In this tutorial, we help you prepare your workstation to be able to run a virtual device (QEMU) with Mender integrated which will connect to hosted Mender and simulate a physical device.
To follow this tutorial, install Docker Engine on your workstation.
Hosted Mender is available in multiple regions to connect to. Make sure you select your desired one before proceeding.
Login to hosted Mender. On the main page for the first time new users will get a tutorial in the Mender web GUI.
Go to the Dashboard tab and click on Connect a device.
Select Prepare a virtual device for now.
Next we start the virtual device on your workstation.
In the dialog box from above, click Copy to clipboard to copy the code. Now go to the command line on your workstation, and paste the code e.g. by right-clicking in the terminal and selecting Paste, followed by Enter.
This downloads the virtual device images and starts it.
This process could take several minutes depending on your workstation capabilities.
Once the client has started, the Mender Client will attempt to connect to the server and it will appear in your Pending devices tab in the server. Go ahead and Accept the pending device in the server. After accepting the device, it will appear on the Device groups tab on the left of Pending.
Before continuing to following the UI tooltips, please complete the step below.
You will need the IP address of the virtual device in later stages of the documentation.
You should execute below commands in a terminal window on your workstation while the virtual device is running.
Save the CONTAINER ID
in a shell variable:
CONTAINER_ID=$(docker ps | grep 'mender-client-qemu' | awk '{print $1}')
Find the IP address of the virtual device (we will save it a in shell variable):
IP_ADDRESS=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' "${CONTAINER_ID}")
Example output:
$ echo "${IP_ADDRESS}"
172.17.0.3
Please proceed to Deploy an application update to keep on following the UI steps.
© 2024 Northern.tech AS