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