problem
With the Q35 machine type, which is the default on many recent libvirt versions or set intentionally per VM/template as per the requirements attaching 4th volume (3rd data volume) fails for running VM. It can be attached to a stopped VM.
Error:
Failed to attach volume vol4 to VM scsi-3; org.libvirt.LibvirtException: XML error: target 'sde' duplicated for disk sources '/mnt/f18be102-4fc9-36c8-a322-02b8e9674714/i-2-1936-VM.iso' and '/mnt/b75b9349-4d30-30dd-84ca-1de657c42cbf/30078d45-68d2-4e9b-ae53-16e49e73c795'
versions
4.22.1
The steps to reproduce the bug
- Create an L2 guest network with the offering 'DefaultL2NetworkOfferingConfigDrive'
- Register two templates with the following template settings
rootDiskController:scsi, kvm.guest.os.machine.type:pc-q35-rhel9.6.0,UEFI=LEGACY
rootDiskController:virtio, kvm.guest.os.machine.type:pc-q35-rhel9.6.0,UEFI=LEGACY
- Deploy an instance in the L2 network using each template , attach 3 data volumes, 4th one fails to attach.
What to do about it?
Allow attaching the 4th volume.
problem
With the Q35 machine type, which is the default on many recent libvirt versions or set intentionally per VM/template as per the requirements attaching 4th volume (3rd data volume) fails for running VM. It can be attached to a stopped VM.
Error:
Failed to attach volume vol4 to VM scsi-3; org.libvirt.LibvirtException: XML error: target 'sde' duplicated for disk sources '/mnt/f18be102-4fc9-36c8-a322-02b8e9674714/i-2-1936-VM.iso' and '/mnt/b75b9349-4d30-30dd-84ca-1de657c42cbf/30078d45-68d2-4e9b-ae53-16e49e73c795'
versions
4.22.1
The steps to reproduce the bug
rootDiskController:scsi, kvm.guest.os.machine.type:pc-q35-rhel9.6.0,UEFI=LEGACY
rootDiskController:virtio, kvm.guest.os.machine.type:pc-q35-rhel9.6.0,UEFI=LEGACY
What to do about it?
Allow attaching the 4th volume.