Remote Spice access *without* using web manager

great - glad its working, let me know if you have any issues with it.

cheers
 
Here is a link to it - if there are any errors it will show the message in the command window and wait for you to press enter before terminating.

Its pretty rough code but let me know if it works.

https://moxhamconsultants.com/proxmox/ProxmoxSpiceLauncher.zip

it needs to be run with the following arguments, should hopefully work with other virt viewer versions but this is the version I am using (note the quotes around the remote viewer path)

ProxmoxSpiceLauncher.exe host=x.x.x.x port=8006 username=root@pam password=xxx node=pve vm=121 viewer="C:\Program Files\VirtViewer v8.0-256\bin\remote-viewer.exe"

I have also tested your Launcher with 4 VM's (Win7/8/10/Debian), its working fantastic. Thanks that you share this nice tool with us.
A little Request: It is possible to not open a cmd window when i start a session? With an extra switch (cmd=off) or so?
 
  • Like
Reactions: moxmox
I have also tested your Launcher with 4 VM's (Win7/8/10/Debian), its working fantastic. Thanks that you share this nice tool with us.
A little Request: It is possible to not open a cmd window when i start a session? With an extra switch (cmd=off) or so?

new version in here

https://moxhamconsultants.com/proxmox/ProxmoxSpiceLauncher-NoConsole.zip

it now by default does not show the command window - but if you add the argument "debug=on" to the command line it will show it (so you can see any errors if its failing)

cheers
 
  • Like
Reactions: Dominic and loomes
@moxmox Thanks for your program. :)

Just one question, does it work with Proxmox 5.X? I keep geting an error 500 with debug=on on Proxmox 5.4.

Code:
failed to get spice command : The remote server returned an error: (500) Internal Server Error.

Thanks one more time. :)
 
@moxmox Thanks for your program. :)

Just one question, does it work with Proxmox 5.X? I keep geting an error 500 with debug=on on Proxmox 5.4.

Code:
failed to get spice command : The remote server returned an error: (500) Internal Server Error.

Thanks one more time. :)

Sorry only tested in the latest version. From the logs its authenticating fine which is good. Its just failing to get the Spice ticket.

Could it be the node or vm setting is not correct? They are not used until that stage.

node=pve vm=121.

In my case pve matches up with what is shown in the gui in proxmox.

Also looking back to the beginning of this thread, the url does not seem to have changed - and the first post was back in Nov 2, 2013 so should work I think with older versions.
 
Last edited:
@moxmox Thanks for your program. :)

Just one question, does it work with Proxmox 5.X? I keep geting an error 500 with debug=on on Proxmox 5.4.

Code:
failed to get spice command : The remote server returned an error: (500) Internal Server Error.

Thanks one more time. :)

Did you get it working in the end?
 
Should it work with v6.1?

EDIT: I had a typo. It works like a charm with proxmox 6.1-7.
 
Last edited:
  • Like
Reactions: moxmox
I have created a small windows command line app (.net) that achieves the same result if anyone wants it. I can put the code on github or provide a built exe.
The program works quite nicely. But I sometimes migrate VMs to different machines, and then I have to manipulate the desktop shortcut. Could you please provide the source code so that I can add a patch for my scenario?

My current DNS setup:

pvex is a CNAME to either pve1 or pve2, depending on which one is currently running the important VMs:

pvex CNAME pve1
pve1 A 10.10.10.1
pve2 A 10.10.10.2

So using pvex as hostname is already working. But now I have to "fix" the node=pve1 or node=pve2 parameter. Obviously, passing pvex does not work here.
 
Hi!

I've added finding the host dynamically as well as working with LXC.

Best regards,

Rickard
 

Attachments

  • prox_spice.sh.txt
    4.3 KB · Views: 97
Hi!

I've added finding the host dynamically as well as working with LXC.

Best regards,

Rickard

Hi, my problem is:

./conectar.sh: line 91: [[: 100
101: syntax error in expression (error token is "101")
curl: (22) The requested URL returned error: 501 Method 'GET /nodes///101/status/current' not implemented
./conectar.sh: line 106: [: =: unary operator expected
curl: (22) The requested URL returned error: 501 Method 'POST /nodes///101/spiceproxy' not implemented
ERROR: Maybe Proxmox-API changed?

any idea?? Tyy
 
Someone can add a variable to the curl that indicates the proxy server jump for the curl, "--noproxy", thanks
 
Hi!

I've added finding the host dynamically as well as working with LXC.

Best regards,

Rickard

Added a couple patches myself, see the diff.
 

Attachments

  • diff_prox_spice.sh.txt_pve_spice.sh.txt_.txt
    990 bytes · Views: 65
  • pve_spice.sh.txt
    4.3 KB · Views: 110
  • Like
Reactions: sgorla

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!