
--_000_HK2PR0401MB13322CE62E444F628CF2E3F5D71F0HK2PR0401MB1332_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi : I want to integrate oVirt-engine into our system platform. In reference to = ovirt rest API , I have finished added host and create virtual machine. But= I can't find the way to open vm console by API or CLI ,so what should I do= ? Thanks ! Evan --_000_HK2PR0401MB13322CE62E444F628CF2E3F5D71F0HK2PR0401MB1332_ Content-Type: text/html; charset="us-ascii" Content-ID: <959C49C01EEEAB4B9F2C281FC1C76AB6@sct-15-1-485-9-msonline-outlook-33ea8.templateTenant> Content-Transfer-Encoding: quoted-printable <html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr= osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" = xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" xmlns=3D"http:= //www.w3.org/TR/REC-html40"> <head> <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dus-ascii"=
<meta name=3D"Generator" content=3D"Microsoft Word 15 (filtered medium)"> <style><!-- /* Font Definitions */ @font-face {font-family:SimSun; panose-1:2 1 6 0 3 1 1 1 1 1;} @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4;} @font-face {font-family:SimSun; panose-1:2 1 6 0 3 1 1 1 1 1;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0cm; margin-bottom:.0001pt; text-align:justify; text-justify:inter-ideograph; font-size:10.5pt; font-family:"Calibri",sans-serif;} a:link, span.MsoHyperlink {mso-style-priority:99; color:#0563C1; text-decoration:underline;} a:visited, span.MsoHyperlinkFollowed {mso-style-priority:99; color:#954F72; text-decoration:underline;} span.EmailStyle17 {mso-style-type:personal-compose; font-family:"Calibri",sans-serif; color:windowtext;} .MsoChpDefault {mso-style-type:export-only;} /* Page Definitions */ @page WordSection1 {size:612.0pt 792.0pt; margin:72.0pt 90.0pt 72.0pt 90.0pt;} div.WordSection1 {page:WordSection1;} --></style><!--[if gte mso 9]><xml> <o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" /> </xml><![endif]--><!--[if gte mso 9]><xml> <o:shapelayout v:ext=3D"edit"> <o:idmap v:ext=3D"edit" data=3D"1" /> </o:shapelayout></xml><![endif]--> </head> <body lang=3D"ZH-CN" link=3D"#0563C1" vlink=3D"#954F72" style=3D"text-justi= fy-trim:punctuation"> <div class=3D"WordSection1"> <p class=3D"MsoNormal"><span lang=3D"EN-US">Hi :<o:p></o:p></span></p> <p class=3D"MsoNormal"><span lang=3D"EN-US"><o:p> </o:p></span></p> <p class=3D"MsoNormal"><span lang=3D"EN-US">I want to integrate oVirt-engin= e into our system platform. In reference to ovirt rest API , I have finishe= d added host and create virtual machine. But I can't find the way to open v= m console by API or CLI ,so what should I do ?<o:p></o:p></span></p> <p class=3D"MsoNormal"><span lang=3D"EN-US"><o:p> </o:p></span></p> <p class=3D"MsoNormal"><span lang=3D"EN-US">Thanks !<o:p></o:p></span></p> <p class=3D"MsoNormal"><span lang=3D"EN-US"><o:p> </o:p></span></p> <p class=3D"MsoNormal"><span lang=3D"EN-US">Evan<o:p></o:p></span></p> </div> </body> </html> --_000_HK2PR0401MB13322CE62E444F628CF2E3F5D71F0HK2PR0401MB1332_--

This is a multi-part message in MIME format. --------------076D984B3E7D3859E259336F Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit Hi, This has been asked a short time ago, you can find the thread in [1]. In [2] you can find an unofficial oVirt project written in Python + QT5 that already does that, it connects to the API, gets a list of available VMs for the supplied credentials and then you can open a VM console to any of these machines (using virt-viewer). Regards. [1]: http://lists.ovirt.org/pipermail/users/2016-June/040222.html [2]: https://github.com/nkovacne/ovirt-desktop-client El 12/08/16 a las 07:59, Wang Evan escribió:
Hi :
I want to integrate oVirt-engine into our system platform. In reference to ovirt rest API , I have finished added host and create virtual machine. But I can't find the way to open vm console by API or CLI ,so what should I do ?
Thanks !
Evan
_______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
--------------076D984B3E7D3859E259336F Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: 8bit <html> <head> <meta content="text/html; charset=windows-1252" http-equiv="Content-Type"> </head> <body bgcolor="#FFFFFF" text="#000000"> Hi,<br> <br> This has been asked a short time ago, you can find the thread in [1].<br> <br> In [2] you can find an unofficial oVirt project written in Python + QT5 that already does that, it connects to the API, gets a list of available VMs for the supplied credentials and then you can open a VM console to any of these machines (using virt-viewer).<br> <br> Regards.<br> <br> [1]: <a class="moz-txt-link-freetext" href="http://lists.ovirt.org/pipermail/users/2016-June/040222.html">http://lists.ovirt.org/pipermail/users/2016-June/040222.html</a><br> [2]: <a class="moz-txt-link-freetext" href="https://github.com/nkovacne/ovirt-desktop-client">https://github.com/nkovacne/ovirt-desktop-client</a><br> <br> <div class="moz-cite-prefix">El 12/08/16 a las 07:59, Wang Evan escribió:<br> </div> <blockquote cite="mid:HK2PR0401MB13322CE62E444F628CF2E3F5D71F0@HK2PR0401MB1332.apcprd04.prod.outlook.com" type="cite"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <meta name="Generator" content="Microsoft Word 15 (filtered medium)"> <style><!-- /* Font Definitions */ @font-face {font-family:SimSun; panose-1:2 1 6 0 3 1 1 1 1 1;} @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4;} @font-face {font-family:SimSun; panose-1:2 1 6 0 3 1 1 1 1 1;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0cm; margin-bottom:.0001pt; text-align:justify; text-justify:inter-ideograph; font-size:10.5pt; font-family:"Calibri",sans-serif;} a:link, span.MsoHyperlink {mso-style-priority:99; color:#0563C1; text-decoration:underline;} a:visited, span.MsoHyperlinkFollowed {mso-style-priority:99; color:#954F72; text-decoration:underline;} span.EmailStyle17 {mso-style-type:personal-compose; font-family:"Calibri",sans-serif; color:windowtext;} .MsoChpDefault {mso-style-type:export-only;} /* Page Definitions */ @page WordSection1 {size:612.0pt 792.0pt; margin:72.0pt 90.0pt 72.0pt 90.0pt;} div.WordSection1 {page:WordSection1;} --></style><!--[if gte mso 9]><xml> <o:shapedefaults v:ext="edit" spidmax="1026" /> </xml><![endif]--><!--[if gte mso 9]><xml> <o:shapelayout v:ext="edit"> <o:idmap v:ext="edit" data="1" /> </o:shapelayout></xml><![endif]--> <div class="WordSection1"> <p class="MsoNormal"><span lang="EN-US">Hi :<o:p></o:p></span></p> <p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p> <p class="MsoNormal"><span lang="EN-US">I want to integrate oVirt-engine into our system platform. In reference to ovirt rest API , I have finished added host and create virtual machine. But I can't find the way to open vm console by API or CLI ,so what should I do ?<o:p></o:p></span></p> <p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p> <p class="MsoNormal"><span lang="EN-US">Thanks !<o:p></o:p></span></p> <p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p> <p class="MsoNormal"><span lang="EN-US">Evan<o:p></o:p></span></p> </div> <br> <fieldset class="mimeAttachmentHeader"></fieldset> <br> <pre wrap="">_______________________________________________ Users mailing list <a class="moz-txt-link-abbreviated" href="mailto:Users@ovirt.org">Users@ovirt.org</a> <a class="moz-txt-link-freetext" href="http://lists.ovirt.org/mailman/listinfo/users">http://lists.ovirt.org/mailman/listinfo/users</a> </pre> </blockquote> <br> </body> </html> --------------076D984B3E7D3859E259336F--

On 08/14/2016 01:26 PM, Nicolás wrote:
Hi,
This has been asked a short time ago, you can find the thread in [1].
In [2] you can find an unofficial oVirt project written in Python + QT5 that already does that, it connects to the API, gets a list of available VMs for the supplied credentials and then you can open a VM console to any of these machines (using virt-viewer).
Regards.
[1]: http://lists.ovirt.org/pipermail/users/2016-June/040222.html [2]: https://github.com/nkovacne/ovirt-desktop-client
In addition to what Nicolás suggests you can also take inspiration from how the "console" command is implemented in the "ovirt-engine-cli" tool: https://github.com/oVirt/ovirt-engine-cli/blob/master/src/ovirtcli/command/c... That code shows how to obtain the required VM. Information (display address, display port, etc). Then the virt-viewer configuration file is created here: https://github.com/oVirt/ovirt-engine-cli/blob/master/src/ovirtcli/platform/... Note also that recent versions of the engine (including 3.6) can generate the virt-viewer configutation file for you. For example, if you know the id of the VM you can get the virt-viewer configuration file and then launch the "remote-viewer" program with a simple script like this: ---8<--- #!/bin/bash -ex # Connection parameters: url="https://engine36.local/ovirt-engine/api" user="admin@internal" password="..." # The identifier of the VM: vm="3235367b-9bae-4ff1-87ed-b42446e97046" # The name of the protocol, encoded in hexadecimal, it will # be 5350494345 for SPICE and 564e43 for VNC: protocol="5350494345" # Download the "virt-viewer" configuration file: curl \ --verbose \ --cacert /etc/pki/ovirt-engine/ca.pem \ --request GET \ --user "${user}:${password}" \ --header "Version: 3" \ --header "Accept: application/x-virt-viewer" \ --output "${vm}.vv" \ "${url}/vms/${vm}/graphicsconsoles/${protocol}" # Launch the "virt-viewer" program (it will automatically delete # the configuration file once loaded): remote-viewer "${vm}.vv" --->8---
El 12/08/16 a las 07:59, Wang Evan escribió:
Hi :
I want to integrate oVirt-engine into our system platform. In reference to ovirt rest API , I have finished added host and create virtual machine. But I can't find the way to open vm console by API or CLI ,so what should I do ?
Thanks !
Evan
-- 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.
participants (3)
-
Juan Hernández
-
Nicolás
-
Wang Evan