Virtual Disk size after a re-install

This is for discussing general topics about how to use VirtualBox.
Post Reply
MrBiggz
Posts: 11
Joined: 19. Jan 2008, 22:40
Primary OS: MS Windows Vista
VBox Version: OSE other
Guest OSses: XP Pro, Ubuntu
Location: Indianapolis
Contact:

Virtual Disk size after a re-install

Post 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:
nalmir
Posts: 15
Joined: 3. Aug 2010, 16:27
Primary OS: MS Windows Vista
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: win 2003 server 32bit and 64 bit

Re: Virtual Disk size after a re-install

Post 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."
MrBiggz
Posts: 11
Joined: 19. Jan 2008, 22:40
Primary OS: MS Windows Vista
VBox Version: OSE other
Guest OSses: XP Pro, Ubuntu
Location: Indianapolis
Contact:

Re: Virtual Disk size after a re-install

Post 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!
kebabbert
Volunteer
Posts: 321
Joined: 31. May 2008, 10:00
Primary OS: OpenSolaris 11
VBox Version: OSE other
Guest OSses: WinXP, RedHat, Ubuntu

Re: Virtual Disk size after a re-install

Post by kebabbert »

Regarding your question about differencing disks. Read this link
http://forums.virtualbox.org/viewtopic.php?f=1&t=33578
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Virtual Disk size after a re-install

Post 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.
Post Reply