kjdfhaueiase
Enthusiast
Enthusiast

I made the same mistake of trying to keep snapshots on the same machine with the goal of creating other virtual machines.

Goals:

-Maintain one OS system

-Multiple software configurations are snapshots

-Simply clone from snapshots when I quickly need a variation

-Save as template to keep myself (or someone else!) from accidentally changing the template and ruining it.

Our idea doesn't work because of several reasons:

-VMware decided to make templates single focused (quickly create another exact vm for quick scaling and automation)

-Thus, templates should not contain snapshots. They slow down operations like this.

-In fact, snapshots do slow things down. Infrastructure is geared toward speed.

-You and I are probably both doing some kind of testing functions whether it be for roll out, software testing, etc.

Here's what you can do:

-Take the VM you worked so hard on and do the following one snapshot at a time:

1) Restore to snapshot

2) If snapshot is running state, I recommend then you shutdown (no need copying memory if you don't need to)

3) Clone now to a new machine. That machine should be labeled to reflect state of the snapshot you have.

4) When cloning, I recommend using the opportunity to switch to "Thin provision" when chosing storage location. This varies by version of vSphere. Pick shared datastore if it will run on different hosts

5) Convert the cloned VM to a template. Save it in a folder named by template function with other similar templates

That's it!

If you like the original base image, shut down the original machine and delete all the snapshots. Make it into a template related to the base image.

One person mentioned that you can just save it as a VM and clone from the snapshots. On vSphere you need to do that with the APIs and there are some powershell scripts that can help you do that. It is NOT supported in the vSphere UI. Workstation and Fusion let you do this, but I find that if I migrate the VM down to fusion or workstation (yes you can do that by logging into vcenter from those products!), the snapshots go "bye bye.

If you decide to leave the virtual machine around with snapshots (not a template) for the purpose of cloning, I would rename it to something like "If you touch this VM I will first snapshot you a thousand times, and then vmotion you to Antarctica". This would potentially ward off (or incite) co-workers to modify it.

Honestly, the snapshot concept not good for this. If you need to update the base image with windows updates or other software updates, you will have to recreate all of the snapshot states anyway. I haven't come up with a way to make those things propagate.

Linked Clones are a cool concept (theoretically you could update the base and the linked virtual machines would all get the benefit) but in practice, this only works with Horizon View Composer/Virtual Desktops. It's probably not what you're looking for. We just need to bite the bullet and run windows update on every template we make once a month at least.

Reply
0 Kudos