%3CLINGO-SUB%20id%3D%22lingo-sub-1407066%22%20slang%3D%22en-US%22%3ELinux%20modules%20with%20Azure%20IoT%20Edge%20on%20Windows%2010%20IoT%20Enterprise%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1407066%22%20slang%3D%22en-US%22%3E%3CP%3EMicrosoft%20is%20enabling%20the%20ability%20to%20run%20Linux%20modules%20with%20Azure%20IoT%20Edge%20for%20Linux%20on%20Windows%2010%20IoT%20Enterprise.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThis%20includes%20the%20ability%20to%20deploy%20pre-built%20Linux%20modules%20available%20in%20the%20Azure%20Marketplace%20from%20Microsoft%20as%20well%20as%203%3CSUP%3Erd%3C%2FSUP%3E%20party%20publishers%20in%20addition%20to%20custom%20workloads%20built%20for%20a%20specific%20scenario.%20Running%20Linux%20modules%20on%20Windows%20just%20part%20of%20the%20solution.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20addition%2C%20Windows%20processes%20will%20be%20able%20to%20smoothly%20interact%20with%20Linux%20modules%20running%20on%20the%20same%20physical%20device.%20This%20will%20allow%20a%20Windows%20process%20that%20may%20provide%20UI%20as%20well%20as%20act%20as%20a%20proxy%20to%20data%20access%20or%20specific%20hardware%20to%20be%20backed%20by%20business%20logic%20or%20data%20inferencing%20provided%20by%20a%20Linux%20module.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20align%3D%22center%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22twarwick_0-1590088849284.png%22%20style%3D%22width%3A%20391px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F193671i6AE5A46D5BA610C2%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22twarwick_0-1590088849284.png%22%20alt%3D%22twarwick_0-1590088849284.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThis%20is%20part%201%20of%20a%202%20part%20series%20which%20will%20allow%20you%20to%20experience%20Linux%20modules%20on%20Windows%20using%20Azure%20IoT%20Edge%20for%20Linux%20as%20demonstrated%20in%20the%20%3CA%20href%3D%22https%3A%2F%2Faka.ms%2FWinIoT-LOW-Show%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EIoT%20Show%3A%20Linux%20modules%20on%20Windows%2010%20IoT%20Enterprise%3C%2FA%3E%2C%20as%20a%20developer%3CFONT%20color%3D%22%23000000%22%3E.%26nbsp%3B%26nbsp%3B%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20align%3D%22center%22%3E%3CIFRAME%20src%3D%22https%3A%2F%2Faka.ms%2Fiotshow%2F212%2Fyoutube%2Fembed%22%20width%3D%22560%22%20height%3D%22315%22%20frameborder%3D%220%22%20allowfullscreen%3D%22allowfullscreen%22%20allow%3D%22accelerometer%3B%20autoplay%3B%20encrypted-media%3B%20gyroscope%3B%20picture-in-picture%22%3E%3C%2FIFRAME%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAdditional%20information%20will%20be%20provided%20before%202020%20end-of-year%20about%20an%20%22official%22%20offering%20to%20support%20Linux%20modules%20on%20Windows%20using%20a%20Linux%20environment%20provided%20by%20Microsoft%20specifically%20for%20running%20Azure%20IoT%20Edge%20for%20Linux%20in%20a%20production%20environment.%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-1167646691%22%20id%3D%22toc-hId-1167646691%22%3ERecipe%3A%20Linux%20modules%20on%20Windows%3C%2FH3%3E%0A%3CP%3EThe%20following%20recipe%20will%20walk%20you%20through%20the%20setup%20and%20deployment%20of%20Azure%20IoT%20Edge%20for%20Linux%20as%20well%20as%20deploy%20one%20or%20more%20Linux%20modules%20from%20the%20Azure%20Marketplace%20on%20Windows.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFor%20this%20exercise%2C%20you%20may%20use%20either%20a%20physical%20machine%20running%20Windows%2010%20or%20a%20virtual%20machine%20running%20Windows%2010.%26nbsp%3B%20%26nbsp%3BIf%20you%20choose%20to%20use%20a%20Windows%2010%20virtual%20machine%20for%20this%20exercise%20you%20will%20need%20to%20-ERR%3AREF-NOT-FOUND-enable%20nested%20virtualization%20before%20continuing.%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--639807772%22%20id%3D%22toc-hId--639807772%22%3EInstall%20the%20Windows%20Subsystem%20for%20Linux%20with%20Ubuntu%2018.04%20LTS%3C%2FH3%3E%0A%3CP%3EWindows%20Subsystem%20for%20Linux%20is%20designed%20to%20support%20developer%20workflows%2C%20however%20in%20this%20case%20we%20are%20using%20it%20to%20demonstrate%20a%20%E2%80%9CProof%20of%20Concept%E2%80%9D%20for%20IoT%20workloads%20in%20production%20environments.%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows%2Fwsl%2Finstall-win10%23install-the-windows-subsystem-for-linux%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3ETurn%20on%20%3CSTRONG%3EWindows%20Subsystem%20for%20Linux%3C%2FSTRONG%3E%20optional%20feature%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows%2Fwsl%2Finstall-win10%23update-to-wsl-2%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3ETurn%20on%20%3CSTRONG%3EVirtual%20Machine%20Platform%3C%2FSTRONG%3E%20optional%20feature%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fwww.microsoft.com%2Fstore%2Fapps%2F9N9TNGVNDL3Q%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EInstall%20%3CSTRONG%3EUbuntu%2018.04%20LTS%3C%2FSTRONG%3E%20distribution%20from%20the%20Microsoft%20Store%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows%2Fwsl%2Finstall-win10%23set-up-a-new-distribution%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3ESetup%20your%20new%26nbsp%3B%3CSTRONG%3EUbuntu%2018.04%20LTS%3C%2FSTRONG%3E%20distribution%3C%2FA%3E%3CBR%20%2F%3E%3CP%3E%3CFONT%20size%3D%222%22%3E%3CSTRONG%3ENote%3A%3C%2FSTRONG%3E%20Username%20and%20password%20will%20accept%20lower%20case%20letters%20%5Ba-z%5D%20and%20numbers%20%5B0-9%5D%20only.%3C%2FFONT%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows%2Fwsl%2Finstall-win10%23set-your-distribution-version-to-wsl-1-or-wsl-2%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3ESet%20%3CSTRONG%3EUbuntu%2018.04%20LTS%3C%2FSTRONG%3E%20distribution%20to%20use%20%3CSTRONG%3EWLS%202%3C%2FSTRONG%3E%3C%2FA%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3ENow%20type%20the%20following%20command%20into%20PowerShell%20to%20confirm%20that%20you%20are%20ready%20to%20go%20to%20the%20next%20step.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-powershell%22%3E%3CCODE%3Ewsl%20--list%20--verbose%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20should%20see%20the%20following%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22twarwick_1-1590098184560.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F193754i6D4A6673AE0548D4%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22twarwick_1-1590098184560.png%22%20alt%3D%22twarwick_1-1590098184560.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-1847705061%22%20id%3D%22toc-hId-1847705061%22%3EConfigure%20WSL%202%20to%20run%20SystemD%20to%20support%20Moby%3C%2FH3%3E%0A%3CP%3EWSL%202%2C%20which%20uses%20a%20custom%20init%20to%20support%20integration%20with%20multiple%20Linux%20distributions%2C%20is%20nearly%20ready%20to%20install%20Azure%20IoT%20Edge%20for%20Linux%2C%20but%20first%20we%20need%20to%20provide%20a%20systemd%20process%20management%20environment.%20Systemd%20is%20preinstalled%20with%20the%20%3CSTRONG%3EUbuntu%2018.04%20LTS%3C%2FSTRONG%3E%20distribution%20that%20you%20installed%20previously%20but%20it%20is%20inactive.%20The%20following%20steps%20will%20create%20a%20new%20namespace%20running%20systemd%20then%20move%20into%20that%20namespace%20so%20that%20we%20can%20install%20Azure%20IoT%20Edge%20and%20the%20Moby%20container%20engine.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20color%3D%22%23FF0000%22%3E%3CSTRONG%3ECAUTION%3A%26nbsp%3B%3C%2FSTRONG%3E%3C%2FFONT%3E%20Invoking%20systemd%20in%20WSL%202%20is%20considered%20an%20unsupported%20*HACK*%20that%20we%20are%20using%20to%20demonstrate%20a%20this%20developer%20scenario.%20This%20is%20NOT%20to%20be%20interpreted%20as%20an%20officially%20supported%20scenario%20and%20may%20cause%20odd%20behavior%20with%20other%20distributions%20that%20you%20may%20be%20using%20with%20WSL%202.%20It%20is%20also%20important%20to%20understand%20that%20this%20*HACK*%20is%20not%20persistent.%20If%20you%20reboot%20Windows%2C%20WSL%202%20will%20revert%20to%20its%20default%20configuration%20using%20init.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20will%20enable%20systemd%20using%20a%20PowerShell%20administrator%20session.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EClick%20Start%2C%20type%20PowerShell%3C%2FLI%3E%0A%3CLI%3ERight-click%20Windows%20PowerShell%2C%20and%20then%20click%20Run%20as%20administrator.%3C%2FLI%3E%0A%3CLI%3EStart%20WSL%20to%20use%20the%20Linux%20Bash%20command%20line%20interface%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-powershell%22%3E%3CCODE%3Ewsl%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3COL%20start%3D%224%22%3E%0A%3CLI%3EInstalling%20the%20Daemonize%20tool%20which%20will%20allow%20the%20creation%20of%20a%20systemd%20namespace%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-bash%22%3E%3CCODE%3Esudo%20apt-get%20update%20-y%0Asudo%20apt-get%20install%20-y%20daemonize%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3COL%20start%3D%225%22%3E%0A%3CLI%3ECreate%20the%20systemd%20namespace%20using%20daemonize%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-bash%22%3E%3CCODE%3Esudo%20daemonize%20%2Fusr%2Fbin%2Funshare%20--fork%20--pid%20--mount-proc%20%2Flib%2Fsystemd%2Fsystemd%20--system-unit%3Dbasic.target%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3COL%20start%3D%226%22%3E%0A%3CLI%3EEnter%20the%20newly%20created%20systemd%20namespace%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-bash%22%3E%3CCODE%3Eexec%20sudo%20nsenter%20-t%20%24(pidof%20systemd)%20-a%20su%20-%20%24LOGNAME%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%3CFONT%20color%3D%22%23008000%22%3ENote%3A%3C%2FFONT%3E%3C%2FSTRONG%3E%20To%20return%20to%20this%20WSL%20session%20running%20systemd%20after%20a%20reboot%20or%20a%20new%20login%2C%20simply%20repeat%20steps%205%20and%206%20above.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-40250598%22%20id%3D%22toc-hId-40250598%22%3EDeploy%20Azure%20IoT%20Edge%20with%20Linux%20modules%3C%2FH3%3E%0A%3CP%3ENow%20that%20the%20WSL%202%20environment%20is%20configured%20to%20allow%20Azure%20IoT%20Edge%20to%20install%2C%20please%20follow%20the%20instructions%20in%20each%20of%20the%20following%20articles%20to%20install%20Azure%20IoT%20Edge%20for%20Linux%20and%20deploy%20a%20Linux%20module%20from%20Azure%20IoT%20Hub.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CFONT%20color%3D%22%23FF9900%22%3E%3CSTRONG%3EIMPORTANT%3A%3C%2FSTRONG%3E%3C%2FFONT%3E%26nbsp%3BMake%20sure%20that%20you%20choose%20the%20%3CSTRONG%3EUbuntu%2018.04%3C%2FSTRONG%3E%20or%20%3CSTRONG%3EUbuntu%20Server%2018.04%3C%2FSTRONG%3E%20path%20when%20there%20are%20multiple%20operating%20system%20choices%20presented%20so%20that%20your%20Azure%20IoT%20Edge%20runtime%20matches%20the%20Linux%20distribution%20installed%20earlier.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3E%3CA%20style%3D%22background-color%3A%20%23ffffff%3B%22%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fiot-edge%2Fhow-to-register-device%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3ERegister%20an%20Azure%20IoT%20Edge%20device%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fiot-edge%2Fhow-to-install-iot-edge-linux%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EInstall%20Azure%20IoT%20Edge%20runtime%20for%20Debian-based%20Linux%20Systems%20%3C%2FA%3E%26nbsp%3B%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fazure%2Fiot-edge%2Fhow-to-deploy-modules-portal%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EDeploy%20Azure%20IoT%20Edge%20Linux%20modules%20from%20the%20Azure%20portal%3C%2FA%3E%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--1767203865%22%20id%3D%22toc-hId--1767203865%22%3ENext%20Steps%3C%2FH3%3E%0A%3CP%3EStay%20tuned%20for%20a%20follow%20up%20to%20this%20blog%20in%20June%2FJuly%202020%20which%20will%20demonstrate%20how%20you%20can%20build%20a%20solution%20that%20employs%20bidirectional%20communication%20between%20a%20native%20Windows%20process%20and%20a%20Linux%20module%20as%20demonstrated%20in%20the%20-ERR%3AREF-NOT-FOUND-IoT%20Show%3A%20Linux%20modules%20on%20Windows%2010%20IoT%20Enterprise.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-1407066%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22Windows%20for%20IoT%20Banner.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F193770i167D76EDC8F5F9FC%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22Windows%20for%20IoT%20Banner.png%22%20alt%3D%22Windows%20for%20IoT%20Banner.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHave%20you%20ever%20wanted%20to%20run%20your%20Linux%20modules%20on%20Windows%20edge%20devices%3F%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1407066%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%20IoT%20Edge%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ELinux%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EWindows%2010%20IoT%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EWindows%20for%20IoT%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Microsoft

