Mirza’s tutorial QEMU, the FAST! processor emulator (Ubuntu) explains how to boot the generated image with qemu well and it works flawlessly. Now i’m trying to port this to Virtualbox. I hesitated posting about it on this forum as this is not directly Mender related, but since the vmdk file works on Virtualbox without Mender (I also tested), I think it can interest many people.
The qemu command I use, based on mender-qemu script:
qemu-system-x86_64 \ -m 512M \ -drive file=ovmf.qcow2,if=pflash,format=qcow2,unit=0,readonly=on \ -drive file=ovmf.vars.qcow2,if=pflash,format=qcow2,unit=1 \ -nographic \ -drive file=file.uefiimg,if=ide,format=raw
QEMU image is great for development but the motive is to ship the VM to customers in a one file format on a software that is well known by customers in general, hence Virtualbox.
Yocto can also provide a “wic.vmdk” image but in this case it is not “mender compatible” as only the uefiimg generated by Mender works (along with the bios one).
I read that it seems possible to convert a qemu image to a raw image, then to a vdi (http://www.whitemiceconsulting.com/node/37) but the bootloader image and data are in separate files.
I converted the uefiimg to a vdi and added as hard drive under a “Controller: AHCI”, the image boots as you can see here: https://imgur.com/a/0jOednl but then, constant black screen.
Command I used to convert:
VBoxManage convertfromraw file.uefiimg --format vdi file.vdi