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
@@ -32,13 +32,13 @@ To create and deploy your confidential VM using an ARM template through the Azur
32
32
33
33
1. Sign in to your Azure account in the Azure CLI.
34
34
35
-
```azurecli
35
+
```azurecli-interactive
36
36
az login
37
37
```
38
38
39
39
1. Set your Azure subscription. Replace `<subscription-id>` with your subscription identifier. Make sure to use a subscription that meets the [prerequisites](#prerequisites).
40
40
41
-
```azurecli
41
+
```azurecli-interactive
42
42
az account set --subscription <subscription-id>
43
43
```
44
44
@@ -55,15 +55,14 @@ To create and deploy your confidential VM using an ARM template through the Azur
55
55
```
56
56
57
57
If the resource group you specified doesn't exist, create a resource group with that name.
58
-
59
-
```azurecli
58
+
59
+
```azurecli-interactive
60
60
az group create -n $resourceGroup -l $region
61
61
```
62
62
63
63
1. Deploy your VM to Azure using an ARM template with a custom parameter file
64
64
65
-
66
-
```azurecli
65
+
```azurecli-interactive
67
66
az deployment group create `
68
67
-g $resourceGroup `
69
68
-n $deployName `
@@ -73,7 +72,6 @@ To create and deploy your confidential VM using an ARM template through the Azur
73
72
vmName=$vmName
74
73
```
75
74
76
-
77
75
### Define custom parameter file
78
76
79
77
When you create a confidential VM through the Azure Command-Line Interface (Azure CLI), you need to define a custom parameter file. To create a custom JSON parameter file:
@@ -151,6 +149,9 @@ Use this example to create a custom parameter file for a Linux-based confidentia
151
149
}
152
150
```
153
151
152
+
> [!NOTE]
153
+
> Replace the osImageName value accordingly.
154
+
154
155
## Deploy confidential VM template with OS disk confidential encryption via customer-managed key
155
156
156
157
1. Sign in to your Azure account through the Azure CLI.
@@ -161,83 +162,81 @@ Use this example to create a custom parameter file for a Linux-based confidentia
161
162
162
163
1. Set your Azure subscription. Replace `<subscription-id>` with your subscription identifier. Make sure to use a subscription that meets the [prerequisites](#prerequisites).
163
164
164
-
```azurecli
165
+
```azurecli-interactive
165
166
az account set --subscription <subscription-id>
166
167
```
168
+
167
169
1. Grant confidential VM Service Principal `Confidential VM Orchestrator` to tenant
168
170
169
171
For this step you need to be a Global Admin or you need to have the User Access Administrator RBAC role.
170
-
171
-
```azurecli
172
+
173
+
```azurecli-interactive
172
174
Connect-AzureAD -Tenant "your tenant ID"
173
175
New-AzureADServicePrincipal -AppId bf7b6499-ff71-4aa2-97a4-f372087be7f0 -DisplayName "Confidential VM Orchestrator"
174
176
```
177
+
175
178
1. Set up your Azure key vault. For how to use an Azure Key Vault Managed HSM instead, see the next step.
176
179
177
180
1. Create a resource group for your key vault. Your key vault instance and your confidential VM must be in the same Azure region.
178
-
179
-
```azurecli
181
+
182
+
```azurecli-interactive
180
183
$resourceGroup = <key vault resource group>
181
184
$region = <Azure region>
182
185
az group create --name $resourceGroup --location $region
183
186
```
184
-
187
+
185
188
1. Create a key vault instance with a premium SKU in your preferred region.
1. Make sure that you have an **owner** role in this key vault.
193
-
194
196
1. Give `Confidential VM Orchestrator` permissions to `get` and `release` the key vault.
195
-
196
-
```azurecli
197
+
198
+
```azurecli-interactive
197
199
$cvmAgent = az ad sp show --id "bf7b6499-ff71-4aa2-97a4-f372087be7f0" | Out-String | ConvertFrom-Json
198
200
az keyvault set-policy --name $KeyVault --object-id $cvmAgent.objectId --key-permissions get release
199
201
```
200
202
201
203
1. (Optional) If you don't want to use an Azure key vault, you can create an Azure Key Vault Managed HSM instead.
202
204
203
205
1. Follow the [quickstart to create an Azure Key Vault Managed HSM](../key-vault/managed-hsm/quick-create-cli.md) to provision and activate Azure Key Vault Managed HSM.
204
-
205
206
1. Enable purge protection on the Azure Managed HSM. This step is required to enable key release.
1. Give `Confidential VM Orchestrator` permissions to managed HSM.
213
-
214
-
```azurecli
213
+
214
+
```azurecli-interactive
215
215
$cvmAgent = az ad sp show --id "bf7b6499-ff71-4aa2-97a4-f372087be7f0" | Out-String | ConvertFrom-Json
216
216
az keyvault role assignment create --hsm-name $hsm --assignee $cvmAgent.objectId --role "Managed HSM Crypto Service Release User" --scope /keys/$KeyName
217
217
```
218
218
219
219
1. Create a new key using Azure Key Vault. For how to use an Azure Managed HSM instead, see the next step.
220
220
221
221
1. Prepare and download the [key release policy](https://cvmprivatepreviewsa.blob.core.windows.net/cvmpublicpreviewcontainer/skr-policy.json) to your local disk.
1. Deploy a Disk Encryption Set (DES) using a [DES ARM template](https://cvmprivatepreviewsa.blob.core.windows.net/cvmpublicpreviewcontainer/deploymentTemplate/deployDES.json) (`deployDES.json`).
239
238
240
-
```azurecli
239
+
```azurecli-interactive
241
240
$desName = <name of DES>
242
241
$deployName = <name of deployment>
243
242
$desArmTemplate = <name of DES ARM template file>
@@ -253,7 +252,7 @@ Use this example to create a custom parameter file for a Linux-based confidentia
253
252
254
253
1. Assign key access to the DES file.
255
254
256
-
```azurecli
255
+
```azurecli-interactive
257
256
$desIdentity= (az disk-encryption-set show -n $desName -g
@@ -263,26 +262,24 @@ Use this example to create a custom parameter file for a Linux-based confidentia
263
262
```
264
263
265
264
1. (Optional) Create a new key from an Azure Managed HSM.
266
-
267
265
1. Prepare and download the [key release policy](https://cvmprivatepreviewsa.blob.core.windows.net/cvmpublicpreviewcontainer/skr-policy.json) to your local disk.
@@ -300,16 +297,16 @@ Use this example to create a custom parameter file for a Linux-based confidentia
300
297
```
301
298
302
299
1. Deploy your confidential VM with the customer-managed key.
303
-
300
+
304
301
1. Get the resource ID for the DES.
305
302
306
-
```azurecli
303
+
```azurecli-interactive
307
304
$desID = (az disk-encryption-set show -n $desName -g $resourceGroup --query [id] -o tsv)
308
305
```
309
-
306
+
310
307
1. Deploy your confidential VM using the [confidential VM ARM template](https://cvmprivatepreviewsa.blob.core.windows.net/cvmpublicpreviewcontainer/deploymentTemplate/deployCPSCVM_cmk.json) (`deployCPSCVM_cmk.json`) and a [deployment parameter file](#example-deployment-parameter-file) (for example, `azuredeploy.parameters.win2022.json`) with the customer-managed key.
311
-
312
-
```azurecli
308
+
309
+
```azurecli-interactive
313
310
$deployName = <name of deployment>
314
311
$vmName = <name of confidential VM>
315
312
$cvmArmTemplate = <name of confidential VM ARM template file>
@@ -325,7 +322,7 @@ Use this example to create a custom parameter file for a Linux-based confidentia
325
322
```
326
323
327
324
1. Connect to your confidential VM to make sure the creation was successful.
328
-
325
+
329
326
### Example deployment parameter file
330
327
331
328
This is an example parameter file for a Windows Server 2022 Gen 2 confidential VM:
@@ -356,7 +353,7 @@ This is an example parameter file for a Windows Server 2022 Gen 2 confidential V
0 commit comments