Microsoft is enabling the ability to run Linux modules with Azure IoT Edge for Linux on Windows 10 IoT Enterprise.

 

This includes the ability to deploy pre-built Linux modules available in the Azure Marketplace from Microsoft as well as 3rd party publishers in addition to custom workloads built for a specific scenario. Running Linux modules on Windows just part of the solution.

 

In addition, Windows processes will be able to smoothly interact with Linux modules running on the same physical device. This will allow a Windows process that may provide UI as well as act as a proxy to data access or specific hardware to be backed by business logic or data inferencing provided by a Linux module.

 

twarwick_0-1590088849284.png

 

This blog will allow you to experience Linux modules on Windows using Azure IoT Edge for Linux as demonstrated in the IoT Show: Linux modules on Windows 10 IoT Enterprise, as a developer

Update: Nov 10, 2020
Additionally, we now have multiple sample code projects available at https://aka.ms/winiotsamples which demonstrates messaging interop between a Windows application and a Linux Edge Module running in a Linux virtual machine.

Keep an eye out for our Azure IoT Edge for Linux on Windows Public Preview coming soon
https://aka.ms/AzIoTEdgeforLinuxOnWindows

  

 

 

Additional information will be provided before 2020 end-of-year about an "official" offering to support Linux modules on Windows using a Linux environment provided by Microsoft specifically for running Azure IoT Edge for Linux in a production environment. 

