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
41 lines
1.5 KiB
Diff
41 lines
1.5 KiB
Diff
Subject: addhardware: generate target only if not customizing
|
|
From: Martin Kletzander mkletzan@redhat.com Tue Feb 18 11:38:56 2014 +0100
|
|
Date: Tue Feb 18 16:09:12 2014 +0100:
|
|
Git: bc5d84b0407257b1e257e7cabaf619430a7e8f83
|
|
|
|
Commit 078e1a4d0503d98884b5b61df83021941bf32e8d changed the fact that
|
|
disk target was generated only when adding new disk, not when current
|
|
disk is being customized, so fix that back.
|
|
|
|
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
|
|
|
|
diff --git a/virtManager/addhardware.py b/virtManager/addhardware.py
|
|
index ecb5fc8..b1f6251 100644
|
|
--- a/virtManager/addhardware.py
|
|
+++ b/virtManager/addhardware.py
|
|
@@ -1471,20 +1471,22 @@ class vmmAddHardware(vmmGObjectUI):
|
|
return disk
|
|
|
|
try:
|
|
+ used = []
|
|
disk.bus = bus
|
|
if cache:
|
|
disk.driver_cache = cache
|
|
|
|
# Generate target
|
|
if not self.is_customize_dialog:
|
|
- used = []
|
|
disks = (self.vm.get_disk_devices() +
|
|
self.vm.get_disk_devices(inactive=True))
|
|
for d in disks:
|
|
used.append(d.target)
|
|
|
|
prefer_ctrl = self._set_disk_controller(disk, controller_model, disks)
|
|
- disk.generate_target(used, prefer_ctrl)
|
|
+
|
|
+ if not self.is_customize_dialog:
|
|
+ disk.generate_target(used, prefer_ctrl)
|
|
|
|
except Exception, e:
|
|
return self.err.val_err(_("Storage parameter error."), e)
|