mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-01-12 09:18:00 +03:00
addhardware: Generate disk targets for disks via customize dialog
Since the XML we use now is with the defaults filled in. Fixes some issues in the log here: https://bugzilla.redhat.com/show_bug.cgi?id=1213475
This commit is contained in:
parent
a8d3afbcd9
commit
4547031152
@ -1683,20 +1683,16 @@ class vmmAddHardware(vmmGObjectUI):
|
||||
disk.driver_cache = cache
|
||||
|
||||
# Generate target
|
||||
disks = []
|
||||
if not self.is_customize_dialog:
|
||||
disks = (self.vm.get_disk_devices() +
|
||||
self.vm.get_disk_devices(inactive=True))
|
||||
for d in disks:
|
||||
if d.target not in used:
|
||||
used.append(d.target)
|
||||
disks = (self.vm.get_disk_devices() +
|
||||
self.vm.get_disk_devices(inactive=True))
|
||||
for d in disks:
|
||||
if d.target not in used:
|
||||
used.append(d.target)
|
||||
|
||||
prefer_ctrl = self._set_disk_controller(
|
||||
disk, controller_model, disks)
|
||||
|
||||
if not self.is_customize_dialog:
|
||||
disk.generate_target(used, prefer_ctrl)
|
||||
|
||||
disk.generate_target(used, prefer_ctrl)
|
||||
except Exception, e:
|
||||
return self.err.val_err(_("Storage parameter error."), e)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user