In general, 3 steps are required to achieve this task
1) Disk cleanup / Defrag the hard drive on guest system
2) Execute "sdelete -c" to zero the free disk space before compressing the virtual disk image (sdelete tool was provided by Microsoft) on guest system
> sdelete -c [drive letter]3) Compact the virtual disk image
VirtualBox user
Execute VBoxManage command on host system
$ VBoxManage modifyhd [filename] --compactVMWare user
Shrinking needs to be done on guest system. Complete the first two steps above then:
1) Open VMWare tools by right click VM icon in system tray
2) Go to Shrink tab, under supported partitions, check the mount point checkbox

VMWare Tools Properties
3) Click "Prepare to shrink" and once ready, click "Yes" to proceed

Preparing shrink process

Ready to go

Shrinking in progress
If everything working as expected, virtual disk usage on both guest and host should be ~same
Note:
Test environment
Host: Linux Mint 10 64-bit
VirtualBox guest: Windows Server 2003 32-bit
VMWare guest: Windows 7 Profesional 64-bit
No comments:
Post a Comment