How to prepare the Ubuntu created by Hyper-V to be a Azure IoT Edge device

Create Unbunt VM using Hyper-V quick create

Hyper-V Quick Create

Hyper-V Quick Create Ubuntu

Depends on your internet connection, it is going to take awhile

Hyper-V Quick Create Ubuntu Progress Bar

Hyper-V Quick Create Ubuntu Successful

Please follow the instruction on this post to expand the disk in Ubunto the all the disk space just allocated

Most likely when you installed the VM, some of the components are outdated

 sudo apt install update

This will update all components to the latest.

Sometime you don’t want to connect to the VM using Hyper-V, instead tools like Putty is preferred. In this case, the SSH server needs to be installed on the VM

 sudo apt update
 sudo apt install openssh-server

Once the installation is complete, the SSH service will start automatically. You can verify that SSH is running by typing

 sudo systemctl status ssh

Press q to get back to the command line prompt

Ubunto shipped with Firewall configuration tool called UFW. make sure SSH port is allowed in the Firewall

 sudo ufw allow ssh
sudo iotedge system status

A successful status response is ok