Use a preconfigured virtual machine to get started quickly, and easily automate and scale your IoT Edge testing.
This Ubuntu Server 16.04 LTS based virtual machine will install the latest Azure IoT Edge runtime and its dependencies on startup, and makes it easy to connect to your IoT Hub.
Connect this VM to your IoT Hub by setting the connection string with the run command feature (via Azure portal or command line interface) to execute:
/etc/iotedge/configedge.sh "<your_iothub_edge_connection_string>"
-
Click here to deploy an Azure IoT Edge enabled Linux VM.
-
Provide Subscription details and resource group. Also select password radio button and provide user and password to use later
-
Validation process happens and a web page is presented. Click Create button.
-
Click on Go To Resource button
-
Click on Cloud Shell icon, opens a cloud shell on the browser. Copy the shh command and press enter
ssh iotedgeadmin@<Your VM IP>
Provide pasword and press Enter
-
Confirm Azure Edge Runtime is installed on the VM
iotedge version
Use VSCode to create Edge Device.
```Editor
Control + Shift + P
Search for Azure IoT Edge tools
> Azure IoT Edge Create IoT Edge
```
Select Create Edge Device option
Enter Device ID and press Enter
Edge device created, you can check the response in VSCode output
Use IoT Toolkit to copy IoT Hub connection string.
Press Control + Shift + P in the VSCode editor
Enter >Azure IoT Hub
Select Copy IoTHub Device Connection String option
You will be presented with device list. Select your edge device
When you press Control+V you will see a string like below
HostName=rvedgehub.azure-devices.net;DeviceId=mylinuxedge;SharedAccessKey=sZTt4dg3lB/i39b5L6vWuNuZxH7CCWzz7T6q8eA19PQ=
Another way to get connection string is to go to Portal and find your IoT Hub -> -> IoT Edge Device -> Your Edge Device -> Connection string - primary key. Copy the connection string primary key.
Go To cloud shell. ssh into your Linux VM. sudo into your VM as root
sudo su -
and run the following command. Replace your IoT Hub connection string.
/etc/iotedge/configedge.sh "<your_iothub_edge_device_connection_string>"
EdgeAgent System Module is sent to the edge device