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
@@ -31,17 +31,16 @@ You must enable the feature for your subscription before you use the EncryptionA
31
31
32
32
- Execute the following command to register the feature for your subscription
33
33
34
-
```azurecli
34
+
```azurecli-interactive
35
35
az feature register --namespace Microsoft.Compute --name EncryptionAtHost
36
36
```
37
-
37
+
38
38
- Check that the registration state is **Registered** (takes a few minutes) using the command below before trying out the feature.
39
39
40
-
```azurecli
40
+
```azurecli-interactive
41
41
az feature show --namespace Microsoft.Compute --name EncryptionAtHost
42
42
```
43
43
44
-
45
44
### Create resources
46
45
47
46
> [!NOTE]
@@ -53,16 +52,16 @@ Once the feature is enabled, you need to set up a DiskEncryptionSet and either a
53
52
54
53
## Example scripts
55
54
56
-
### Create a VM with encryption at host enabled with customer-managed keys.
55
+
### Create a VM with encryption at host enabled with customer-managed keys
57
56
58
-
Create a VM with managed disks using the resource URI of the DiskEncryptionSet created earlier to encrypt cache of OS and data disks with customer-managed keys. The temp disks are encrypted with platform-managed keys.
57
+
Create a VM with managed disks using the resource URI of the DiskEncryptionSet created earlier to encrypt cache of OS and data disks with customer-managed keys. The temp disks are encrypted with platform-managed keys.
### Create a VM with encryption at host enabled with platform-managed keys.
81
+
### Create a VM with encryption at host enabled with platform-managed keys
83
82
84
-
Create a VM with encryption at host enabled to encrypt cache of OS/data disks and temp disks with platform-managed keys.
83
+
Create a VM with encryption at host enabled to encrypt cache of OS/data disks and temp disks with platform-managed keys.
85
84
86
-
```azurecli
85
+
```azurecli-interactive
87
86
rgName=yourRGName
88
87
vmName=yourVMName
89
88
location=eastus
90
89
vmSize=Standard_DS2_v2
91
-
image=UbuntuLTS
90
+
image=LinuxImageURN
92
91
93
92
az vm create -g $rgName \
94
93
-n $vmName \
@@ -100,9 +99,9 @@ az vm create -g $rgName \
100
99
--data-disk-sizes-gb 128 128 \
101
100
```
102
101
103
-
### Update a VM to enable encryption at host.
102
+
### Update a VM to enable encryption at host
104
103
105
-
```azurecli
104
+
```azurecli-interactive
106
105
rgName=yourRGName
107
106
vmName=yourVMName
108
107
@@ -113,7 +112,7 @@ az vm update -n $vmName \
113
112
114
113
### Check the status of encryption at host for a VM
115
114
116
-
```azurecli
115
+
```azurecli-interactive
117
116
rgName=yourRGName
118
117
vmName=yourVMName
119
118
@@ -122,12 +121,11 @@ az vm show -n $vmName \
122
121
--query [securityProfile.encryptionAtHost] -o tsv
123
122
```
124
123
125
-
126
-
### Update a VM to disable encryption at host.
124
+
### Update a VM to disable encryption at host
127
125
128
126
You must deallocate your VM before you can disable encryption at host.
129
127
130
-
```azurecli
128
+
```azurecli-interactive
131
129
rgName=yourRGName
132
130
vmName=yourVMName
133
131
@@ -136,24 +134,24 @@ az vm update -n $vmName \
136
134
--set securityProfile.encryptionAtHost=false
137
135
```
138
136
139
-
### Create a Virtual Machine Scale Set with encryption at host enabled with customer-managed keys.
137
+
### Create a Virtual Machine Scale Set with encryption at host enabled with customer-managed keys
140
138
141
139
Create a Virtual Machine Scale Set with managed disks using the resource URI of the DiskEncryptionSet created earlier to encrypt cache of OS and data disks with customer-managed keys. The temp disks are encrypted with platform-managed keys.
### Update a Virtual Machine Scale Set to disable encryption at host.
206
+
### Update a Virtual Machine Scale Set to disable encryption at host
209
207
210
208
You can disable encryption at host on your Virtual Machine Scale Set but, this will only affect VMs created after you disable encryption at host. For existing VMs, you must deallocate the VM, [disable encryption at host on that individual VM](#update-a-vm-to-disable-encryption-at-host), then reallocate the VM.
211
209
212
-
```azurecli
210
+
```azurecli-interactive
213
211
rgName=yourRGName
214
212
vmssName=yourVMName
215
213
@@ -245,7 +243,7 @@ When calling the [Resource Skus API](/rest/api/compute/resourceskus/list), check
245
243
246
244
For the Azure PowerShell module, use the [Get-AzComputeResourceSku](/powershell/module/az.compute/get-azcomputeresourcesku) cmdlet.
0 commit comments