VMware Cloud Community
timbo475
Contributor
Contributor
Jump to solution

Snapshots - How to save machine state before deleting

Hi,

We have a production VM on a ESXi5 host cluster, which was snapshotted a while ago (nearly 2 years?). Obviously I want to get rid of the snapshot as it shouldn't have been left so long, and after a bit of research, I'm fairly sure deleting will do what I want (I'd like to retain the VM as it currently is with all changes since snapshot).

However, I also want to make all possible precautions before I do this because if the changes are discarded (i.e. if returned to original state before the change) it will create a fair amount of work, and I'd like to preserve the VM as it currently is before deleting the shapshot.

Is this possible? I've read cloning will not clone the snapshot files themselves but will the cloned VM contain the changes since shapshot was created or will it be the VM prior to the snapshot? If the clone itself is a copy of the current running machine (changes since snapshot included) this might be an OK option.

I'm thinking another solution could be to shutdown the VM and copy the actual VMWare files somewhere - would this work?

I'm probably being a little bit overcautious with this but I'm a little nervous about snapshots and want to make sure I've got all bases covered.....just in case........

The VM is backed-up so as a last resort I can restore from backup but I'd rather avoid that route if possible.

Cheers,

Tim

0 Kudos
1 Solution

Accepted Solutions
npadmani
Virtuoso
Virtuoso
Jump to solution

is this just one snapshot associated with your VM which is 2 years old?

what you are thinking is right about Deleting it. If you simply initiate Delete operation of that snapshot, it will merge delta with base disk (since you snapshot is very old, size of your delta is probably very big, in this case this operation could take really long time to finish), and resultant VM will be your latest VM with all the changes made after taking that snapshot too.

At the time of Deleting snapshot, you also got to remember that there should be enough space available in your datastore where you VM is residing, if possible to achieve downtime, then do deletion of the snapshot while VM is powered off, or try to initiate process during off peak hours.

I am sure you might have come across following KB already as you have done enough research on the subject

VMware KB: Delete all Snapshots and Consolidate Snapshots feature FAQ

I've read cloning will not clone the snapshot files themselves but will the cloned VM contain the changes since shapshot was created or will it be the VM prior to the snapshot? If the clone itself is a copy of the current running machine (changes since snapshot included) this might be an OK option.

Cloning will also do the job. Yes cloned VM will take blocks from Base disk and Delta disk and merge them while cloning so resultant VM will be having only Base disk with all the changes that you have made after taking snapshot.

I'm thinking another solution could be to shutdown the VM and copy the actual VMWare files somewhere - would this work?

The VM is backed-up so as a last resort I can restore from backup but I'd rather avoid that route if possible.

Keep copy of all the files of this VM somewhere safe, would be advisable for sure but at the same time if you have Image level successful backup of this VM done already then nothing to be worried about. Your VM can be restored from that successful back. If you wish to test restore, why don't you restore that VM on an isolated network and do bit of a testing for your satisfaction before you proceed with snapshot deletion.

Note: Please don't press Revert to, this will put your VM back to 2 years back state at the time of snapshot creation.

Narendra Padmani VCIX6-DCV | VCIX7-CMA | VCI | TOGAF 9 Certified

View solution in original post

0 Kudos
3 Replies
npadmani
Virtuoso
Virtuoso
Jump to solution

is this just one snapshot associated with your VM which is 2 years old?

what you are thinking is right about Deleting it. If you simply initiate Delete operation of that snapshot, it will merge delta with base disk (since you snapshot is very old, size of your delta is probably very big, in this case this operation could take really long time to finish), and resultant VM will be your latest VM with all the changes made after taking that snapshot too.

At the time of Deleting snapshot, you also got to remember that there should be enough space available in your datastore where you VM is residing, if possible to achieve downtime, then do deletion of the snapshot while VM is powered off, or try to initiate process during off peak hours.

I am sure you might have come across following KB already as you have done enough research on the subject

VMware KB: Delete all Snapshots and Consolidate Snapshots feature FAQ

I've read cloning will not clone the snapshot files themselves but will the cloned VM contain the changes since shapshot was created or will it be the VM prior to the snapshot? If the clone itself is a copy of the current running machine (changes since snapshot included) this might be an OK option.

Cloning will also do the job. Yes cloned VM will take blocks from Base disk and Delta disk and merge them while cloning so resultant VM will be having only Base disk with all the changes that you have made after taking snapshot.

I'm thinking another solution could be to shutdown the VM and copy the actual VMWare files somewhere - would this work?

The VM is backed-up so as a last resort I can restore from backup but I'd rather avoid that route if possible.

Keep copy of all the files of this VM somewhere safe, would be advisable for sure but at the same time if you have Image level successful backup of this VM done already then nothing to be worried about. Your VM can be restored from that successful back. If you wish to test restore, why don't you restore that VM on an isolated network and do bit of a testing for your satisfaction before you proceed with snapshot deletion.

Note: Please don't press Revert to, this will put your VM back to 2 years back state at the time of snapshot creation.

Narendra Padmani VCIX6-DCV | VCIX7-CMA | VCI | TOGAF 9 Certified
0 Kudos
timbo475
Contributor
Contributor
Jump to solution

Thanks for the reply

is this just one snapshot associated with your VM which is 2 years old?

Unfortunately yes - I've taken over administration of this VM and it looks like someone set a snapshot and forgot about it.

At the time of Deleting snapshot, you also got to remember that there should be enough space available in your datastore where you VM is residing, if possible to achieve downtime, then do deletion of the snapshot while VM is powered off, or try to initiate process during off peak hours.

There's enough space in the datastore but I'm unsure about the virtual disk of this VM - do you mean datastore or virtual disk?

If cloning essentially merges the changes then that's probably a good fallback copy as that's what I'm after anyway.

As far as backups go, I don't think they're image-level backups - they're more likely to be file level backups of the VM. However, if the clone works the way you described, then I probably don't need to copy the vmware files themselves as the clone will achieve what I want.

I don't think 'revert' is an option - there is only 'go to' and 'delete' (and 'delete all').

0 Kudos
npadmani
Virtuoso
Virtuoso
Jump to solution

do you mean datastore or virtual disk?

Datastore

I don't think 'revert' is an option - there is only 'go to' and 'delete' (and 'delete all').

That's because you are using vSphere client based Snapshot manager, where button label is 'Go To', the same in vSphere Web client based snapshot manger is 'Revert To'.

job is same anyway.

and yes, if backup is not VM image level, then keep a clone copy of the same VM. Would serve the purpose.

Narendra Padmani VCIX6-DCV | VCIX7-CMA | VCI | TOGAF 9 Certified