Console using REST API

Hi All, Could you please explain how can i create console using REST api ?

On 06/30/2014 07:14 AM, Shanil S wrote:
Hi All,
Could you please explain how can i create console using REST api ?
_______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
do you mean a command line shell or a web user portal? for web user portal, several samples here: http://gerrit.ovirt.org/gitweb?p=samples-portals.git;a=tree;h=refs/heads/mas...

Hi Itamar, I am planning to use web portal using php and curl. I checked this doc http://www.ovirt.org/How_to_Connect_to_SPICE_Console_Without_Portal but didn't understand about it. On Mon, Jun 30, 2014 at 11:38 AM, Itamar Heim <iheim@redhat.com> wrote:
On 06/30/2014 07:14 AM, Shanil S wrote:
Hi All,
Could you please explain how can i create console using REST api ?
_______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
do you mean a command line shell or a web user portal? for web user portal, several samples here: http://gerrit.ovirt.org/gitweb?p=samples-portals.git; a=tree;h=refs/heads/master;hb=refs/heads/master

On Jun 30, 2014, at 09:33 , Shanil S <xielesshanil@gmail.com> wrote:
Hi Itamar,
I am planning to use web portal using php and curl. I checked this doc http://www.ovirt.org/How_to_Connect_to_SPICE_Console_Without_Portal but didn't understand about it.
You'd need to detail what exactly are your trying to do. The term "create console" can mean many things. Assuming you want to open a console connection using virt-viewer using REST API… conceptually quite simple - you get a ticket (set password for access, using /vms/{vm:id}/ticket) an then invoke virt-viewer with the right parameters which you get afterwards (vm's host, port, password). Thanks, michal
On Mon, Jun 30, 2014 at 11:38 AM, Itamar Heim <iheim@redhat.com> wrote: On 06/30/2014 07:14 AM, Shanil S wrote: Hi All,
Could you please explain how can i create console using REST api ?
_______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
do you mean a command line shell or a web user portal? for web user portal, several samples here: http://gerrit.ovirt.org/gitweb?p=samples-portals.git;a=tree;h=refs/heads/mas...
_______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users

