Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

VM console vs SSH tunnel

Help
Toomas Aas
2012-06-07
2013-04-23
  • Toomas Aas
    Toomas Aas
    2012-06-07

    I checked out revision 81 and I'm trying to access my company Xenserver 6.0 pool from home via SSH tunnel. I set up a tunnel from localhost:4443 to pool_master:443 and created a connection successfully. The only thing that is not working is VM console. When trying to access the console, Python prints the following:

    Exception in thread Thread-25:

    Traceback (most recent call last):
      File "/usr/local/lib/python2.7/threading.py", line 552, in __bootstrap_inner
        self.run()
      File "/usr/local/lib/python2.7/threading.py", line 505, in run
        self.__target(*self.__args, **self.__kwargs)
      File "/home/toomas/oxm/openxenmanager/tunnel.py", line 43, in listen
        self.server_fd.connect((self.ip, 80))
      File "/usr/local/lib/python2.7/socket.py", line 224, in meth
        return getattr(self._sock,name)(*args)
    error: [Errno 64] Host is down
    

    I am not a Python programmer nor any other kind of programmer, but the line
    self.server_fd.connect((self.ip, 80))
    caught my eye. I thought maybe there is a mistake and port 80 is hardcoded somewhere. So, for testing I created another SSH tunnel from localhost:80 to pool_master:80 and connected without SSL. Situation is unchanged: I can connect to the pool, but trying to access VM console still gives the same error.

    My last guess is that "self.ip" is in my case maybe not localhost, but the real IP of pool_master in my company LAN, which I obviously cannot access from home.

    Is there any possibility to use OpenXenManager via ssh tunnel and access the VM console? I understand I could set up a VPN, but for occasional OXM usage this seems like a lot of work…

     
  • Toomas Aas
    Toomas Aas
    2012-06-08

    OK, it seems that there are protocol peculiarities that prevent this kind of usage over SSH tunnel. This is also discussed in Citrix forums: http://forums.citrix.com/thread.jspa?threadID=236712. So it's not specific to OpenXenManager. Looks like I'll be setting up VPN after all.