Creating a new Azure VM from OsDisk snapshot in Azure

Symptoms

Creating a new Azure VM based on your SoftNAS current root volume could be a fast for recovery or having a DR site with the same configurations.

Purpose

This article allows you to create a snapshot of your OS Disk and how to launch a new Azure VM by creating a new OS disk.

Resolution


Please follow the step by step guide below to create a snapshot of the OS disk and launch a new VM.

  1. SSH to your machine and by using the root privileges remove the /etc/udev/rules.d/70-persistent-net.rules file as below



  2. Go to Azure portal, select the SoftNAS VM, navigate to the Disks and select the OS Disk. It is recommended to create a snapshot in VM stopped state.



  3. Click on Create snapshot button and a window will appear like the below image. Just fill-up the information and proceed to create. Please remember to choose Full - make a complete read-only copy of the selected disk before proceeding.



  4. Now try to create a new disk from the newly created snapshot by filling up all the required fields as shown below



  5. Find the newly created Disk and select Create VM. Fill up all the required information and from the Review + create section download template for automation. You will not be able to create a new VM as it requires plan information to be included prior to launch successfully a new VM. Just download the template and abort. After downloading the template you should have two files parameters.json and template.json inside the template.zip file



  6. From the Azure portal search box search for template deployment and select deploy using a custom template and click on Build your own template in the editor.