On the VM (Linux)
- Test Everything
- Review configurations
- Clean up – get rid of everything that you don’t need (for RPM based Linux): du -sh /home/*; ls -lh /tmp; yum clean all; find . -type f -size +100M -exec ls -lh {} \;
- Zero the drive space — on linux: cat /dev/zero > zero.fill;sync;sleep 1;sync;rm -f zero.fill
In VMware Fusion (Mac)
- Open the Settings UI for the Virtual machine, select the hard drive & click Clean Up Disk
- Select the VM in Virtual Machine Library; under select Virtual Machine -> Downgrade Virtual Machine
- Copy the vmx & vmdk files
On the Machine with VMware Converter
- # vmware-converter-client
- Click Convert Machine
- Set Source-Type: VMware Workstation or Other VMware virtual machine
- Select the vmx file
- Click next
- Set Destination Type: Virtual appliance
- Enter the VM Name
- Enter the Directory to save the new virtual appliance
- Set the Distribution Format: Single File (*.ova)
- Click next
- Edit the Product Information and other text
- Click next
- Review
- Click Finish
- Copy ova file
On other VMware machines
- Test ova file
RELEASE
PARTY
Ref:
http://www.howtoforge.com/how-to-shrink-vmware-virtual-disk-files-vmdk