674941bbf7
53022930-lxc-connection-fix.patch 530229cb-non-x86-kvm-creation-fix.patch 53023f56-dont-alter-caps-machine-list-on-create.patch 53030858-generate_target-fix.patch 53037798-not-customizing-generate_target-fix.patch 53047532-dont-get-duplicated-disks.patch 53047595-calculate-disk-bus-properly.patch 530987c4-disk-bus-calculation-fix.patch 530c021c-attempt-empty-path-on-virDomainBlockStats.patch 530cd6ab-log-broken-xml.patch 530cf4de-allow-numbered-object-names.patch 530cfa5e-close-connection-on-tick-failure-fix.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=146
22 lines
867 B
Diff
22 lines
867 B
Diff
Subject: addhardware: don't get duplicated disks
|
|
From: Martin Kletzander mkletzan@redhat.com Wed Feb 19 10:11:14 2014 +0100
|
|
Date: Wed Feb 19 10:11:14 2014 +0100:
|
|
Git: 7c437f6a6f07c81bcf20cecece462c857d0b5848
|
|
|
|
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
|
|
|
|
diff --git a/virtManager/addhardware.py b/virtManager/addhardware.py
|
|
index b446a9d..ed25c26 100644
|
|
--- a/virtManager/addhardware.py
|
|
+++ b/virtManager/addhardware.py
|
|
@@ -1481,7 +1481,8 @@ class vmmAddHardware(vmmGObjectUI):
|
|
disks = (self.vm.get_disk_devices() +
|
|
self.vm.get_disk_devices(inactive=True))
|
|
for d in disks:
|
|
- used.append(d.target)
|
|
+ if d.target not in used:
|
|
+ used.append(d.target)
|
|
|
|
prefer_ctrl = self._set_disk_controller(disk, controller_model, disks)
|
|
|