[virt-tools-list] [PATCH virt-manager] ConnectionInfo: console is active if fd can be provided

Marc-André Lureau marcandre.lureau at redhat.com
Tue Apr 26 15:59:34 UTC 2016


A domain doesn't need to have TCP socket listening, virt-manager can
now connect to it as long as libvirt can provide some fd (through
local unix sockets).

Signed-off-by: Marc-André Lureau <marcandre.lureau at redhat.com>
---
 virtManager/sshtunnels.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/virtManager/sshtunnels.py b/virtManager/sshtunnels.py
index 4fe8c3f..8749fa2 100644
--- a/virtManager/sshtunnels.py
+++ b/virtManager/sshtunnels.py
@@ -101,6 +101,10 @@ class ConnectionInfo(object):
     def console_active(self):
         if self.gsocket:
             return True
+        connfd = self.get_conn_fd()
+        if connfd != -1:
+            os.close(connfd)
+            return True
         if (self.gport in [None, -1] and self.gtlsport in [None, -1]):
             return False
         return True
-- 
2.7.4




More information about the virt-tools-list mailing list