Incus VM on Raspberry PI4

Hi all,
following the hint provided by @stgraber closing #475 issue on github I have finally started a vm in Voidlinux x86 platform.
I can’t do the same on a Raspberry PI4.

Since Voidlinux doesn’t have the ovmf package for aarch64 platform I tried Fedora

To setup incus I followed instructions found at ‘Start your first virtual machine’ here, but i got the same QEMU error “Failed instance creation: Failed creating instance record: Instance type “virtual-machine” is not supported on this server: QEMU failed to run feature checks” even skipping the, to me unknown, cloud-init section.

Libvirtd.service is active (is that enough to run vm on Fedora??) and it looks like qemu is working.

@stgraber suggested to look into journalctl (no clues at all), and incusd log (no incusd log at all), so I ran out of options.

May anyone who started succesfully vm through incus on a Raspberry PI4 point me in the right direction?

My kind regards

P.S. Linux distribution doesn’t matter, I want only a working one

journalctl -u incus doesn’t show anything?

Simulating a VM detection failure on Fedora 39 here:

[root@f39 ~]# rm /dev/kvm 
[root@f39 ~]# systemctl restart incus
[root@f39 ~]# journalctl -u incus.
Mar 12 23:42:54 f39 systemd[1]: Starting incus.service - Incus - Daemon...
Mar 12 23:42:54 f39 incusd[1130]: time="2024-03-12T23:42:54Z" level=error msg="Unable to parse system idmap" err="No map found for user"
Mar 12 23:42:54 f39 incusd[1130]: time="2024-03-12T23:42:54Z" level=warning msg="AppArmor support has been disabled because of lack of kernel support"
Mar 12 23:42:54 f39 incusd[1130]: time="2024-03-12T23:42:54Z" level=warning msg=" - AppArmor support has been disabled, Disabled because of lack of kernel support"
Mar 12 23:42:54 f39 incusd[1130]: time="2024-03-12T23:42:54Z" level=warning msg="Instance type not operational" driver=qemu err="KVM support is missing (no /dev/kvm)" type=virtual-machine
Mar 12 23:42:55 f39 systemd[1]: Started incus.service - Incus - Daemon.
[root@f39 ~]# 

This shows the expected error:

Mar 12 23:42:54 f39 incusd[1130]: time="2024-03-12T23:42:54Z" level=warning msg="Instance type not operational" driver=qemu err="KVM support is missing (no /dev/kvm)" type=virtual-machine

I use Raspberry Pi OS on my Raspberry Pis. It is basically just Debian 12.

Then you can use the Zabbly Debian packages of incus and zfs.

Incus runs perfectly on my 5, 4, and 3 models.

This is probably the easiest way of doing it.

My ignorance of systemd is total

Thanks to your suggestions i discovered where the problem. is

qemu-system-aarch64 device requires 67108864 bytes, block backend provides 1966080 bytes

I shortly googled for this error and it looks like the fix is over my capabilities

Sorry for the noise

I’ll try that way

Thanks

I don’t exactly understand what i did so this workaround could have unpredictable downsides, however…

cd /usr/share/edk2/aarch64
dd of="QEMU_EFI-pflash.raw" if="/dev/zero" bs=1M count=64
dd of="QEMU_EFI-pflash.raw" if="QEMU_EFI.fd" conv=notrunc
dd of="QEMU_VARS-pflash.raw" if="/dev/zero" bs=1M count=64
dd of="QEMU_VARS-pflash.raw" if="QEMU_VARS.fd" conv=notrunc
cd /usr/share/edk2/ovmf
dd of="OVMF_VARS.fd" if="/dev/zero" bs=1M count=64

allows the virtual machine to start

Next days i’ll do more tests

1 Like