--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(a)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(a)ring.lt <mailto:tadas@ring.lt>
Cc: users(a)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(a)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(a)ovirt.org <>
http://lists.ovirt.org/mailman/listinfo/users
=20
=3D
_______________________________________________
Users mailing list
Users(a)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(a)ring.lt</a>&gt; =
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(a)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(a)ring.lt" =
href=3D"mailto:tadas@ring.lt" class=3D"">tadas(a)ring.lt</a>
</div>
<div class=3D""><b class=3D"">Cc:</b> <a
title=3D"users(a)ovirt.org" =
href=3D"mailto:users@ovirt.org"
class=3D"">users(a)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(a)ring.lt</a>&gt; =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/m...
=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(a)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<... =
=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(a)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--