[solved] attach more than ONE device during boot-time

I can attach one device during boot-time like this

qvm-start hvm-mac --hddisk=dispXXXX:/home/user/OpenCore.img

but I need to attach a second device. qvm-start seems not support that. More over when I install and use virt-manager in dom0 to add a loop-device as Xen Disk 5 the changes get overwritten while starting up the VM with qvm-start.

One can add --hddisk more then once, but only the last --hddisk option is fullfilled. One can not combine --hddisk with --cdrom.

You can use custom VM config with libvirt template and add multiple disks there:
sudo cp /etc/libvirt/libxl/yourvm.xml /etc/qubes/templates/libvirt/xen/by-name/.
Then add as many <disk> ... </disk> entries as you need in /etc/qubes/templates/libvirt/xen/by-name/yourvm.xml:

<disk type='file' device='cdrom'>
  <driver name='qemu' type='raw'/>
  <source file='/path/to/your/iso.iso'/>
  <target dev='hdc' bus='ide'/>
  <address type='drive' controller='0' bus='1' unit='0'/>
1 Like

On second thought you can just attach blockdevice to your hvm:
qvm-block a --persistent yourvm vault:loop0

1 Like

Are you sure about the path /etc/qubes/templates/libvirt/xen/by-name/? Because in v4.1 I can’t find a /etc/qubes/templates/.

I’m sure, you need to create it:
mkdir -p /etc/qubes/templates/libvirt/xen/by-name/

I choose the qvm-block a --persistent method. Works great.