File virtman-load-stored-uris.patch of Package virt-manager

If booted Xen, don't try connecting to local qemu
Likewise if booted native, don't try connecting to local xen

Index: virt-manager-2.2.0/virtManager/connmanager.py
===================================================================
--- virt-manager-2.2.0.orig/virtManager/connmanager.py
+++ virt-manager-2.2.0/virtManager/connmanager.py
@@ -26,11 +26,17 @@ class vmmConnectionManager(vmmGObject):
 
     def __init__(self):
         vmmGObject.__init__(self)
+        from .createconn import vmmCreateConn
+        default_uri = vmmCreateConn.default_uri()
 
         self._conns = {}
 
         # Load URIs from gsettings
         for uri in self.config.get_conn_uris():
+            if uri == 'xen:///' or uri == 'qemu:///system':
+                if default_uri and default_uri != uri:
+                    log.debug("Skipping local connection %s because it is incompatible with the host", uri)
+                    continue
             self.add_conn(uri)
 
     def _cleanup(self):
openSUSE Build Service is sponsored by