• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Yellow Bricks

by Duncan Epping

  • Home
  • ESXTOP
  • Stickers/Shirts
  • Privacy Policy
  • About
  • Show Search
Hide Search

Deleting snapshots when everything else failse…

Duncan Epping · Jun 23, 2008 ·

The common mis perception of the term “snapshot”, related to VMware, can cause huge problems. I’ve spend a lot of time the last years solving snapshot problems. For once and for all, a snapshot isn’t a static situation like a clone is. A snapshot can best be compared to a redo log, although technically it isn’t because it’s just a bitmap of disk sectors that changed. When you create a snapshot you only create a small “differences” file (*.delta.vmdk) which will contain all the differences until you delete or revert. Please remember reverting(go to) doesn’t delete the differences file! And this file can grow very fast depending on how many changes are made on the disk.

Another thing that people don’t know is the way “delete all” works, but I’ve already outlined that a while ago in a blog.

When you’ve got for instance a 10 levels deep nested snapshot tree with a very large last snapshot it would almost be impossible to press delete all because it will take up a lot of disk space. It would consume a lot of time doing a “delete” for every snapshot, and still it would always take up additional diskspace.

Another way to remove the snapshot is just by cloning the VM to another Datastore. This way you don’t need the extra disk space on the same datastore, and it might be a good moment to consider re-loadbalancing your lun’s again. But for some weird reason this doesn’t always commit your snapshot. VMware just posted a nice KB article on how do the same using the vmkfstools command.

If a clone through the VMware Infrastructure 3 client did not commit the snapshots; you can try to export the disk with vmkfstools to recreate the virtual machine:

1. Run the following command to create a directory for the new disk:

[[email protected] RHEL5]# mkdir /vmfs/volumes/openfiler-iscsi/new_RHEL5

2. Run the following command to point vmkfstools at the last snapshot file:

[[email protected] RHEL5]# vmkfstools -i RHEL5-000001.vmdk /vmfs/volumes/openfiler
iscsi/new_RHEL5/new_RHEL5.vmdk

Destination disk format: VMFS thick
Cloning disk ‘RHEL5-000001.vmdk’…
Clone: 3% done
[[email protected] RHEL5]#

3. Recreate the machine. Select Use an existing virtual disk.

Share it:

  • Tweet

Related

Server 3.0.x, 3.5, ESX, Howto, VMware

Reader Interactions

Comments

  1. Rich says

    25 June, 2008 at 23:11

    Thanks Duncan.

    I guess we both have snapshots on the brain these days!
    http://vmetc.com/2008/06/25/search-for-vm-snapshots-from-the-service-console/

Primary Sidebar

About the author

Duncan Epping is a Chief Technologist in the Office of CTO of the Cloud Platform BU at VMware. He is a VCDX (# 007), the author of the "vSAN Deep Dive", the “vSphere Clustering Technical Deep Dive” series, and the host of the "Unexplored Territory" podcast.

Upcoming Events

29-08-2022 – VMware Explore US
07-11-2022 – VMware Explore EMEA
17-11-2022 – VMUG UK
….

Recommended Reads

Sponsors

Want to support Yellow-Bricks? Buy an advert!

Advertisements

Copyright Yellow-Bricks.com © 2022 · Log in