[PATCH 2/2] Show the new connection dialog if we can't find a default URI.

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

 



---
 virtManager/engine.py | 18 +++++-------------
 1 file changed, 5 insertions(+), 13 deletions(-)

diff --git a/virtManager/engine.py b/virtManager/engine.py
index 8e9caeb..487277a 100644
--- a/virtManager/engine.py
+++ b/virtManager/engine.py
@@ -178,14 +178,6 @@ class vmmEngine(vmmGObject):
         self.timeout_add(1000, self._add_default_conn, manager)
 
     def _add_default_conn(self, manager):
-        # Manager fail message
-        msg = _("Could not detect a default hypervisor. Make\n"
-                "sure the appropriate virtualization packages\n"
-                "are installed (kvm, qemu, libvirt, etc.), and\n"
-                "that libvirtd is running.\n\n"
-                "A hypervisor connection can be manually\n"
-                "added via File->Add Connection")
-
         logging.debug("Determining default libvirt URI")
 
         ret = None
@@ -202,10 +194,6 @@ class vmmEngine(vmmGObject):
         else:
             tryuri = vmmConnect.default_uri(always_system=True)
 
-        if tryuri is None:
-            manager.set_startup_error(msg)
-            return
-
         warnmsg = _("The 'libvirtd' service will need to be started.\n\n"
                     "After that, virt-manager will connect to libvirt on\n"
                     "the next application start up.")
@@ -219,7 +207,11 @@ class vmmEngine(vmmGObject):
             if not connected and do_start:
                 manager.err.ok(_("Libvirt service must be started"), warnmsg)
 
-        self.idle_add(idle_connect)
+        # If there is no default URI to be found, show the new connection dialog
+        if tryuri is None:
+            self._do_show_connect(self.windowManager)
+        else:
+            self.idle_add(idle_connect)
 
 
     def load_stored_uris(self):
-- 
2.1.2

_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list




[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