JHF’s homepage

Just another WordPress weblog
  • rss
  • Home

Compacting a virtualbox volume

admin | March 16, 2009

One nice feature about virtualbox is that volume files only grow up to their size as you use them. However, after a certain time, it can be that a volume containing 1GB of data occupies 8GB on disk.

This is not really related to virtualbox but rather to the way the filesystem is allocating the blocks on the disk : it not necessarilly reuses blocks, so when new ones are allocated, the volume’s size increases.

Decreasing the size of a volume file (compacting) is not that easy. Virtualbox will only “forget” sectors that contain all zero’s. Doing this on linux is straight forward (dd), but there is no Windows equivalent.

In fact there is ! run sdelete -c C:\ to zero all available blocks on the disk. It will write to all free blocks, therefore the size of the volume will reach the maximum. It will also take some time.

Then, the volume file can be compacted :

VBoxManage modifyvdi <path to VDI file> compact
Categories
Linux
Tags
Linux, Virtualbox
Comments rss
Comments rss
Trackback
Trackback

« Emacs and PHP/HTML mode Another way of managing passwords »

Leave a comment

You can use these tags : <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Tags

Apache Apps Bash C Crypto Emacs Linux Unix Virtualbox webdesign

Recent posts

  • Last call for linux und ich contest
  • Firefox not saving passwords
  • Install debian squeeze on a sheevaplug
  • Trouble with SATA-II disk
  • Change in apache vhosts files’ format!!

Pages

  • About
  • Deutsch
    • CV
  • English
  • Français
    • CV
    • MFC
  • Impressum
  • Linux
    • Crypto
    • Linux User Group
  • Photography
    • Fine art

Archives

Categories

  • Hardware (2)
  • Linux (11)
  • Uncategorized (1)

Meta

  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org

Blogroll

  • Development Blog
  • Documentation
  • Plugins
  • Suggest Ideas
  • Support Forum
  • Themes
  • WordPress Planet
rss Comments rss valid xhtml 1.1 design by jide powered by Wordpress get firefox