Skip to content

Commit 6d91fac

Browse files
authored
Merge pull request #253720 from AjKundnani/main
Enable TL on existing VM - Added Portal steps
2 parents 1b6c1b5 + 72d7cb4 commit 6d91fac

6 files changed

+70
-51
lines changed
118 KB
Loading
113 KB
Loading
208 KB
Loading
165 KB
Loading
130 KB
Loading

articles/virtual-machines/trusted-launch-existing-vm.md

Lines changed: 70 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
title: Enable Trusted Launch on existing VMs
3-
description: Enable Trusted Launch on existing Azure VMs.
2+
title: Enable Trusted launch on existing VMs
3+
description: Enable Trusted launch on existing Azure VMs.
44
author: AjKundnani
55
ms.author: ajkundna
66
ms.reviewer: cynthn
@@ -11,39 +11,76 @@ ms.date: 08/13/2023
1111
ms.custom: template-how-to, devx-track-azurepowershell
1212
---
1313

14-
# Enable Trusted Launch on existing Azure VMs
14+
# Enable Trusted launch on existing Azure VMs
1515

1616
**Applies to:** :heavy_check_mark: Linux VM :heavy_check_mark: Windows VM :heavy_check_mark: Generation 2 VM
1717

18-
Azure Virtual Machines supports enabling Trusted Launch on existing [Azure Generation 2](generation-2.md) VMs by upgrading to [Trusted launch](trusted-launch.md) security type.
18+
Azure Virtual Machines supports enabling Trusted launch on existing [Azure Generation 2](generation-2.md) VMs by upgrading to [Trusted launch](trusted-launch.md) security type.
1919

2020
[Trusted launch](trusted-launch.md) is a way to enable foundational compute security on [Azure Generation 2 VMs](generation-2.md). Trusted launch protects your Virtual Machines against advanced and persistent attack techniques like boot kits and rootkits by combining infrastructure technologies like Secure Boot, vTPM and Boot Integrity Monitoring on your VM.
2121

2222
> [!IMPORTANT]
23-
> Enabling Trusted Launch on existing virtual machines (VMs) is currently not supported for following scenarios:
23+
> Enabling Trusted launch on existing virtual machines (VMs) is currently not supported for following scenarios:
2424
>
2525
> - Azure Generation 1 VMs is currently not supported.
26-
> - Azure Virtual Machine Scale Sets (VMSS) Uniform & Flex is currently not supported.
26+
> - Azure Virtual Machine Scale Sets (VMSS) Uniform & Flex are currently not supported.
2727
2828
## Prerequisites
2929

