Skip to content

Commit 642f571

Browse files
authored
Merge pull request #127271 from pkshultz/batch-disk-encryption
Add Batch disk encryption article
2 parents edbbd54 + 08844e4 commit 642f571

File tree

5 files changed

+107
-1
lines changed

5 files changed

+107
-1
lines changed

articles/batch/TOC.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,8 @@
137137
href: batch-sig-images.md
138138
- name: Create a pool with a managed image resource
139139
href: batch-custom-images.md
140+
- name: Create a pool with disk encryption enabled
141+
href: disk-encryption.md
140142
- name: Create a pool in a virtual network
141143
href: batch-virtual-network.md
142144
- name: Create a pool with public IP addresses

articles/batch/batch-customer-managed-key.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,6 @@ az batch account set \
145145
* **How can I rotate my keys?** Customer-managed keys are not automatically rotated. To rotate the key, update the Key Identifier that the account is associated with.
146146
* **After I restore access how long will it take for the Batch account to work again?** It can take up to 10 minutes for the account to be accessible again once access is restored.
147147
* **While the Batch Account is unavailable what happens to my resources?** Any pools that are running when Batch access to customer-managed keys is lost will continue to run. However, the nodes will transition into an unavailable state, and tasks will stop running (and be requeued). Once access is restored, nodes will become available again and tasks will be restarted.
148-
* **Does this encryption mechanism apply to VM disks in a Batch pool?** No. For Cloud Service Configuration Pools, no encryption is applied for the OS and temporary disk. For Virtual Machine Configuration Pools, the OS and any specified data disks will be encrypted with a Microsoft platform managed key by default. Currently, you cannot specify your own key for these disks. To encrypt the temporary disk of VMs for a Batch pool with a Microsoft platform managed key, you must enable the [diskEncryptionConfiguration](/rest/api/batchservice/pool/add#diskencryptionconfiguration) property in your [Virtual Machine Configuration](/rest/api/batchservice/pool/add#virtualmachineconfiguration) Pool. For highly sensitive environments, we recommend enabling temporary disk encryption and avoiding storing sensitive data on OS and data disks.
148+
* **Does this encryption mechanism apply to VM disks in a Batch pool?** No. For Cloud Service Configuration Pools, no encryption is applied for the OS and temporary disk. For Virtual Machine Configuration Pools, the OS and any specified data disks will be encrypted with a Microsoft platform managed key by default. Currently, you cannot specify your own key for these disks. To encrypt the temporary disk of VMs for a Batch pool with a Microsoft platform managed key, you must enable the [diskEncryptionConfiguration](/rest/api/batchservice/pool/add#diskencryptionconfiguration) property in your [Virtual Machine Configuration](/rest/api/batchservice/pool/add#virtualmachineconfiguration) Pool. For highly sensitive environments, we recommend enabling temporary disk encryption and avoiding storing sensitive data on OS and data disks. For more information, see [Create a pool with disk encryption enabled](./disk-encryption.md)
149149
* **Is the system-assigned managed identity on the Batch account available on the compute nodes?** No. This managed identity is currently used only for accessing the Azure Key Vault for the customer-managed key.
150150

articles/batch/disk-encryption.md

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
---
2+
title: Create a pool with disk encryption enabled
3+
description: Learn how to use disk encryption configuration to encrypt nodes with a platform-managed key.
4+
author: pkshultz
5+
ms.topic: how-to
6+
ms.date: 08/25/2020
7+
ms.author: peshultz
8+
ms.custom: references_regions
9+
---
10+
11+
# Create a pool with disk encryption enabled
12+
13+
When you create an Azure Batch pool using virtual machine configuration, you can encrypt compute nodes in the pool with a platform-managed key by specifying the disk encryption configuration.
14+
15+
This article explains how to create a Batch pool with disk encryption enabled.
16+
17+
## Why use a pool with disk encryption configuration?
18+
19+
With a Batch pool, you can access and store data on the OS and temporary disks of the compute node. Encrypting the server-side disk with a platform-managed key will safeguard this data with low overhead and convenience.
20+
21+
Batch will apply one of these disk encryption technologies on compute nodes, based on pool configuration and regional supportability.
22+
23+
* [Managed disk encryption at rest with platform-managed keys](../virtual-machines/windows/disk-encryption.md#platform-managed-keys)
24+
25+
* [Encryption at host using a platform-managed Key](../virtual-machines/windows/disk-encryption.md#encryption-at-host---end-to-end-encryption-for-your-vm-data)
26+
27+
* [Azure Disk Encryption](../security/fundamentals/azure-disk-encryption-vms-vmss.md)
28+
29+
> [!IMPORTANT]
30+
> Support for encryption at host using a platform-managed key in Azure Batch is currently in public preview for the East US, West US 2, South Central US, US Gov Virginia, and US Gov Arizona regions.
31+
> This preview version is provided without a service level agreement, and it's not recommended for production workloads. Certain features might not be supported or might have constrained capabilities.
32+
> For more information, see [Supplemental Terms of Use for Microsoft Azure Previews](https://azure.microsoft.com/support/legal/preview-supplemental-terms/).
33+
34+
You won't be able to specify which encryption method will be applied to the nodes in your pool. Instead, you provide the target disks you want to encrypt on their nodes, and Batch can choose the appropriate encryption method, ensuring the specified disks are encrypted on the compute node.
35+
36+
## Azure portal
37+
38+
When creating a Batch pool in the the Azure portal, select either **TemporaryDisk** or **OsAndTemporaryDisk** under **Disk Encryption Configuration**.
39+
40+
![Screenshot of the Disk Encryption Configuration option in the Azure portal.](./media/disk-encryption/portal-view.png)
41+
42+
After the pool is created, you can see the disk encryption configuration targets in the pool's **Properties** section.
43+
44+
![Screenshot showing the disk encryption configuration targets in the Azure portal.](./media/disk-encryption/disk-encryption-configuration-target.png)
45+
46+
## Examples
47+
48+
The following examples show how to encrypt the OS and temporary disks on a Batch pool using the Batch .NET SDK, the Batch REST API, and the Azure CLI.
49+
50+
### Batch .NET SDK
51+
52+
```csharp
53+
pool.VirtualMachineConfiguration.DiskEncryptionConfiguration = new DiskEncryptionConfiguration(
54+
targets: new List<DiskEncryptionTarget> { DiskEncryptionTarget.OsDisk, DiskEncryptionTarget.TemporaryDisk }
55+
);
56+
```
57+
58+
### Batch REST API
59+
60+
61+
REST API URL:
62+
```
63+
POST {batchURL}/pools?api-version=2020-03-01.11.0
64+
client-request-id: 00000000-0000-0000-0000-000000000000
65+
```
66+
Request body:
67+
```
68+
"pool": {
69+
"id": "pool2",
70+
"vmSize": "standard_a1",
71+
"virtualMachineConfiguration": {
72+
"imageReference": {
73+
"publisher": "Canonical",
74+
"offer": "UbuntuServer",
75+
"sku": "18.04-LTS"
76+
},
77+
"diskEncryptionConfiguration": {
78+
"targets": [
79+
"OsDisk",
80+
"TemporaryDisk"
81+
]
82+
}
83+
"nodeAgentSKUId": "batch.node.ubuntu 18.04"
84+
},
85+
"resizeTimeout": "PT15M",
86+
"targetDedicatedNodes": 5,
87+
"targetLowPriorityNodes": 0,
88+
"maxTasksPerNode": 3,
89+
"enableAutoScale": false,
90+
"enableInterNodeCommunication": false
91+
}
92+
```
93+
94+
### Azure CLI
95+
96+
```azurecli-interactive
97+
az batch pool create \
98+
--id diskencryptionPool \
99+
--vm-size Standard_DS1_V2 \
100+
--target-dedicated-nodes 2 \
101+
--image canonical:ubuntuserver:18.04-LTS \
102+
--node-agent-sku-id "batch.node.ubuntu 18.04" \
103+
--disk-encryption-targets OsDisk TemporaryDisk
104+
```
12.4 KB
Loading
23.6 KB
Loading

0 commit comments

Comments
 (0)