Score:0

Azure snapshots as VM templates

gb flag

I have multiple users that all need to use almost identical VMs - the VMs should have the same OS and same software installed. I can create one VM, set it up properly and create a snapshot that others can use to start their VMs from.

Is this the best Azure way? Or is there a better way? I'm mostly worried about updating the base snapshot when there's a new version of the software or OS.a

ng flag
Do you need persistence of data on these VM's, or can they be destroyed and recreated whenever?
gb flag
Once a VM is created from the snapshot, it needs to persist data.
Score:1
ng flag

Given you need persistence, then you need to use VM's rather than VM scale sets, which might have made the updating easier.

The approach you are going with currently will work to initially create the VM, but as you pointed out, updates are going to be a pain. Once the VM is created it is effectively independent of the snapshot and you will need to update each VM separately. If that is just OS updates it's not so bad, but if you want to do software and configuration updates then it can become painful.

To deal with this there are a few options:

  1. Instead of using snapshots, create custom images. You can autoamte this using the VM image builder. When you want to do an update, build an updated image then roll it out to your VMs
  2. Create VM's as a one off from the snapshot, then move your update management outside the VM, using things like Azure Update Management for OS patches, and configuration management tools like Puppet, Chef, Ansible for software management
  3. Persist the user data on separate disks in the VM, not the OS or data disk. When you want to update create a new snapshot, destroy the old VM, create a new one and attach the disk.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.