Add an IoT Edge Device on Windows with Multipass
Prerequisites
Before you begin, you need:
-
Create an IoT Edge device in the Device Visibility section.
-
Go to the Device Overview page. Here, you can find the Serial Number and the other required parameters clicking on the Get Credentials button.
Network Requirements
To ensure proper communication between your IoT Edge device and Datalogic Connect services, make sure the following network endpoints are accessible:
| Endpoint | Port | Protocol | Notes |
|---|---|---|---|
| *.azure-devices.net | 8883, 443 | MQTT, HTTPS | Send diagnostic data, receive cloud commands |
| global.azure-devices-provisioning.net | 443 | HTTPS | Device provisioning |
| *.blob.core.windows.net | 443 | HTTPS | File upload, Docker image pull |
| crsolinfraprodeuw.azurecr.io | 443 | HTTPS | Container registry |
Firewall Configuration
If your device is behind a corporate firewall, ensure these endpoints are whitelisted to allow proper IoT Edge functionality.
Windows requirements
- A Windows 10 or Windows 11 machine with Hyper-V enabled. You can enable Hyper-V by following the instructions on the Microsoft Hyper-V installation guide.
Add an IoT Edge Device on Windows with Multipass
-
Install Multipass:
- Download and install Multipass from the official website.
- Follow the installation instructions for Windows.
-
Create a Bridged Network:
- Open PowerShell or Command Prompt and run the following command to create a bridged network:
multipass networks
multipass set local.bridged-network="Default Switch"
- Open PowerShell or Command Prompt and run the following command to create a bridged network:
-
Update the Cloud-Init File with Edge Device Parameters:
- Download the cloud-init-edge.yaml script for configuring the Edge device.
- Open the file in a text editor and replace the placeholder values with the actual values you noted earlier:
REPLACE_WITH_YOUR_SCOPE_IDwith your Scope IDREPLACE_WITH_YOUR_EDGE_DEVICE_SERIAL_NUMBERwith your Serial NumberREPLACE_WITH_YOUR_EDGE_DEVICE_PRIMARY_KEYwith your Device Primary KeyREPLACE_WITH_YOUR_ORGANIZATION_IDwith your Organization IDREPLACE_WITH_YOUR_SAS_DEVICES_KEYwith your SAS Devices KeyREPLACE_WITH_YOUR_SAS_SMART_ENROLLMENT_KEYwith your SAS Smart Enrollment KeyREPLACE_WITH_YOUR_SAS_EDGE_STORAGE_KEYwith your Sas Edge Storage Key
- Save the changes to the file.
-
Create an Ubuntu VM:
- Open PowerShell or Command Prompt and run the following command to create a new Ubuntu 22.04 VM:
multipass launch 22.04 --name edge-vm --cpus 1 --disk 5G --memory 2G --cloud-init cloud-init-edge.yaml --bridged - This command creates a VM named
edge-vmwith 1 CPU, 5GB disk space, and 2GB memory, using the specified cloud-init file and bridged network. After running the command, wait a few minutes for the VM to be fully set up. - You can check the status of the VM with:
multipass listor you can run Multipass app to see the status.
- Open PowerShell or Command Prompt and run the following command to create a new Ubuntu 22.04 VM:
-
Check the Edge Device Status:
- After the VM is created, you can check the status of your IoT Edge device in the Datalogic Connect portal under the Devices section. It may take a few minutes for the device to appear as "Connected".
Troubleshooting
- Multipass Waiting for Daemon:
- If you encounter an error stating "Waiting for daemon...", ensure that the Multipass service is running. Additionally, you can open a power shell as administrator and run (the Y is for Yes and if you have a different language on your Windows you might need to change it accordingly):
You can find more information on the issue page
takeown /a /r /d Y /f "C:\ProgramData\Multipass"
- If you encounter an error stating "Waiting for daemon...", ensure that the Multipass service is running. Additionally, you can open a power shell as administrator and run (the Y is for Yes and if you have a different language on your Windows you might need to change it accordingly):