ms.topic | ms.date | author | ms.author | ms.service | services |
---|---|---|---|---|---|
include |
01/25/2022 |
PatAltimore |
patricka |
iot-edge |
iot-edge |
Deploy Azure IoT Edge for Linux on Windows on your target device.
:::moniker range="iotedge-2018-06"
Install IoT Edge for Linux on Windows on your target device.
Note
The following PowerShell process outlines how to deploy IoT Edge for Linux on Windows onto the local device. To deploy to a remote target device using PowerShell, you can use Remote PowerShell to establish a connection to a remote device and run these commands remotely on that device.
-
In an elevated PowerShell session, run each of the following commands to download IoT Edge for Linux on Windows.
$msiPath = $([io.Path]::Combine($env:TEMP, 'AzureIoTEdge.msi')) $ProgressPreference = 'SilentlyContinue' Invoke-WebRequest "https://aka.ms/AzEflowMSI" -OutFile $msiPath
-
Install IoT Edge for Linux on Windows on your device.
Start-Process -Wait msiexec -ArgumentList "/i","$([io.Path]::Combine($env:TEMP, 'AzureIoTEdge.msi'))","/qn"
You can specify custom IoT Edge for Linux on Windows installation and VHDX directories by adding
INSTALLDIR="<FULLY_QUALIFIED_PATH>"
andVHDXDIR="<FULLY_QUALIFIED_PATH>"
parameters to the install command. -
Set the execution policy on the target device to
AllSigned
if it is not already. See the PowerShell prerequisites for commands to check the current execution policy and set the execution policy toAllSigned
. -
Create the IoT Edge for Linux on Windows deployment. The deployment creates your Linux virtual machine and installs the IoT Edge runtime for you.
Deploy-Eflow
[!TIP] By default, the
Deploy-Eflow
command creates your Linux virtual machine with 1 GB of RAM, 1 vCPU core, and 16 GB of disk space. However, the resources your VM needs are highly dependent on the workloads you deploy. If your VM does not have sufficient memory to support your workloads, it will fail to start.You can customize the virtual machine's available resources using the
Deploy-Eflow
command's optional parameters.For example, the command below creates a virtual machine with 4 vCPU cores, 4 GB of RAM (represented in MB), and 20 GB of disk space:
Deploy-Eflow -cpuCount 4 -memoryInMB 4096 -vmDiskSize 20
For information about all the optional parameters available, see PowerShell functions for IoT Edge for Linux on Windows.
[!WARNING] By default, the EFLOW Linux virtual machine has no DNS configuration. Deployments using DHCP will try to obtain the DNS configuration propagated by the DHCP server. Please check your DNS configuration to ensure internet connectivity. For more information, see AzEFLOW-DNS.
You can assign a GPU to your deployment to enable GPU-accelerated Linux modules. To gain access to these features, you will need to install the prerequisites detailed in GPU acceleration for Azure IoT Edge for Linux on Windows.
To use a GPU passthrough, add the gpuName, gpuPassthroughType, and gpuCount parameters to your
Deploy-Eflow
command. For information about all the optional parameters available, see PowerShell functions for IoT Edge for Linux on Windows.[!WARNING] Enabling hardware device passthrough may increase security risks. Microsoft recommends a device mitigation driver from your GPU's vendor, when applicable. For more information, see Deploy graphics devices using discrete device assignment.
-
Enter 'Y' to accept the license terms.
-
Enter 'O' or 'R' to toggle Optional diagnostic data on or off, depending on your preference.
-
Once the deployment is complete, the PowerShell window reports Deployment successful.
After a successful deployment, you are ready to provision your device.
Note
The Azure IoT Edge extension for Windows Admin Center is currently in public preview. The management process may be different than for generally available features.
-
Install and open Windows Admin Center.
On the Windows Admin Center start page, under the list of connections, you will see a local host connection representing the PC where you are running Windows Admin Center. Any additional servers, PCs, or clusters that you manage will also show up here.
You can use Windows Admin Center to manage Azure IoT Edge for Linux on Windows on either your local device or remote managed devices. In this guide, the local host connection will serve as the target device for the deployment of Azure IoT Edge for Linux on Windows.
-
Confirm that your local device is listed under All connections, like shown below.
If you want to deploy to a remote target device instead of your local device and you do not see your desired target device in the list, follow the instructions to add your device.
-
Select + Add to begin creating your deployment. The deployment creates your Linux virtual machine and installs the IoT Edge runtime for you.
-
On the Add or create resources pane, locate the Azure IoT Edge tile. Select Create new to install a new instance of Azure IoT Edge for Linux on Windows on a device.
If you already have IoT Edge for Linux on Windows running on a device, you could select Add to connect to that existing IoT Edge device and manage it with Windows Admin Center.
-
The Create an Azure IoT Edge for Linux on Windows deployment pane will open. On the 1. Getting Started tab, review the minimum requirements and select Next.
-
Review the license terms, check I Accept, and select Next.
-
You can toggle Optional diagnostic data on or off, depending on your preference.
-
Select Next: Deploy.
-
On the 2. Deploy tab, under Select a target device, click on your listed device to validate it meets the minimum requirements. Once its status is confirmed as supported, select Next.
-
On the 2.2 Settings tab, review the configuration settings of your deployment. The table below shows the settings and their default values.
Setting Default value Virtual disk size in GB 16 Memory in MB (even number) 1024 Number of cores 2 Azure IoT Edge version 1.1 (LTS) [!NOTE] IoT Edge for Linux on Windows uses a default switch, which assigns the Linux virtual machine an internal IP address. This internal IP address cannot be reached from outside the Windows machine. You can connect to the virtual machine locally while logged onto the Windows machine.
If you are using Windows Server, set up a default switch before deploying IoT Edge for Linux on Windows.
You can assign a GPU to your deployment to enable GPU-accelerated Linux modules. To gain access to these features, you will need to install the prerequisites detailed in GPU acceleration for Azure IoT Edge for Linux on Windows. If you are only installing these prerequisites at this point in the deployment process, you will need to start again from the beginning.
There are two options for GPU passthrough available: Direct Device Assignment (DDA) and GPU Paravirtualization (GPU-PV), depending on the GPU adaptor you assign to your deployment.
For the direct device assignment method, select the number of GPU processors to allocate to your Linux virtual machine.
For the paravirtualization method, no additional settings are needed.
[!WARNING] Enabling hardware device passthrough may increase security risks. Microsoft recommends a device mitigation driver from your GPU's vendor, when applicable. For more information, see Deploy graphics devices using discrete device assignment.
Once you are satisfied with the settings, select Next.
-
On the 2.3 Deployment tab, you can watch the progress of the deployment. The full process includes downloading the Azure IoT Edge for Linux on Windows package, installing the package, configuring the host device, and setting up the Linux virtual machine. This process may take several minutes to complete. A successful deployment is pictured below.
-
Once your deployment is complete, you are ready to provision your device. Select Next: Connect to proceed to the 3. Connect tab, which handles Azure IoT Edge device provisioning.
:::moniker-end
:::moniker range=">=iotedge-2020-11"
Note
The following PowerShell process outlines how to deploy IoT Edge for Linux on Windows onto the local device. To deploy to a remote target device using PowerShell, you can use Remote PowerShell to establish a connection to a remote device and run these commands remotely on that device.
-
In an elevated PowerShell session, run each of the following commands to download IoT Edge for Linux on Windows.
-
X64/AMD64
$msiPath = $([io.Path]::Combine($env:TEMP, 'AzureIoTEdge.msi')) $ProgressPreference = 'SilentlyContinue' Invoke-WebRequest "https://aka.ms/AzEFLOWMSI-CR-X64" -OutFile $msiPath
-
ARM64
$msiPath = $([io.Path]::Combine($env:TEMP, 'AzureIoTEdge.msi')) $ProgressPreference = 'SilentlyContinue' Invoke-WebRequest "https://aka.ms/AzEFLOWMSI-CR-ARM64" -OutFile $msiPath
-
-
Install IoT Edge for Linux on Windows on your device.
Start-Process -Wait msiexec -ArgumentList "/i","$([io.Path]::Combine($env:TEMP, 'AzureIoTEdge.msi'))","/qn"
You can specify custom IoT Edge for Linux on Windows installation and VHDX directories by adding
INSTALLDIR="<FULLY_QUALIFIED_PATH>"
andVHDXDIR="<FULLY_QUALIFIED_PATH>"
parameters to the install command. -
Set the execution policy on the target device to
AllSigned
if it is not already. See the PowerShell prerequisites for commands to check the current execution policy and set the execution policy toAllSigned
. -
Create the IoT Edge for Linux on Windows deployment. The deployment creates your Linux virtual machine and installs the IoT Edge runtime for you.
Deploy-Eflow
[!TIP] By default, the
Deploy-Eflow
command creates your Linux virtual machine with 1 GB of RAM, 1 vCPU core, and 10 GB of data parition. However, the resources your VM needs are highly dependent on the workloads you deploy. If your VM does not have sufficient memory to support your workloads, it will fail to start.You can customize the virtual machine's available resources using the
Deploy-Eflow
command's optional parameters.For example, the command below creates a virtual machine with 4 vCPU cores, 4 GB of RAM (represented in MB), and 20 GB of data partition:
Deploy-Eflow -cpuCount 4 -memoryInMB 4096 -vmDataSize 20
Note: vmDataSize is a new parameter introduced in EFLOW CR version.
For information about all the optional parameters available, see PowerShell functions for IoT Edge for Linux on Windows.
[!WARNING] By default, the EFLOW Linux virtual machine has no DNS configuration. Deployments using DHCP will try to obtain the DNS configuration propagated by the DHCP server. Please check your DNS configuration to ensure internet connectivity. For more information, see AzEFLOW-DNS.
You can assign a GPU to your deployment to enable GPU-accelerated Linux modules. To gain access to these features, you will need to install the prerequisites detailed in GPU acceleration for Azure IoT Edge for Linux on Windows.
To use a GPU passthrough, add the gpuName, gpuPassthroughType, and gpuCount parameters to your
Deploy-Eflow
command. For information about all the optional parameters available, see PowerShell functions for IoT Edge for Linux on Windows.[!WARNING] Enabling hardware device passthrough may increase security risks. Microsoft recommends a device mitigation driver from your GPU's vendor, when applicable. For more information, see Deploy graphics devices using discrete device assignment.
-
Enter 'Y' to accept the license terms.
-
Enter 'O' or 'R' to toggle Optional diagnostic data on or off, depending on your preference.
-
Once the deployment is complete, the PowerShell window reports Deployment successful.
After a successful deployment, you are ready to provision your device.
:::moniker-end