mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-01-27 14:03:57 +03:00
details: If changing disk bus, remove <address>
Need to let libvirt regenerate so things don't get funny
This commit is contained in:
parent
19d7df4e47
commit
305808187d
@ -539,6 +539,11 @@ class vmmDomain(vmmLibvirtObject):
|
||||
return self._redefine_device(change, devobj)
|
||||
def define_disk_bus(self, devobj, newval):
|
||||
def change(editdev):
|
||||
if editdev.bus != newval:
|
||||
# Old <address> probably isn't applicable for new bus value
|
||||
editdev.address.clear()
|
||||
# XXX: Need to change target value as well?
|
||||
|
||||
editdev.bus = newval
|
||||
return self._redefine_device(change, devobj)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user