Hard disk management

Discussions related to using VirtualBox on Windows hosts.
Post Reply
claudio2574
Posts: 3
Joined: 28. Apr 2009, 19:35
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: w2003,suse

Hard disk management

Post by claudio2574 »

I'm running XP as host and Win2003 as client using VBox 2.1.0
Everything is fine. The client has 2 dynamic hard disks (C: 20 GB and D: 100 GB)
Within client OS, disk C: is using 5.79 GB, but the size of the c.vdi file in the host system is more than 10 GB.
I wonder why this happens and, more important, if there is any way to shrink the .vdi file.
This could save time when backing up the client OS.
May be this topic has been already discussed, but the "search" option of the site tells me to "try later" (???)
Thank you all
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: Hard disk management

Post by Sasquatch »

The new 2.2.2 version has the VBoxManage modifyhd --compact feature restored, so you can shrink the VDI again. When upgrading, consult the VirtualBox FAQ for how to do that.

The VDI increases in size, because when you add files and then remove them again, the space isn't brought back.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
claudio2574
Posts: 3
Joined: 28. Apr 2009, 19:35
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: w2003,suse

Re: Hard disk management

Post by claudio2574 »

Sasquatch wrote:The new 2.2.2 version ....
Thanks for the quick reply.

Hmmm, my VBox suggests me to upgrade to 2.1.4. (I did not do because I prefer a stable environment, like mine has been till now). Strange that the "check for updates" does not suggest the 2.2.2. Does it mean that I need more than one-step upgrade?
According to the FAQ, the upgrade does not need an uninstall+install procedure, but if I need more steps probably it is faster to backup the .vdi and .xml files, uninstall the 2.1.0 and start a new 2.2.2 . If needed, I can easily change the HD identifiers within the XML file.
Or not?

Other chance: I have a spare Win2003 system (used for backup purposes only). May be I can install the 2.2.2 over there, do the shrink of .vdi files, then move back them to the XP host. Is it correct or there are compatibility issues?

(Don't think I'm mad to use the XP as host: I need some USB hardware that has no support within 2003.)
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: Hard disk management

Post by Sasquatch »

The upgrade can go in one step. From 2.1.x to 2.2.x is no issue.

Your second option, to install 2.2.2 on a different machine will work too. Takes a bit more time due to transferring of the files, but if you think it's worth it, do it.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
claudio2574
Posts: 3
Joined: 28. Apr 2009, 19:35
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: w2003,suse

Re: Hard disk management

Post by claudio2574 »

Well, I made the upgrade to vbox 2.2.2, run the sdelete utility within the client win2003 OS flawlessly, then went back to the host system to run:
VBoxmanage modifyhd d:[....]c.vdi --compact
I got
0%...
and nothing else. The size of the vdi disk remained unchanged.
I see that other users had even worst problem with the --compact option. For example:
http://forums.virtualbox.org/viewtopic.php?f=6&t=17053
Much safer to stay with a big .vdi file. I think I won't use the compact option any more, until the forum reports that it is bugless.
Thanks anyway
Claudio
Post Reply