The attached virtio disk is not recognized by libvirt but it is recognized by qemu

Hello.

I'm trying to virtualize FreeBSD 13.2 for arm 32 bit on my laptop ARM Chromebook where qemu is version 5.1,KVM is enabled,libvirt and virt-manager are installed from the source code and everything works great. The host OS is Devuan 5. Infact,using these parameters,FreeBSD is able to boot entirely :

UEFICODE=/usr/share/AAVMF/AAVMF32_CODE.fd
UEFIVARS=/usr/share/AAVMF/AAVMF32_VARS.fd
DISK=/Dati/img/FreeBSD-13.2-RELEASE-arm-armv7-GENERICSD.img

qemu-system-arm -enable-kvm -serial stdio -m 1024 -M virt -cpu cortex-a15 
-drive if=pflash,format=raw,unit=0,file=$UEFICODE 
-drive if=pflash,format=raw,unit=1,file=$UEFIVARS 
-drive file=$DISK,media=disk,format=raw 
-device i82559b,netdev=net0,mac="52:54:00:12:34:55" 
-netdev type=user,id=net0 -device virtio-gpu-pci -usb 
-device nec-usb-xhci -device usb-kbd -device usb-mouse 
-device vmware-svga,id=video0,vgamem_mb=16

As you can see from this boot log messages :

https://pastebin.ubuntu.com/p/VBtJ5bTTCz/

So,this argument is good because qemu recognizes the virtio disk :

-drive file=$DISK,media=disk,format=raw \

but these arguments used by libvirt aren't able to boot FreeBSD because the virtio disk attached is not recognized (I also tried with a SATA disk and it is not recognized as well) :

<disk type="file" device="disk">
  <driver name="qemu" type="raw"/>
  <source file="/Dati/img/FreeBSD-13.2-RELEASE-arm-armv7-GENERICSD.img"/>
  <target dev="vda" bus="virtio"/>
  <address type="pci" domain="0x0000" bus="0x04" slot="0x00" function="0x0"/>
</disk>

Here you can see what are the full XML code used by libirt :

https://pastebin.ubuntu.com/p/hpGmgp2773/

this is the portion of code that correspond with the virtio disk (the FreeBSD image file)

What's the difference between the qemu and the libvirt parameters ? Do you have some vague idea about the reason ? I think the problem is caused by qemu and/or libvirt.

I tried to boot the image going inside the bios settings and trying to boot directly the image disk,but I saw this error :

If you want to see the whole boot sequence,you can give a look at this short video that I have recorded :

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.