From 096afbb01da255ee87f135f108a45ef72da2f7e8 Mon Sep 17 00:00:00 2001 From: Charles Arnold Date: Wed, 3 Sep 2014 21:55:51 +0000 Subject: [PATCH] - bnc#892821 - Minor enhancement to virt-manager's operating system detection virtinst-ignore-error-403-on-directories.patch (Leonardo Chiquitto) - bnc#886311 - Xen Virtual Machine Manager does not display CPU usage stats - bnc#888289 - After domU shutdown, sometimes virt-manager doesn't refresh the domU status. virtman-sync-vm-startup-for-cpu-usage.patch - add patch: virtinst-ppc64le.patch initial ppc64le support for virt-install - bnc#875111 - When kvm guest is in crashed state, virt-manager reports guest as still running, no option to shutdown/destroy virtman-allow-destroy-from-shutdown-menu-of-crashed-vm.patch - bnc#892003 - create virtual machine with Virt Manager randomly times out with large memory guest virtman-increase-setKeepAlive-count.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-manager?expand=0&rev=194 --- virt-manager.changes | 32 +++++++++ virt-manager.spec | 11 +++- ...inst-ignore-error-403-on-directories.patch | 24 +++++++ virtinst-ppc64le.patch | 49 ++++++++++++++ ...roy-from-shutdown-menu-of-crashed-vm.patch | 66 +++++++++++++++++++ virtman-increase-setKeepAlive-count.patch | 12 ++++ virtman-sync-vm-startup-for-cpu-usage.patch | 19 ++++++ 7 files changed, 212 insertions(+), 1 deletion(-) create mode 100644 virtinst-ignore-error-403-on-directories.patch create mode 100644 virtinst-ppc64le.patch create mode 100644 virtman-allow-destroy-from-shutdown-menu-of-crashed-vm.patch create mode 100644 virtman-increase-setKeepAlive-count.patch create mode 100644 virtman-sync-vm-startup-for-cpu-usage.patch diff --git a/virt-manager.changes b/virt-manager.changes index a71f9c25..5ab0e047 100644 --- a/virt-manager.changes +++ b/virt-manager.changes @@ -1,3 +1,35 @@ +------------------------------------------------------------------- +Thu Aug 28 09:25:44 MDT 2014 - carnold@suse.com + +- bnc#892821 - Minor enhancement to virt-manager's operating system + detection + virtinst-ignore-error-403-on-directories.patch (Leonardo Chiquitto) + +------------------------------------------------------------------- +Tue Aug 26 15:41:39 MDT 2014 - carnold@suse.com + +- bnc#886311 - Xen Virtual Machine Manager does not display CPU + usage stats +- bnc#888289 - After domU shutdown, sometimes virt-manager doesn't + refresh the domU status. + virtman-sync-vm-startup-for-cpu-usage.patch + +------------------------------------------------------------------- +Thu Aug 21 02:26:28 CEST 2014 - ro@suse.de + +- add patch: virtinst-ppc64le.patch + initial ppc64le support for virt-install + +------------------------------------------------------------------- +Mon Aug 18 17:51:41 MDT 2014 - carnold@suse.com + +- bnc#875111 - When kvm guest is in crashed state, virt-manager + reports guest as still running, no option to shutdown/destroy + virtman-allow-destroy-from-shutdown-menu-of-crashed-vm.patch +- bnc#892003 - create virtual machine with Virt Manager randomly + times out with large memory guest + virtman-increase-setKeepAlive-count.patch + ------------------------------------------------------------------- Mon Aug 11 15:27:41 MDT 2014 - carnold@suse.com diff --git a/virt-manager.spec b/virt-manager.spec index 3dca55ad..b349cbab 100644 --- a/virt-manager.spec +++ b/virt-manager.spec @@ -15,7 +15,6 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # - %define with_guestfs 0 %define askpass_package "openssh-askpass" %define qemu_user "qemu" @@ -109,6 +108,9 @@ Patch92: virtman-add-connect-default.patch Patch93: virtman-dont-allow-grub.xen-to-be-deleted.patch Patch94: virtman-check-for-empty-network-name.patch Patch95: virtman-s390x-default-to-vminstall.patch +Patch96: virtman-increase-setKeepAlive-count.patch +Patch97: virtman-allow-destroy-from-shutdown-menu-of-crashed-vm.patch +Patch98: virtman-sync-vm-startup-for-cpu-usage.patch Patch151: virtinst-storage-ocfs2.patch Patch152: virtinst-supported-disk-formats.patch Patch153: virtinst-support-suse-distros.patch @@ -124,6 +126,8 @@ Patch162: virtinst-set-cache-mode-unsafe-for-install.patch Patch163: virtinst-add-default-rng-device.patch Patch164: virtinst-refresh_before_fetch_pool.patch Patch165: virtinst-nfs-install-sanitize.patch +Patch166: virtinst-ppc64le.patch +Patch167: virtinst-ignore-error-403-on-directories.patch BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -285,6 +289,9 @@ machine). %patch93 -p1 %patch94 -p1 %patch95 -p1 +%patch96 -p1 +%patch97 -p1 +%patch98 -p1 %patch151 -p1 %patch152 -p1 %patch153 -p1 @@ -300,6 +307,8 @@ machine). %patch163 -p1 %patch164 -p1 %patch165 -p1 +%patch166 -p1 +%patch167 -p1 %build %if %{qemu_user} diff --git a/virtinst-ignore-error-403-on-directories.patch b/virtinst-ignore-error-403-on-directories.patch new file mode 100644 index 00000000..56f3df99 --- /dev/null +++ b/virtinst-ignore-error-403-on-directories.patch @@ -0,0 +1,24 @@ +bnc#892821 + +Ignore HTTP error 403 if the location is a directory. This allows +the OS detection procedure to succeed when Indexes are disabled +on the HTTP server. + +Index: virt-manager-1.0.1/virtinst/urlfetcher.py +=================================================================== +--- virt-manager-1.0.1.orig/virtinst/urlfetcher.py ++++ virt-manager-1.0.1/virtinst/urlfetcher.py +@@ -140,8 +140,11 @@ class _HTTPImageFetcher(_URIImageFetcher + request.get_method = lambda: "HEAD" + urllib2.urlopen(request) + except Exception, e: +- logging.debug("HTTP hasFile: didn't find %s: %s", path, str(e)) +- return False ++ if path.endswith("/") and e.code == 403: ++ logging.debug("HTTP hasFile: indexing disabled in %s?.", path) ++ else: ++ logging.debug("HTTP hasFile: didn't find %s: %s", path, str(e)) ++ return False + return True + + diff --git a/virtinst-ppc64le.patch b/virtinst-ppc64le.patch new file mode 100644 index 00000000..86e8fb6f --- /dev/null +++ b/virtinst-ppc64le.patch @@ -0,0 +1,49 @@ +--- a/virtinst/guest.py ++++ b/virtinst/guest.py +@@ -623,7 +623,7 @@ + return + if self.os.is_container(): + return +- if self.os.arch not in ["x86_64", "i686", "ppc64", "ia64", "s390x"]: ++ if self.os.arch not in ["x86_64", "i686", "ppc64", "ppc64le", "ia64", "s390x"]: + return + self.add_device(virtinst.VirtualGraphics(self.conn)) + +@@ -752,6 +752,8 @@ + if self.conn.is_qemu(): + if self.os.arch == "s390x": + preferred_emulator = "/usr/bin/qemu-system-s390x" ++ elif self.os.arch == "ppc64le": ++ preferred_emulator = "/usr/bin/qemu-system-ppc64" + else: + preferred_emulator = "/usr/bin/qemu-system-x86_64" + else: +@@ -847,7 +849,7 @@ + if not self._lookup_osdict_key(key, False): + return False + +- if self.os.is_x86() or self.os.is_s390x(): ++ if self.os.is_x86() or self.os.is_s390x() or self.os.is_ppc64(): + return True + if (self.os.is_arm_vexpress() and + self.os.dtb and +@@ -898,6 +900,8 @@ + net_model = None + elif self._can_virtio("virtionet"): + net_model = "virtio" ++ elif self.os.is_pseries(): ++ net_model = "spapr-vlan" + else: + net_model = self._lookup_osdict_key("netmodel", None) + +--- a/virtinst/osxml.py ++++ b/virtinst/osxml.py +@@ -55,6 +55,8 @@ + return self.is_ppc64 and self.machine == "pseries" + def is_s390x(self): + return self.arch == "s390x" ++ def is_ppc64(self): ++ return self.arch == "ppc64" or self.arch == "ppc64le" + + _XML_ROOT_NAME = "os" + _XML_PROP_ORDER = ["arch", "os_type", "loader", diff --git a/virtman-allow-destroy-from-shutdown-menu-of-crashed-vm.patch b/virtman-allow-destroy-from-shutdown-menu-of-crashed-vm.patch new file mode 100644 index 00000000..56ddb09d --- /dev/null +++ b/virtman-allow-destroy-from-shutdown-menu-of-crashed-vm.patch @@ -0,0 +1,66 @@ +bnc#875111 +--- virt-manager-1.0.1/virtManager/manager.py.orig 2014-08-18 17:39:09.506148602 -0600 ++++ virt-manager-1.0.1/virtManager/manager.py 2014-08-18 17:39:12.440170326 -0600 +@@ -892,7 +892,7 @@ class vmmManager(vmmGObjectUI): + show_pause = bool(vm and vm.is_unpauseable()) + else: + show_pause = bool(vm and vm.is_pauseable()) +- show_shutdown = bool(vm and vm.is_stoppable()) ++ show_shutdown = bool(vm and vm.is_destroyable()) + + if vm and vm.managedsave_supported: + self.change_run_text(vm.hasSavedImage()) +--- virt-manager-1.0.1/virtManager/vmmenu.py.orig 2014-08-18 17:39:04.166109065 -0600 ++++ virt-manager-1.0.1/virtManager/vmmenu.py 2014-08-18 17:39:15.265191243 -0600 +@@ -24,6 +24,7 @@ from gi.repository import Gtk + from virtManager import config + + import platform ++import logging + + #################################################################### + # Build toolbar new button menu (manager and details toolbar) # +@@ -58,6 +59,7 @@ class _VMMenu(Gtk.Menu): + self._parent = src + self._current_vm_cb = current_vm_cb + self._show_open = show_open ++ self._shutdown = None + + self._init_state() + +@@ -122,6 +124,7 @@ class VMShutdownMenu(_VMMenu): + name = getattr(child, "vmm_widget_name", None) + if name in statemap: + child.set_sensitive(statemap[name]) ++ child.set_visible(statemap[name]) + + + class VMActionMenu(_VMMenu): +@@ -133,7 +136,8 @@ class VMActionMenu(_VMMenu): + self._add_action(_("_Pause"), "suspend", Gtk.STOCK_MEDIA_PAUSE) + self._add_action(_("R_esume"), "resume", Gtk.STOCK_MEDIA_PAUSE) + s = self._add_action(_("_Shut Down"), "shutdown", addcb=False) +- s.set_submenu(VMShutdownMenu(self._parent, self._current_vm_cb)) ++ self._shutdown = VMShutdownMenu(self._parent, self._current_vm_cb) ++ s.set_submenu(self._shutdown) + + self.add(Gtk.SeparatorMenuItem()) + self._add_action(_("Clone..."), "clone", None) +@@ -149,7 +153,7 @@ class VMActionMenu(_VMMenu): + def update_widget_states(self, vm): + statemap = { + "run": bool(vm and vm.is_runable()), +- "shutdown": bool(vm and vm.is_stoppable()), ++ "shutdown": bool(vm and vm.is_destroyable()), + "suspend": bool(vm and vm.is_stoppable()), + "resume": bool(vm and vm.is_paused()), + "migrate": bool(vm and vm.is_stoppable()), +@@ -166,6 +170,8 @@ class VMActionMenu(_VMMenu): + child.update_widget_states(vm) + if name in statemap: + child.set_sensitive(statemap[name]) ++ if name == "shutdown" and self._shutdown: ++ self._shutdown.update_widget_states(vm) + if name in vismap: + child.set_visible(vismap[name]) + diff --git a/virtman-increase-setKeepAlive-count.patch b/virtman-increase-setKeepAlive-count.patch new file mode 100644 index 00000000..a818fe65 --- /dev/null +++ b/virtman-increase-setKeepAlive-count.patch @@ -0,0 +1,12 @@ +bnc#892003 +--- virt-manager-1.0.1/virtManager/connection.py.orig 2014-08-18 13:45:50.843688551 -0600 ++++ virt-manager-1.0.1/virtManager/connection.py 2014-08-18 14:13:37.968606032 -0600 +@@ -1114,7 +1114,7 @@ class vmmConnection(vmmGObject): + self._add_conn_events() + + try: +- self._backend.setKeepAlive(20, 1) ++ self._backend.setKeepAlive(20, 10) + except Exception, e: + if (type(e) is not AttributeError and + not util.is_error_nosupport(e)): diff --git a/virtman-sync-vm-startup-for-cpu-usage.patch b/virtman-sync-vm-startup-for-cpu-usage.patch new file mode 100644 index 00000000..b1b8422d --- /dev/null +++ b/virtman-sync-vm-startup-for-cpu-usage.patch @@ -0,0 +1,19 @@ +bnc#886311 and bnc#888289 +Prevents a second unecessary vmmDomain object from being created for the VM. +The orignal object gets the cpu stats from libvirt but the new one is used to +update the display but it is never updated with the new stats. + +Index: virt-manager-1.0.1/virtManager/connection.py +=================================================================== +--- virt-manager-1.0.1.orig/virtManager/connection.py ++++ virt-manager-1.0.1/virtManager/connection.py +@@ -1291,6 +1291,9 @@ class vmmConnection(vmmGObject): + self.emit("nodedev-added", name) + + self.idle_add(tick_send_signals) ++ if len(self.vms) < len(vms): ++ # Allow time for tick_send_signals to run ++ time.sleep(.1) + + ticklist = [] + def add_to_ticklist(l, args=()):