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
Copy file name to clipboardExpand all lines: articles/iot-edge/how-to-access-host-storage-from-module.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -72,6 +72,9 @@ Your deployment manifest would be similar to the following:
72
72
}
73
73
```
74
74
75
+
> [!NOTE]
76
+
> If you are using a snap installation, ensure you choose a host storage path that is accessible to the snaps. For example, `$HOME/snap/azure-iot-edge/current/modules/`.
77
+
75
78
### Automatic host system permissions management
76
79
77
80
On version 1.4 and newer, there's no need for manually setting ownership or permissions for host storage backing the `StorageFolder`. Permissions and ownership are automatically managed by the system modules during startup.
1.Open the configuration file on the IoT Edge device.
62
+
Open the configuration file on the IoT Edge device.
61
63
62
64
```bash
63
65
sudo nano /etc/aziot/config.toml
64
66
```
65
67
68
+
# [Ubuntu Core snaps](#tab/snaps)
69
+
70
+
If using a snap installation of IoT Edge, the template file is located at `/snap/azure-iot-edge/current/etc/aziot/config.toml.edge.template`. Create a copy of the template file in your home directory and name it config.toml. For example:
Open the configuration file in your home directory on the IoT Edge device.
77
+
78
+
```bash
79
+
nano ~/config.toml
80
+
```
81
+
82
+
---
83
+
66
84
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.
67
85
68
86
```toml
@@ -90,18 +108,29 @@ Have the following information ready:
90
108
91
109
If you use any PKCS#11 URIs, find the **PKCS#11** section in the config file and provide information about your PKCS#11 configuration.
92
110
93
-
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).
111
+
For more information about provisioning configuration settings, see [Configure IoT Edge device settings](configure-device.md#provisioning).
94
112
95
-
1. Optionally, uncomment the `payload` parameter to specify the path to a local JSON file. The contents of the file will be [sent to DPS as additional data](../iot-dps/how-to-send-additional-data.md#iot-edge-support) when the device registers. This is useful for [custom allocation](../iot-dps/how-to-use-custom-allocation-policies.md). For example, if you want to allocate your devices based on an IoT Plug and Play model ID without human intervention.
113
+
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 daemons 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).
96
114
97
-
1. Save and close the file.
115
+
1. Optionally, uncomment the `payload` parameter to specify the path to a local JSON file. The contents of the file is [sent to DPS as additional data](../iot-dps/how-to-send-additional-data.md#iot-edge-support) when the device registers. This is useful for [custom allocation](../iot-dps/how-to-use-custom-allocation-policies.md). For example, if you want to allocate your devices based on an IoT Plug and Play model ID without human intervention.
98
116
99
-
1. Apply the configuration changes that you made to IoT Edge.
117
+
1. Save and close the file.
100
118
101
-
```bash
102
-
sudo iotedge config apply
103
-
```
119
+
1. Apply the configuration changes that you made on the device.
Copy file name to clipboardExpand all lines: articles/iot-edge/how-to-provision-devices-at-scale-linux-tpm.md
+63-29Lines changed: 63 additions & 29 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: 05/13/2022
7
+
ms.date: 02/27/2024
8
8
ms.topic: conceptual
9
9
ms.service: iot-edge
10
10
services: iot-edge
@@ -52,7 +52,7 @@ The tasks are as follows:
52
52
53
53
A physical Linux device to be the IoT Edge device.
54
54
55
-
If you are a device manufacturer then refer to guidance on [integrating a TPM into the manufacturing process](../iot-dps/concepts-device-oem-security-practices.md#integrating-a-tpm-into-the-manufacturing-process).
55
+
If you are a device manufacturer, then refer to guidance on [integrating a TPM into the manufacturing process](../iot-dps/concepts-device-oem-security-practices.md#integrating-a-tpm-into-the-manufacturing-process).
56
56
57
57
# [Virtual machine](#tab/virtual-machine)
58
58
@@ -165,6 +165,11 @@ Sign in to your device, and install the `tpm2-tools` package.
165
165
sudo yum install tpm2-tools
166
166
```
167
167
168
+
# [Ubuntu Core snaps](#tab/snaps)
169
+
170
+
```bash
171
+
sudo snap install tpm2-tools
172
+
```
168
173
---
169
174
170
175
Run the following script to read the endorsement key, creating one if it does not already exist.
@@ -212,19 +217,37 @@ After you have your registration ID and endorsement key, you're ready to continu
212
217
213
218
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.
214
219
215
-
1.Know your device provisioning service **ID Scope** and device **Registration ID** that were gathered previously.
220
+
Know your device provisioning service **ID Scope** and device **Registration ID** that were gathered previously.
216
221
217
-
1.Create a configuration file for your device based on a template file that's provided as part of the IoT Edge installation.
222
+
Create a configuration file for your device based on a template file that's provided as part of the IoT Edge installation.
Open the configuration file on the IoT Edge device.
231
+
232
+
```bash
233
+
sudo nano /etc/aziot/config.toml
234
+
```
235
+
236
+
# [Ubuntu Core snaps](#tab/snaps)
237
+
238
+
If using a snap installation of IoT Edge, the template file is located at `/snap/azure-iot-edge/current/etc/aziot/config.toml.edge.template`. Create a copy of the template file in your home directory and name it config.toml. For example:
Open the configuration file in your home directory on the IoT Edge device.
245
+
246
+
```bash
247
+
nano ~/config.toml
248
+
```
249
+
250
+
---
228
251
229
252
1. Find the provisioning configurations section of the file. Uncomment the lines for TPM provisioning, and make sure any other provisioning lines are commented out.
230
253
@@ -247,9 +270,11 @@ After the runtime is installed on your device, configure the device with the inf
247
270
248
271
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.
249
272
250
-
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).
273
+
For more information about provisioning configuration settings, see [Configure IoT Edge device settings](configure-device.md#provisioning).
251
274
252
-
1. Optionally, uncomment the `payload` parameter to specify the path to a local JSON file. The contents of the file will be [sent to DPS as additional data](../iot-dps/how-to-send-additional-data.md#iot-edge-support) when the device registers. This is useful for [custom allocation](../iot-dps/how-to-use-custom-allocation-policies.md). For example, if you want to allocate your devices based on an IoT Plug and Play model ID without human intervention.
275
+
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 daemons 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).
276
+
277
+
1. Optionally, uncomment the `payload` parameter to specify the path to a local JSON file. The contents of the file is [sent to DPS as additional data](../iot-dps/how-to-send-additional-data.md#iot-edge-support) when the device registers. This is useful for [custom allocation](../iot-dps/how-to-use-custom-allocation-policies.md). For example, if you want to allocate your devices based on an IoT Plug and Play model ID without human intervention.
253
278
254
279
1. Save and close the file.
255
280
@@ -259,7 +284,7 @@ The IoT Edge runtime relies on a TPM service that brokers access to a device's T
259
284
260
285
You can give access to the TPM by overriding the systemd settings so that the `aziottpm` service has root privileges. If you don't want to elevate the service privileges, you can also use the following steps to manually provide TPM access.
261
286
262
-
1. Create a new rule that will give the IoT Edge runtime access to `tpm0` and `tpmrm0`.
287
+
1. Create a new rule that gives the IoT Edge runtime access to `tpm0` and `tpmrm0`.
263
288
264
289
```bash
265
290
sudo touch /etc/udev/rules.d/tpmaccess.rules
@@ -300,39 +325,48 @@ You can give access to the TPM by overriding the systemd settings so that the `a
0 commit comments