VMware Cloud Community
timbo475
Contributor
Contributor

Snashots - how to commit safely

Hi,

This might be basic stuff but I haven't really spent much time using snapshots yet so could do with a bit of a hand. We've got a Linux 64-bit VM on an ESXi 3.5 box and the user has createda bunch of snapshots and they'd like to move this to an ESX 3.5 box on a different network (I'm going to use FastSCP for that - again I haven't done this before but it seems quite simple).

They are happy for me to commit the snapshots but after reading around, this can be frought with difficulties. Therefore I'm wondering if it's a good idea to clone the VM before I delete all snapshots (Which as I understand it will commit all the snapshots).

If I do clone the machine, will this clone all the files including snapshots?

Are there any tips for commiting snapshots safely?

Cheers,

Tim

Tags (4)
Reply
0 Kudos
9 Replies
karavinds1
Enthusiast
Enthusiast

Hello,

You may have to delete the snapshot to commit the changes and remove the snapshot files from the storage. However please remember you do not select to remove the snapshot. This will not commit the changes.

Refer these articles for more information

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=100966...

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=100684...

Regards,

Aravind K

If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful

Regards, Aravind K If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful
msemon1
Expert
Expert

Click delete all. This will commit all snapshots to the parent disk. I think you must commit snapshots before cloning. I sometimes make a clone before making snapshots in case something goes bump with the snapshots. Go To or Revert discards all changes from snapshot. Go To allows you to revert to any snapshot in chain.

Mike

Reply
0 Kudos
kjb007
Immortal
Immortal

A clone will create a new vm with a single vmdk file from all of the snapshots. It will not contain any snapshots that are currently on the source virtual machine, only the most current snapshot data.

Comitting a snapshot, means deleting that snapshot. Deletion process committs the data to the parent disk.

-KjB

vExpert/VCP/VCAP vmwise.com / @vmwise -KjB
Reply
0 Kudos
msemon1
Expert
Expert

So If I reverted a VM to a snapshot to discard changes, Could I get rid of the snapshot by cloning?

Reply
0 Kudos
kjb007
Immortal
Immortal

A clone will take the current state of the vm, and the current snapshot. If you revert to a snapshot, and then clone, then you will create a copy of your vm in its current reverted snapshot data state. Remember also, that a clone will create a new vm, and does not modify an existing vm, so your existing snapshots on the original vm will be in tact, but the new vm will have 0 snapshots.

-KjB

vExpert/VCP/VCAP vmwise.com / @vmwise -KjB
msemon1
Expert
Expert

This is probably the desired outcome. If I reverted a VM to a snapshot ,because my change went wonky, I would want not want to run this VM from a snapshot for very long. To keep this VM in it's current state, if I clone it, the new VM keeps the current state and loses the snaphot.

Reply
0 Kudos
kjb007
Immortal
Immortal

That is correct. Technically, since you're always running off of a snapshot, if you revert to a previous snapshot, then your current snapshot gets abandoned, and you start a new snapshot that is linked to the one you were previously connected to.

For example, you are running on a vm, create a snapshot A, and create a 2nd snapshot, B. You are currently running on a snapshot "C", which is linked in that A --> B --> C. If you revert back to Snapshot A, then you are now running : A --> D. If you now choose to delete snapshot "B", then that will actually be a delete, instead of a committ. Since you are not linked on that snapshot chain, you can safely remove that data without worrying about committing it.

Hope that makes sense.

-KjB

vExpert/VCP/VCAP vmwise.com / @vmwise -KjB
Reply
0 Kudos
msemon1
Expert
Expert

That makes sense. It that chain I reverted from D----->A so now I can delete B and C. It broke the chain of snaphsots. If I have just the one snaphot on a VM and revert to A and then clone this VM. The cloned VM should be running only VMDK if I understand correctly. No more snaphots.

Thanks,

Mike

Reply
0 Kudos
kjb007
Immortal
Immortal

That is correct.

-KjB

vExpert/VCP/VCAP vmwise.com / @vmwise -KjB
Reply
0 Kudos