[RFC PATCH] virt-manager: console disconnected after rebooting virtual machine in Xen mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Running with virt-manager 3.2.0, not a problem in 2.2.1.

When rebooting an HVM guest on Xen, virt-manager gets a disconnected
event which closes the viewer. See
self._viewer.connect("disconnected", self._viewer_disconnected).
Running on KVM, this event does not seem to occur on VM reboot.

Both Xen and KVM get a state changed event,
self.vm.connect("state-changed", self._vm_state_changed_cb)
but for Xen, the viewer is gone due to the prior disconnect and when
calling into _activate_default_console_page(), the viewer does not
exist nor does it get created.
The VM comes up fine but you need to close the console window and
open it again to see the running VM.

This patch resolves the issue for me.

diff --git a/virtManager/details/console.py b/virtManager/details/console.py
index fafb7202..f8a005ee 100644
--- a/virtManager/details/console.py
+++ b/virtManager/details/console.py
@@ -913,6 +913,8 @@ class vmmConsolePages(vmmGObjectUI):
             return

         cpage = self.widget("console-pages").get_current_page()
+        if cpage == _CONSOLE_PAGE_GRAPHICS:
+            self._init_viewer()
         if cpage != _CONSOLE_PAGE_UNAVAILABLE:
             return





[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux