For people that are tired of manually looking up DOM ID, executing socat and establishing their SSH tunnel.
- Edit
connect_vm.shto add the IP address of your XCP-ng host. - Ensure
socatis installed on the host. If it isn't, useyum install socat - For best results, set up keys for SSH root login to our XCP-ng host.
- Place the script
forward_console.shon the XCP-ng host, in/root. - Place the script
connect_vm.shlocally on the computer you will VNC from. - Optionally, you may edit
connect_vm.shto launch your preferred VNC viewer.
Essentially, these scripts create an SSH tunnel for VNC to the local Unix socket for the Xen VNC console connection. Because the ID of the connection may change between boot cycles, the script on the host will look up the current DOM ID using the VM name, so you can simply reference the VM name.
- 2025-11-27: Script has been updated to select a random port between 5000 and 6000. Port numbers no longer need to be set / tracked manually.
- 2025-11-27: Added
sleepline and addtional instructions for launching VNC client.