Skip to content

Commit 260b634

Browse files
Merge pull request #245151 from roygara/adeMig
Changing key type
2 parents f7f9a77 + 82fe8ce commit 260b634

File tree

1 file changed

+34
-1
lines changed

1 file changed

+34
-1
lines changed

articles/virtual-machines/faq-for-disks.yml

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,40 @@ sections:
334334
- question: |
335335
Can I switch from server-side encryption with customer-managed keys to Azure Disk Encryption?
336336
answer: |
337-
Yes. First, switch your disk to use platform-managed keys, and then encrypt your current disk with Azure Disk Encryption.
337+
Yes. First, switch your disk to use platform-managed keys with one of the following steps:
338+
339+
# [Portal](#tab/azure-portal)
340+
341+
1. Sign in to the Azure portal.
342+
1. Select the disk you'd like to change the encryption type of.
343+
1. Select **Encryption**.
344+
1. For **Key management** select **Platform-managed key** and select save.
345+
346+
Your managed disk has successfully switched from being secured with your own customer-managed key to a platform-managed key.
347+
348+
# [Azure CLI](#tab/azure-cli)
349+
350+
Your existing disks must not be attached to a running VM in order for you to encrypt them using the following script:
351+
352+
```azurecli
353+
rgName=yourResourceGroupName
354+
diskName=yourDiskName
355+
356+
az disk update -n $diskName -g $rgName --encryption-type EncryptionAtRestWithPlatformKey
357+
```
358+
359+
# [Azure PowerShell](#tab/azure-powershell)
360+
361+
Your existing disks must not be attached to a running VM in order for you to encrypt them using the following script:
362+
363+
```PowerShell
364+
$rgName = "yourResourceGroupName"
365+
$diskName = "yourDiskName"
366+
367+
New-AzDiskUpdateConfig -EncryptionType "EncryptionAtRestWithPlatformKey" | Update-AzDisk -ResourceGroupName $rgName -DiskName $diskName
368+
```
369+
---
370+
Then, encrypt your current disk with Azure Disk Encryption.
338371
339372
- name: "Premium disks: Managed and unmanaged"
340373
questions:

0 commit comments

Comments
 (0)