Remote VM Through SSH Tunnel?

longhair

Member
Jun 27, 2014
113
0
16
Proxmox Version 3.2-4

My goal is to be able to use SPICE for Linux VMs and RDP for Window VMs. At the moment, I am only able to open the web management console through SSH tunnel & SOCK5.

When I try to open SPICE, I receive the "Unable to connect to the graphic server..." message. I tried opening port 3128 on the router (Promox side). In PuTTy, my forwarded ports is L3128 192.168.27.2:3128 - neither of those are working.

I figured once I get SPICE working, I will move to RDP.
 
I am able to get RDP working by doing the following:

PuTTy forwarded ports: L3390 (source port) 192.168.27.4:3389 (destination (lan address of Windows VM))

Remote Desktop Connection: localhost:3390

Unfortunately, I am still not able to get SPICE to connect...
 
hi, to access pve VMs with spice, you have to make your spice client to authenticate to the pve server, which will proxy the vm via spice for you.
you can make this
- using the web gui: login to pve, select the vm, press "spice" button, the browser will download a small file, just open that with virt-viewer
- writing a quite simple script to make just the same: using perl+curl or php+curl, using pve API to get an auth token, then the same small file, and then just open that with virt-viewer

Marco
 
hi, to access pve VMs with spice, you have to make your spice client to authenticate to the pve server, which will proxy the vm via spice for you.
you can make this
- using the web gui: login to pve, select the vm, press "spice" button, the browser will download a small file, just open that with virt-viewer
- writing a quite simple script to make just the same: using perl+curl or php+curl, using pve API to get an auth token, then the same small file, and then just open that with virt-viewer

Marco

It gets as far as opening the small file with virt-viewer, then it hangs for about a minute and gives the error.

From what you have said, it sounds like there is a problem with authentication between remote Proxmox and the local computer (Windows 7).
 
mmm, what version of virt-viewer? iirc only 0.5.7+ works. and keep in mind that the token file has a really short life (maybe 30 sec) so you should open it quick.
otherwise post more details about virt-viewer and "pveversion -v", for anyone here to spot what could be the issue.

Marco
 
Version 0.6.0 The virt-viewer works because I am using it with a local Proxmox (same exact version as remote, just different hardware).
 
is java console working? btw, on newer/next pve there's also html5 console.

are you getting the token file downloaded by the browser? on win7/ffox is named like spiceproxy-X.vv file

try to open it with a text editor, looking for infos, hints, or post it here (mask sensible infos)

Marco
 
Yes, the java console is working however, the display is messed up - the reason for using spice.

The *.vv file is being downloaded and the remote viewer window opens up with a message "waiting for connection" (or something along those lines) for about 30 seconds, then closes with the error "Unable to connect to the graphic server..."
 
I guess, download the token file somewhere, and open it fast (remember the short lifetime) from commandline with virt-viewer, adding the option..?

Marco
 
I thought I would update this thread because I kept finding it in my Google search when trying to solve the original problem in the first post. I'm using PuTTy for Windows.

After reading SPICE VM Remotely a few times, I've cleared all the Forwarded ports (Connection - SSH - Tunnels) and started from scratch.

Forwarded ports:

Code:
L3128        127.0.0.1:3128
L8006        127.0.0.1:8006
R3128        127.0.0.1:3128
R8006        127.0.0.1:8006

In the address bar of the browser, I type https://127.0.0.1:8006 to access the Proxmox web-based management page. SPICE now works the same as if I was on the same network subnet accessing it locally.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!