How To Create An Azure Virtual Machine From A Managed Operating System Disk

Create a virtual machine using an existing managed OS disk with PowerShell.

This script creates a virtual machine by attaching an existing managed disk as OS disk. Use this script in preceding scenarios:

Create a VM from an existing managed OS disk that was copied from a managed disk in different subscription Create a VM from an existing managed disk that was created from a specialized VHD file Create a VM from an existing managed OS disk that was created from a snapshot

Pre-requisites Requires the Azure PowerShell module version 5.1.1 or later. Requires an Azure subscription.

Prerequisites include: Azure subscription Azure Resource Group Managed OS disk Azure Virtual Network