Skip to contentSkip to conversation

How to create a Raspberry QEMU VM emulating the physical hardware as close as possible

DISCUSSION [email protected] 1 participant 1 message Jan 27, 2022

lore
Share & tools
lore
#0 lore raw

Hello everyone,

I have a Raspberry Pi 4 model B v1.4 with 8GB RAM, and I need to create a VM in it as close to the physical hardware as possible (no need to be the exact RPi4 hardware, RPi3 or RPi2 would also work).

The reason is because I need to run this semi-closed software which comes only in a bootable SD image: https://github.com/victronenergy/venus/wiki/raspberrypi-install-venus-image

The host RPi is running Devuan Chimaera 4.0 (systemd-less Debian Bullseye derivative) and I'm using the QEMU v6.1 packages straight from its backports repo.

I've got so far as to extracting the image and trying to run it with

        qemu-system-arm -M raspi2b -vnc :50 -drive file=~/tape/victron/venusos_rpi/venus-image-raspberrypi2-20210411203709-v2.66.rootfs.rpi-sdimg,format=raw,index=0,media=disk

The result is that the QEMU process starts and keeps running, and I can connect via VNC to port 5950 to see the VM screen, but VNC shows only a black screen.

What am I doing wrong? Has anyone managed to emulate a physical RPi in QEMU yet?

Additionally, hints on how to debug this or other things to try would be most welcome.

Cheers,
--
Durval Menezes.