Page 1 of 1

Virtual Disk size after a re-install

Posted: 20. Aug 2010, 07:27
by MrBiggz
Hi!

I hosed my XP guest and I thought I kept a good copy of the virtual disk around to copy on top of it. But .. some where along the line I guess I removed it.

The virtual disk I originally created was 40G dynamic. At the time it's 13.5G but with a fresh install of XP on it there's no way it can take up 13.5G. Is there any way to shrink this back down so it reflect the proper amount of space?

Secondly. Should I use differencing disks? I've never played with them before but read about them in the document a little bit. Am I right in assuming that I could make a virtual disk with about 3G and then install XP to it (this would be the parent) and then make another 25G virtual disk that is the differencing disk. And periodically back that up so if it gets hosed I can revert back to and old copy? Just a thought.

I'm all ears! Thanks for the help in advance!

p.s. If I posted this in the wrong secion, sorry! :oops:

Re: Virtual Disk size after a re-install

Posted: 20. Aug 2010, 09:27
by nalmir
Have you read the manual?
"In addition, the modifyhd --compact command can be used to compact disk images,
i.e. remove blocks that only contains zeroes. For this operation to be effective,
it is required to zero out free space in the guest system using a suitable software tool.
Microsoft provides the sdelete tool for Windows guests. Execute sdelete -c in the
guest to zero the free disk space before compressing the virtual disk image. Compaction
works both for base images and for diff images created as part of a snapshot."

Re: Virtual Disk size after a re-install

Posted: 20. Aug 2010, 16:02
by MrBiggz
nalmir,

Thanks for responding. I try to read it. Although what I'm searching for and the words used to exactly describe it diff. Thanks for pointing this out!

Re: Virtual Disk size after a re-install

Posted: 20. Aug 2010, 23:44
by kebabbert
Regarding your question about differencing disks. Read this link
http://forums.virtualbox.org/viewtopic.php?f=1&t=33578

Re: Virtual Disk size after a re-install

Posted: 21. Aug 2010, 11:49
by mpack
MrBiggz wrote:Is there any way to shrink this back down so it reflect the proper amount of space?
CloneVDI tool, be sure to set the compact option.

Sdelete followed by VBoxManage still works, but it's very slow by comparison.