Getting rid of disk-space hungry snapshots on VMware Server isn't a push-button task and requires a bit of creativity. This tip will offer some creative ideas for removing a snapshot chain in VMware Server in order to reclaim lost disk space.
Both VMware Workstation 5 and ESX 3 have snapshot managers that allow the creation of many snapshots. A series of snapshots is known as a snapshot chain, and each member of this chain is required, or else the chain is broken and the virtual machine (VM) will no longer function.
The snapshot managers in Workstation and ESX can remove older snapshots by collapsing the delta information back into the previous snapshot until at last there are no more snapshots. However, many people forget to delete these snapshots before moving a VM from Workstation or ESX to VMware Server, and VMware Server has no solution for deleting beyond the most recent snapshot. Many snapshots can consume large amounts of disk space; and because of the way snapshot chains work, it is not possible to simply delete the snapshot files.
Inside snapshots
To understand why it is not possible to simply remove snapshot files that belong to a snapshot chain requires a basic understanding of how snapshots work. When a snapshot is created in VMware Workstation, ESX, or VMware Server (Server) a new virtual hard disk file (VMDK) is created. All subsequent write operations are written to this new file; these are delta operations off of either the VM's original VMDK file or the previous snapshot.
The VM continues to function normally because, even though write operations are being flushed to a delta file, the underlying virtualization software is aware of the previous VMDK files. So, the snapshots that make up the snapshot chain
To continue reading for free, register below or login
To read more you must become a member of SearchVMware.com
');
// -->

and will read information from them as if all the data was grouped in a single container.
However, if any member of this snapshot chain were to be deleted then the virtual machine may be rendered unusable. Both Workstation's and ESX's snapshot managers can remove older snapshots by recombining these delta writes back into the previous snapshot or finally into the VM's original VMDK file. VMware Server does not possess the ability to create more than one snapshot at any given time and therefore it cannot remove more than the most recent snapshot.
Workstation 5 workarounds
The easiest way to recombine these snapshots into a single virtual hard disk file is to download a 30-day trial version of VMware Workstation 5. Using Workstation it is possible to clone a virtual hard disk or collapse a snapshot chain back to one virtual hard disk file. There may be cases though where Workstation is not an option, and since members of a snapshot chain cannot simply be erased, a little creativity is required.
These steps were validated by removing the snapshots from a VM running Windows XP SP2, but they will work for any guest operating system (OS) as long as the "dd" program has been ported to that OS.
If there any questions feel free to e-mail this author at editor@searchservervirtualization.com
About the author
Andrew Kutz is deeply embedded in the dark, dangerous world of virtualization. He is a Microsoft Certified Solutions Developer (MCSD), a SANS/GIAC Certified Windows Security Administrator (GCWN), and a VMware Certified Professional (VCP) in VI3. Andrew also recently submitted a security practical entitled "Sudo for Windows (sudowin)" to the SANS organization where it was accepted, thereby granting Andrew SANS GOLD status.