virt-manager/virtman-add-connect-default.patch
2015-09-10 21:19:49 +00:00

30 lines
1.2 KiB
Diff

Enhancement for when no hypervisor can be found locally it opens
the new connection dialog.
Index: virt-manager-1.2.1/virtManager/engine.py
===================================================================
--- virt-manager-1.2.1.orig/virtManager/engine.py
+++ virt-manager-1.2.1/virtManager/engine.py
@@ -202,9 +202,6 @@ class vmmEngine(vmmGObject):
except:
logging.exception("Error talking to PackageKit")
- if tryuri is None:
- tryuri = "qemu:///system"
-
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.")
@@ -218,7 +215,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):