Skip to content

Commit 70e5dce

Browse files
committed
edit pass: linux-aad-and-overview-aad
1 parent 6bc4b21 commit 70e5dce

File tree

1 file changed

+25
-25
lines changed

1 file changed

+25
-25
lines changed

articles/virtual-machines/linux/disk-encryption-linux-aad.md

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,15 @@ Use the [az vm encryption enable](/cli/azure/vm/encryption#az-vm-encryption-enab
4949

5050
- **Encrypt a running VM by using a client secret:**
5151

52-
```azurecli-interactive
52+
```azurecli-interactive
5353
az vm encryption enable --resource-group "MyVirtualMachineResourceGroup" --name "MySecureVM" --aad-client-id "<my spn created with CLI/my Azure AD ClientID>" --aad-client-secret "My-AAD-client-secret" --disk-encryption-keyvault "MySecureVault" --volume-type [All|OS|Data]
54-
```
54+
```
5555
5656
- **Encrypt a running VM by using KEK to wrap the client secret:**
5757
58-
```azurecli-interactive
58+
```azurecli-interactive
5959
az vm encryption enable --resource-group "MyVirtualMachineResourceGroup" --name "MySecureVM" --aad-client-id "<my spn created with CLI which is the Azure AD ClientID>" --aad-client-secret "My-AAD-client-secret" --disk-encryption-keyvault "MySecureVault" --key-encryption-key "MyKEK_URI" --key-encryption-keyvault "MySecureVaultContainingTheKEK" --volume-type [All|OS|Data]
60-
```
60+
```
6161
6262
>[!NOTE]
6363
> The syntax for the value of the disk-encryption-keyvault parameter is the full identifier string:
@@ -66,22 +66,22 @@ https://[keyvault-name].vault.azure.net/keys/[kekname]/[kek-unique-id].
6666
6767
- **Verify that the disks are encrypted:** To check on the encryption status of an IaaS VM, use the [az vm encryption show](/cli/azure/vm/encryption#az-vm-encryption-show) command.
6868
69-
```azurecli-interactive
69+
```azurecli-interactive
7070
az vm encryption show --name "MySecureVM" --resource-group "MyVirtualMachineResourceGroup"
71-
```
71+
```
7272
7373
- **Disable encryption:** To disable encryption, use the [az vm encryption disable](/cli/azure/vm/encryption#az-vm-encryption-disable) command. Disabling encryption is only allowed on data volumes for Linux VMs.
7474
75-
```azurecli-interactive
75+
```azurecli-interactive
7676
az vm encryption disable --name "MySecureVM" --resource-group "MyVirtualMachineResourceGroup" --volume-type DATA
77-
```
77+
```
7878
7979
### <a name="bkmk_RunningLinuxPSH"> </a> Enable encryption on an existing or running Linux VM by using PowerShell
8080
Use the [Set-AzVMDiskEncryptionExtension](/powershell/module/az.compute/set-azvmdiskencryptionextension) cmdlet to enable encryption on a running IaaS virtual machine in Azure. Take a [snapshot](snapshot-copy-managed-disk.md) or make a backup of the VM with [Azure Backup](../../backup/backup-azure-vms-encryption.md) before the disks are encrypted. The -skipVmBackup parameter is already specified in the PowerShell scripts to encrypt a running Linux VM.
8181
8282
- **Encrypt a running VM by using a client secret:** The following script initializes your variables and runs the Set-AzVMDiskEncryptionExtension cmdlet. The resource group, VM, key vault, Azure AD app, and client secret should have already been created as prerequisites. Replace MyVirtualMachineResourceGroup, MyKeyVaultResourceGroup, MySecureVM, MySecureVault, My-AAD-client-ID, and My-AAD-client-secret with your values. Modify the -VolumeType parameter to specify which disks you're encrypting.
8383
84-
```azurepowershell
84+
```azurepowershell
8585
$VMRGName = 'MyVirtualMachineResourceGroup';
8686
$KVRGname = 'MyKeyVaultResourceGroup';
8787
$vmName = 'MySecureVM';
@@ -94,10 +94,10 @@ Use the [Set-AzVMDiskEncryptionExtension](/powershell/module/az.compute/set-azvm
9494
$sequenceVersion = [Guid]::NewGuid();
9595
9696
Set-AzVMDiskEncryptionExtension -ResourceGroupName $VMRGName -VMName $vmName -AadClientID $aadClientID -AadClientSecret $aadClientSecret -DiskEncryptionKeyVaultUrl $diskEncryptionKeyVaultUrl -DiskEncryptionKeyVaultId $KeyVaultResourceId -VolumeType '[All|OS|Data]' -SequenceVersion $sequenceVersion -skipVmBackup;
97-
```
97+
```
9898
- **Encrypt a running VM by using KEK to wrap the client secret:** Azure Disk Encryption lets you specify an existing key in your key vault to wrap disk encryption secrets that were generated while enabling encryption. When a key encryption key is specified, Azure Disk Encryption uses that key to wrap the encryption secrets before writing to the key vault. Modify the -VolumeType parameter to specify which disks you're encrypting.
9999
100-
```azurepowershell
100+
```azurepowershell
101101
$KVRGname = 'MyKeyVaultResourceGroup';
102102
$VMRGName = 'MyVirtualMachineResourceGroup';
103103
$aadClientID = 'My-AAD-client-ID';
@@ -111,7 +111,7 @@ Use the [Set-AzVMDiskEncryptionExtension](/powershell/module/az.compute/set-azvm
111111
$sequenceVersion = [Guid]::NewGuid();
112112
113113
Set-AzVMDiskEncryptionExtension -ResourceGroupName $VMRGName -VMName $vmName -AadClientID $aadClientID -AadClientSecret $aadClientSecret -DiskEncryptionKeyVaultUrl $diskEncryptionKeyVaultUrl -DiskEncryptionKeyVaultId $KeyVaultResourceId -KeyEncryptionKeyUrl $keyEncryptionKeyUrl -KeyEncryptionKeyVaultId $KeyVaultResourceId -VolumeType '[All|OS|Data]' -SequenceVersion $sequenceVersion -skipVmBackup;
114-
```
114+
```
115115
116116
>[!NOTE]
117117
> The syntax for the value of the disk-encryption-keyvault parameter is the full identifier string:
@@ -121,15 +121,15 @@ Use the [Set-AzVMDiskEncryptionExtension](/powershell/module/az.compute/set-azvm
121121
122122
- **Verify that the disks are encrypted:** To check on the encryption status of an IaaS VM, use the [Get-AzVmDiskEncryptionStatus](/powershell/module/az.compute/get-azvmdiskencryptionstatus) cmdlet.
123123
124-
```azurepowershell-interactive
124+
```azurepowershell-interactive
125125
Get-AzVmDiskEncryptionStatus -ResourceGroupName MyVirtualMachineResourceGroup -VMName MySecureVM
126-
```
126+
```
127127
128128
- **Disable disk encryption:** To disable the encryption, use the [Disable-Azure​RmVMDisk​Encryption](/powershell/module/az.compute/disable-azvmdiskencryption) cmdlet. Disabling encryption is only allowed on data volumes for Linux VMs.
129129
130-
```azurepowershell-interactive
130+
```azurepowershell-interactive
131131
Disable-AzVMDiskEncryption -ResourceGroupName 'MyVirtualMachineResourceGroup' -VMName 'MySecureVM'
132-
```
132+
```
133133
134134
135135
### <a name="bkmk_RunningLinux"> </a> Enable encryption on an existing or running IaaS Linux VM with a template
@@ -263,23 +263,23 @@ In contrast to Powershell syntax, the CLI doesn't require you to provide a uniqu
263263

264264
- **Encrypt a running VM by using a client secret:**
265265

266-
```azurecli-interactive
266+
```azurecli-interactive
267267
az vm encryption enable --resource-group "MyVirtualMachineResourceGroup" --name "MySecureVM" --aad-client-id "<my spn created with CLI/my Azure AD ClientID>" --aad-client-secret "My-AAD-client-secret" --disk-encryption-keyvault "MySecureVault" --volume-type "Data"
268-
```
268+
```
269269
270270
- **Encrypt a running VM by using KEK to wrap the client secret:**
271271
272-
```azurecli-interactive
272+
```azurecli-interactive
273273
az vm encryption enable --resource-group "MyVirtualMachineResourceGroup" --name "MySecureVM" --aad-client-id "<my spn created with CLI which is the Azure AD ClientID>" --aad-client-secret "My-AAD-client-secret" --disk-encryption-keyvault "MySecureVault" --key-encryption-key "MyKEK_URI" --key-encryption-keyvault "MySecureVaultContainingTheKEK" --volume-type "Data"
274-
```
274+
```
275275
276276
### Enable encryption on a newly added disk with Azure PowerShell
277277
When you use Powershell to encrypt a new disk for Linux, a new sequence version needs to be specified. The sequence version has to be unique. The following script generates a GUID for the sequence version.
278278
279279
280280
- **Encrypt a running VM by using a client secret:** The following script initializes your variables and runs the Set-AzVMDiskEncryptionExtension cmdlet. The resource group, VM, key vault, Azure AD app, and client secret should have already been created as prerequisites. Replace MyVirtualMachineResourceGroup, MyKeyVaultResourceGroup, MySecureVM, MySecureVault, My-AAD-client-ID, and My-AAD-client-secret with your values. The -VolumeType parameter is set to data disks and not the OS disk. If the VM was previously encrypted with a volume type of "OS" or "All," then the -VolumeType parameter should be changed to All so that both the OS and the new data disk will be included.
281281
282-
```azurepowershell
282+
```azurepowershell
283283
$KVRGname = 'MyKeyVaultResourceGroup';
284284
$VMRGName = 'MyVirtualMachineResourceGroup';
285285
$vmName = 'MySecureVM';
@@ -292,10 +292,10 @@ In contrast to Powershell syntax, the CLI doesn't require you to provide a uniqu
292292
$sequenceVersion = [Guid]::NewGuid();
293293
294294
Set-AzVMDiskEncryptionExtension -ResourceGroupName $VMRGName -VMName $vmName -AadClientID $aadClientID -AadClientSecret $aadClientSecret -DiskEncryptionKeyVaultUrl $diskEncryptionKeyVaultUrl -DiskEncryptionKeyVaultId $KeyVaultResourceId -VolumeType 'data' –SequenceVersion $sequenceVersion;
295-
```
295+
```
296296
- **Encrypt a running VM by using KEK to wrap the client secret:** Azure Disk Encryption lets you specify an existing key in your key vault to wrap disk encryption secrets that were generated while enabling encryption. When a key encryption key is specified, Azure Disk Encryption uses that key to wrap the encryption secrets before writing to the key vault. The -VolumeType parameter is set to data disks and not the OS disk. If the VM was previously encrypted with a volume type of "OS" or "All," then the -VolumeType parameter should be changed to All so that both the OS and the new data disk will be included.
297297
298-
```azurepowershell
298+
```azurepowershell
299299
$KVRGname = 'MyKeyVaultResourceGroup';
300300
$VMRGName = 'MyVirtualMachineResourceGroup';
301301
$vmName = 'MyExtraSecureVM';
@@ -310,7 +310,7 @@ In contrast to Powershell syntax, the CLI doesn't require you to provide a uniqu
310310
$sequenceVersion = [Guid]::NewGuid();
311311
312312
Set-AzVMDiskEncryptionExtension -ResourceGroupName $VMRGName -VMName $vmName -AadClientID $aadClientID -AadClientSecret $aadClientSecret -DiskEncryptionKeyVaultUrl $diskEncryptionKeyVaultUrl -DiskEncryptionKeyVaultId $KeyVaultResourceId -KeyEncryptionKeyUrl $keyEncryptionKeyUrl -KeyEncryptionKeyVaultId $KeyVaultResourceId -VolumeType 'data' –SequenceVersion $sequenceVersion;
313-
```
313+
```
314314
315315
316316
>[!NOTE]
@@ -337,7 +337,7 @@ You can disable encryption by using Azure PowerShell, the Azure CLI, or a Resour
337337
- **Disable encryption with a Resource Manager template:** To disable encryption, use the [Disable encryption on a running Linux VM](https://aka.ms/decrypt-linuxvm) template.
338338
1. Select **Deploy to Azure**.
339339
2. Select the subscription, resource group, location, VM, legal terms, and agreement.
340-
3. Select **Purchase** to disable disk encryption on a running Windows VM.
340+
3. Select **Purchase** to disable disk encryption on a running Windows VM.
341341
342342
343343
## Next steps

0 commit comments

Comments
 (0)