[virt-tools-list] [virt-manager PATCH 4/7] addhardware: Correctly handle 7 devices per narrow virtio-scsi controller

Lin Ma lma at suse.com
Mon Nov 6 12:52:06 UTC 2017


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 at suse.com>
---
 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:
-- 
2.14.0




More information about the virt-tools-list mailing list