Once a snapshot has been taken of an existing virtual machine, the snapshot can be used to create a new virtual machine. In this section, we will cover the deployment of a new virtual machine, using a snapshot as the OS disk for the new virtual machine.
The process of deploying a new virtual machine, using a snapshot, includes a few different steps. The first step is to load up required variables with information about the snapshot and the disk config for the new virtual machine.
Once the variables are loaded, the configuration for the new virtual machine needs to be initialized. This process includes setting the virtual machine size, deploying a public IP address, provisioning an NIC, and telling the process which virtual network to deploy the virtual machine to.
After initializing the configuration for the new virtual machine, the virtual machine...