Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get VNC Ticket #19

Open
1 task
Snakzi opened this issue Jul 13, 2022 · 7 comments
Open
1 task

Get VNC Ticket #19

Snakzi opened this issue Jul 13, 2022 · 7 comments

Comments

@Snakzi
Copy link

Snakzi commented Jul 13, 2022

What happened?

Hello,

how do you get a ticket?

$vncTicket = $client->get('/access/ticket');

is giving me status code 200, but the data block is empty.

Best regards

Expected behavior

Giving me a ticket instead of empty response in data block

Relevant log output

No response

PHP Version

8.4

Proxmox VE Version

5.4

Version (bug)

latest

Version (working)

No response

On what operating system are you experiencing the issue?

Mac OSX

Pull Request

  • I would like to do a Pull Request
@franklupo
Copy link
Member

Hi,
this code retrieve ticket for login not for vnc.

best regards

@Snakzi
Copy link
Author

Snakzi commented Jul 13, 2022

How do I retrieve the ticket for VNC?

@franklupo
Copy link
Member

For open VNC:

  • create ticket login /access/ticket
  • open vncproxy /nodes/{node}/qemu/{vmid}/vncproxy
  • open https://{host}:{port}/?console={console}&vmid={vmId}&vmname={vmName}&node={node}&resize=scale&novnc=1

@franklupo
Copy link
Member

News?

@HugoMskn
Copy link

Could you provide with code ? I tried
$client->get('/access/ticket')->getResponse();
$client->get('/access/ticket')
But none is returning the ticket for the novnc thing

@franklupo
Copy link
Member

the mechanism is different for VNC you need to call:

  • open vncproxy /nodes/{node}/qemu/{vmid}/vncproxy
  • open https://{host}:{port}/?console={console}&vmid={vmId}&vmname={vmName}&node={node}&resize=scale&novnc=1

@HugoMskn
Copy link

Tried it with the following code :

$client->get('/nodes/pve/qemu/100/vncproxy'); echo '<iframe src="https://192.168.1.2:8006/?console=kvm&vmid=100&vmname=Win7&node=pve&resize=scale&novnc=1" </iframe>';

But the Iframe just return a 401 error "no ticket"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants