Difference between revisions of "Azure Disk"

From UVOO Tech Wiki
Jump to navigation Jump to search
Line 33: Line 33:
 
     --os-type linux
 
     --os-type linux
 
```
 
```
 +
 +
https://github.com/kubernetes-sigs/azuredisk-csi-driver/tree/master/charts

Revision as of 21:43, 12 November 2021

https://blog.mycloudit.com/4-differences-between-the-azure-vm-storage-types

https://docs.microsoft.com/en-us/azure/virtual-machines/windows/convert-disk-storage

Restore disk

https://docs.microsoft.com/en-us/azure/virtual-machines/linux/tutorial-manage-disks#take-a-disk-snapshot

#Create snapshot
osdiskid=$(az vm show \
   -g myResourceGroupDisk \
   -n myVM \
   --query "storageProfile.osDisk.managedDisk.id" \
   -o tsv)

az snapshot create \
    --resource-group myResourceGroupDisk \
    --source "$osdiskid" \
    --name osDisk-backup

#Create disk from snapshot
az disk create \
   --resource-group myResourceGroupDisk \
   --name mySnapshotDisk \
   --source osDisk-backup

#Create a new virtual machine from the snapshot disk.
az vm create \
    --resource-group myResourceGroupDisk \
    --name myVM \
    --attach-os-disk mySnapshotDisk \
    --os-type linux

https://github.com/kubernetes-sigs/azuredisk-csi-driver/tree/master/charts