
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