2018-10-30 23:00:52 +01:00
|
|
|
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.0.0/virtManager/connmanager.py
|
2016-01-12 21:36:29 +01:00
|
|
|
===================================================================
|
2018-10-30 23:00:52 +01:00
|
|
|
--- virt-manager-2.0.0.orig/virtManager/connmanager.py
|
|
|
|
+++ virt-manager-2.0.0/virtManager/connmanager.py
|
|
|
|
@@ -26,12 +26,23 @@ class vmmConnectionManager(vmmGObject):
|
2015-12-14 16:28:18 +01:00
|
|
|
|
2018-10-30 23:00:52 +01:00
|
|
|
def __init__(self):
|
|
|
|
vmmGObject.__init__(self)
|
|
|
|
+ from .connect import vmmConnect
|
2015-05-04 22:15:01 +02:00
|
|
|
+ tryuri = vmmConnect.default_uri()
|
2018-10-30 23:00:52 +01:00
|
|
|
+ found_uri = False
|
|
|
|
|
|
|
|
self._conns = {}
|
|
|
|
|
|
|
|
# Load URIs from gsettings
|
|
|
|
for uri in self.config.get_conn_uris():
|
2014-03-14 00:44:08 +01:00
|
|
|
+ if uri == 'xen:///' or uri == 'qemu:///system':
|
|
|
|
+ if tryuri and tryuri != uri:
|
|
|
|
+ logging.debug("Skipping %s because it is incompatible with local host", uri)
|
|
|
|
+ continue
|
|
|
|
+ found_uri = True
|
2018-10-30 23:00:52 +01:00
|
|
|
self.add_conn(uri)
|
|
|
|
+ if tryuri and found_uri is False:
|
|
|
|
+ logging.debug("CEA:: Didn't connect with anything, use default %s", tryuri)
|
|
|
|
+ self.add_conn(tryuri)
|
2014-03-14 00:44:08 +01:00
|
|
|
|
2018-10-30 23:00:52 +01:00
|
|
|
def _cleanup(self):
|
|
|
|
for conn in self._conns.values():
|