Edit

Quickstart: Create and encrypt a Windows virtual machine by using the Azure portal

Important

Azure Disk Encryption is scheduled for retirement on September 15, 2028. Until that date, you can continue to use Azure Disk Encryption without disruption. On September 15, 2028, ADE-enabled workloads will continue to run, but encrypted disks will fail to unlock after VM reboots, resulting in service disruption.

Use encryption at host for new VMs, or consider Confidential VM sizes with OS disk encryption for confidential computing workloads. All ADE-enabled VMs (including backups) must migrate to encryption at host before the retirement date to avoid service disruption. See Migrate from Azure Disk Encryption to encryption at host for details.

Applies to: ✔️ Windows VMs

You can create Azure virtual machines (VMs) through the Azure portal. The Azure portal is a browser-based user interface to create VMs and their associated resources. In this quickstart, you use the Azure portal to deploy a Windows virtual machine, create a key vault for the storage of encryption keys, and encrypt the VM.

If you don't have an Azure subscription, create a free account before you begin.

Sign in to Azure

Sign in to the Azure portal.

Create a virtual machine

  1. Select Create a resource in the upper left corner of the Azure portal.

  2. On the New page, under Popular, select Windows Server 2016 Datacenter.

  3. On the Basics tab, under Project details, make sure the correct subscription is selected.

  4. For Resource group, select Create new. Enter myResourceGroup as the name and select OK.

  5. For Virtual machine name, enter MyVM.

  6. For Region, select (US) East US.

  7. Verify that the Size is Standard D2s v3.

  8. Under Administrator account, select Password. Enter a user name and a password.

    Screenshot that shows Azure portal Basics tab for Windows VM creation.

    Warning

    The "Disks" tab features an "Encryption Type" field under Disk options. This field is used to specify encryption options for managed disks + CMK, not for Azure Disk Encryption.

    To avoid confusion, we suggest you skip the Disks tab entirely while completing this tutorial.

  9. Select the Management tab and verify that you have a diagnostics storage account. If you have no storage accounts, select Create new, give your new account a name, and select OK.

    Screenshot that shows Azure portal Management tab with diagnostics storage account settings.

  10. Select Review + create.

  11. On the Create a virtual machine page, you can see the details about the VM you're about to create. When you're ready, select Create.

It takes a few minutes to deploy your VM. When the deployment is finished, move on to the next section.

Encrypt the virtual machine

  1. When the VM deployment is complete, select Go to resource.

  2. On the left-hand sidebar, select Disks.

  3. On the top bar, select Additional settings.

  4. Under Encryption settings > Disks to encrypt, select OS and data disks.

    Screenshot that shows OS and data disks.

  5. Under Encryption settings, select Select a key vault and key for encryption.

  6. On the Select key from Azure Key Vault screen, select Create new.

    Screenshot that shows the Create new option.

  7. To the left of Key vault and key, select Click to select a key.

  8. On the Select key from Azure Key Vault, under the Key Vault field, select Create new.

  9. On the Create key vault screen, ensure that the resource group is myResourceGroup, and give your key vault a name. Every key vault in Azure must have a unique name.

  10. On the Access policies tab, check the Azure Disk Encryption for volume encryption box.

    Screenshot that shows Azure portal Access policies tab with Azure Disk Encryption for volume encryption selected.

  11. Select Review + create.

  12. After the key vault passes validation, select Create. You return to the Select key from Azure Key Vault screen.

  13. Leave the Key field blank and choose Select.

  14. At the top of the encryption screen, select Save. A pop-up warns you that the VM reboots. Select Yes.

Clean up resources

When you no longer need these resources, you can delete the resource group, virtual machine, and all related resources. To delete these resources, select the resource group for the virtual machine, select Delete, and then confirm the name of the resource group to delete.

Next steps

In this quickstart, you created a key vault that was enabled for encryption keys, created a virtual machine, and enabled the virtual machine for encryption.