Am 30.06.2014 15:32, schrieb Michal Skrivanek:
conceptually quite simple - you get a ticket (set password for access, using /vms/{vm:id}/ticket) an then invoke virt-viewer with the right parameters which you get afterwards (vm's host, port, password).
well as he said he want's to use php and curl I assume he does not want to use virt-viewer but maybe a novnc client, but put that aside, it should work. -- 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

Hi Seven,Michal, Thanks for your reply. Yes, i am using php and curl to create the console. Is it possible to create html5 console using php and curl ? Thanks for all your answers.. On Mon, Jun 30, 2014 at 7:15 PM, Sven Kieske <S.Kieske@mittwald.de> wrote:
Am 30.06.2014 15:32, schrieb Michal Skrivanek:
conceptually quite simple - you get a ticket (set password for access, using /vms/{vm:id}/ticket) an then invoke virt-viewer with the right parameters which you get afterwards (vm's host, port, password).
well as he said he want's to use php and curl I assume he does not want to use virt-viewer but maybe a novnc client, but put that aside, it should work.
-- 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

Am 01.07.2014 12:00, schrieb Shanil S:
Hi Seven,Michal,
Thanks for your reply.
Yes, i am using php and curl to create the console. Is it possible to create html5 console using php and curl ? Thanks for all your answers..
Yes it is, you can load the novnc html5 stuff from ovirt and patch it to accept tickets from rest api. how to do it exactly depends on your web application. just dig into the code a little, you should be able to find it. HTH -- 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

Hi, I tried this way to create the console http://www.ovirt.org/How_to_Connect_to_SPICE_Console_Without_Portal but its showing error like ---------------------------------------------------------------------------- Cannot open display: Run 'remote-viewer --help' to see a full list of available command line options ------------------------------------------------------------------------------ used the following method for opening the remote-viewer, could you please check if any issues with it ? *remote-viewer --spice-ca-file ${CA_FILE} --spice-host-subject "${SUBJECT}" spice://${HOST}/?port=${PORT}\&tls-port=${SPORT}* -- Regards Shanil On Tue, Jul 1, 2014 at 3:34 PM, Sven Kieske <S.Kieske@mittwald.de> wrote:
Am 01.07.2014 12:00, schrieb Shanil S:
Hi Seven,Michal,
Thanks for your reply.
Yes, i am using php and curl to create the console. Is it possible to create html5 console using php and curl ? Thanks for all your answers..
Yes it is, you can load the novnc html5 stuff from ovirt and patch it to accept tickets from rest api.
how to do it exactly depends on your web application.
just dig into the code a little, you should be able to find it.
HTH
-- 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

On Čt, 2014-07-03 at 11:46 +0530, Shanil S wrote:
Hi,
I tried this way to create the console http://www.ovirt.org/How_to_Connect_to_SPICE_Console_Without_Portal but its showing error like
The page needs an update but this hasn't changed, the CLI should work. You also try to reformat the URI like: spice://host:port/?tls-port=sport HTH, David
----------------------------------------------------------------------------
Cannot open display: Run 'remote-viewer --help' to see a full list of available command line options
------------------------------------------------------------------------------
used the following method for opening the remote-viewer, could you please check if any issues with it ? remote-viewer --spice-ca-file ${CA_FILE} --spice-host-subject "${SUBJECT}" spice://${HOST}/?port=${PORT}\&tls-port=${SPORT}
-- Regards Shanil
On Tue, Jul 1, 2014 at 3:34 PM, Sven Kieske <S.Kieske@mittwald.de> wrote:
Am 01.07.2014 12:00, schrieb Shanil S: > Hi Seven,Michal, > > Thanks for your reply. > > Yes, i am using php and curl to create the console. Is it possible to > create html5 console using php and curl ? > Thanks for all your answers..
Yes it is, you can load the novnc html5 stuff from ovirt and patch it to accept tickets from rest api.
how to do it exactly depends on your web application.
just dig into the code a little, you should be able to find it.
HTH
-- 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

Hi David, So, you mean something like remote-viewer --spice-ca-file ${CA_FILE} --spice-host-subject "${SUBJECT}" spice://${HOST}:port=${PORT}/?tls-port=${SPORT} right ? I tried the above way too but still getting the Cannot open display: Run 'remote-viewer --help' to see a full list of available command line options -- Regards Shanil On Thu, Jul 3, 2014 at 1:10 PM, David Jaša <djasa@redhat.com> wrote:
On Čt, 2014-07-03 at 11:46 +0530, Shanil S wrote:
Hi,
I tried this way to create the console http://www.ovirt.org/How_to_Connect_to_SPICE_Console_Without_Portal but its showing error like
The page needs an update but this hasn't changed, the CLI should work. You also try to reformat the URI like: spice://host:port/?tls-port=sport
HTH,
David
----------------------------------------------------------------------------
Cannot open display: Run 'remote-viewer --help' to see a full list of available command line options
------------------------------------------------------------------------------
used the following method for opening the remote-viewer, could you please check if any issues with it ? remote-viewer --spice-ca-file ${CA_FILE} --spice-host-subject
"${SUBJECT}" spice://${HOST}/?port=${PORT}\&tls-port=${SPORT}
-- Regards Shanil
On Tue, Jul 1, 2014 at 3:34 PM, Sven Kieske <S.Kieske@mittwald.de> wrote:
Am 01.07.2014 12:00, schrieb Shanil S: > Hi Seven,Michal, > > Thanks for your reply. > > Yes, i am using php and curl to create the console. Is it possible to > create html5 console using php and curl ? > Thanks for all your answers..
Yes it is, you can load the novnc html5 stuff from ovirt and patch it to accept tickets from rest api.
how to do it exactly depends on your web application.
just dig into the code a little, you should be able to find it.
HTH
-- 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

Hi Shanil, On Čt, 2014-07-03 at 13:19 +0530, Shanil S wrote:
Hi David,
So, you mean something like
remote-viewer --spice-ca-file ${CA_FILE} --spice-host-subject "${SUBJECT}" spice://${HOST}:port=${PORT}/?tls-port=${SPORT}
right ?
yes.
I tried the above way too but still getting the Cannot open display: Run 'remote-viewer --help' to see a full list of available command line options
Do you fill all the values in place of all ${VARIABLES} ? If so, try to run the remote-viewer with --debug and --spice-debug options, they should give some insight into what goes wrong. Regards, David
-- Regards Shanil
On Thu, Jul 3, 2014 at 1:10 PM, David Jaša <djasa@redhat.com> wrote: On Čt, 2014-07-03 at 11:46 +0530, Shanil S wrote: > Hi, > > > I tried this way to create the console > http://www.ovirt.org/How_to_Connect_to_SPICE_Console_Without_Portal > but its showing error like
The page needs an update but this hasn't changed, the CLI should work. You also try to reformat the URI like: spice://host:port/?tls-port=sport
HTH,
David
> > ---------------------------------------------------------------------------- > > Cannot open display: > Run 'remote-viewer --help' to see a full list of available command > line options > > ------------------------------------------------------------------------------ > > > used the following method for opening the remote-viewer, could you > please check if any issues with it ? > remote-viewer --spice-ca-file ${CA_FILE} --spice-host-subject "${SUBJECT}" spice://${HOST}/?port= ${PORT}\&tls-port=${SPORT} > > > > > > -- > Regards > Shanil > > > On Tue, Jul 1, 2014 at 3:34 PM, Sven Kieske <S.Kieske@mittwald.de> > wrote: > > > Am 01.07.2014 12:00, schrieb Shanil S: > > Hi Seven,Michal, > > > > Thanks for your reply. > > > > Yes, i am using php and curl to create the console. Is it > possible to > > create html5 console using php and curl ? > > Thanks for all your answers.. > > > Yes it is, you can load the novnc html5 stuff from ovirt and > patch it to > accept tickets from rest api. > > how to do it exactly depends on your web application. > > just dig into the code a little, you should be able to find > it. > > HTH > > -- > 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

Hi David, Yes, i tried after replacing the variables with the correct values but still getting the same above error. Do you have any idea about it ? -- Regards Shanil On Thu, Jul 3, 2014 at 1:41 PM, David Jaša <djasa@redhat.com> wrote:
Hi Shanil,
On Čt, 2014-07-03 at 13:19 +0530, Shanil S wrote:
Hi David,
So, you mean something like
remote-viewer --spice-ca-file ${CA_FILE} --spice-host-subject "${SUBJECT}" spice://${HOST}:port=${PORT}/?tls-port=${SPORT}
right ?
yes.
I tried the above way too but still getting the Cannot open display: Run 'remote-viewer --help' to see a full list of available command line options
Do you fill all the values in place of all ${VARIABLES} ? If so, try to run the remote-viewer with --debug and --spice-debug options, they should give some insight into what goes wrong.
Regards,
David
-- Regards Shanil
On Thu, Jul 3, 2014 at 1:10 PM, David Jaša <djasa@redhat.com> wrote: On Čt, 2014-07-03 at 11:46 +0530, Shanil S wrote: > Hi, > > > I tried this way to create the console >
http://www.ovirt.org/How_to_Connect_to_SPICE_Console_Without_Portal
> but its showing error like
The page needs an update but this hasn't changed, the CLI should work. You also try to reformat the URI like: spice://host:port/?tls-port=sport
HTH,
David
> >
----------------------------------------------------------------------------
> > Cannot open display: > Run 'remote-viewer --help' to see a full list of available command > line options > >
------------------------------------------------------------------------------
> > > used the following method for opening the remote-viewer, could you > please check if any issues with it ? > remote-viewer --spice-ca-file ${CA_FILE} --spice-host-subject "${SUBJECT}" spice://${HOST}/?port= ${PORT}\&tls-port=${SPORT} > > > > > > -- > Regards > Shanil > > > On Tue, Jul 1, 2014 at 3:34 PM, Sven Kieske <S.Kieske@mittwald.de> > wrote: > > > Am 01.07.2014 12:00, schrieb Shanil S: > > Hi Seven,Michal, > > > > Thanks for your reply. > > > > Yes, i am using php and curl to create the console. Is it > possible to > > create html5 console using php and curl ? > > Thanks for all your answers.. > > > Yes it is, you can load the novnc html5 stuff from ovirt and > patch it to > accept tickets from rest api. > > how to do it exactly depends on your web application. > > just dig into the code a little, you should be able to find > it. > > HTH > > -- > 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

Hi Shanil, would you mind pasting the CLI verbatim, with variables expanded? Regards, David On Pá, 2014-07-04 at 12:05 +0530, Shanil S wrote:
Hi David,
Yes, i tried after replacing the variables with the correct values but still getting the same above error. Do you have any idea about it ?
-- Regards Shanil
On Thu, Jul 3, 2014 at 1:41 PM, David Jaša <djasa@redhat.com> wrote: Hi Shanil,
On Čt, 2014-07-03 at 13:19 +0530, Shanil S wrote: > Hi David, > > > So, you mean something like > > remote-viewer --spice-ca-file ${CA_FILE} --spice-host-subject > "${SUBJECT}" spice://${HOST}:port=${PORT}/?tls-port=${SPORT} > > right ? >
yes.
> > I tried the above way too but still getting the > Cannot open display: > Run 'remote-viewer --help' to see a full list of available command > line options
Do you fill all the values in place of all ${VARIABLES} ? If so, try to run the remote-viewer with --debug and --spice-debug options, they should give some insight into what goes wrong.
Regards,
David
> > > > -- > Regards > Shanil > > > On Thu, Jul 3, 2014 at 1:10 PM, David Jaša <djasa@redhat.com> wrote: > On Čt, 2014-07-03 at 11:46 +0530, Shanil S wrote: > > Hi, > > > > > > I tried this way to create the console > > > http://www.ovirt.org/How_to_Connect_to_SPICE_Console_Without_Portal > > but its showing error like > > > The page needs an update but this hasn't changed, the CLI > should work. > You also try to reformat the URI like: > spice://host:port/?tls-port=sport > > HTH, > > David > > > > > > ---------------------------------------------------------------------------- > > > > Cannot open display: > > Run 'remote-viewer --help' to see a full list of available > command > > line options > > > > > ------------------------------------------------------------------------------ > > > > > > used the following method for opening the remote-viewer, > could you > > please check if any issues with it ? > > remote-viewer --spice-ca-file ${CA_FILE} > --spice-host-subject "${SUBJECT}" spice://${HOST}/?port= > ${PORT}\&tls-port=${SPORT} > > > > > > > > > > > > -- > > Regards > > Shanil > > > > > > On Tue, Jul 1, 2014 at 3:34 PM, Sven Kieske > <S.Kieske@mittwald.de> > > wrote: > > > > > > Am 01.07.2014 12:00, schrieb Shanil S: > > > Hi Seven,Michal, > > > > > > Thanks for your reply. > > > > > > Yes, i am using php and curl to create the > console. Is it > > possible to > > > create html5 console using php and curl ? > > > Thanks for all your answers.. > > > > > > Yes it is, you can load the novnc html5 stuff from > ovirt and > > patch it to > > accept tickets from rest api. > > > > how to do it exactly depends on your web > application. > > > > just dig into the code a little, you should be able > to find > > it. > > > > HTH > > > > -- > > 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
_______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
participants (5)
-
David Jaša
-
Itamar Heim
-
Michal Skrivanek
-
Shanil S
-
Sven Kieske