Skip to content

Commit 26ec17c

Browse files
committed
Adding instructions.
1 parent 63502e8 commit 26ec17c

File tree

1 file changed

+32
-5
lines changed

1 file changed

+32
-5
lines changed

articles/virtual-machines/disks-convert-types.md

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ The preview allowing direct switching to Premium SSD v2 disks has some additiona
3636
- Existing disks can only be directly switched to 512 sector size Premium SSD v2 disks.
3737
- You can only perform 40 conversions at the same time per subscription per region.
3838
- If your existing disk is a shared disk, you must detach all VMs before changing to Premium SSD v2.
39-
- If your existing disk is using host caching, you must set it to none before changing to Premium SSD v2.
40-
- If your existing disk is using bursting, you must disable it before changing to Premium SSD v2.
41-
- If your existing disk is using double encryption, you must switch to one of the single encryption options before changing to Premium SSD v2.
39+
- If your existing disk is using host caching, you must [set it to none](#disable-host-caching) before changing to Premium SSD v2.
40+
- If your existing disk is using bursting, you must [disable it](#disable-bursting) before changing to Premium SSD v2.
41+
- If your existing disk is using double encryption, you must [switch to one of the single encryption options](#disable-double-encryption) before changing to Premium SSD v2.
4242
- You can't directly switch from a Premium SSD v2 to another disk type. If you want to change a Premium SSD v2 to another disk type, you must migrate using [snapshots](#migrate-to-premium-ssd-v2-or-ultra-disk-using-snapshots).
4343
- You can't directly switch from Ultra Disks to Premium SSD v2 disks, you must migrate using [snapshots](#migrate-to-premium-ssd-v2-or-ultra-disk-using-snapshots).
4444
- If you're using the rest API, you must use an API version `2020-12-01` or newer for both the Compute Resource Provider and the Disk Resource Provider.
@@ -57,6 +57,33 @@ This preview is currently only available in the following regions:
5757
- Central India
5858
- France Central
5959

60+
### Disable host caching
61+
62+
You can use the following CLI script to identify your disk's LUN and disable host caching. Replace `yourResourceGroup` and `nameOfYourVM` with your own values, then run the script.
63+
64+
```azurecli
65+
$myRG="yourResourceGroup"
66+
$myVM="nameOfYourVM"
67+
68+
lun=$(az vm show -g $myRG -n $myVM --query "storageProfile.dataDisks[].lun")
69+
70+
az vm update --resource-group $myRG --name $myVM --disk-caching $lun=None
71+
```
72+
73+
### Disable bursting
74+
75+
If you enabled bursting within 12 hours, you have to wait until the 13th hour or later to disable it.
76+
77+
You can use the following command to disable disk bursting: `az disk update --name "yourDiskNameHere" --resource-group "yourRGNameHere" --enable-bursting false`
78+
79+
### Disable double encryption
80+
81+
You can use the following command to change your disk from double encryption to encryption at rest with customer-managed keys:
82+
83+
```azurecli
84+
az disk-encryption-set update --name "nameOfYourDiskEncryptionSetHere" --resource-group "yourRGNameHere" --key-url yourKeyURL --source-vault "yourKeyVaultName" --encryption-type EncryptionAtRestWithCustomerKey
85+
```
86+
6087
## Switch all managed disks of a VM from one account to another
6188

6289
This example shows how to convert all of a VM's disks to premium storage. However, by changing the $storageType variable in this example, you can convert the VM's disks type to standard SSD or standard HDD. To use Premium managed disks, your VM must use a [VM size](sizes.md) that supports Premium storage. This example also switches to a size that supports premium storage:
@@ -108,7 +135,7 @@ Start-AzVM -ResourceGroupName $rgName -Name $vmName
108135
```azurecli
109136
110137
#resource group that contains the virtual machine
111-
$rgName='yourResourceGroup'
138+
rgName='yourResourceGroup'
112139
113140
#Name of the virtual machine
114141
vmName='yourVM'
@@ -190,7 +217,7 @@ Start-AzVM -ResourceGroupName $vm.ResourceGroupName -Name $vm.Name
190217
```azurecli
191218
192219
#resource group that contains the managed disk
193-
$rgName='yourResourceGroup'
220+
rgName='yourResourceGroup'
194221
195222
#Name of your managed disk
196223
diskName='yourManagedDiskName'

0 commit comments

Comments
 (0)