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
1. Update the values of `scope_id`, `registration_id`, and `symmetric_key` with your DPS and device information.
@@ -110,26 +111,30 @@ Have the following information ready:
110
111
111
112
1. Find the **Provisioning** section of the file. Uncomment the lines for DPS provisioning with symmetric key, and make sure any other provisioning lines are commented out.
symmetric_key = { value = "PASTE_YOUR_PRIMARY_KEY_OR_DERIVED_KEY_HERE" }
126
+
127
+
# auto_reprovisioning_mode = Dynamic
128
+
```
126
129
127
130
1. Update the values of `id_scope`, `registration_id`, and `symmetric_key` with your DPS and device information.
128
131
129
132
The symmetric key parameter can accept a value of an inline key, a file URI, or a PKCS#11 URI. Uncomment just one symmetric key line, based on which format you're using.
130
133
131
134
If you use any PKCS#11 URIs, find the **PKCS#11** section in the config file and provide information about your PKCS#11 configuration.
132
135
136
+
1. Optionally, find the auto reprovisioning mode section of the file. Use the `auto_reprovisioning_mode` parameter to configure your device's reprovisioning behavior. **Dynamic** - Reprovision when the device detects that it may have been moved from one IoT Hub to another. This is the default. **AlwaysOnStartup** - Reprovision when the device is rebooted or a crash causes the daemon(s) to restart. **OnErrorOnly** - Never trigger device reprovisioning automatically. Each mode has an implicit device reprovisioning fallback if the device is unable to connect to IoT Hub during identity provisioning due to connectivity errors. For more information, see [IoT Hub device reprovisioning concepts](../iot-dps/concepts-device-reprovision.md).
137
+
133
138
1. Save and close the config.toml file.
134
139
135
140
1. Apply the configuration changes that you made to IoT Edge.
Copy file name to clipboardExpand all lines: articles/iot-edge/how-to-provision-devices-at-scale-linux-tpm.md
+5-2Lines changed: 5 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ description: Use a simulated TPM on a Linux device to test the Azure IoT Hub dev
4
4
author: PatAltimore
5
5
manager: lizross
6
6
ms.author: patricka
7
-
ms.date: 10/28/2021
7
+
ms.date: 05/13/2022
8
8
ms.topic: conceptual
9
9
ms.service: iot-edge
10
10
services: iot-edge
@@ -196,6 +196,7 @@ After the runtime is installed on your device, configure the device with the inf
196
196
attestation:
197
197
method: "tpm"
198
198
registration_id: "REGISTRATION_ID_HERE"
199
+
199
200
# always_reprovision_on_startup: true
200
201
# dynamic_reprovisioning: false
201
202
```
@@ -238,11 +239,13 @@ After the runtime is installed on your device, configure the device with the inf
238
239
[provisioning.attestation]
239
240
method = "tpm"
240
241
registration_id = "REGISTRATION_ID_HERE"
242
+
243
+
# auto_reprovisioning_mode = Dynamic
241
244
```
242
245
243
246
1. Update the values of `id_scope` and `registration_id` with your device provisioning service and device information. The `scope_id` value is the **ID Scope** from your device provisioning service instance's overview page.
244
247
245
-
1. Optionally, find the auto reprovisioning mode section of the file. Use the `auto_reprovisioning_mode` parameter to configure your device's reprovisioning behaviorto either `Dynamic`, `AlwaysOnStartup`, or `OnErrorOnly`. For more information, see [IoT Hub device reprovisioning concepts](../iot-dps/concepts-device-reprovision.md).
248
+
1. Optionally, find the auto reprovisioning mode section of the file. Use the `auto_reprovisioning_mode` parameter to configure your device's reprovisioning behavior. **Dynamic** - Reprovision when the device detects that it may have been moved from one IoT Hub to another. This is the default. **AlwaysOnStartup** - Reprovision when the device is rebooted or a crash causes the daemon(s) to restart. **OnErrorOnly** - Never trigger device reprovisioning automatically. Each mode has an implicit device reprovisioning fallback if the device is unable to connect to IoT Hub during identity provisioning due to connectivity errors. For more information, see [IoT Hub device reprovisioning concepts](../iot-dps/concepts-device-reprovision.md).
1. Update the value of `id_scope` with the scope ID you copied from your instance of DPS.
@@ -178,6 +181,8 @@ Have the following information ready:
178
181
179
182
If you use any PKCS#11 URIs, find the **PKCS#11** section in the config file and provide information about your PKCS#11 configuration.
180
183
184
+
1. Optionally, find the auto reprovisioning mode section of the file. Use the `auto_reprovisioning_mode` parameter to configure your device's reprovisioning behavior. **Dynamic** - Reprovision when the device detects that it may have been moved from one IoT Hub to another. This is the default. **AlwaysOnStartup** - Reprovision when the device is rebooted or a crash causes the daemon(s) to restart. **OnErrorOnly** - Never trigger device reprovisioning automatically. Each mode has an implicit device reprovisioning fallback if the device is unable to connect to IoT Hub during identity provisioning due to connectivity errors. For more information, see [IoT Hub device reprovisioning concepts](../iot-dps/concepts-device-reprovision.md).
185
+
181
186
1. Save and close the file.
182
187
183
188
1. Apply the configuration changes that you made to IoT Edge.
warn: edgelet_utils::logging -- Could not start module edgeHub
156
-
warn: edgelet_utils::logging -- caused by: failed to create endpoint edgeHub on network nat: hnsCall failed in Win32:
156
+
warn: edgelet_utils::logging -- caused by: failed to create endpoint edgeHub on network nat: hnsCall failed in Win32:
157
157
The process cannot access the file because it is being used by another process. (0x20)
158
158
```
159
159
@@ -317,6 +317,27 @@ Windows Registry Editor Version 5.00
317
317
"TypesSupported"=dword:00000007
318
318
```
319
319
320
+
## DPS client error
321
+
322
+
**Observed behavior:**
323
+
324
+
IoT Edge fails to start with error message `failed to provision with IoT Hub, and no valid device backup was found dps client error.`
325
+
326
+
**Root cause:**
327
+
328
+
A group enrollment is used to provision an IoT Edge device to an IoT Hub. The IoT Edge device is moved to a different hub. The registration is deleted in DPS. A new registration is created in DPS for the new hub. The device is not reprovisioned.
329
+
330
+
**Resolution:**
331
+
332
+
1. Verify your DPS credentials are correct.
333
+
1. Apply your configuration using `sudo iotedge apply config`.
334
+
1. If the device isn't reprovisioned, restart the device using `sudo iotedge system restart`.
335
+
1. If the device isn't reprovisioned, force reprovisioning using `sudo iotedge system reprovision`.
336
+
337
+
To automatically reprovision, set`dynamic_reprovisioning: true`in the device configuration file. Setting this flag to true opts in to the dynamic re-provisioning feature. IoT Edge detects situations where the device appears to have been reprovisioned in the cloud by monitoring its own IoT Hub connection for certain errors. IoT Edge responds by shutting itself and all Edge modules down. The next time the daemon starts up, it will attempt to reprovision this device with Azure to receive the new IoT Hub provisioning information.
338
+
339
+
When using external provisioning, the daemon will also notify the external provisioning endpoint about the re-provisioning event before shutting down. For more information, see [IoT Hub device reprovisioning concepts](../iot-dps/concepts-device-reprovision.md).
340
+
320
341
:::moniker-end
321
342
<!-- end 1.1 -->
322
343
@@ -421,7 +442,7 @@ On Windows:
421
442
422
443
1. If the parameter exists, set the value of the parameter to **1**.
423
444
424
-
1. If the paramter doesn't exist, add it as a new parameter with the following settings:
445
+
1. If the parameter doesn't exist, add it as a new parameter with the following settings:
0 commit comments