The Holy Java

Building the right thing, building it right, fast

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:

  1. Join the snapshot and the parent disk into one: use the free VMWare Converter (see – 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!!!).
  2. 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”

  1. Jason said

    Hi At work we are using a VM that has a prealloacted HDD and about 20 snapshots. I have managed to change the original HDD to a Growable one. Now i need to shrink it.
    I do not have the permissio to create VM’s so i am unable to test out theories

    Please help answer these questions for me
    1.) The method you have used in your post, will it delete the snapshots? or will they still be avaliable after im done?
    2.) …mmm i guess that the only question for now

Sorry, the comment form is closed at this time.

%d bloggers like this: