On 11/06/2017 07:52 AM, Lin Ma wrote: > when we add virtual disks on virtio-scsi bus, Because the redundant disk > objects are passed to used_disks, It causes that virt-manager allows only > 4 sd* devices per controller. virt-manager automatically adds more virtio > scsi controllers for us if we add more virtual disks on virtio-scsi bus. > > e.g: > virtio-scsi controller 0: sda, sdb, sdc, sdd (disk name sde, f and g will be ignoged) > virtio-scsi controller 1: sdh, sdi, sdj, sdk (l, m and n will be ignoged) > virtio-scsi controller 2: sdo, sdp, sdq, sdr > > The patch fixes this issue. > > Signed-off-by: Lin Ma <lma@xxxxxxxx> > --- > virtManager/addhardware.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/virtManager/addhardware.py b/virtManager/addhardware.py > index cd82cd3e..c6402e0d 100644 > --- a/virtManager/addhardware.py > +++ b/virtManager/addhardware.py > @@ -1507,7 +1507,7 @@ class vmmAddHardware(vmmGObjectUI): > used.append(d.target) > > prefer_ctrl = self._set_disk_controller( > - disk, controller_model, disks) > + disk, controller_model, self.vm.get_disk_devices(inactive=True)) > > disk.generate_target(used, prefer_ctrl) > except Exception as e: > Hmm indeed I see the bug. But we do want to account for both active and inactive devices when calculating disk controller usage so this fix isn't correct. But I've pushed a patch now that fixes the calculating logic to handle duplicate targets commit ddcf22bad2e679e076d10e8745d022bb726fa013 (HEAD -> master) Author: Cole Robinson <crobinso@xxxxxxxxxx> Date: Wed Nov 22 14:58:12 2017 -0500 addhardware: Fix virtio-scsi controller target calculation More details here: https://www.redhat.com/archives/virt-tools-list/2017-November/msg00014.html Reported-by: Lin Ma <lma@xxxxxxxx> Thanks, Cole _______________________________________________ virt-tools-list mailing list virt-tools-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/virt-tools-list