Qemu worker issue in autokit

Hi balena team,
I am planning autokit test for my custom board, so I use raspberry pi for autokit demonstration. I am running Qemu autokit test on virtualbox running Debian 12 bookworm. When I make local-test in leviathan folder, qemu autokit test shows “Couldn’t retrieve http://worker worker’s state. Querying http://worker and received StatusCodeError: 502”, here is my config:

module.exports = {
deviceType: “raspberrypi3-64”, // replace this with your device type slug. A contract must exist for this in the leviathan/core/contracts submodule.
suite: ${__dirname}/../suites/e2e,
config: {
networkWired: false,
networkWireless: false,
downloadVersion: ‘latest’,
balenaApiKey: ‘XXXXXX’, // api key is right, I omit it.
balenaApiUrl: ‘balena-cloud.com’,
organization: ‘xxxxx’, //organizaion is right, I omit it.
},
debug: {
unstable: [“Kill the device under test”],
},
image: ${__dirname}/balena.img.zip, // can also set image: false to auto download - only if the image is aailable through balena cloud
workers: [‘http://worker’], // or local ip address of the autokit (recommended)
}

by the way, leviathan-worker-1 reports an error: modprobe: FATAL: Module sg not found in directory /lib/modules/6.1.0-18-amd64, but I found sg module does exist.

By the way do I have to create a Qemu device on my balena cloud fleet?

attachment is the full log
balenaos-log.txt (21.1 KB)

Thanks

Hello Jason, Leviathan maintainer here, thanks for reaching out. QEMU is a great worker to run your first Leviathan test suite ideally the e2e test suite that we have. This ensures everything is setup correctly and ready to go. What custom board are you looking to start testing with autokit?

To run the QEMU tests, you can follow the Getting Started guide: QEMU worker | Leviathan Helpers

A fix in the config.js is the device type to be tested with the QEMU worker type. QEMU can only run generic device-type images. Hence, the RPi3-64 images won’t be able to run in QEMU. Replace the deviceType with genericx86-64-ext and use false in image property to get started on testing the e2e suite.

No, you won’t need to create a QEMU device in the balenaCloud fleet. Follow along with the instructions in the Getting Started guide, let us know of any feedback or questions you have, happy to help.

1 Like

Thanks for your reply, now it worked.

My custom board is based on I.MX8m plus, and my custom board balena yocto image has done, the device has been registered to my Balena cloud fleet, with raspberry pi device type. So my next step is pass autokit test, then I will contact Balena sales to add my device type to Balena cloud.

Do I have to pass qemu autokit test? Or I only need to pass physical autokit test?

Thanks