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(a)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(a)ovirt.org=20
Subject: Re: [ovirt-users] Communicating with ovirt agent
On Jul 1, 2016, at 4:24 PM, Tadas <tadas(a)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(a)ring.lt=20
Cc: users(a)ovirt.org=20
Subject: Re: [ovirt-users] Communicating with ovirt agent
On Jul 1, 2016, at 12:05 PM, Tadas <tadas(a)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(a)ovirt.org
http://lists.ovirt.org/mailman/listinfo/users
=3D
_______________________________________________
Users mailing list
Users(a)ovirt.org
http://lists.ovirt.org/mailman/listinfo/users
-------------------------------------------------------------------------=
-------
_______________________________________________
Users mailing list
Users(a)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(a)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(a)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(a)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(a)ring.lt =
href=3D"mailto:tadas@ring.lt">Tadas</A>=20
</DIV>
<DIV><B>Cc:</B> <A title=3Dusers(a)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/us...
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(a)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(a)ring.lt=20
href=3D"mailto:tadas@ring.lt">tadas@ring.lt</A> </DIV>
<DIV><B>Cc:</B> <A title=3Dusers(a)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(a)ring.lt</A>&gt; =
=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(a)ovirt.org</A><BR =
=3D'lass=3D"" '><A=20
=
href=3D"http://lists.ovirt.org/mailman/listinfo/users">http:...
.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--