
is there any documentation o oVirt guest agent commands? To be more precise: i need to pass commands to oVirt guest agent from hypervisor. Reading info works fine: socat /var/lib/libvirt/qemu/channel/target/domain-20- win7_32bit/com.redhat.serial.0 - {"applications": ["Python 2.7.12rc1", "SPICE Guest Tools", "Total Commander (Remove or Repair)", "Python 2.7 pywin32-216", "Microsoft .NET Framework 4.6.1", "Git version 2.9.0", "WinRAR 5.40 beta 2 (32- bit)", "Notepad++"], "__name__": "applications"} {"__name__": "host-name", "name": "WIN7_32BIT"} {"__name__": "os-version", "version": "Win 7"} I'm unable to find how to send command (lets say "shutdown") to agent?. echo "shutdown" | socat /var/lib/libvirt/qemu/channel/target/domain-20- win7_32bit/com.redhat.kvm-vdi.0 - Does not seem to work Thank you for your help.

--Apple-Mail=_3BE0665E-6368-4F14-B7B6-B74A6939D809 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8
On Jul 1, 2016, at 12:05 PM, Tadas <tadas@ring.lt> wrote: =20 =20 is there any documentation o oVirt guest agent commands? To be more precise: i need to pass commands to oVirt guest agent from hypervisor. Reading info works fine: =20 socat /var/lib/libvirt/qemu/channel/target/domain-20- win7_32bit/com.redhat.serial.0 - =20 {"applications": ["Python 2.7.12rc1", "SPICE Guest Tools", "Total Commander (Remove or Repair)", "Python 2.7 pywin32-216", "Microsoft .NET Framework 4.6.1", "Git version 2.9.0", "WinRAR 5.40 beta 2 (32- bit)", "Notepad++"], "__name__": "applications"} {"__name__": "host-name", "name": "WIN7_32BIT"} {"__name__": "os-version", "version": "Win 7=E2=80=9D}
Every command has to be send as a whole JSON object and sent as line = terminated by a \n character The commands available are currently not documented however. {=E2=80=9C__name__=E2=80=9D: =E2=80=9Cname=E2=80=9D, =E2=80=A6 args} - name: shutdown parameters: - timeout: optional integer (seconds) - reboot: optional boolean - message: string - name: refresh parameters: - apiVersion: optiona integer=20 this defines what information can be exchanged - name: hibernate: parameters: - state: disk 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-guest-agent/O= VirtAgentLogic.py#L306 = <https://github.com/oVirt/ovirt-guest-agent/blob/master/ovirt-guest-agent/= OVirtAgentLogic.py#L306> at the parseCommand function or just ask here :-)
=20 =20 I'm unable to find how to send command (lets say "shutdown") to = agent?. echo "shutdown" | socat = /var/lib/libvirt/qemu/channel/target/domain-20- win7_32bit/com.redhat.kvm-vdi.0 - Does not seem to work Thank you for your help. _______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users
--Apple-Mail=_3BE0665E-6368-4F14-B7B6-B74A6939D809 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 <html><head><meta http-equiv=3D"Content-Type" content=3D"text/html = charset=3Dutf-8"></head><body style=3D"word-wrap: break-word; = -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" = class=3D""><br class=3D""><div><blockquote type=3D"cite" class=3D""><div = class=3D"">On Jul 1, 2016, at 12:05 PM, Tadas <<a = href=3D"mailto:tadas@ring.lt" class=3D"">tadas@ring.lt</a>> = wrote:</div><br class=3D"Apple-interchange-newline"><div class=3D""><div = class=3D""><br class=3D"">is there any documentation o oVirt guest agent = commands?<br class=3D"">To be more precise: i need to pass commands to = oVirt guest agent from<br class=3D"">hypervisor.<br class=3D"">Reading = info works fine:<br class=3D""><br class=3D"">socat = /var/lib/libvirt/qemu/channel/target/domain-20-<br = class=3D"">win7_32bit/com.redhat.serial.0 -<br class=3D""><br = class=3D"">{"applications": ["Python 2.7.12rc1", "SPICE Guest Tools", = "Total<br class=3D"">Commander (Remove or Repair)", "Python 2.7 = pywin32-216", "Microsoft<br class=3D"">.NET Framework 4.6.1", "Git = version 2.9.0", "WinRAR 5.40 beta 2 (32-<br class=3D"">bit)", = "Notepad++"], "__name__": "applications"}<br class=3D"">{"__name__": = "host-name", "name": "WIN7_32BIT"}<br class=3D"">{"__name__": = "os-version", "version": "Win 7=E2=80=9D}<br = class=3D""></div></div></blockquote><div><br class=3D""></div><div>Every = command has to be send as a whole JSON object and sent as line = terminated by a \n character</div><div><br class=3D""></div><div>The = commands available are currently not documented however.</div><div><br = class=3D""></div><div>{=E2=80=9C__name__=E2=80=9D: =E2=80=9Cname=E2=80=9D,= =E2=80=A6 args}</div><div><br class=3D""></div><div>- name: = shutdown</div><div> parameters:</div><div><span = class=3D"Apple-tab-span" style=3D"white-space:pre"> </span>- = timeout: optional integer (seconds)</div><div><span = class=3D"Apple-tab-span" style=3D"white-space:pre"> = </span>- reboot: optional boolean</div><div><span = class=3D"Apple-tab-span" style=3D"white-space:pre"> </span>- = message: string</div><div><br class=3D""></div><div>- = name: refresh</div><div> parameters:</div><div><span = class=3D"Apple-tab-span" style=3D"white-space:pre"> </span>- = apiVersion: optiona integer </div><div> = this defines what information can be = exchanged</div><div><br class=3D""></div><div>- = name: hibernate:</div><div> parameters:</div><div><span = class=3D"Apple-tab-span" style=3D"white-space:pre"> </span>- state: = disk or mem (default is disk if not specified)</div><div><br = class=3D""></div><div>if you need more you can look here: <a = href=3D"https://github.com/oVirt/ovirt-guest-agent/blob/master/ovirt-guest= -agent/OVirtAgentLogic.py#L306" = class=3D"">https://github.com/oVirt/ovirt-guest-agent/blob/master/ovirt-gu= est-agent/OVirtAgentLogic.py#L306</a> at the parseCommand = function</div><div>or just ask here :-)</div><br class=3D""><blockquote = type=3D"cite" class=3D""><div class=3D""><div class=3D""><br = class=3D""><br class=3D"">I'm unable to find how to send command (lets = say "shutdown") to agent?.<br class=3D"">echo "shutdown" | socat = /var/lib/libvirt/qemu/channel/target/domain-20-<br = class=3D"">win7_32bit/com.redhat.kvm-vdi.0 -<br class=3D"">Does= not seem to work<br class=3D"">Thank you for your help.<br = class=3D"">_______________________________________________<br = class=3D"">Users mailing list<br class=3D""><a = href=3D"mailto:Users@ovirt.org" class=3D"">Users@ovirt.org</a><br = class=3D"">http://lists.ovirt.org/mailman/listinfo/users<br = class=3D""></div></div></blockquote></div><br class=3D""></body></html>= --Apple-Mail=_3BE0665E-6368-4F14-B7B6-B74A6939D809--

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--

--Apple-Mail=_F29BC291-4CB2-4CD5-8856-BD4ABEB46229 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jul 1, 2016, at 4:24 PM, Tadas <tadas@ring.lt> wrote: >=20 > 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 <http://pastebin.com/usAYc7Ww> > =20 > But still I get no reaction from ovirt agent. Surely I=E2=80=99m = missing something. Yes the newline character send a =E2=80=98\n=E2=80=99 at the end and the = name key must be surrounded by two underscores like in the replies = __name__ not name > =20 > =20 > From: Vinzenz Feenstra <mailto:vfeenstr@redhat.com> > Sent: Friday, July 01, 2016 2:53 PM > To: tadas@ring.lt <mailto:tadas@ring.lt> > Cc: users@ovirt.org <mailto:users@ovirt.org> > Subject: Re: [ovirt-users] Communicating with ovirt agent > =20 > =20 >> On Jul 1, 2016, at 12:05 PM, Tadas <tadas@ring.lt <>> =3Drote: >> =20 >>=20 >> 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: >>=20 >> socat =3Dvar/lib/libvirt/qemu/channel/target/domain-20- >> win7_32bit/com.redhat.serial.0 - >>=20 >> {"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} > =20 > Every =3Dommand has to be send as a whole JSON object and sent as line = =3Derminated by a \n character > =20 > The =3Dommands available are currently not documented however. > =20 > {=E2=80=9C__name__=E2=80=9D: =E2=80=9Cname=E2=80=9D,=3D=E2=80=A6 args} > =20 > - name: =3Dhutdown > parameters: > - =3Dimeout: optional integer (seconds) > =3D/span>- reboot:=20 > optional boolean > - =3Dessage: string > =20 > - =3Dame: refresh > parameters: > - =3DpiVersion: optiona integer > =3Dnbsp; this defines what information can be =3Dxchanged > =20 > - =3Dame: hibernate: > parameters: > - state: =3Disk or mem (default is disk if not specified) > =20 > if you need more you can look here: = https://github.com/oVirt/ovirt-guest-agent/blob/master/ovirt-gu=3Dst-agent= /OVirtAgentLogic.py#L306 <> at the parseCommand =3Dunction > or just ask here :-) >=20 >=20 >=20 > 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 >=20 > =3D > _______________________________________________ > Users mailing list > Users@ovirt.org > http://lists.ovirt.org/mailman/listinfo/users --Apple-Mail=_F29BC291-4CB2-4CD5-8856-BD4ABEB46229 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 <html><head><meta http-equiv=3D"Content-Type" content=3D"text/html = charset=3Dutf-8"></head><body style=3D"word-wrap: break-word; = -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" = class=3D""><br class=3D""><div><blockquote type=3D"cite" class=3D""><div = class=3D"">On Jul 1, 2016, at 4:24 PM, Tadas <<a = href=3D"mailto:tadas@ring.lt" class=3D"">tadas@ring.lt</a>> = wrote:</div><br class=3D"Apple-interchange-newline"><div class=3D""> <meta content=3D"text/html =3Dharset=3Dutf-8" http-equiv=3D"Content-Type" = class=3D""> <div style=3D"WORD-WRAP: break-word; webkit-nbsp-mode: space; = -webkit-line-break: after-white-space" dir=3D"ltr" =3D'lass=3D"" '=3D"" = class=3D""> <div dir=3D"ltr" class=3D""> <div style=3D"font-size: 12pt; font-family: Calibri;" class=3D""> <div class=3D"">Thank you for reply!</div> <div class=3D"">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 class=3D""><a title=3D"http://pastebin.com/usAYc7Ww" = href=3D"http://pastebin.com/usAYc7Ww" = class=3D"">http://pastebin.com/usAYc7Ww</a></div> <div class=3D""> </div> <div class=3D"">But still I get no reaction from ovirt agent. Surely = I=E2=80=99m missing=20 something.</div></div></div></div></div></blockquote><div><br = class=3D""></div><div>Yes the newline character send a =E2=80=98\n=E2=80=99= at the end and the name key must be surrounded by two underscores like = in the replies __name__ not name</div><br class=3D""><blockquote = type=3D"cite" class=3D""><div class=3D""><div style=3D"WORD-WRAP: = break-word; webkit-nbsp-mode: space; -webkit-line-break: = after-white-space" dir=3D"ltr" =3D'lass=3D"" '=3D"" class=3D""><div = dir=3D"ltr" class=3D""><div style=3D"font-size: 12pt; font-family: = Calibri;" class=3D""> <div class=3D""> </div> <div style=3D"font-size: small; text-decoration: none; font-family: = Calibri; font-weight: normal; font-style: normal; display: inline;" = class=3D""> <div style=3D"FONT: 10pt tahoma" class=3D""> <div class=3D""> </div> <div style=3D"BACKGROUND: #f5f5f5" class=3D""> <div style=3D"font-color: black" class=3D""><b class=3D"">From:</b> <a = title=3D"vfeenstr@redhat.com" href=3D"mailto:vfeenstr@redhat.com" = class=3D"">Vinzenz Feenstra</a> </div> <div class=3D""><b class=3D"">Sent:</b> Friday, July 01, 2016 2:53 = PM</div> <div class=3D""><b class=3D"">To:</b> <a title=3D"tadas@ring.lt" = href=3D"mailto:tadas@ring.lt" class=3D"">tadas@ring.lt</a> </div> <div class=3D""><b class=3D"">Cc:</b> <a title=3D"users@ovirt.org" = href=3D"mailto:users@ovirt.org" class=3D"">users@ovirt.org</a> </div> <div class=3D""><b class=3D"">Subject:</b> Re: [ovirt-users] = Communicating with ovirt=20 agent</div></div></div> <div class=3D""> </div></div> <div style=3D"font-size: small; text-decoration: none; font-family: = Calibri; font-weight: normal; font-style: normal; display: inline;" = class=3D""> <div class=3D""> </div> <div class=3D""> <blockquote type=3D"cite" class=3D""> <div =3D'lass=3D"" '=3D"" class=3D"">On Jul 1, 2016, at 12:05 PM, = Tadas <<a =3D'ref=3D"mailto:tadas@ring.lt" '=3D"" = class=3D"">tadas@ring.lt</a>> =3Drote:</div> <div class=3D""> </div> <div class=3D""> <div =3D'lass=3D"" '=3D"" class=3D""><br class=3D"">is there any = documentation o oVirt guest agent=20 =3Dommands?<br class=3D"">To be more precise: i need to pass commands = to =3DVirt guest agent=20 from<br class=3D"">hypervisor.<br class=3D"">Reading =3Dnfo works = fine:<br class=3D""><br class=3D"">socat=20 =3Dvar/lib/libvirt/qemu/channel/target/domain-20-<br =3D'lass=3D"" = '=3D"" class=3D"">win7_32bit/com.redhat.serial.0 -<br class=3D""><br = =3D'lass=3D"" '=3D"" class=3D"">{"applications":=20 ["Python 2.7.12rc1", "SPICE Guest Tools", =3DTotal<br = class=3D"">Commander (Remove or=20 Repair)", "Python 2.7 =3Dywin32-216", "Microsoft<br class=3D"">.NET = Framework 4.6.1", "Git=20 =3Dersion 2.9.0", "WinRAR 5.40 beta 2 (32-<br class=3D"">bit)", = =3DNotepad++"], "__name__":=20 "applications"}<br class=3D"">{"__name__": =3Dhost-name", "name":=20 "WIN7_32BIT"}<br class=3D"">{"__name__": =3Dos-version", "version": = "Win 7=E2=80=9D}<br =3D'lass=3D"" '=3D"" = class=3D""></div></div></blockquote> <div class=3D""> </div> <div class=3D"">Every =3Dommand has to be send as a whole JSON object = and sent as line=20 =3Derminated by a \n character</div> <div class=3D""> </div> <div class=3D"">The =3Dommands available are currently not documented = however.</div> <div class=3D""> </div> <div class=3D"">{=E2=80=9C__name__=E2=80=9D: =E2=80=9Cname=E2=80=9D,=3D=E2= =80=A6 args}</div> <div class=3D""> </div> <div class=3D"">- name: =3Dhutdown</div> <div class=3D""> parameters:</div> <div class=3D""><span style=3D"WHITE-SPACE: pre" =3D'lass=3D"Apple-tab-spa= n" '=3D"" class=3D""></span>- =3Dimeout:=20 optional integer (seconds)</div> <div class=3D""><span style=3D"WHITE-SPACE: pre" =3D'lass=3D"Apple-tab-spa= n" '=3D"" class=3D"">=3D/span>- reboot:=20 optional boolean</span></div> <div class=3D""><span style=3D"WHITE-SPACE: pre" =3D'lass=3D"Apple-tab-spa= n" '=3D"" class=3D""></span>- =3Dessage:=20 string</div> <div class=3D""> </div> <div class=3D"">- =3Dame: refresh</div> <div class=3D""> parameters:</div> <div class=3D""><span style=3D"WHITE-SPACE: pre" =3D'lass=3D"Apple-tab-spa= n" '=3D"" class=3D""></span>-=20 =3DpiVersion: optiona integer </div> <div class=3D""> = =3Dnbsp; this defines=20 what information can be =3Dxchanged</div> <div class=3D""> </div> <div class=3D"">- =3Dame: hibernate:</div> <div class=3D""> parameters:</div> <div class=3D""><span style=3D"WHITE-SPACE: pre" =3D'lass=3D"Apple-tab-spa= n" '=3D"" class=3D""></span>- state:=20 =3Disk or mem (default is disk if not specified)</div> <div class=3D""> </div> <div class=3D"">if you need more you can look here: <a = =3D'ref=3D"https://github.com/oVirt/ovirt-guest-agent/blob/master/ovirt-gu= est=3Dagent/OVirtAgentLogic.py#L306" '=3D"" = class=3D"">https://github.com/oVirt/ovirt-guest-agent/blob/master/ovirt-gu= =3Dst-agent/OVirtAgentLogic.py#L306</a>=20 at the parseCommand =3Dunction</div> <div class=3D"">or just ask here :-)</div><br class=3D""> <blockquote =3D'ype=3D"cite" '=3D"" class=3D""> <div class=3D""> <div class=3D""><br =3D'lass=3D"" '=3D"" class=3D""><br class=3D"">I'm = unable to find how to send command (lets =3Day=20 "shutdown") to agent?.<br class=3D"">echo "shutdown" | socat=20 =3Dvar/lib/libvirt/qemu/channel/target/domain-20-<br =3D'lass=3D"" = '=3D"" class=3D"">win7_32bit/com.redhat.kvm-vdi.0 -<br = class=3D"">Does=3Dnot seem to=20 work<br class=3D"">Thank you for your help.<br =3D'lass=3D"" '=3D"" = class=3D"">_______________________________________________<br =3D'lass=3D"= " '=3D"" class=3D"">Users=20 mailing list<br class=3D""><a =3D'ref=3D"mailto:Users@ovirt.org" '=3D"" = class=3D"">Users@ovirt.org</a><br =3D'lass=3D"" '=3D"" class=3D""><a = href=3D"http://lists.ovirt.org/mailman/listinfo/users" = class=3D"">http://lists.ovirt.org/mailman/listinfo/users</a><br = =3D'lass=3D"" '=3D"" class=3D""></div></div></blockquote></div><br = class=3D"">=3D</div></div></div></div> _______________________________________________<br class=3D"">Users = mailing list<br class=3D""><a href=3D"mailto:Users@ovirt.org" = class=3D"">Users@ovirt.org</a><br = class=3D"">http://lists.ovirt.org/mailman/listinfo/users<br = class=3D""></div></blockquote></div><br class=3D""></body></html>= --Apple-Mail=_F29BC291-4CB2-4CD5-8856-BD4ABEB46229--

This is a multi-part message in MIME format. ------=_NextPart_000_001B_01D1D3C1.43418010 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Thank you very much. Seems to work now. From: Vinzenz Feenstra=20 Sent: Friday, July 01, 2016 5:37 PM To: Tadas=20 Cc: users@ovirt.org=20 Subject: Re: [ovirt-users] Communicating with ovirt agent On Jul 1, 2016, at 4:24 PM, Tadas <tadas@ring.lt> wrote: 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. Yes the newline character send a =E2=80=98\n=E2=80=99 at the end and the = name key must be surrounded by two underscores like in the replies = __name__ not name 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 _______________________________________________ Users mailing list Users@ovirt.org http://lists.ovirt.org/mailman/listinfo/users ------=_NextPart_000_001B_01D1D3C1.43418010 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable <HTML><HEAD> <META content=3D"text/html charset=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> <DIV dir=3Dltr> <DIV style=3D"FONT-SIZE: 12pt; FONT-FAMILY: 'Calibri'; COLOR: #000000"> <DIV>Thank you very much. Seems to work now.</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 5:37 PM</DIV> <DIV><B>To:</B> <A title=3Dtadas@ring.lt = href=3D"mailto:tadas@ring.lt">Tadas</A>=20 </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>On Jul 1, 2016, at 4:24 PM, Tadas <<A=20 href=3D"mailto:tadas@ring.lt">tadas@ring.lt</A>> wrote:</DIV> <DIV> </DIV> <DIV> <DIV=20 style=3D"WORD-WRAP: break-word; -webkit-line-break: after-white-space; = webkit-nbsp-mode: space"=20 dir=3Dltr =3D'lass=3D"" '> <DIV dir=3Dltr> <DIV style=3D"FONT-SIZE: 12pt; FONT-FAMILY: calibri"> <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></DIV></BLOCKQUOTE> <DIV> </DIV> <DIV>Yes the newline character send a =E2=80=98\n=E2=80=99 at the end = and the name key must be=20 surrounded by two underscores like in the replies __name__ not = name</DIV><BR> <BLOCKQUOTE type=3D"cite"> <DIV> <DIV=20 style=3D"WORD-WRAP: break-word; -webkit-line-break: after-white-space; = webkit-nbsp-mode: space"=20 dir=3Dltr =3D'lass=3D"" '> <DIV dir=3Dltr> <DIV style=3D"FONT-SIZE: 12pt; FONT-FAMILY: calibri"> <DIV> </DIV> <DIV=20 style=3D"FONT-SIZE: small; TEXT-DECORATION: none; FONT-FAMILY: = calibri; FONT-WEIGHT: normal; 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; 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=20 =3Dommands?<BR>To be more precise: i need to pass commands to = =3DVirt guest=20 agent from<BR>hypervisor.<BR>Reading =3Dnfo works fine:<BR><BR>socat = =3Dvar/lib/libvirt/qemu/channel/target/domain-20-<BR=20 =3D'lass=3D"" '>win7_32bit/com.redhat.serial.0 -<BR><BR=20 =3D'lass=3D"" '>{"applications": ["Python 2.7.12rc1", "SPICE Guest = Tools",=20 =3DTotal<BR>Commander (Remove or Repair)", "Python 2.7 = =3Dywin32-216",=20 "Microsoft<BR>.NET Framework 4.6.1", "Git =3Dersion 2.9.0", "WinRAR = 5.40 beta=20 2 (32-<BR>bit)", =3DNotepad++"], "__name__": = "applications"}<BR>{"__name__":=20 =3Dhost-name", "name": "WIN7_32BIT"}<BR>{"__name__": =3Dos-version", = "version":=20 "Win 7=E2=80=9D}<BR =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>-=20 =3Dimeout: optional integer (seconds)</DIV> <DIV><SPAN style=3D"WHITE-SPACE: pre" =3D'lass=3D"Apple-tab-span" = '>=3D/span>-=20 reboot: optional boolean</SPAN></DIV> <DIV><SPAN style=3D"WHITE-SPACE: pre" =3D'lass=3D"Apple-tab-span" = '></SPAN>-=20 =3Dessage: 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=20 defines 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-guest-agent/blob/master/ovirt-gu=3Dst-ag= ent/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=20 =3D'lass=3D"" '>Users mailing list<BR><A=20 =3D'ref=3D"mailto:Users@ovirt.org" '>Users@ovirt.org</A><BR = =3D'lass=3D"" '><A=20 = href=3D"http://lists.ovirt.org/mailman/listinfo/users">http://lists.ovirt= .org/mailman/listinfo/users</A><BR=20 =3D'lass=3D"" = '></DIV></DIV></BLOCKQUOTE></DIV><BR>=3D</DIV></DIV></DIV></DIV>_________= ______________________________________<BR>Users=20 mailing list<BR><A=20 = href=3D"mailto:Users@ovirt.org">Users@ovirt.org</A><BR>http://lists.ovirt= .org/mailman/listinfo/users<BR></DIV></BLOCKQUOTE></DIV> <DIV> </DIV></DIV></DIV></DIV></BODY></HTML> ------=_NextPart_000_001B_01D1D3C1.43418010--

This is a multi-part message in MIME format. ------=_NextPart_000_004B_01D1D3CB.7B0A9D10 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Last question: anything I should know about logging in remotely (SSO)? {"__name__":"login", "parameters":[{"username":"user", = "password":"secret"}]} \n=20 should work? From: Tadas=20 Sent: Friday, July 01, 2016 5:51 PM To: users@ovirt.org=20 Subject: Re: [ovirt-users] Communicating with ovirt agent Thank you very much. Seems to work now. From: Vinzenz Feenstra=20 Sent: Friday, July 01, 2016 5:37 PM To: Tadas=20 Cc: users@ovirt.org=20 Subject: Re: [ovirt-users] Communicating with ovirt agent On Jul 1, 2016, at 4:24 PM, Tadas <tadas@ring.lt> wrote: 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. Yes the newline character send a =E2=80=98\n=E2=80=99 at the end and the = name key must be surrounded by two underscores like in the replies = __name__ not name 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 _______________________________________________ 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 ------=_NextPart_000_004B_01D1D3CB.7B0A9D10 Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable <HTML><HEAD> <META content=3D"text/html charset=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> <DIV dir=3Dltr> <DIV style=3D"FONT-SIZE: 12pt; FONT-FAMILY: 'Calibri'; COLOR: #000000"> <DIV>Last question:</DIV> <DIV>anything I should know about logging in remotely (SSO)?</DIV> <DIV> </DIV> <DIV>{"__name__":"login", "parameters":[{"username":"user",=20 "password":"secret"}]} \n </DIV> <DIV> </DIV> <DIV>should work?</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=3Dtadas@ring.lt=20 href=3D"mailto:tadas@ring.lt">Tadas</A> </DIV> <DIV><B>Sent:</B> Friday, July 01, 2016 5:51 PM</DIV> <DIV><B>To:</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 dir=3Dltr> <DIV style=3D"FONT-SIZE: 12pt; FONT-FAMILY: 'Calibri'; COLOR: #000000"> <DIV>Thank you very much. Seems to work now.</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 5:37 PM</DIV> <DIV><B>To:</B> <A title=3Dtadas@ring.lt = href=3D"mailto:tadas@ring.lt">Tadas</A>=20 </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>On Jul 1, 2016, at 4:24 PM, Tadas <<A=20 href=3D"mailto:tadas@ring.lt">tadas@ring.lt</A>> wrote:</DIV> <DIV> </DIV> <DIV> <DIV=20 style=3D"WORD-WRAP: break-word; -webkit-line-break: after-white-space; = webkit-nbsp-mode: space"=20 dir=3Dltr =3D'lass=3D"" '> <DIV dir=3Dltr> <DIV style=3D"FONT-SIZE: 12pt; FONT-FAMILY: calibri"> <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></DIV></BLOCKQUOTE> <DIV> </DIV> <DIV>Yes the newline character send a =E2=80=98\n=E2=80=99 at the end = and the name key must be=20 surrounded by two underscores like in the replies __name__ not = name</DIV><BR> <BLOCKQUOTE type=3D"cite"> <DIV> <DIV=20 style=3D"WORD-WRAP: break-word; -webkit-line-break: after-white-space; = webkit-nbsp-mode: space"=20 dir=3Dltr =3D'lass=3D"" '> <DIV dir=3Dltr> <DIV style=3D"FONT-SIZE: 12pt; FONT-FAMILY: calibri"> <DIV> </DIV> <DIV=20 style=3D"FONT-SIZE: small; TEXT-DECORATION: none; FONT-FAMILY: = calibri; FONT-WEIGHT: normal; 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; 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=20 =3Dommands?<BR>To be more precise: i need to pass commands to = =3DVirt guest=20 agent from<BR>hypervisor.<BR>Reading =3Dnfo works fine:<BR><BR>socat = =3Dvar/lib/libvirt/qemu/channel/target/domain-20-<BR=20 =3D'lass=3D"" '>win7_32bit/com.redhat.serial.0 -<BR><BR=20 =3D'lass=3D"" '>{"applications": ["Python 2.7.12rc1", "SPICE Guest = Tools",=20 =3DTotal<BR>Commander (Remove or Repair)", "Python 2.7 = =3Dywin32-216",=20 "Microsoft<BR>.NET Framework 4.6.1", "Git =3Dersion 2.9.0", "WinRAR = 5.40 beta=20 2 (32-<BR>bit)", =3DNotepad++"], "__name__": = "applications"}<BR>{"__name__":=20 =3Dhost-name", "name": "WIN7_32BIT"}<BR>{"__name__": =3Dos-version", = "version":=20 "Win 7=E2=80=9D}<BR =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>-=20 =3Dimeout: optional integer (seconds)</DIV> <DIV><SPAN style=3D"WHITE-SPACE: pre" =3D'lass=3D"Apple-tab-span" = '>=3D/span>-=20 reboot: optional boolean</SPAN></DIV> <DIV><SPAN style=3D"WHITE-SPACE: pre" =3D'lass=3D"Apple-tab-span" = '></SPAN>-=20 =3Dessage: 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=20 defines 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-guest-agent/blob/master/ovirt-gu=3Dst-ag= ent/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=20 =3D'lass=3D"" '>Users mailing list<BR><A=20 =3D'ref=3D"mailto:Users@ovirt.org" '>Users@ovirt.org</A><BR = =3D'lass=3D"" '><A=20 = href=3D"http://lists.ovirt.org/mailman/listinfo/users">http://lists.ovirt= .org/mailman/listinfo/users</A><BR=20 =3D'lass=3D"" = '></DIV></DIV></BLOCKQUOTE></DIV><BR>=3D</DIV></DIV></DIV></DIV>_________= ______________________________________<BR>Users=20 mailing list<BR><A=20 = href=3D"mailto:Users@ovirt.org">Users@ovirt.org</A><BR>http://lists.ovirt= .org/mailman/listinfo/users<BR></DIV></BLOCKQUOTE></DIV> <DIV> </DIV></DIV></DIV></DIV> <P> <HR> _______________________________________________<BR>Users mailing=20 list<BR>Users@ovirt.org<BR>http://lists.ovirt.org/mailman/listinfo/users<= BR></DIV></DIV></DIV></BODY></HTML> ------=_NextPart_000_004B_01D1D3CB.7B0A9D10--

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

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