You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/virtual-machines/linux/disk-encryption-linux.md
+37-23Lines changed: 37 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -219,7 +219,7 @@ The **EncryptFormatAll** parameter reduces the time for Linux data disks to be e
219
219
>If you're setting this parameter while updating encryption settings, it might lead to a reboot before the actual encryption. In this case, you will also want to remove the disk you don't want formatted from the fstab file. Similarly, you should add the partition you want encrypt-formatted to the fstab file before initiating the encryption operation.
220
220
221
221
### EncryptFormatAll criteria
222
-
The parameter goes though all partitions and encrypts them as long as they meet **all** of the criteria below:
222
+
The parameter goes though all partitions and encrypts them as long as they meet **all** of the criteria below:
### Use the EncryptFormatAll parameter with Logical Volume Manager (LVM)
260
260
We recommend an LVM-on-crypt setup. For all the following examples, replace the device-path and mountpoints with whatever suits your use-case. This setup can be done as follows:
261
261
262
-
- Add the data disks that will compose the VM.
263
-
- Format, mount, and add these disks to the fstab file.
262
+
1. Add the data disks that will compose the VM.
264
263
265
-
1. Choose a partition standard, create a partition that spans the entire drive, and then format the partition. We use symlinks generated by Azure here. Using symlinks avoids problems related to device names changing. For more information, see the [Troubleshoot Device Names problems](troubleshoot-device-names-problems.md) article.
264
+
1. Format, mount, and add these disks to the fstab file.
265
+
266
+
1. Choose a partition standard, create a partition that spans the entire drive, and then format the partition. We use symlinks generated by Azure here. Using symlinks avoids problems related to device names changing. For more information, see the [Troubleshoot Device Names problems](troubleshoot-device-names-problems.md) article.
266
267
267
-
```azurepowershell-interactive
268
-
parted /dev/disk/azure/scsi1/lun0 mklabel gpt
269
-
parted -a opt /dev/disk/azure/scsi1/lun0 mkpart primary ext4 0% 100%
270
-
271
-
mkfs -t ext4 /dev/disk/azure/scsi1/lun0-part1
272
-
```
268
+
```bash
269
+
parted /dev/disk/azure/scsi1/lun0 mklabel gpt
270
+
parted -a opt /dev/disk/azure/scsi1/lun0 mkpart primary ext4 0% 100%
1. Run the Set-AzVMDiskEncryptionExtension PowerShell cmdlet with -EncryptFormatAll to encrypt these disks.
287
+
1. Run the Azure PowerShell [Set-AzVMDiskEncryptionExtension](/powershell/module/az.compute/set-azvmdiskencryptionextension?view=azps-3.8.0) cmdlet with -EncryptFormatAll to encrypt these disks.
If you wish to use a key encryption key (KEK), pass the URI of your KEK and the ResourceID of your key vault to the -KeyEncryptionKeyUrl and -KeyEncryptionKeyVaultId parameters, respectively:
289
296
290
-
1. Set up LVM on top of these new disks. Note the encrypted drives are unlocked after the VM has finished booting. So, the LVM mounting will also have to be subsequently delayed.
1. Set up LVM on top of these new disks. Note the encrypted drives are unlocked after the VM has finished booting. So, the LVM mounting will also have to be subsequently delayed.
292
306
293
307
## New VMs created from customer-encrypted VHD and encryption keys
294
308
In this scenario, you can enable encrypting by using PowerShell cmdlets or CLI commands.
Copy file name to clipboardExpand all lines: articles/virtual-machines/linux/disk-encryption-overview.md
+11-2Lines changed: 11 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -100,8 +100,17 @@ Make sure the /etc/fstab settings are configured properly for mounting. To confi
100
100
- Before starting encryption, be sure to stop all services and processes that could be writing to mounted data disks and disable them, so that they do not restart automatically after a reboot. These could keep files open on these partitions, preventing the encryption procedure to remount them, causing failure of the encryption.
101
101
- After reboot, it will take time for the Azure Disk Encryption process to mount the newly encrypted disks. They won't be immediately available after a reboot. The process needs time to start, unlock, and then mount the encrypted drives before being available for other processes to access. This process may take more than a minute after reboot depending on the system characteristics.
102
102
103
-
An example of commands that can be used to mount the data disks and create the necessary /etc/fstab entries can be found in the [Azure Disk Encryption prerequisites CLI script](https://github.com/ejarvi/ade-cli-getting-started) (lines 244-248) and the [Azure Disk Encryption prerequisites PowerShell script](https://github.com/Azure/azure-powershell/tree/master/src/Compute/Compute/Extension/AzureDiskEncryption/Scripts).
104
-
103
+
An example of the commands that can be used to mount the data disks and create the necessary /etc/fstab entries can be found in the [Azure Disk Encryption validation shell script](https://github.com/ejarvi/ade-cli-getting-started/blob/master/validate.sh#L245-L251), lines 245-251:
104
+
105
+
```bash
106
+
UUID0="$(blkid -s UUID -o value /dev/disk/azure/scsi1/lun0)"
107
+
UUID1="$(blkid -s UUID -o value /dev/disk/azure/scsi1/lun1)"
0 commit comments