Recipe: Linux modules on Windows

The following recipe will walk you through the setup and deployment of Azure IoT Edge for Linux as well as deploy one or more Linux modules from the Azure Marketplace on Windows. 

 

For this exercise, you may use either a physical machine running Windows 10 or a virtual machine running Windows 10.   If you choose to use a Windows 10 virtual machine for this exercise you will need to enable nested virtualization before continuing. 

Install the Windows Subsystem for Linux with Ubuntu 18.04 LTS

Windows Subsystem for Linux is designed to support developer workflows, however in this case we are using it to demonstrate a “Proof of Concept” for IoT workloads in production environments.

Now type the following command into PowerShell to confirm that you are ready to go to the next step.

 

 

 

 

wsl --list --verbose

 

 

 

 

 

You should see the following:

twarwick_1-1590098184560.png

Configure WSL 2 to run SystemD to support Moby

WSL 2, which uses a custom init to support integration with multiple Linux distributions, is nearly ready to install Azure IoT Edge for Linux, but first we need to provide a systemd process management environment. Systemd is preinstalled with the Ubuntu 18.04 LTS distribution that you installed previously but it is inactive. The following steps will create a new namespace running systemd then move into that namespace so that we can install Azure IoT Edge and the Moby container engine.

 

CAUTION:  Invoking systemd in WSL 2 is considered an unsupported *HACK* that we are using to demonstrate a this developer scenario. This is NOT to be interpreted as an officially supported scenario and may cause odd behavior with other distributions that you may be using with WSL 2. It is also important to understand that this *HACK* is not persistent. If you reboot Windows, WSL 2 will revert to its default configuration using init.

 

