Configure KVM guest to have .iso mounted as a cdrom
From AcrodusWiki
This was a pain in the arse.
So ensure that the xml file for the host includes the following.
<disk type=’file’ device=’cdrom’> <driver name=’qemu’ type=’raw' cache=’none’/> <source file=’/var/lib/libvirt/images/my-cdrom.iso’/> <target dev=’sda’ bus=’sata’/> <readonly/> <address type=’drive’ controller=’0' bus=’0' target=’0' unit=’0'/> </disk>
and then run the command from the host to mount
sudo virsh attach-disk vm-wshark0 /var/lib/libvirt/images/debian-12.5.0-amd64-STICK16GB-1.iso sda --type cdrom