Hands on Tutorial – Device Update for Azure IoT Hub Over the Air Updates with Pantavisor

The Pantacor team recently merged an update to the Device Update for IoT Hub repo allowing anyone to deploy containers over the air and to update IoT fleets at the intelligent edge. The Device Update for IoT Hub is based on the same reliable and secure technology created for Windows Software but is optimized for IoT devices. By combining Device Update (DU) with lightweight containers on embedded Linux devices, release teams can now easily maintain and secure IoT device fleets across all architectures. 

In this post, we’ll show you how that works with a hands-on tutorial. You’ll prepare an update, export it and then apply it to your embedded Linux IoT devices with the Azure IoT Hub dashboard. 

Pantavisor – an embedded framework for building containerized IoT devices

Pantavisor turns the runtime on your embedded Linux IoT device into a set of containers. Any updates you push from the Device Update UI will result in a group of containers that can be added, updated, or removed. This includes the Device Update (DU) agent, which has also been containerized to be run on a Pantavisor-enabled device.

How Docker and Pantavisor work together 

The contents of each container are defined in the Dockerfile template that is built for arm32, arm64 and x64 architectures on GitLab CI with container-ci. Containers on a Pantavisor-enabled system are not natively run by Docker, but instead, Pantavisor offers a lightweight container engine to run them. The Dockerfile is only used to define the container root file system.

The Device Update agent is also implemented as a container that can be added to any Pantavisor-enabled device. Once done, you can can onboard your Pantavisor device and use Device Update to deploy software updates at scale.

The main components of the DU agent container are:

Before you begin


Device updates with DU update

To simplify this guide, a precompiled image with the DU client is provided. If you prefer, you can also set up a standard Pantavisor-enabled device first and then add the agent using the pvr2adu add-agent command.

Set up Device Update in IoT Hub if you haven’t done that already.

  1. Download the image with the following:

    pvr2adu [options] download arm-bpi-r64|arm-rpi64|x64-uefi <connection-string> <manufacturer> <model>


  • options – can be help or verbose mode  -h or -v
  • connection- string – A pre-provisioned connection string the device uses to connect to the IoT Hub.
  • manufacturer – Reported by the device update agent as part of the DeviceInformation interface.
  • model – Reported by the Device Update Agent as part of the DeviceInformation interface.

See Device Update Configuration File – list of fields

For example, to download an arm-rpi64 compatible image, use the following:

pvr2adu download arm-rpi64 <your-connection-string> FabrikamToaster

    1. Next, flash the device storage with the downloaded image.

    2. Turn on the device and check that it successfully connected to DU IoT Hub.

    3. Clone the current running revision in your host computer with pvr cli. First, you will need to know your device IP. If your host computer is in the same network, you can use the PVR device scan command:

      pvr scan

    4. After scanning and finding an IP, clone the revision into your computer with:

      pvr clone my-checkout

    5. Make changes to the state revision. In this case, you will install a new NGINX container from DockerHub.

      cd my-checkout
      pvr app add --from nginx:stable-alpine webserver
      pvr add .
      pvr commit
    6. Convert the PVR checkout into Azure DU format with the pvr2adu script

      pvr2adu -p Pantacor -n Toaster -m Fabrikam -d Toaster -v 1.1 -o out

    7. Deploy the resulting manifest from the Device Update dashboard. 


Below you can see how to upload the tar file to the device updater to complete the deployment. 

Note: For updates to this tutorial look to the GitLab source and Readme file.  

Final Thoughts

This tutorial demonstrated how to update containerized embedded Linux IoT devices through the Device Update dashboard.  With the support of containers and Pantavisor, you can now use DU IoT Hub to update your entire fleet regardless of the device architecture.  

Questions or Comments?

Ask a question on our Community forum or submit an issue to the Pantavisor GitHub repo. We’d be very happy to hear from you.