You will enable systemd using a PowerShell administrator session.

 

  1. Click Start, type PowerShell
  2. Right-click Windows PowerShell, and then click Run as administrator.
  3. Start WSL to use the Linux Bash command line interface

 

 

 

 

wsl

 

 

 

 

  1. Installing the Daemonize tool which will allow the creation of a systemd namespace

 

 

 

 

sudo apt-get update -y
sudo apt-get install -y daemonize

 

 

 

 

  1. Create the systemd namespace using daemonize

 

 

 

 

sudo daemonize /usr/bin/unshare --fork --pid --mount-proc /lib/systemd/systemd --system-unit=basic.target

 

 

 

 

  1. Enter the newly created systemd namespace

 

 

 

 

exec sudo nsenter -t $(pidof systemd) -a su - $LOGNAME

 

 

 

 

 

Note: To return to this WSL session running systemd after a reboot or a new login, simply repeat steps 5 and 6 above.  

 

Deploy Azure IoT Edge with Linux modules

Now that the WSL 2 environment is configured to allow Azure IoT Edge to install, please follow the instructions in each of the following articles to install Azure IoT Edge for Linux and deploy a Linux module from Azure IoT Hub.

 

IMPORTANT: Make sure that you choose the Ubuntu 18.04 or Ubuntu Server 18.04 path when there are multiple operating system choices presented so that your Azure IoT Edge runtime matches the Linux distribution installed earlier.  

 

  1. Register an Azure IoT Edge device
  2. Install Azure IoT Edge runtime for Debian-based Linux Systems  
  3. Deploy Azure IoT Edge Linux modules from the Azure portal

 

Next Steps

Stay tuned for a follow up to this blog in June/July 2020 which will demonstrate how you can build a solution that employs bidirectional communication between a native Windows process and a Linux module as demonstrated in the IoT Show: Linux modules on Windows 10 IoT Enterprise.

3 Comments
Visitor

Hey @twarwick, ,

Has there been any update on this? I haven't been able to find any documentation since this about either the private or public release this fall or the final release for next year. Very excited about the Linux container capability!!

Microsoft

@bbenrsa,

I apologize for not getting a follow up post out.  We have our heads down preparing for a public release that I hope to be able to share details about in the coming weeks.  Keep an eye on this location for an update by mid-December:  https://aka.ms/aziotedgeforlinuxonwindows 

 

Our interop sample code that was promised as Part 2 of this post is currently available at https://aka.ms/winiotsamples 

 

Terry Warwick
Microsoft

Visitor

Awesome! Thanks so much, appreciate the quick response too