<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jul 4, 2016 at 9:16 AM, Tadas <span dir="ltr">&lt;<a href="mailto:tadas@ring.lt" target="_blank">tadas@ring.lt</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Got everything working now.<br></blockquote><div><br></div><div>Great to hear.</div><div>What is your use case?</div><div>Y.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class="">Thank you for your help.<br>
</span>For any users, whom it may be useful, heres the code for external (SSO)<br>
logins from hypervisor.<br>
<br>
<a href="http://paste.ubuntu.com/18435531/" rel="noreferrer" target="_blank">http://paste.ubuntu.com/18435531/</a><br>
<div class="HOEnZb"><div class="h5"><br>
On Fri, 2016-07-01 at 13:53 +0200, Vinzenz Feenstra wrote:<br>
&gt;<br>
&gt; &gt; On Jul 1, 2016, at 12:05 PM, Tadas &lt;<a href="mailto:tadas@ring.lt">tadas@ring.lt</a>&gt; wrote:<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; is there any documentation o oVirt guest agent commands?<br>
&gt; &gt; To be more precise: i need to pass commands to oVirt guest agent<br>
&gt; &gt; from<br>
&gt; &gt; hypervisor.<br>
&gt; &gt; Reading info works fine:<br>
&gt; &gt;<br>
&gt; &gt; socat /var/lib/libvirt/qemu/channel/target/domain-20-<br>
&gt; &gt; win7_32bit/com.redhat.serial.0 -<br>
&gt; &gt;<br>
&gt; &gt; {&quot;applications&quot;: [&quot;Python 2.7.12rc1&quot;, &quot;SPICE Guest Tools&quot;, &quot;Total<br>
&gt; &gt; Commander (Remove or Repair)&quot;, &quot;Python 2.7 pywin32-216&quot;, &quot;Microsoft<br>
&gt; &gt; .NET Framework 4.6.1&quot;, &quot;Git version 2.9.0&quot;, &quot;WinRAR 5.40 beta 2<br>
&gt; &gt; (32-<br>
&gt; &gt; bit)&quot;, &quot;Notepad++&quot;], &quot;__name__&quot;: &quot;applications&quot;}<br>
&gt; &gt; {&quot;__name__&quot;: &quot;host-name&quot;, &quot;name&quot;: &quot;WIN7_32BIT&quot;}<br>
&gt; &gt; {&quot;__name__&quot;: &quot;os-version&quot;, &quot;version&quot;: &quot;Win 7”}<br>
&gt;<br>
&gt; Every command has to be send as a whole JSON object and sent as line<br>
&gt; terminated by a \n character<br>
&gt;<br>
&gt; The commands available are currently not documented however.<br>
&gt;<br>
&gt; {“__name__”: “name”, … args}<br>
&gt;<br>
&gt; - name: shutdown<br>
&gt;   parameters:<br>
&gt;       - timeout: optional integer (seconds)<br>
&gt;       - reboot: optional boolean<br>
&gt;       - message: string<br>
&gt;<br>
&gt; - name: refresh<br>
&gt;   parameters:<br>
&gt;       - apiVersion: optiona integer <br>
&gt;             this defines what information can be exchanged<br>
&gt;<br>
&gt; - name: hibernate:<br>
&gt;   parameters:<br>
&gt;       - state: disk or mem (default is disk if not specified)<br>
&gt;<br>
&gt; if you need more you can look here:  <a href="https://github.com/oVirt/ovirt-g" rel="noreferrer" target="_blank">https://github.com/oVirt/ovirt-g</a><br>
&gt; uest-agent/blob/master/ovirt-guest-agent/OVirtAgentLogic.py#L306 at<br>
&gt; the parseCommand function<br>
&gt; or just ask here :-)<br>
&gt;<br>
&gt; &gt;<br>
&gt; &gt; I&#39;m unable to find how to send command (lets say &quot;shutdown&quot;) to<br>
&gt; &gt; agent?.<br>
&gt; &gt; echo &quot;shutdown&quot; | socat<br>
&gt; &gt; /var/lib/libvirt/qemu/channel/target/domain-20-<br>
&gt; &gt; win7_32bit/com.redhat.kvm-vdi.0  -<br>
&gt; &gt; Does not seem to work<br>
&gt; &gt; Thank you for your help.<br>
&gt; &gt; _______________________________________________<br>
&gt; &gt; Users mailing list<br>
&gt; &gt; <a href="mailto:Users@ovirt.org">Users@ovirt.org</a><br>
&gt; &gt; <a href="http://lists.ovirt.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.ovirt.org/mailman/listinfo/users</a><br>
&gt;<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@ovirt.org">Users@ovirt.org</a><br>
<a href="http://lists.ovirt.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.ovirt.org/mailman/listinfo/users</a><br>
</div></div></blockquote></div><br></div></div>