VMWare: Shrink image even though it’s a snapshot
Posted by Jakub Holý on August 21, 2007
I needed to shrink a vmware image to save space but it wasn’t possible because it wasn’t an independent disk but a snapshot (rhel3_ws_u4-000001.vmdk etc.) dependant upon the original disk (rhel3_ws_u4-s001.vmdk etc). The steps were:
- Join the snapshot and the parent disk into one: use the free VMWare Converter (see vmware.com) – perform transformation (import+export) from a standalone virt. machine to an stanalone virt. machine; it’s necessary to import all the disk, preserving its size (by selecting “select volumes and resize…” I got an unbootable disk); than check “Create a full clone” and “Allow virtual disk files to grow” (don’t pre-allocate space!!!).
- Shrink: After the successfull conversion run the system and verify that the disk is of the type independant-persistent and perhaps disable snapshots). Iinstall there vmware tools (from the vmware menu while the system is running), run the command vmware-toolbox and in its user interface select “shrink disk”.
One Response to “VMWare: Shrink image even though it’s a snapshot”
Sorry, the comment form is closed at this time.