VMware Cloud Community
arasm
Contributor
Contributor
Jump to solution

ESXi 4.1.0_b345043 Consolidating Snapshots question

vmware_snapshot_q.png

Hi all,

We had a crash situation with one of our servers, and the backup admin took a snapshot of the system as it was, then rolled it back to an earlier snapshot (PRIOR TO MAIN 6_12_13).

We 've managed to since correct the problems with the server, and are happy with the way things are as it is. However, before I do what I believe is the correct method, I wanted to ensure:

*) If I hit the "Delete All" button: does that mean it will delete ALL snapshots on the server and flatten the image down to IT'S CURRENT RUNNING STATE with no snapshots? This is what I would like at this point (as I call it, flattening/solidifying/consolidating the server image to a master state)

*) As this is a PROD server, I need to schedule some downtime (as it's an ESXi box) Is there a way to capture off the "before hard drive crash" snapshot to a separate vmdk of it's own, so I can mount it off-site later on to do some forensics on my own time? (this is more of a wish at this point)

TIA for all the answers! Smiley Happy

--vtk

Reply
0 Kudos
1 Solution

Accepted Solutions
admin
Immortal
Immortal
Jump to solution

I just saw this one of old post. where same issue was resolved..i hope it will help you.

The consolidate option can be used for orphaned snapshots -

>> When initiating Delete or DeleteAll snapshots, the snapshot details are deleted from Snapshot Manager, then the snapshot files are consolidated and merged to another snapshot file or to the virtual machine parent disk. If the consolidation fails, there were no snapshots shown in the Snapshot Manager, but the snapshot files were still being used on the datastore. This can cause the datastore to run out of space.

>> In vSphere 5.0, you are now informed when a virtual machine snapshot consolidation fails. Administrators can now initiate a consolidate operation from the vSphere Client, rather than from via the ESX command-line. The vSphere Client now shows a Configuration Issue warning in the Summary tab when a virtual machine snapshot consolidation fails.
Note: The ESXi host that the virtual machine is registered on must be an ESXi 5.0 host.

http://kb.vmware.com/kb/2003638

View solution in original post

Reply
0 Kudos
7 Replies
arasm
Contributor
Contributor
Jump to solution

^^^ BUMP^^^

Apologies for bumping, but I really would appreciate an expert confirmation! Smiley Happy

TIA!

Reply
0 Kudos
admin
Immortal
Immortal
Jump to solution

I just saw this one of old post. where same issue was resolved..i hope it will help you.

The consolidate option can be used for orphaned snapshots -

>> When initiating Delete or DeleteAll snapshots, the snapshot details are deleted from Snapshot Manager, then the snapshot files are consolidated and merged to another snapshot file or to the virtual machine parent disk. If the consolidation fails, there were no snapshots shown in the Snapshot Manager, but the snapshot files were still being used on the datastore. This can cause the datastore to run out of space.

>> In vSphere 5.0, you are now informed when a virtual machine snapshot consolidation fails. Administrators can now initiate a consolidate operation from the vSphere Client, rather than from via the ESX command-line. The vSphere Client now shows a Configuration Issue warning in the Summary tab when a virtual machine snapshot consolidation fails.
Note: The ESXi host that the virtual machine is registered on must be an ESXi 5.0 host.

http://kb.vmware.com/kb/2003638

Reply
0 Kudos
a_p_
Leadership
Leadership
Jump to solution

Delete All will merge the current state (You are here) and its parent snapshots - if any - into the base virtual disk and it will also delete other unused snapshot files which are not part of the active chain.

To preserve the crash state you may want to clone the virtual disk including the appropriate snapshot. First you need to find out which snapshot file belongs to "Before Hard Drive Crash". With the two snapshot's you have it should be the older one of the <vmname>-00000x.vmdk files in the VM's folder. You can clone the virtual disk using the vmkfstools command:

vmkfstools -i /vmfs/volumes/source-datasatore/source-folder/vmname-00000x.vmdk /vmfs/volumes/target-datasatore/target-folder/clone-of-disk.vmdk

Make sure the target folder exists. To save disk space you may append -d thin to the command.

André

arasm
Contributor
Contributor
Jump to solution

THANKS! :smileygrin:

Reply
0 Kudos
arasm
Contributor
Contributor
Jump to solution

You sir, are awesome! I was able to do exactly as you outlined and have saved the day! :smileygrin:

Reply
0 Kudos
RoastChicken
Contributor
Contributor
Jump to solution

vmkfstools -i /vmfs/volumes/source-datasatore/source-folder/vmname-00000x.vmdk /vmfs/volumes/target-datasatore/target-folder/clone-of-disk.vmdk

This command consolidates the snapshots into one vmdk, right? Can it be done while the VM is powered on?

Cheers.

Reply
0 Kudos
RoastChicken
Contributor
Contributor
Jump to solution

I have been searching the VMware knowledge base and I found this VMware KB: Consolidating snapshots in ESX/ESXi 3.x and 4.x that refers to this youtube video How to consolidate a snapshot in VMware ESX when there are virtual machine errors - YouTube

I have been told this command only clones and does not consolidate?

PS: The parentCID of the delta 0001 matches the CID of the original vmdk.

Cheers

Reply
0 Kudos