Api 2.0 and vncproxy

evharten

New Member
Aug 12, 2011
23
0
1
When starting an VNCProxy thru the api this works perfect, one big issue here tho, as the command which starts it is:

Code:
/bin/nc -l -p 5900 -w 10 -c '/usr/sbin/qm vncproxy 100 2'

It crashes only when connecting, quite logical, since the command passed thru nc should be in my case:
Code:
/usr/sbin/qm vncproxy 100
And NOT the 2 behind it, since it does not accept that 2nd parameter.

Output from a telnet to port 5900:
Code:
400 wrong number of arguments
qm vncproxy <vmid>

Would be nice to have an hotfix for this issue, so we can use the VNCProxy ;)
Also would like the opportunity to say keep up the great work, i LOVE the new PVE2.0 its really awesome!
 
POST /api2/json/nodes/{node}/qemu/{vmid}/vncproxy

This gives back the cert, etc.
And also starts the VNC Proxy, only the command it executes doesnt work, because of the added 2 at the end.
 
Before i posted, i did an apt-get update && apt-get upgrade to ensure i've got the latest version.
Sadly it still didnt fixed it.
And i'm using the stock install.
 
Before i posted, i did an apt-get update && apt-get upgrade to ensure i've got the latest version.
Sadly it still didnt fixed it.
And i'm using the stock install.

to upgrade, run:
Code:
aptitude update && aptitude full-upgrade
 
Dear Tom,

Full-upgrade is only needed when packages are hold back in debian, which is basicly major changes, like kernel upgrades.
Which was not the case for me, as there was no major change.

Regards,

Evert
 
Dear Tom,

Full-upgrade is only needed when packages are hold back in debian, which is basicly major changes, like kernel upgrades.
Which was not the case for me, as there was no major change.

Regards,

Evert

Well, then give us the output from pveversion -v so we can verify your claims.
 
Output:

root@vps1:~# pveversion -v
pve-manager: 2.0-57 (pve-manager/2.0/ff6cd700)
running kernel: 2.6.32-10-pve
proxmox-ve-2.6.32: 2.0-63
pve-kernel-2.6.32-10-pve: 2.6.32-63
lvm2: 2.02.88-2pve2
clvm: 2.02.88-2pve2
corosync-pve: 1.4.1-1
openais-pve: 1.1.4-2
libqb: 0.10.1-2
redhat-cluster-pve: 3.1.8-3
resource-agents-pve: 3.9.2-3
fence-agents-pve: 3.1.7-2
pve-cluster: 1.0-26
qemu-server: 2.0-37
pve-firmware: 1.0-15
libpve-common-perl: 1.0-25
libpve-access-control: 1.0-17
libpve-storage-perl: 2.0-17
vncterm: 1.0-2
vzctl: 3.0.30-2pve2
vzprocps: 2.0.11-2
vzquota: 3.0.12-3
pve-qemu-kvm: 1.0-9
ksm-control-daemon: 1.1-1

Only thing not upgraded currently is the kernel, as i need to reboot for it.
 
Yes it works in the Pve Gui, only doesnt work for the API which passes the wrong command (hence the extra 2 at the end of the command before the last ' after nc which isnt correct statement according to qm vncproxy, as this requires the syntax: qm vncproxy <vmid> , eg. qm vncproxy 100, but not qm vncproxy 100 2)
 
so basicly the PVE interface uses the API also ? then ill have to debug some more in the vncproxy call, quite odd that it gives an extra 2 in the commandline. thats what i see in the output of an ps -auxww on the server itself within the 10second window nc runs
 
root 93864 0.0 0.0 5972 692 ? S 07:53 0:00 /bin/nc -l -p 5900 -w 10 -c /usr/sbin/qm vncproxy 100 2>/dev/null

Thats what is in the processlist.
 
Ok, tested it myself with the 2>/dev/null which is just a redirect in a wrong sentence basicly :), got an proxy with that command aka VNC return, so now going to call it thru the API, and see if i can telnet to it.

Update:
That works also, guess something with the VNC applet is just wrong then :) using tigerVNC applet with the same flags as you guys use in the PVE interface.
 
Finally got it working, it appeared that you REALLY have to parse the certificate and replace the \n's with |'s, if you do not do this, it just doesnt work ;)
Now only need to find a way to include the darn applet into my webpage, as currently its only working with Open in new window, which i dont want ofc :)
 

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!