Running a QEMU virtual machine with 'runqemu' or 'mender-qemu' is easy, but sometimes you want more advanced features like passing through a host USB device. While this can be done with command line tools, it gets complicated quickly. We will discuss some experiences building and launching QEMU images with tools that leverage libvirt and virtio on your host, such as virsh and virt-manager.
These days, most searches for launching a virtual machine on your Linux desktop will suggest a tool which uses libvirt, such as virsh or virt-manager. Launching a QEMU image built with Yocto Project with these tools is not obvious at first. On the other hand, getting a full virtualized experience--including the handy UI that virt-manager provides for things like passing through a host USB device--is sometimes exactly what you need. We will discuss how to build a QEMU image (in qcow2 format), create a libvirt xml domain file including the OVMF firmware and launch it with virsh. We will then demonstrate how this is immediately available in the virt-manager UI interface. While we are at it, we will discuss some minor tweaks to meta-mender to make this possible with Mender images.