diff --git a/src/virtManager/addhardware.py b/src/virtManager/addhardware.py index b383ed7f..45f64c51 100644 --- a/src/virtManager/addhardware.py +++ b/src/virtManager/addhardware.py @@ -535,6 +535,10 @@ class vmmAddHardware(gobject.GObject): "reboot.")): return + if self.vm.is_active() and not attach_err: + # Attach device should alter xml for us + return + try: self.vm.add_device(xml) except Exception, e: diff --git a/src/virtManager/details.py b/src/virtManager/details.py index 8072f7a9..d6d395d6 100644 --- a/src/virtManager/details.py +++ b/src/virtManager/details.py @@ -1684,6 +1684,9 @@ class vmmDetails(gobject.GObject): "reboot.")): return + if self.vm.is_active() and not detach_err: + return + try: self.vm.remove_device(xml) except Exception, e: