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
This article provides end-to-end instructions for auto-provisioning a Windows IoT Edge device using a Trusted Platform Module (TPM). You can automatically provision Azure IoT Edge devices with the [Azure IoT Hub Device Provisioning Service](../iot-dps/index.yml) (DPS). If you're unfamiliar with the process of auto-provisioning, review the [provisioning overview](../iot-dps/about-iot-dps.md#provisioning-process) before continuing.
17
+
This article provides instructions for autoprovisioning an Azure IoT Edge for Windows device by using a Trusted Platform Module (TPM). You can automatically provision IoT Edge devices with the [Azure IoT Hub device provisioning service](../iot-dps/index.yml). If you're unfamiliar with the process of autoprovisioning, review the [provisioning overview](../iot-dps/about-iot-dps.md#provisioning-process) before you continue.
18
18
19
19
This article outlines two methodologies. Select your preference based on the architecture of your solution:
20
20
21
-
1. Auto-provision a Windows device with physical TPM hardware.
22
-
1. Auto-provision a Windows device running a simulated TPM. This methodology is recommended only as a testing scenario, because a simulated TPM does not offer the same security as a physical TPM.
21
+
- Autoprovision a Windows device with physical TPM hardware.
22
+
- Autoprovision a Windows device running a simulated TPM. We recommend this methodology only as a testing scenario. A simulated TPM doesn't offer the same security as a physical TPM.
23
23
24
-
Instructions differ based on your methodology, so make sure you are on the correct tab going forward.
24
+
Instructions differ based on your methodology, so make sure you're on the correct tab going forward.
25
25
26
26
The tasks are as follows:
27
27
@@ -44,21 +44,23 @@ The tasks are as follows:
44
44
The prerequisites are the same for physical TPM and virtual TPM solutions.
45
45
46
46
* A Windows development machine. This article uses Windows 10.
47
-
* An active IoT Hub.
48
-
* An instance of the IoT Hub Device Provisioning Service in Azure, linked to your IoT hub.
49
-
* If you don't have a Device Provisioning Service instance, you can follow the instructions in the [Create a new IoT Hub Device Provisioning Service](../iot-dps/quick-setup-auto-provision.md#create-a-new-iot-hub-device-provisioning-service) and [Link the IoT hub and your Device Provisioning Service](../iot-dps/quick-setup-auto-provision.md#link-the-iot-hub-and-your-device-provisioning-service) sections of the IoT Hub Device Provisioning Service quickstart.
50
-
* After you have the Device Provisioning Service running, copy the value of **ID Scope** from the overview page. You use this value when you configure the IoT Edge runtime.
47
+
* An active IoT hub.
48
+
* An instance of the IoT Hub device provisioning service in Azure linked to your IoT hub.
49
+
* If you don't have a device provisioning service instance, follow the instructions in two sections of the IoT Hub device provisioning service quickstart:
50
+
-[Create a new IoT Hub device provisioning service](../iot-dps/quick-setup-auto-provision.md#create-a-new-iot-hub-device-provisioning-service)
51
+
-[Link the IoT hub and your device provisioning service](../iot-dps/quick-setup-auto-provision.md#link-the-iot-hub-and-your-device-provisioning-service)
52
+
* After you have the device provisioning service running, copy the value of **ID Scope** from the overview page. You use this value when you configure the IoT Edge runtime.
51
53
52
54
> [!NOTE]
53
-
> TPM 2.0 is required when using TPM attestation with DPS.
55
+
> TPM 2.0 is required when you use TPM attestation with the device provisioning service.
54
56
>
55
-
> You can only create individual, not group, DPS enrollments when using a TPM.
57
+
> You can only create individual, not group, device provisioning service enrollments when you use a TPM.
56
58
57
59
## Set up your TPM
58
60
59
61
# [Physical TPM](#tab/physical-tpm)
60
62
61
-
In this section, you build a tool that you can use to retrieve the **Registration ID** and **Endorsement key** for your TPM.
63
+
In this section, you build a tool that you can use to retrieve the registration ID and endorsement key for your TPM.
62
64
63
65
1. Follow the steps in [Set up a Windows development environment](https://github.com/Azure/azure-iot-sdk-c/blob/master/doc/devbox_setup.md#set-up-a-windows-development-environment) to install and build the Azure IoT device SDK for C.
64
66
@@ -72,23 +74,23 @@ In this section, you build a tool that you can use to retrieve the **Registratio
72
74
.\tpm_device_provision
73
75
```
74
76
75
-
1. The output window displays the device's **Registration ID** and the **Endorsement key**. Copy these values for use later when you create an individual enrollment for your device in DPS.
77
+
1. The output window displays the device's **Registration ID** and the **Endorsement key**. Copy these values for use later when you create an individual enrollment for your device in the device provisioning service.
76
78
77
79
> [!TIP]
78
-
> If you do not want to use the SDK tool to retrieve the information, you need to find another way to obtain the provisioning information. The **Endorsement key**, which is unique to each TPM chip, is obtained from the TPM chip manufacturer associated with it. You can derive a unique **Registration ID** for your TPM device by, for example, creating an SHA-256 hash of the endorsement key.
80
+
> If you don't want to use the SDK tool to retrieve the information, you need to find another way to obtain the provisioning information. The endorsement key, which is unique to each TPM chip, is obtained from the TPM chip manufacturer associated with it. You can derive a unique registration ID for your TPM device. For example, you can create an SHA-256 hash of the endorsement key.
79
81
80
-
Once you have your registration ID and endorsement key, you're ready to continue.
82
+
After you have your registration ID and endorsement key, you're ready to continue.
81
83
82
84
# [Simulated TPM](#tab/simulated-tpm)
83
85
84
86
If you don't have a physical TPM available and want to test this provisioning method, you can simulate a TPM on your device.
85
87
86
-
IoT Hub Device Provisioning Service provides samples that simulate a TPM and return the **Endorsement key** and **Registration ID** for you.
88
+
The IoT Hub device provisioning service provides samples that simulate a TPM and return the endorsement key and registration ID for you.
87
89
88
-
1. Choose one of the samples from the following list, based on your preferred language.
89
-
1. Stop following the DPS sample steps once you have the simulated TPM running and have collected the **Endorsement key** and **Registration ID**. Do not press *Enter* to run registration in the sample application.
90
+
1. Choose one of the samples from the following list based on your preferred language.
91
+
1. Stop following the device provisioning service sample steps after you have the simulated TPM running and have collected the **Endorsement key** and **Registration ID**. Don't select **Enter** to run registration in the sample application.
90
92
1. Keep the window hosting the simulated TPM running until you're finished testing this scenario.
91
-
1. Return to this article to create a DPS enrollment and configure your device.
93
+
1. Return to this article to create a device provisioning service enrollment and configure your device.
92
94
93
95
Simulated TPM samples:
94
96
@@ -100,52 +102,52 @@ Simulated TPM samples:
100
102
101
103
---
102
104
103
-
## Create a DPS enrollment
105
+
## Create a device provisioning service enrollment
104
106
105
-
Use your TPM's provisioning information to create an individual enrollment in the Device Provisioning Service.
107
+
Use your TPM's provisioning information to create an individual enrollment in the device provisioning service.
106
108
107
-
When you create an enrollment in DPS, you have the opportunity to declare an **Initial Device Twin State**. In the device twin, you can set tags to group devices by any metric you need in your solution, like region, environment, location, or device type. These tags are used to create [automatic deployments](how-to-deploy-at-scale.md).
109
+
When you create an enrollment in the device provisioning service, you have the opportunity to declare an **Initial Device Twin State**. In the device twin, you can set tags to group devices by any metric you need in your solution, like region, environment, location, or device type. These tags are used to create [automatic deployments](how-to-deploy-at-scale.md).
108
110
109
111
> [!TIP]
110
-
> The steps in this article are for the Azure portal, but you can also create individual enrollments using the Azure CLI. For more information, see [az iot dps enrollment](/cli/azure/iot/dps/enrollment). As part of the CLI command, use the **edge-enabled** flag to specify that the enrollment is for an IoT Edge device.
112
+
> The steps in this article are for the Azure portal, but you can also create individual enrollments by using the Azure CLI. For more information, see [az iot dps enrollment](/cli/azure/iot/dps/enrollment). As part of the CLI command, use the **edge-enabled** flag to specify that the enrollment is for an IoT Edge device.
111
113
112
-
1. In the [Azure portal](https://portal.azure.com), navigate to your instance of the IoT Hub Device Provisioning Service.
114
+
1. In the [Azure portal](https://portal.azure.com), go to your instance of the IoT Hub device provisioning service.
113
115
114
116
1. Under **Settings**, select **Manage enrollments**.
115
117
116
-
1. Select **Add individual enrollment**, then complete the following steps to configure the enrollment:
118
+
1. Select **Add individual enrollment**, and then complete the following steps to configure the enrollment:
117
119
118
120
1. For **Mechanism**, select **TPM**.
119
121
120
-
1. Provide the **Endorsement key** and **Registration ID** that you copied from your virtual machine or physical device.
122
+
1. Provide the **Endorsement key** and **Registration ID** that you copied from your virtual machine (VM) or physical device.
121
123
122
-
1. Provide an ID for your device if you'd like. If you don't provide a device ID, the registration ID is used.
124
+
1. Provide an ID for your device if you want. If you don't provide a device ID, the **Registration ID** is used.
123
125
124
-
1. Select **True** to declare that your virtual machine or physical device is an IoT Edge device.
126
+
1. Select **True** to declare that your VM or physical device is an IoT Edge device.
125
127
126
128
1. Choose the linked IoT hub that you want to connect your device to, or select **Link to new IoT Hub**. You can choose multiple hubs, and the device will be assigned to one of them according to the selected assignment policy.
127
129
128
-
1. Add a tag value to the **Initial Device Twin State** if you'd like. You can use tags to target groups of devices for module deployment. For more information, see [Deploy IoT Edge modules at scale](how-to-deploy-at-scale.md).
130
+
1. Add a tag value to the **Initial Device Twin State** if you want. You can use tags to target groups of devices for module deployment. For more information, see [Deploy IoT Edge modules at scale](how-to-deploy-at-scale.md).
129
131
130
132
1. Select **Save**.
131
133
132
134
Now that an enrollment exists for this device, the IoT Edge runtime can automatically provision the device during installation.
133
135
134
136
## Install the IoT Edge runtime
135
137
136
-
In this section, you prepare your Windows virtual machine or physical device for IoT Edge. Then, you will install IoT Edge.
138
+
In this section, you prepare your Windows VM or physical device for IoT Edge. Then, you'll install IoT Edge.
137
139
138
-
There is one step you need to complete on your device before it is ready to install the IoT Edge runtime. Your device needs a container engine installed.
140
+
There's one step you need to complete on your device before it's ready to install the IoT Edge runtime. Your device needs a container engine installed.
139
141
140
142
### Install IoT Edge
141
143
142
144
The IoT Edge security daemon provides and maintains security standards on the IoT Edge device. The daemon starts on every boot and bootstraps the device by starting the rest of the IoT Edge runtime.
143
145
144
-
The steps in this section represent the typical process to install the latest version on a device that has internet connectivity. If you need to install a specific version, like a pre-release version, or need to install while offline, follow the Offline or specific version installation steps.
146
+
The steps in this section represent the typical process to install the latest version on a device that has internet connectivity. If you need to install a specific version, like a prerelease version, or need to install while offline, follow the Offline or specific version installation steps.
145
147
146
148
1. Run PowerShell as an administrator.
147
149
148
-
Use an AMD64 session of PowerShell, not PowerShell(x86). If you're unsure which session type you're using, run the following command:
150
+
Use an AMD64 session of PowerShell, not PowerShell(x86). If you're unsure which session type you're using, run the following command:
@@ -164,22 +166,22 @@ The steps in this section represent the typical process to install the latest ve
164
166
165
167
3. Restart your device if prompted.
166
168
167
-
When you install IoT Edge on a device, you can use additional parameters to modify the process including:
169
+
When you install IoT Edge on a device, you can use other parameters to modify the process to:
168
170
169
-
* Direct traffic to go through a proxy server
171
+
* Direct traffic to go through a proxy server.
170
172
* Point the installer to a local directory for offline installation.
171
173
172
-
For more information about these additional parameters, see [PowerShell scripts for IoT Edge with Windows containers](reference-windows-scripts.md).
174
+
For more information about these other parameters, see [PowerShell scripts for IoT Edge with Windows containers](reference-windows-scripts.md).
173
175
174
176
## Configure the device with provisioning information
175
177
176
-
Once the runtime is installed on your device, configure the device with the information it uses to connect to the Device Provisioning Service and IoT Hub.
178
+
After the runtime is installed on your device, configure the device with the information it uses to connect to the device provisioning service and IoT Hub.
177
179
178
-
1. Know your DPS**ID Scope** and device **Registration ID** that were gathered in the previous sections.
180
+
1. Know your device provisioning service**ID Scope** and device **Registration ID** that were gathered in the previous sections.
179
181
180
-
1. Open a PowerShell window in administrator mode. Be sure to use an AMD64 session of PowerShell when installing IoT Edge, not PowerShell (x86).
182
+
1. Open a PowerShell window in administrator mode. Be sure to use an AMD64 session of PowerShell when you install IoT Edge, not PowerShell (x86).
181
183
182
-
1. The **Initialize-IoTEdge** command configures the IoT Edge runtime on your machine. The command defaults to manual provisioning with Windows containers. Use the `-Dps` flag to use the Device Provisioning Service instead of manual provisioning.
184
+
1. The `Initialize-IoTEdge` command configures the IoT Edge runtime on your machine. The command defaults to manual provisioning with Windows containers. Use the `-Dps` flag to use the device provisioning service instead of manual provisioning.
183
185
184
186
Replace the placeholder values for `{scope_id}` and `{registration_id}` with the data you collected earlier.
185
187
@@ -190,26 +192,28 @@ Once the runtime is installed on your device, configure the device with the info
190
192
191
193
## Verify successful installation
192
194
193
-
If the runtime started successfully, you can go into your IoT Hub and start deploying IoT Edge modules to your device. Use the following commands on your device to verify that the runtime installed and started successfully.
195
+
If the runtime started successfully, go into your IoT hub and start deploying IoT Edge modules to your device. Use the following commands on your device to verify that the runtime installed and started successfully.
The Device Provisioning Service enrollment process lets you set the device ID and device twin tags at the same time as you provision the new device. You can use those values to target individual devices or groups of devices using automatic device management. Learn how to [Deploy and monitor IoT Edge modules at scale using the Azure portal](how-to-deploy-at-scale.md) or [using Azure CLI](how-to-deploy-cli-at-scale.md)
217
+
The device provisioning service enrollment process lets you set the device ID and device twin tags at the same time as you provision the new device. You can use those values to target individual devices or groups of devices by using automatic device management.
218
+
219
+
Learn how to [deploy and monitor IoT Edge modules at scale by using the Azure portal](how-to-deploy-at-scale.md) or [the Azure CLI](how-to-deploy-cli-at-scale.md).
0 commit comments