virt-manager/virtman-autorestart.diff
2010-08-02 21:45:48 +00:00

44 lines
1.8 KiB
Diff

Index: virt-manager-0.8.4/src/virtManager/details.py
===================================================================
--- virt-manager-0.8.4.orig/src/virtManager/details.py
+++ virt-manager-0.8.4/src/virtManager/details.py
@@ -1335,8 +1335,15 @@ class vmmDetails(gobject.GObject):
self.vm.hotplug_both_mem,
(curmem, maxmem))
- # Boot device / Autostart
+ # Boot device
def config_boot_options_apply(self):
+ bootdevs = self.get_config_boot_devs()
+ return self._change_config_helper(self.vm.set_boot_device,
+ (bootdevs,))
+
+ # Autostart - See bnc#624250 - L3: virt-manager doesn't update
+ # "Autostart" setting in vm configuration correctly
+ def update_on_xend_start(self):
auto = self.window.get_widget("config-autostart")
if auto.get_property("sensitive"):
@@ -1345,11 +1352,6 @@ class vmmDetails(gobject.GObject):
except Exception, e:
self.err.show_err((_("Error changing autostart value: %s") %
str(e)), "".join(traceback.format_exc()))
- return False
-
- bootdevs = self.get_config_boot_devs()
- return self._change_config_helper(self.vm.set_boot_device,
- (bootdevs,))
# CDROM
def change_storage_media(self, dev_id_info, newpath, _type=None):
@@ -1505,6 +1507,9 @@ class vmmDetails(gobject.GObject):
else:
self.err.show_info(_("These changes will take effect after "
"the next guest reboot."))
+
+ self.update_on_xend_start()
+
return True
########################