[Users] novnc console button/ticket via REST-API?
Hi, we are quite impressed of the novnc console option to get access to the vms. however, we want to implement our own userportal. So is it possible to create the novnc ticket / open a vnc session with the vm event via REST-API? If yes how? If not, how could this be achieved? -- Mit freundlichen Grüßen / Regards Sven Kieske Systemadministrator Mittwald CM Service GmbH Co. KG Königsberger Straße 6 32339 Espelkamp T: +49-5772-293-100 F: +49-5772-293-333 https://www.mittwald.de Geschäftsführer: Robert Meyer St.Nr.: 331/5721/1033, USt-IdNr.: DE814773217, HRA 6640, AG Bad Oeynhausen Komplementärin: Robert Meyer Verwaltungs GmbH, HRB 13260, AG Bad Oeynhausen ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
Re: [Users] novnc console button/ticket via REST-API?
On Jan 21, 2014, at 11:48 , Sven Kieske s.kie...@mittwald.de wrote: Hi, we are quite impressed of the novnc console option to get access to the vms. however, we want to implement our own userportal. So is it possible to create the novnc ticket / open a vnc session with the vm event via REST-API? If yes how? setting the ticket is a VM's action ticket after that you can spawn your client and connect to the desired host/port you get from VM display's address, secureport Thanks, michal If not, how could this be achieved? -- Mit freundlichen Grüßen / Regards Sven Kieske Systemadministrator Mittwald CM Service GmbH Co. KG Königsberger Straße 6 32339 Espelkamp T: +49-5772-293-100 F: +49-5772-293-333 https://www.mittwald.de Geschäftsführer: Robert Meyer St.Nr.: 331/5721/1033, USt-IdNr.: DE814773217, HRA 6640, AG Bad Oeynhausen Komplementärin: Robert Meyer Verwaltungs GmbH, HRB 13260, AG Bad Oeynhausen ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
Re: [Users] novnc console button/ticket via REST-API?
On 01/21/2014 12:22 PM, Michal Skrivanek wrote: On Jan 21, 2014, at 11:48 , Sven Kieske s.kie...@mittwald.de wrote: Hi, we are quite impressed of the novnc console option to get access to the vms. however, we want to implement our own userportal. So is it possible to create the novnc ticket / open a vnc session with the vm event via REST-API? If yes how? setting the ticket is a VM's action ticket after that you can spawn your client and connect to the desired host/port you get from VM display's address, secureport Thanks, michal If not, how could this be achieved? To get the ticket for the VNC display you need to do the following: curl \ -k \ -X POST \ -H Accept: application/xml \ -H Content-Type: application/xml \ -d action/ \ -u admin@internal:** \ https://whatever/api/vms/your_vm_id/ticket That will return something like this: action ticket valueIKWW7PpFZhjP/value expiry7200/expiry /ticket vm href=... id=... ... /vm status statecomplete/state /status /action The ticket.value is the password for the VNC display. To connect to the display you will need also to get the host and port number from the VM details: curl \ -k \ -H Accept: application/xml \ -u admin@internal:** \ https://whatever/api/vms/your_vm_id This will return the following: vm href=... id=... ... display typevnc/type address192.168.122.20/address port5900/port ... /display ... /vm The the ticket.value, vm.display.address and vm.display.port you can complete the VNC connection. -- Dirección Comercial: C/Jose Bardasano Baos, 9, Edif. Gorbea 3, planta 3ºD, 28016 Madrid, Spain Inscrita en el Reg. Mercantil de Madrid – C.I.F. B82657941 - Red Hat S.L. ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
Re: [Users] novnc console button/ticket via REST-API?
On Jan 21, 2014, at 15:55 , Sven Kieske s.kie...@mittwald.de wrote: Hi, yeah we have already setup a websocket proxy on a different host. But our goal is not just to use this websocket proxy in the engine and clicking the console link in webadmin. We want a setup like this: Host a: engine Host b: websocket proxy Host c: custom user portal with a link which opens the novnc connection (similar to the link in webadmin when I click console for a vm). how can we construct this link for host c? right, so what do you miss? perhaps the websocket proxy address, I don't think it's exposed via REST:/ Don't know. Maybe use a fixed one in your environment is good enough? other than that you have everything, no? everything else works. :) Am 21.01.2014 15:03, schrieb Michal Skrivanek: On Jan 21, 2014, at 13:09 , Sven Kieske s.kie...@mittwald.de wrote: Hi, Am 21.01.2014 12:22, schrieb Michal Skrivanek: setting the ticket is a VM's action ticket after that you can spawn your client and connect to the desired host/port you get from VM display's address, secureport well it's cool I can set the ticket, but the client would be novnc in our case, so there is no way to get the actual url for this ticket for novnc with REST? there are two steps you get the password via ticket action (which enables/opens the connection for those 120s window) you get the display details from VM's properties (host, port) and then you can connect. for novnc you'd need to use websocket proxy in addition so you need to get the proxy address from engine-config Thanks, michal -- Mit freundlichen Grüßen / Regards Sven Kieske Systemadministrator Mittwald CM Service GmbH Co. KG Königsberger Straße 6 32339 Espelkamp T: +49-5772-293-100 F: +49-5772-293-333 https://www.mittwald.de Geschäftsführer: Robert Meyer St.Nr.: 331/5721/1033, USt-IdNr.: DE814773217, HRA 6640, AG Bad Oeynhausen Komplementärin: Robert Meyer Verwaltungs GmbH, HRB 13260, AG Bad Oeynhausen -- Mit freundlichen Grüßen / Regards Sven Kieske Systemadministrator Mittwald CM Service GmbH Co. KG Königsberger Straße 6 32339 Espelkamp T: +49-5772-293-100 F: +49-5772-293-333 https://www.mittwald.de Geschäftsführer: Robert Meyer St.Nr.: 331/5721/1033, USt-IdNr.: DE814773217, HRA 6640, AG Bad Oeynhausen Komplementärin: Robert Meyer Verwaltungs GmbH, HRB 13260, AG Bad Oeynhausen ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
Re: [Users] novnc console button/ticket via REST-API?
No, I think I didn't explain it good enough. the link in webadmin is created via the novnc program, right? (basically just html+js) currently it resides directly on the host where ovirt-engine is installed. we want to move this to a different host, but how? I mean, I got the ticket, I got the websocket proxy, I got the host we need to connect to and ports and all, but how to put those pieces together? Maybe I just miss something very basic and simple? Am 21.01.2014 16:42, schrieb Michal Skrivanek: On Jan 21, 2014, at 15:55 , Sven Kieske s.kie...@mittwald.de wrote: Hi, yeah we have already setup a websocket proxy on a different host. But our goal is not just to use this websocket proxy in the engine and clicking the console link in webadmin. We want a setup like this: Host a: engine Host b: websocket proxy Host c: custom user portal with a link which opens the novnc connection (similar to the link in webadmin when I click console for a vm). how can we construct this link for host c? right, so what do you miss? perhaps the websocket proxy address, I don't think it's exposed via REST:/ Don't know. Maybe use a fixed one in your environment is good enough? other than that you have everything, no? everything else works. :) Am 21.01.2014 15:03, schrieb Michal Skrivanek: On Jan 21, 2014, at 13:09 , Sven Kieske s.kie...@mittwald.de wrote: Hi, Am 21.01.2014 12:22, schrieb Michal Skrivanek: setting the ticket is a VM's action ticket after that you can spawn your client and connect to the desired host/port you get from VM display's address, secureport well it's cool I can set the ticket, but the client would be novnc in our case, so there is no way to get the actual url for this ticket for novnc with REST? there are two steps you get the password via ticket action (which enables/opens the connection for those 120s window) you get the display details from VM's properties (host, port) and then you can connect. for novnc you'd need to use websocket proxy in addition so you need to get the proxy address from engine-config Thanks, michal -- Mit freundlichen Grüßen / Regards Sven Kieske Systemadministrator Mittwald CM Service GmbH Co. KG Königsberger Straße 6 32339 Espelkamp T: +49-5772-293-100 F: +49-5772-293-333 https://www.mittwald.de Geschäftsführer: Robert Meyer St.Nr.: 331/5721/1033, USt-IdNr.: DE814773217, HRA 6640, AG Bad Oeynhausen Komplementärin: Robert Meyer Verwaltungs GmbH, HRB 13260, AG Bad Oeynhausen -- Mit freundlichen Grüßen / Regards Sven Kieske Systemadministrator Mittwald CM Service GmbH Co. KG Königsberger Straße 6 32339 Espelkamp T: +49-5772-293-100 F: +49-5772-293-333 https://www.mittwald.de Geschäftsführer: Robert Meyer St.Nr.: 331/5721/1033, USt-IdNr.: DE814773217, HRA 6640, AG Bad Oeynhausen Komplementärin: Robert Meyer Verwaltungs GmbH, HRB 13260, AG Bad Oeynhausen -- Mit freundlichen Grüßen / Regards Sven Kieske Systemadministrator Mittwald CM Service GmbH Co. KG Königsberger Straße 6 32339 Espelkamp T: +49-5772-293-100 F: +49-5772-293-333 https://www.mittwald.de Geschäftsführer: Robert Meyer St.Nr.: 331/5721/1033, USt-IdNr.: DE814773217, HRA 6640, AG Bad Oeynhausen Komplementärin: Robert Meyer Verwaltungs GmbH, HRB 13260, AG Bad Oeynhausen ___ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users