Skip to content

Commit 4031237

Browse files
authored
Merge pull request #100838 from roygara/nonblockUpdate
Remaining updates for SSE CMK
2 parents e8c04f9 + 2b65184 commit 4031237

File tree

5 files changed

+78
-20
lines changed

5 files changed

+78
-20
lines changed

articles/virtual-machines/linux/disk-encryption.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,14 @@ For now, only the following scenarios are supported:
6363

6464
For now, we also have the following restrictions:
6565

66-
- **Only available in West Central US, South Central US, East US 2, East US, West US 2, Central Canada, and North Europe.**
66+
- Available as a GA offering in East US, West US 2, and South Central US.
67+
- Available as a public preview in West Central US, East US 2, Canada Central, and North Europe.
6768
- Disks created from custom images that are encrypted using server-side encryption and customer-managed keys must be encrypted using the same customer-managed keys and must be in the same subscription.
6869
- Snapshots created from disks that are encrypted with server-side encryption and customer-managed keys must be encrypted with the same customer-managed keys.
6970
- Custom images encrypted using server-side encryption and customer-managed keys cannot be used in the shared image gallery.
7071
- All resources related to your customer-managed keys (Azure Key Vaults, disk encryption sets, VMs, disks, and snapshots) must be in the same subscription and region.
7172
- Disks, snapshots, and images encrypted with customer-managed keys cannot move to another subscription.
72-
- If you use the Azure Portal to create your disk encryption set, you cannot use snapshots for now.
73+
- If you use the Azure portal to create your disk encryption set, you cannot use snapshots for now.
7374

7475
### CLI
7576
#### Setting up your Azure Key Vault and DiskEncryptionSet
@@ -132,8 +133,20 @@ diskEncryptionSetName=yourDiskencryptionSetName
132133
diskEncryptionSetId=$(az disk-encryption-set show -n $diskEncryptionSetName -g $rgName --query [id] -o tsv)
133134
134135
az vm create -g $rgName -n $vmName -l $location --image $image --size $vmSize --generate-ssh-keys --os-disk-encryption-set $diskEncryptionSetId --data-disk-sizes-gb 128 128 --data-disk-encryption-sets $diskEncryptionSetId $diskEncryptionSetId
136+
```
135137

138+
#### Create a virtual machine scale set using a Marketplace image, encrypting the OS and data disks with customer-managed keys
136139

140+
```azurecli
141+
rgName=ssecmktesting
142+
vmssName=ssecmktestvmss5
143+
location=WestCentralUS
144+
vmSize=Standard_DS3_V2
145+
image=UbuntuLTS
146+
diskEncryptionSetName=diskencryptionset786
147+
148+
diskEncryptionSetId=$(az disk-encryption-set show -n $diskEncryptionSetName -g $rgName --query [id] -o tsv)
149+
az vmss create -g $rgName -n $vmssName --image UbuntuLTS --upgrade-policy automatic --admin-username azureuser --generate-ssh-keys --os-disk-encryption-set $diskEncryptionSetId --data-disk-sizes-gb 64 128 --data-disk-encryption-sets $diskEncryptionSetId $diskEncryptionSetId
137150
```
138151

139152
#### Create an empty disk encrypted using server-side encryption with customer-managed keys and attach it to a VM

articles/virtual-machines/windows/disk-encryption.md

Lines changed: 47 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,14 @@ For now, only the following scenarios are supported:
6464

6565
For now, we also have the following restrictions:
6666

67-
- **Only available in West Central US, South Central US, East US 2, East US, West US 2, Central Canada, and North Europe.**
67+
- Available as a GA offering in East US, West US 2, and South Central US.
68+
- Available as a public preview in West Central US, East US 2, Canada Central, and North Europe.
6869
- Disks created from custom images that are encrypted using server-side encryption and customer-managed keys must be encrypted using the same customer-managed keys and must be in the same subscription.
6970
- Snapshots created from disks that are encrypted with server-side encryption and customer-managed keys must be encrypted with the same customer-managed keys.
7071
- Custom images encrypted using server-side encryption and customer-managed keys cannot be used in the shared image gallery.
7172
- All resources related to your customer-managed keys (Azure Key Vaults, disk encryption sets, VMs, disks, and snapshots) must be in the same subscription and region.
7273
- Disks, snapshots, and images encrypted with customer-managed keys cannot move to another subscription.
73-
- If you use the Azure Portal to create your disk encryption set, you cannot use snapshots for now.
74+
- If you use the Azure portal to create your disk encryption set, you cannot use snapshots for now.
7475
- Only ["soft" and "hard" RSA keys](../../key-vault/about-keys-secrets-and-certificates.md#keys-and-key-types) of size 2080 are supported, no other keys or sizes.
7576

7677
### PowerShell
@@ -178,6 +179,50 @@ Update-AzVM -ResourceGroupName $rgName -VM $vm
178179
179180
```
180181