3030
- Azure Generation 2 VM(s) is configured with:
31-
- [Trusted Launch supported size family](trusted-launch.md#virtual-machines-sizes)
32-
- [Trusted Launch supported OS Image](trusted-launch.md#operating-systems-supported). For custom OS image or disks, the base image should be **Trusted Launch capable**.
33-
- Azure Generation 2 VM(s) is not using [features currently not supported with Trusted Launch](trusted-launch.md#unsupported-features).
34-
- Azure Generation 2 VM(s) should be **stopped and deallocated** before enabling Trusted Launch security type.
35-
- Azure Backup if enabled for Generation 2 VM(s) should be configured with [Enhanced Backup Policy](../backup/backup-azure-vms-enhanced-policy.md). Trusted Launch security type cannot be enabled for Generation 2 VM(s) configured with *Standard Policy* backup protection.
31+
- [Trusted launch supported size family](trusted-launch.md#virtual-machines-sizes)
32+
- [Trusted launch supported OS Image](trusted-launch.md#operating-systems-supported). For custom OS image or disks, the base image should be **Trusted launch capable**.
33+
- Azure Generation 2 VM(s) is not using [features currently not supported with Trusted launch](trusted-launch.md#unsupported-features).
34+
- Azure Generation 2 VM(s) should be **stopped and deallocated** before enabling Trusted launch security type.
35+
- Azure Backup if enabled for Generation 2 VM(s) should be configured with [Enhanced Backup Policy](../backup/backup-azure-vms-enhanced-policy.md). Trusted launch security type cannot be enabled for Generation 2 VM(s) configured with *Standard Policy* backup protection.
3636

3737
## Best practices
3838

39-
- [Create restore point](create-restore-points.md) for Azure Generation 2 VM(s) before enabling Trusted Launch security type. You can use the Restore Point to re-create the disks and Generation 2 VM with the previous well-known state.
40-
- Enable Trusted launch on a test Generation 2 VM and ensure if any changes are required to meet the prerequisites before enabling Trusted Launch on Generation 2 VMs running production workloads.
39+
- Enable Trusted launch on a test Generation 2 VM and ensure if any changes are required to meet the prerequisites before enabling Trusted launch on Generation 2 VMs associated with production workloads.
40+
- [Create restore point](create-restore-points.md) for Azure Generation 2 VM(s) associated with production workloads before enabling Trusted launch security type. You can use the Restore Point to re-create the disks and Generation 2 VM with the previous well-known state.
4141

42-
## Enable Trusted Launch on existing VM
42+
## Enable Trusted launch on existing VM
43+
44+
> [!NOTE]
45+
>
46+
> - After enabling Trusted launch, currently virtual machines cannot be rolled back to security type **Standard** (Non-Trusted launch configuration).
47+
> - **vTPM** is enabled by default.
48+
> - **Secure Boot** is recommended to be enabled (not enabled by default) if you are not using custom unsigned kernel or drivers. Secure Boot preserves boot integrity and enables foundational security for VM.
49+
50+
### [Portal](#tab/portal)
51+
52+
This section steps through using the Azure portal to enable Trusted launch on existing Azure Generation 2 VM.
53+
54+
1. Log in to [Azure portal](https://portal.azure.com)
55+
2. Validate virtual machine generation is **V2** and **Stop** VM.
56+
57+
:::image type="content" source="./media/trusted-launch/02-generation-2-to-trusted-launch-stop-vm.png" alt-text="Screenshot of the Gen2 VM to be de-allocated.":::
58+
59+
3. On **Overview** page in VM **Properties**, Select **Standard** under **Security type**. This navigates to **Configuration** page for VM.
60+
61+
:::image type="content" source="./media/trusted-launch/03-generation-2-to-trusted-launch-click-standard.png" alt-text="Screenshot of the Security type Standard.":::
62+
63+
4. Select drop-down **Security type** under **Security type** section of **Configuration** page.
64+
65+
:::image type="content" source="./media/trusted-launch/04-generation-2-to-trusted-launch-select-dropdown.png" alt-text="Screenshot of the Security type drop-down.":::
66+
67+
5. Select **Trusted launch** under drop-down and select check-boxes to enable **Secure Boot** and **vTPM**. Click **Save** after making required changes.
68+
69+
> [!NOTE]
70+
>
71+
> - Generation 2 VMs created using [Azure Compute Gallery (ACG)](azure-compute-gallery.md), [Managed Image](capture-image-resource.md), [OS Disk](./scripts/create-vm-from-managed-os-disks.md) cannot be upgraded to Trusted launch using Portal. Please ensure [OS Version is supported for Trusted launch](trusted-launch.md#operating-systems-supported) and use PowerShell, CLI or ARM template to execute upgrade.
72+
73+
:::image type="content" source="./media/trusted-launch/05-generation-2-to-trusted-launch-select-uefi-settings.png" alt-text="Screenshot of the Secure boot and vTPM settings.":::
74+
75+
6. Close the **Configuration** page once the update is successfully complete and validate **Security type** under VM properties on **Overview** page.
76+
77+
:::image type="content" source="./media/trusted-launch/06-generation-2-to-trusted-launch-validate-uefi.png" alt-text="Screenshot of the Trusted launch upgraded VM.":::
78+
79+
7. Start the upgraded Trusted launch VM and ensure that it has started successfully and verify that you are able to log in to the VM using either RDP (for Windows VM) or SSH (for Linux VM).
4380

4481
### [CLI](#tab/cli)
4582

46-
This section steps through using the Azure CLI to enable Trusted Launch on existing Azure Generation 2 VM.
83+
This section steps through using the Azure CLI to enable Trusted launch on existing Azure Generation 2 VM.
4784

4885
Make sure that you've installed the latest [Azure CLI](/cli/azure/install-az-cli2) and are logged in to an Azure account with [az login](/cli/azure/reference-index).
4986

@@ -62,13 +99,7 @@ az vm deallocate \
6299
--resource-group myResourceGroup --name myVm
63100
```
64101

65-
3. Enable Trusted Launch by setting `--security-type` to `TrustedLaunch`.
66-
67-
> [!NOTE]
68-
>
69-
> - After enabling Trusted Launch, currently virtual machine cannot be rolled back to security type **Standard** (Non-Trusted Launch configuration).
70-
> - **vTPM** is enabled by default.
71-
> - **Secure Boot** is recommended to be enabled (not enabled by default) if you are not using custom unsigned kernel or drivers. Secure Boot preserves boot integrity and enables foundational security for VM.
102+
3. Enable Trusted launch by setting `--security-type` to `TrustedLaunch`.
72103

73104
```azurecli-interactive
74105
az vm update \
@@ -98,11 +129,11 @@ az vm start \
98129
--resource-group myResourceGroup --name myVm
99130
```
100131

101-
6. Start the upgraded Trusted Launch VM and ensure that it has started successfully and verify that you are able to log in to the VM using either RDP (for Windows VM) or SSH (for Linux VM).
132+
6. Start the upgraded Trusted launch VM and ensure that it has started successfully and verify that you are able to log in to the VM using either RDP (for Windows VM) or SSH (for Linux VM).
102133

103134
### [PowerShell](#tab/powershell)
104135

105-
This section steps through using the Azure PowerShell to enable Trusted Launch on existing Azure Generation 2 VM.
136+
This section steps through using the Azure PowerShell to enable Trusted launch on existing Azure Generation 2 VM.
106137

107138
Make sure that you've installed the latest [Azure PowerShell](/powershell/azure/install-azps-windows) and are logged in to an Azure account with [Connect-AzAccount](/powershell/module/az.accounts/connect-azaccount).
108139

@@ -118,13 +149,7 @@ Connect-AzAccount -SubscriptionId 00000000-0000-0000-0000-000000000000
118149
Stop-AzVM -ResourceGroupName myResourceGroup -Name myVm
119150
```
120151

121-
3. Enable Trusted Launch by setting `--security-type` to `TrustedLaunch`.
122-
123-
> [!NOTE]
124-
>
125-
> - After enabling Trusted Launch, currently virtual machine cannot be rolled back to security type **Standard** (Non-Trusted Launch configuration).
126-
> - **vTPM** is enabled by default.
127-
> - **Secure Boot** is recommended to be enabled (not enabled by default) if you are not using custom unsigned kernel or drivers. Secure Boot preserves boot integrity and enables foundational security for VM.
152+
3. Enable Trusted launch by setting `--security-type` to `TrustedLaunch`.
128153

129154
```azurepowershell-interactive
130155
Get-AzVM -ResourceGroupName myResourceGroup -VMName myVm `
@@ -154,11 +179,11 @@ Get-AzVM -ResourceGroupName myResourceGroup -VMName myVm `
154179
Start-AzVM -ResourceGroupName myResourceGroup -Name myVm
155180
```
156181

157-
6. Start the upgraded Trusted Launch VM and ensure that it has started successfully and verify that you are able to log in to the VM using either RDP (for Windows VM) or SSH (for Linux VM).
182+
6. Start the upgraded Trusted launch VM and ensure that it has started successfully and verify that you are able to log in to the VM using either RDP (for Windows VM) or SSH (for Linux VM).
158183

159184
### [Template](#tab/template)
160185

161-
This section steps through using an ARM template to enable Trusted Launch on existing Azure Generation 2 VM.
186+
This section steps through using an ARM template to enable Trusted launch on existing Azure Generation 2 VM.
162187

163188
[!INCLUDE [About Azure Resource Manager](../../includes/resource-manager-quickstart-introduction.md)]
164189

@@ -169,10 +194,10 @@ This section steps through using an ARM template to enable Trusted Launch on exi
169194
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
170195
"contentVersion": "1.0.0.0",
171196
"parameters": {
172-
"vmsToMigrate": {
197+
"vmsToUpgrade": {
173198
"type": "object",
174199
"metadata": {
175-
"description": "Specifies the list of Gen2 virtual machines to be migrated to Trusted Launch."
200+
"description": "Specifies the list of Gen2 virtual machines to be upgraded to Trusted launch."
176201
}
177202
},
178203
"vTpmEnabled": {
@@ -187,20 +212,20 @@ This section steps through using an ARM template to enable Trusted Launch on exi
187212
{
188213
"type": "Microsoft.Compute/virtualMachines",
189214
"apiVersion": "2022-11-01",
190-
"name": "[parameters('vmsToMigrate').virtualMachines[copyIndex()].vmName]",
191-
"location": "[parameters('vmsToMigrate').virtualMachines[copyIndex()].location]",
215+
"name": "[parameters('vmsToUpgrade').virtualMachines[copyIndex()].vmName]",
216+
"location": "[parameters('vmsToUpgrade').virtualMachines[copyIndex()].location]",
192217
"properties": {
193218
"securityProfile": {
194219
"uefiSettings": {
195-
"secureBootEnabled": "[parameters('vmsToMigrate').virtualMachines[copyIndex()].secureBootEnabled]",
220+
"secureBootEnabled": "[parameters('vmsToUpgrade').virtualMachines[copyIndex()].secureBootEnabled]",
196221
"vTpmEnabled": "[parameters('vTpmEnabled')]"
197222
},
198223
"securityType": "TrustedLaunch"
199224
}
200225
},
201226
"copy": {
202227
"name": "vmCopy",
203-
"count": "[length(parameters('vmsToMigrate').virtualMachines)]"
228+
"count": "[length(parameters('vmsToUpgrade').virtualMachines)]"
204229
}
205230
}
206231
]
@@ -214,7 +239,7 @@ This section steps through using an ARM template to enable Trusted Launch on exi
214239
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
215240
"contentVersion": "1.0.0.0",
216241
"parameters": {
217-
"vmsToMigrate": {
242+
"vmsToUpgrade": {
218243
"value": {
219244
"virtualMachines": [
220245
{
@@ -240,13 +265,7 @@ Property | Description of Property | Example template value
240265
-|-|-
241266
vmName | Name of Azure Generation 2 VM | "myVm"
242267
location | Location of Azure Generation 2 VM | "westus3"
243-
secureBootEnabled | Enable secure boot with Trusted Launch security type | true
244-
245-
> [!NOTE]
246-
>
247-
> - After enabling Trusted Launch, currently virtual machine cannot be rolled back to security type **Standard** (Non-Trusted Launch configuration).
248-
> - **vTPM** is enabled by default.
249-
> - **Secure Boot** is recommended to be enabled (not enabled by default) if you are not using custom unsigned kernel or drivers. Secure Boot preserves boot integrity and enables foundational security for VM.
268+
secureBootEnabled | Enable secure boot with Trusted launch security type | true
250269

251270
3. **Deallocate** all Azure Generation 2 VM(s) to be updated.
252271

@@ -268,14 +287,14 @@ New-AzResourceGroupDeployment `
268287

269288
5. Verify that the deployment is successful. Check for the security type and UEFI settings of the VM using Azure portal. Check the Security type section in the Overview page.
270289

271-
:::image type="content" source="./media/trusted-launch/generation-2-trusted-launch-settings.png" alt-text="Screenshot of the Trusted Launch properties of the VM.":::
290+
:::image type="content" source="./media/trusted-launch/generation-2-trusted-launch-settings.png" alt-text="Screenshot of the Trusted launch properties of the VM.":::
272291

273-
6. Start the upgraded Trusted Launch VM and ensure that it has started successfully and verify that you are able to log in to the VM using either RDP (for Windows VM) or SSH (for Linux VM).
292+
6. Start the upgraded Trusted launch VM and ensure that it has started successfully and verify that you are able to log in to the VM using either RDP (for Windows VM) or SSH (for Linux VM).
274293

275294
---
276295

277296
## Next steps
278297

279-
**(Recommended)** Post-Upgrades enable [Boot Integrity Monitoring](trusted-launch.md#microsoft-defender-for-cloud-integration) to monitor the health of the VM using Microsoft Defender for Cloud.
298+
**(Recommended)** Post-Upgrades enable [Boot integrity monitoring](trusted-launch.md#microsoft-defender-for-cloud-integration) to monitor the health of the VM using Microsoft Defender for Cloud.
280299

281-
Learn more about [trusted launch](trusted-launch.md) and review [frequently asked questions](trusted-launch-faq.md)
300+
Learn more about [Trusted launch](trusted-launch.md) and review [frequently asked questions](trusted-launch-faq.md)

0 commit comments

Comments
 (0)