
This is a multi-part message in MIME format. ------=_NextPart_000_000F_01D1D3BD.72956C90 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Thank you for reply! Im trying to send JSON-formated shutdown command to windows guest vm = now. Here=E2=80=99s small script I=E2=80=99ve written to test that: http://pastebin.com/usAYc7Ww But still I get no reaction from ovirt agent. Surely I=E2=80=99m missing = something. From: Vinzenz Feenstra=20 Sent: Friday, July 01, 2016 2:53 PM To: tadas@ring.lt=20 Cc: users@ovirt.org=20 Subject: Re: [ovirt-users] Communicating with ovirt agent On Jul 1, 2016, at 12:05 PM, Tadas <tadas@ring.lt> =3Drote: is there any documentation o oVirt guest agent =3Dommands? To be more precise: i need to pass commands to =3DVirt guest agent = from hypervisor. Reading =3Dnfo works fine: socat =3Dvar/lib/libvirt/qemu/channel/target/domain-20- win7_32bit/com.redhat.serial.0 - {"applications": ["Python 2.7.12rc1", "SPICE Guest Tools", =3DTotal Commander (Remove or Repair)", "Python 2.7 =3Dywin32-216", "Microsoft .NET Framework 4.6.1", "Git =3Dersion 2.9.0", "WinRAR 5.40 beta 2 (32- bit)", =3DNotepad++"], "__name__": "applications"} {"__name__": =3Dhost-name", "name": "WIN7_32BIT"} {"__name__": =3Dos-version", "version": "Win 7=E2=80=9D} Every =3Dommand has to be send as a whole JSON object and sent as line = =3Derminated by a \n character The =3Dommands available are currently not documented however. {=E2=80=9C__name__=E2=80=9D: =E2=80=9Cname=E2=80=9D,=3D=E2=80=A6 args} - name: =3Dhutdown parameters: - =3Dimeout: optional integer (seconds) =3D/span>- reboot: optional boolean - =3Dessage: string - =3Dame: refresh parameters: - =3DpiVersion: optiona integer=20 =3Dnbsp; this defines what information can be =3Dxchanged - =3Dame: hibernate: parameters: - state: =3Disk or mem (default is disk if not specified) if you need more you can look here: = https://github.com/oVirt/ovirt-guest-agent/blob/master/ovirt-gu=3Dst-agen= t/OVirtAgentLogic.py#L306 at the parseCommand =3Dunction or just ask here :-) I'm unable to find how to send command (lets =3Day "shutdown") to = agent?. echo "shutdown" | socat = =3Dvar/lib/libvirt/qemu/channel/target/domain-20- win7_32bit/com.redhat.kvm-vdi.0 - Does=3Dnot seem to work Thank you for your help. _______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users =3D ------=_NextPart_000_000F_01D1D3BD.72956C90 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable <HTML><HEAD> <META content=3D"text/html =3Dharset=3Dutf-8" = http-equiv=3DContent-Type></HEAD> <BODY=20 style=3D"WORD-WRAP: break-word; webkit-nbsp-mode: space; = -webkit-line-break: after-white-space"=20 dir=3Dltr =3D'lass=3D""'> <DIV dir=3Dltr> <DIV style=3D"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.=20 Here=E2=80=99s small script I=E2=80=99ve written to test that:</DIV> <DIV><A title=3Dhttp://pastebin.com/usAYc7Ww=20 href=3D"http://pastebin.com/usAYc7Ww">http://pastebin.com/usAYc7Ww</A></D= IV> <DIV> </DIV> <DIV>But still I get no reaction from ovirt agent. Surely I=E2=80=99m = missing=20 something.</DIV> <DIV> </DIV> <DIV=20 style=3D'FONT-SIZE: small; TEXT-DECORATION: none; FONT-FAMILY: = "Calibri"; FONT-WEIGHT: normal; COLOR: #000000; FONT-STYLE: normal; = DISPLAY: inline'> <DIV style=3D"FONT: 10pt tahoma"> <DIV> </DIV> <DIV style=3D"BACKGROUND: #f5f5f5"> <DIV style=3D"font-color: black"><B>From:</B> <A = title=3Dvfeenstr@redhat.com=20 href=3D"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=3Dtadas@ring.lt=20 href=3D"mailto:tadas@ring.lt">tadas@ring.lt</A> </DIV> <DIV><B>Cc:</B> <A title=3Dusers@ovirt.org=20 href=3D"mailto:users@ovirt.org">users@ovirt.org</A> </DIV> <DIV><B>Subject:</B> Re: [ovirt-users] Communicating with ovirt=20 agent</DIV></DIV></DIV> <DIV> </DIV></DIV> <DIV=20 style=3D'FONT-SIZE: small; TEXT-DECORATION: none; FONT-FAMILY: = "Calibri"; FONT-WEIGHT: normal; COLOR: #000000; FONT-STYLE: normal; = DISPLAY: inline'> <DIV> </DIV> <DIV> <BLOCKQUOTE type=3D"cite"> <DIV =3D'lass=3D""'>On Jul 1, 2016, at 12:05 PM, Tadas <<A=20 =3D'ref=3D"mailto:tadas@ring.lt"'>tadas@ring.lt</A>> =3Drote:</DIV> <DIV> </DIV> <DIV> <DIV =3D'lass=3D""'><BR>is there any documentation o oVirt guest agent = =3Dommands?<BR>To be more precise: i need to pass commands to =3DVirt = guest agent=20 from<BR>hypervisor.<BR>Reading =3Dnfo works fine:<BR><BR>socat=20 =3Dvar/lib/libvirt/qemu/channel/target/domain-20-<BR=20 =3D'lass=3D""'>win7_32bit/com.redhat.serial.0 -<BR><BR = =3D'lass=3D""'>{"applications":=20 ["Python 2.7.12rc1", "SPICE Guest Tools", =3DTotal<BR>Commander = (Remove or=20 Repair)", "Python 2.7 =3Dywin32-216", "Microsoft<BR>.NET Framework = 4.6.1", "Git=20 =3Dersion 2.9.0", "WinRAR 5.40 beta 2 (32-<BR>bit)", =3DNotepad++"], = "__name__":=20 "applications"}<BR>{"__name__": =3Dhost-name", "name":=20 "WIN7_32BIT"}<BR>{"__name__": =3Dos-version", "version": "Win = 7=E2=80=9D}<BR=20 =3D'lass=3D""'></DIV></DIV></BLOCKQUOTE> <DIV> </DIV> <DIV>Every =3Dommand has to be send as a whole JSON object and sent as = line=20 =3Derminated by a \n character</DIV> <DIV> </DIV> <DIV>The =3Dommands available are currently not documented = however.</DIV> <DIV> </DIV> <DIV>{=E2=80=9C__name__=E2=80=9D: =E2=80=9Cname=E2=80=9D,=3D=E2=80=A6 = args}</DIV> <DIV> </DIV> <DIV>- name: =3Dhutdown</DIV> <DIV> parameters:</DIV> <DIV><SPAN style=3D"WHITE-SPACE: pre" = =3D'lass=3D"Apple-tab-span"'></SPAN>- =3Dimeout:=20 optional integer (seconds)</DIV> <DIV><SPAN style=3D"WHITE-SPACE: pre" = =3D'lass=3D"Apple-tab-span"'>=3D/span>- reboot:=20 optional boolean</DIV> <DIV><SPAN style=3D"WHITE-SPACE: pre" = =3D'lass=3D"Apple-tab-span"'></SPAN>- =3Dessage:=20 string</DIV> <DIV> </DIV> <DIV>- =3Dame: refresh</DIV> <DIV> parameters:</DIV> <DIV><SPAN style=3D"WHITE-SPACE: pre" = =3D'lass=3D"Apple-tab-span"'></SPAN>-=20 =3DpiVersion: optiona integer </DIV> <DIV> =3Dnbsp; = this defines=20 what information can be =3Dxchanged</DIV> <DIV> </DIV> <DIV>- =3Dame: hibernate:</DIV> <DIV> parameters:</DIV> <DIV><SPAN style=3D"WHITE-SPACE: pre" = =3D'lass=3D"Apple-tab-span"'></SPAN>- state:=20 =3Disk or mem (default is disk if not specified)</DIV> <DIV> </DIV> <DIV>if you need more you can look here: <A=20 =3D'ref=3D"https://github.com/oVirt/ovirt-guest-agent/blob/master/ovirt-g= uest=3Dagent/OVirtAgentLogic.py#L306"'>https://github.com/oVirt/ovirt-gue= st-agent/blob/master/ovirt-gu=3Dst-agent/OVirtAgentLogic.py#L306</A>=20 at the parseCommand =3Dunction</DIV> <DIV>or just ask here :-)</DIV><BR> <BLOCKQUOTE =3D'ype=3D"cite"'> <DIV> <DIV><BR =3D'lass=3D""'><BR>I'm unable to find how to send command = (lets =3Day=20 "shutdown") to agent?.<BR>echo "shutdown" | socat=20 =3Dvar/lib/libvirt/qemu/channel/target/domain-20-<BR=20 =3D'lass=3D""'>win7_32bit/com.redhat.kvm-vdi.0 -<BR>Does=3Dnot = seem to=20 work<BR>Thank you for your help.<BR=20 =3D'lass=3D""'>_______________________________________________<BR = =3D'lass=3D""'>Users=20 mailing list<BR><A = =3D'ref=3D"mailto:Users@ovirt.org"'>Users@ovirt.org</A><BR=20 =3D'lass=3D""'>http://lists.ovirt.org/mailman/listinfo/users<BR=20 = =3D'lass=3D""'></DIV></DIV></BLOCKQUOTE></DIV><BR>=3D</SPAN></DIV></DIV><= /DIV></BODY></HTML> ------=_NextPart_000_000F_01D1D3BD.72956C90--