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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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:
-- 
2.14.0

_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list



[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux