Shrinking vmware instancesPosted: February 12, 2009
Let’s say you have several vmware instances you don’t use currently but have to keep it for future. What about shrinking their size, so they don’t take so much size on preciouse laptop HD ?
This snippet is taken from 41 technologies
- First backup your guest os disk image and other files (just in case something goes wrong) + make sure you have plenty of spare disk space on your harddrive.
- Start Windows guest OS in VMWare Fusion and login as administrator
- Clean up & defrag guest OS disk image from within guest OS
* Delete all unused files, empty your trash can, delete your browser cache etc.
* Defragment your guest OS (f.x. using “defrag c:” in the cmd prompt).
- Zero out unused disk space in guest OS disk image
* Download Mark Russinovich’s disk erase tool SDelete v1.51+ and place it on the local guest drive (*1).
* From a command prompt navigate to where you saved the above delete tool and write “sdelete -c c:”, which will clear all free disk space
- Close guest OS and VMWare
* Shutdown your Windows guest OS.
* Quit VMWare fusion
- Shrink disk image using VMWare’s diskTool
* Navigate to the VMWare Fusion tools directory. E.g. type “cd /Applications/VMware Fusion.app/Contents/MacOS”
* Run VMWare Fusion’s diskTool command with the shrink option “-k” to compact your virtual drive (*.vmdk). E.g. type “./diskTool -k 0 full-path-to-your-virtual-desk-image.vmdk”. (*2)
If you need more, read whole article on 41 technologies it includes also suggestion if you use snapshots.