Using a snapshot is a good way to duplicate an Azure virtual machine relatively quickly. The entire process of taking a snapshot and deploying a new VM from that snapshot takes less than 15 minutes to complete – and it can all be done right from PowerShell.
What’s that, you say? You don’t know how? Well, in that case, read on – and I’ll walk you through the process right here.
The following exercises show you how to take a snapshot (MySnapshot) of the OS disk of an existing virtual machine (MyVM), how to convert the snapshot to a managed disk (MyOSDisk), and how to deploy another virtual machine (MyVM2) using the managed disk created from the snapshot. We’ll walk through the preparation for taking the snapshot, retrieving the configuration of the virtual machine being snapped, creating the snapshot configuration, taking the snapshot, converting the snapshot to a managed disk, and then deploying a new virtual machine using the newly-created managed disk.