[PATCH 1/5] ConnectionInfo: console is active if fd can be provided

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

 



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@xxxxxxxxxx>
---
 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

_______________________________________________
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