Some time ago I accessed the “console” of a Xen VM over a http tunnel, which was working but rather unpleasant due to a crippled terminal. Today I needed to do the same again, so I set out to look for a more comfortable alternative…
Thankfully, I do have SSH access to the Xen server on which my VM is running, so following this post from Citrix I am able to work with my VM without having to use XenCenter or a similar software:
Connect to the Xen Server per SSH, and run the following commands there.
Get the “domain id” of the virtual machine and the “host uuid” of the host it is running on (important when the Xen server manages multiple hosts), where
LABELis my virtual machine’s label:
If the Xen server manages multiple hosts, then get the IP of the host on which the virtual machine is running:
Connect per SSH to that host, and run the following command there.
Get the VNC port of the virtual machine:
On the local machine, open a SSH tunnel to the host and redirect a local port (
LOCALPORT) to the host’s
PORTis the VNC port from above):
Use some VNC viewer on the local machine and connect to
This works extremely well, just a bit laggy sometimes, but certainly good enough to setup a SSH server on the virtual machine.