Member-only story
Create an Unattached Azure osDisk from Existing Snapshot
Azure | CLI | Snapshots | Portal | osDisk | DataDisk | VHD
1 min readApr 27, 2021
I recently had some issues with a VHD where the osDisk would not allow me in via RDP. That is the reason I am writing this article. This article will cover how to create an Unattached Managed osDisk that can be attached to a new Virtual Machine.
Step 1. Create a Snapshot
Create a Snapshot from existing Virtual Machine osDisk or dataDisk:
az snapshot create --resource-group <resource-group-name> --source "<source id of the disk>" --name <name-of-snapshot>
Step 2. Create an Unattached Azure OsDisk from Snapshot
az disk create --resource-group fac-trax-dev --name osdisk-geoserver --source <snapshot-source>
Note: You can add the following attributes:
--size-gb > Identifies the size of the disk
--sku > Identifies the type of storage ex. Premium_LRS
The source is in the format of:
/subscriptions/<subscription id>/resourceGroups/<resource group name>/providers/Microsoft.Compute/disks/<name of osDisk or DataDisk>"
Step 3. Associated the Manage