<HTML><HEAD>
<META content="text/html =harset=utf-8" http-equiv=Content-Type></HEAD>
<BODY
style="WORD-WRAP: break-word; webkit-nbsp-mode: space; -webkit-line-break: after-white-space"
dir=ltr ='lass=""'>
<DIV dir=ltr>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: 'Calibri'; COLOR: #000000">
<DIV>Thank you for reply!</DIV>
<DIV>Im trying to send JSON-formated shutdown command to windows guest vm now.
Here’s small script I’ve written to test that:</DIV>
<DIV><A title=http://pastebin.com/usAYc7Ww
href="http://pastebin.com/usAYc7Ww">http://pastebin.com/usAYc7Ww</A></DIV>
<DIV> </DIV>
<DIV>But still I get no reaction from ovirt agent. Surely I’m missing
something.</DIV>
<DIV> </DIV>
<DIV
style='FONT-SIZE: small; TEXT-DECORATION: none; FONT-FAMILY: "Calibri"; FONT-WEIGHT: normal; COLOR: #000000; FONT-STYLE: normal; DISPLAY: inline'>
<DIV style="FONT: 10pt tahoma">
<DIV> </DIV>
<DIV style="BACKGROUND: #f5f5f5">
<DIV style="font-color: black"><B>From:</B> <A title=vfeenstr@redhat.com
href="mailto:vfeenstr@redhat.com">Vinzenz Feenstra</A> </DIV>
<DIV><B>Sent:</B> Friday, July 01, 2016 2:53 PM</DIV>
<DIV><B>To:</B> <A title=tadas@ring.lt
href="mailto:tadas@ring.lt">tadas@ring.lt</A> </DIV>
<DIV><B>Cc:</B> <A title=users@ovirt.org
href="mailto:users@ovirt.org">users@ovirt.org</A> </DIV>
<DIV><B>Subject:</B> Re: [ovirt-users] Communicating with ovirt
agent</DIV></DIV></DIV>
<DIV> </DIV></DIV>
<DIV
style='FONT-SIZE: small; TEXT-DECORATION: none; FONT-FAMILY: "Calibri"; FONT-WEIGHT: normal; COLOR: #000000; FONT-STYLE: normal; DISPLAY: inline'>
<DIV> </DIV>
<DIV>
<BLOCKQUOTE type="cite">
<DIV ='lass=""'>On Jul 1, 2016, at 12:05 PM, Tadas <<A
='ref="mailto:tadas@ring.lt"'>tadas@ring.lt</A>> =rote:</DIV>
<DIV> </DIV>
<DIV>
<DIV ='lass=""'><BR>is there any documentation o oVirt guest agent
=ommands?<BR>To be more precise: i need to pass commands to =Virt guest agent
from<BR>hypervisor.<BR>Reading =nfo works fine:<BR><BR>socat
=var/lib/libvirt/qemu/channel/target/domain-20-<BR
='lass=""'>win7_32bit/com.redhat.serial.0 -<BR><BR ='lass=""'>{"applications":
["Python 2.7.12rc1", "SPICE Guest Tools", =Total<BR>Commander (Remove or
Repair)", "Python 2.7 =ywin32-216", "Microsoft<BR>.NET Framework 4.6.1", "Git
=ersion 2.9.0", "WinRAR 5.40 beta 2 (32-<BR>bit)", =Notepad++"], "__name__":
"applications"}<BR>{"__name__": =host-name", "name":
"WIN7_32BIT"}<BR>{"__name__": =os-version", "version": "Win 7”}<BR
='lass=""'></DIV></DIV></BLOCKQUOTE>
<DIV> </DIV>
<DIV>Every =ommand has to be send as a whole JSON object and sent as line
=erminated by a \n character</DIV>
<DIV> </DIV>
<DIV>The =ommands available are currently not documented however.</DIV>
<DIV> </DIV>
<DIV>{“__name__”: “name”,=… args}</DIV>
<DIV> </DIV>
<DIV>- name: =hutdown</DIV>
<DIV> parameters:</DIV>
<DIV><SPAN style="WHITE-SPACE: pre" ='lass="Apple-tab-span"'></SPAN>- =imeout:
optional integer (seconds)</DIV>
<DIV><SPAN style="WHITE-SPACE: pre" ='lass="Apple-tab-span"'>=/span>- reboot:
optional boolean</DIV>
<DIV><SPAN style="WHITE-SPACE: pre" ='lass="Apple-tab-span"'></SPAN>- =essage:
string</DIV>
<DIV> </DIV>
<DIV>- =ame: refresh</DIV>
<DIV> parameters:</DIV>
<DIV><SPAN style="WHITE-SPACE: pre" ='lass="Apple-tab-span"'></SPAN>-
=piVersion: optiona integer </DIV>
<DIV> =nbsp; this defines
what information can be =xchanged</DIV>
<DIV> </DIV>
<DIV>- =ame: hibernate:</DIV>
<DIV> parameters:</DIV>
<DIV><SPAN style="WHITE-SPACE: pre" ='lass="Apple-tab-span"'></SPAN>- state:
=isk or mem (default is disk if not specified)</DIV>
<DIV> </DIV>
<DIV>if you need more you can look here: <A
='ref="https://github.com/oVirt/ovirt-guest-agent/blob/master/ovirt-guest=agent/OVirtAgentLogic.py#L306"'>https://github.com/oVirt/ovirt-guest-agent/blob/master/ovirt-gu=st-agent/OVirtAgentLogic.py#L306</A>
at the parseCommand =unction</DIV>
<DIV>or just ask here :-)</DIV><BR>
<BLOCKQUOTE ='ype="cite"'>
<DIV>
<DIV><BR ='lass=""'><BR>I'm unable to find how to send command (lets =ay
"shutdown") to agent?.<BR>echo "shutdown" | socat
=var/lib/libvirt/qemu/channel/target/domain-20-<BR
='lass=""'>win7_32bit/com.redhat.kvm-vdi.0 -<BR>Does=not seem to
work<BR>Thank you for your help.<BR
='lass=""'>_______________________________________________<BR ='lass=""'>Users
mailing list<BR><A ='ref="mailto:Users@ovirt.org"'>Users@ovirt.org</A><BR
='lass=""'>http://lists.ovirt.org/mailman/listinfo/users<BR
='lass=""'></DIV></DIV></BLOCKQUOTE></DIV><BR>=</SPAN></DIV></DIV></DIV></BODY></HTML>