182+
#### Create a virtual machine scale set using a Marketplace image, encrypting the OS and data disks with customer-managed keys
183+
184+
```PowerShell
185+
$VMLocalAdminUser = "yourLocalAdminUser"
186+
$VMLocalAdminSecurePassword = ConvertTo-SecureString Password@123 -AsPlainText -Force
187+
$LocationName = "westcentralus"
188+
$ResourceGroupName = "yourResourceGroupName"
189+
$ComputerNamePrefix = "yourComputerNamePrefix"
190+
$VMScaleSetName = "yourVMSSName"
191+
$VMSize = "Standard_DS3_v2"
192+
$diskEncryptionSetName="yourDiskEncryptionSetName"
193+
194+
$NetworkName = "yourVNETName"
195+
$SubnetName = "yourSubnetName"
196+
$SubnetAddressPrefix = "10.0.0.0/24"
197+
$VnetAddressPrefix = "10.0.0.0/16"
198+
199+
$SingleSubnet = New-AzVirtualNetworkSubnetConfig -Name $SubnetName -AddressPrefix $SubnetAddressPrefix
200+
201+
$Vnet = New-AzVirtualNetwork -Name $NetworkName -ResourceGroupName $ResourceGroupName -Location $LocationName -AddressPrefix $VnetAddressPrefix -Subnet $SingleSubnet
202+
203+
$ipConfig = New-AzVmssIpConfig -Name "myIPConfig" -SubnetId $Vnet.Subnets[0].Id
204+
205+
$VMSS = New-AzVmssConfig -Location $LocationName -SkuCapacity 2 -SkuName $VMSize -UpgradePolicyMode 'Automatic'
206+
207+
$VMSS = Add-AzVmssNetworkInterfaceConfiguration -Name "myVMSSNetworkConfig" -VirtualMachineScaleSet $VMSS -Primary $true -IpConfiguration $ipConfig
208+
209+
$diskEncryptionSet=Get-AzDiskEncryptionSet -ResourceGroupName $ResourceGroupName -Name $diskEncryptionSetName
210+
211+
# Enable encryption at rest with customer managed keys for OS disk by setting DiskEncryptionSetId property
212+
213+
$VMSS = Set-AzVmssStorageProfile $VMSS -OsDiskCreateOption "FromImage" -DiskEncryptionSetId $diskEncryptionSet.Id -ImageReferenceOffer 'WindowsServer' -ImageReferenceSku '2012-R2-Datacenter' -ImageReferenceVersion latest -ImageReferencePublisher 'MicrosoftWindowsServer'
214+
215+
$VMSS = Set-AzVmssOsProfile $VMSS -ComputerNamePrefix $ComputerNamePrefix -AdminUsername $VMLocalAdminUser -AdminPassword $VMLocalAdminSecurePassword
216+
217+
# Add a data disk encrypted at rest with customer managed keys by setting DiskEncryptionSetId property
218+
219+
$VMSS = Add-AzVmssDataDisk -VirtualMachineScaleSet $VMSS -CreateOption Empty -Lun 1 -DiskSizeGB 128 -StorageAccountType Premium_LRS -DiskEncryptionSetId $diskEncryptionSet.Id
220+
221+
$Credential = New-Object System.Management.Automation.PSCredential ($VMLocalAdminUser, $VMLocalAdminSecurePassword);
222+
223+
New-AzVmss -VirtualMachineScaleSet $VMSS -ResourceGroupName $ResourceGroupName -VMScaleSetName $VMScaleSetName
224+
```
225+
181226
> [!IMPORTANT]
182227
> Customer-managed keys rely on managed identities for Azure resources, a feature of Azure Active Directory (Azure AD). When you configure customer-managed keys, a managed identity is automatically assigned to your resources under the covers. If you subsequently move the subscription, resource group, or managed disk from one Azure AD directory to another, the managed identity associated with managed disks is not transferred to the new tenant, so customer-managed keys may no longer work. For more information, see [Transferring a subscription between Azure AD directories](../../active-directory/managed-identities-azure-resources/known-issues.md#transferring-a-subscription-between-azure-ad-directories).
183228
34.3 KB
Loading

includes/virtual-machines-disks-encryption-portal.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,51 +18,51 @@ Setting up customer-managed keys for your disks will require you to create resou
1818
1. Sign into the [Azure portal](https://portal.azure.com/) and search for Key Vault
1919
1. Search for and select **Key Vaults**.
2020

21-
![sse-key-vault-portal-search.png](media/virtual-machines-disk-encryption-portal/sse-key-vault-portal-search.png)
21+
[ ![sse-key-vault-portal-search.png](media/virtual-machines-disk-encryption-portal/sse-key-vault-portal-search.png)](media/virtual-machines-disk-encryption-portal/sse-key-vault-portal-search-expanded.png#lightbox)
2222

23-
> [!IMPORTANT]
24-
> Your Azure key vault, disk encryption set, VM, disks, and snapshots must all be in the same region and subscription for deployment to succeed.
23+
> [!IMPORTANT]
24+
> Your Azure key vault, disk encryption set, VM, disks, and snapshots must all be in the same region and subscription for deployment to succeed.
2525
2626
1. Select **+Add** to create a new Key Vault.
2727
1. Create a new resource group
2828
1. Enter a key vault name, select a region, and select a pricing tier.
2929
1. Select **Review + Create**, verify your choices, then select **Create**.
3030

31-
![sse-create-a-key-vault.png](media/virtual-machines-disk-encryption-portal/sse-create-a-key-vault.png)
31+
![sse-create-a-key-vault.png](media/virtual-machines-disk-encryption-portal/sse-create-a-key-vault.png)
3232

3333
1. Once your key vault finishes deploying, select it.
3434
1. Select **Keys** under **Settings**.
3535
1. Select **Generate/Import**
3636

37-
![sse-key-vault-generate-settings.png](media/virtual-machines-disk-encryption-portal/sse-key-vault-generate-settings.png)
37+
![sse-key-vault-generate-settings.png](media/virtual-machines-disk-encryption-portal/sse-key-vault-generate-settings.png)
3838

39-
1. Keep both **Key Type** set to **RSA** and **RSA Key Size** set to **2080**.
39+
1. Leave both **Key Type** set to **RSA** and **RSA Key Size** set to **2080**.
4040
1. Fill in the remaining selections as you like and then select **Create**.
4141

42-
![sse-create-a-key-generate.png](media/virtual-machines-disk-encryption-portal/sse-create-a-key-generate.png)
42+
![sse-create-a-key-generate.png](media/virtual-machines-disk-encryption-portal/sse-create-a-key-generate.png)
4343

4444
#### Setting up your disk encryption set
4545

46-
To create and configure disk encryption sets, you must use the following link: https://aka.ms/diskencryptionsets. Disk encryption set creation is not yet available in the public Azure portal.
46+
To create and configure disk encryption sets, you must use the following link: https://aka.ms/diskencryptionsets. Disk encryption set creation is not yet available in the global Azure portal.
4747

4848
1. Open the [disk encryption sets link](https://aka.ms/diskencryptionsets).
4949
1. Select **+Add**.
5050

51-
![sse-create-disk-encryption-set.png](media/virtual-machines-disk-encryption-portal/sse-create-disk-encryption-set.png)
51+
![sse-create-disk-encryption-set.png](media/virtual-machines-disk-encryption-portal/sse-create-disk-encryption-set.png)
5252

5353
1. Select your resource group, name your encryption set, and select the same region as your key vault.
5454
1. Select **Key vault and key**.
5555
1. Select the key vault and key you created previously, as well as the version.
5656
1. Press **Select**.
5757
1. Select **Review + Create** and then **Create**.
5858

59-
![sse-disk-enc-set-blade-key.png](media/virtual-machines-disk-encryption-portal/sse-disk-enc-set-blade-key.png)
59+
![sse-disk-enc-set-blade-key.png](media/virtual-machines-disk-encryption-portal/sse-disk-enc-set-blade-key.png)
6060

6161
1. Open the disk encryption set once it finishes creating and select the alert that pops up.
6262

63-
![sse-disk-enc-alert-fix.png](media/virtual-machines-disk-encryption-portal/sse-disk-enc-alert-fix.png)
63+
![sse-disk-enc-alert-fix.png](media/virtual-machines-disk-encryption-portal/sse-disk-enc-alert-fix.png)
6464

65-
Two notifications should pop up and succeed. Doing this will allow you to use the set with your key vault.
65+
Two notifications should pop up and succeed. Doing this will allow you to use the disk encryption set with your key vault.
6666

6767
![disk-enc-notification-success.png](media/virtual-machines-disk-encryption-portal/disk-enc-notification-success.png)
6868

@@ -75,10 +75,10 @@ The VM deployment process is similar to the standard deployment process, the onl
7575
1. On the **Basic** tab, select the same region as your disk encryption set and Azure Key Vault.
7676
1. Fill in the other values on the **Basic** tab as you like.
7777

78-
![sse-create-a-vm-region.png](media/virtual-machines-disk-encryption-portal/sse-create-a-vm-region.png)
78+
![sse-create-a-vm-region.png](media/virtual-machines-disk-encryption-portal/sse-create-a-vm-region.png)
7979

80-
1. On the **Disks** tab, select **Encryption at rest with customer-managed key**.
80+
1. On the **Disks** tab, select **Encryption at rest with a customer-managed key**.
8181
1. Select your disk encryption set in the **Disk encryption set** drop-down.
8282
1. Make the remaining selections as you like.
8383

84-
![sse-create-vm-select-cmk-encryption-set.png](media/virtual-machines-disk-encryption-portal/sse-create-vm-select-cmk-encryption-set.png)
84+
![sse-create-vm-select-cmk-encryption-set.png](media/virtual-machines-disk-encryption-portal/sse-create-vm-select-cmk-encryption-set.png)

includes/virtual-machines-managed-disks-overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Managed disks offer two different kinds of encryption. The first is Server Side
5050

5151
### Server-side encryption
5252

53-
[Azure Server-side Encryption](../articles/virtual-machines/windows/disk-encryption.md) provides encryption-at-rest and safeguards your data to meet your organizational security and compliance commitments. Server-side encryption is enabled by default for all managed disks, snapshots, and images in all the regions where managed disks are available. You can either allow Azure to manage your keys for you, these are platform-managed keys, or you can manage the keys yourself, these are customer-managed keys (preview). Visit the [Managed Disks FAQ page](../articles/virtual-machines/windows/faq-for-disks.md#managed-disks-and-storage-service-encryption) for more details.
53+
[Azure Server-side Encryption](../articles/virtual-machines/windows/disk-encryption.md) provides encryption-at-rest and safeguards your data to meet your organizational security and compliance commitments. Server-side encryption is enabled by default for all managed disks, snapshots, and images in all the regions where managed disks are available. You can either allow Azure to manage your keys for you, these are platform-managed keys, or you can manage the keys yourself, these are customer-managed keys. Visit the [Managed Disks FAQ page](../articles/virtual-machines/windows/faq-for-disks.md#managed-disks-and-storage-service-encryption) for more details.
5454

5555
### Azure Disk Encryption
5656

0 commit comments

Comments
 (0)