And in the journal I pick up the mentioned error:
internal error: Child process (LIBVIRT_LOG_OUTPUTS=3:stderr /usr/lib/libvirt/virt-aa-helper -c -u libvirt-e4089ffc-671d-4d28-9fa5-d0d52dc2d67f) unexpected exit status 1: virt-aa-helper: error: /usr/lib/u-boot/qemu-riscv64_smode/uboot.elf virt-aa-helper: error: skipped restricted file virt-aa-helper: error: invalid VM definition
internal error: cannot load AppArmor profile 'libvirt-e4089ffc-671d-4d28-9fa5-d0d52dc2d67f'
P.S. when bypassing apparmor I realized I'd still need to munge the disc a bit to be able to boot, but that problem is for another day.
I can recreate the same with these simple steps in Jammy (independent to the add-loader or not):
$ wget https:/ /cdimage. ubuntu. com/releases/ 22.04.1/ release/ ubuntu- 22.04.1- preinstalled- server- riscv64+ unmatched. img.xz 22.04.1- preinstalled- server- riscv64+ unmatched. img /var/lib/ libvirt/ images/ ubuntu22. 10-riscv64< /name> 'virt'> hvm</type> /usr/lib/ u-boot/ qemu-riscv64_ smode/uboot. elf</kernel> >/usr/lib/ riscv64- linux-gnu/ opensbi/ generic/ fw_jump. elf</loader> >2</memory> "static" >4</vcpu>
<emulator> usr/bin/ qemu-system- riscv64< /emulator> var/lib/ libvirt/ images/ ubuntu- 22.04.1- preinstalled- server- riscv64+ unmatched. img'/> virtio- scsi'/>
</interface> 10-riscv64' e4089ffc- 671d-4d28- 9fa5-d0d52dc2d6 7f'
$ mv ubuntu-
$ cat << EoF > riscv-guest.xml
<domain type='qemu'>
<name>
<os>
<type arch='riscv64' machine=
<kernel>
<loader readonly="yes" type="rom"
</os>
<memory unit="GiB"
<vcpu placement=
<devices>
<disk type='file' device='disk' cache='none'>
<driver name='qemu' type='raw'/>
<source file='/
<target dev='sda' bus='scsi'/>
</disk>
<controller type='scsi' model='
<interface type='network'>
<source network='default'/>
<target dev='vnet0'/>
<console type='pty'>
<target type='serial' port='0'/>
</console>
</devices>
</domain>
EOF
$ virsh define riscv-guest.xml
$ virsh start ubuntu22.10-riscv64
error: Failed to start domain 'ubuntu22.
error: internal error: cannot load AppArmor profile 'libvirt-
And in the journal I pick up the mentioned error: LOG_OUTPUTS= 3:stderr /usr/lib/ libvirt/ virt-aa- helper -c -u libvirt- e4089ffc- 671d-4d28- 9fa5-d0d52dc2d6 7f) unexpected exit status 1: virt-aa-helper: error: /usr/lib/ u-boot/ qemu-riscv64_ smode/uboot. elf
virt- aa-helper: error: skipped restricted file
virt- aa-helper: error: invalid VM definition e4089ffc- 671d-4d28- 9fa5-d0d52dc2d6 7f'
internal error: Child process (LIBVIRT_
internal error: cannot load AppArmor profile 'libvirt-
P.S. when bypassing apparmor I realized I'd still need to munge the disc a bit to be able to boot, but that problem is for another day.