> On Jul 1, 2016, at 12:05 PM, Tadas <ta...@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-guest-agent/blob/master/ovirt-guest-agent/OVirtAgentLogic.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 :-) > > > 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