I have been trying to control my VM from within it by using qemu-ga to send monitor commands to the host. I run a new qemu-ga instance as follows
qemu-ga -d -m unix-listen -p /var/run/qemu-ga.socket
I then attach to the socket using
socat - unix:/var/run/qemu-ga-socket
This then accepts JSON commands, but valid QMP commands don't seem to work
{ "execute": "qmp_capabilities" }
{"error": {"class": "CommandNotFound", "desc": "The command qmp_capabilities has not been found"}}
{ "execute": "query-commands" }
{"error": {"class": "CommandNotFound", "desc": "The command query-commands has not been found"}}
I am aware of the need to send a "qmp_capabilities" command to 'activate' the other commands, but this does not work. Stopping the existing qemu-agent using systemctl also has no effect on the outcome. I have also used rlwrap rather than socat directly, but this makes no difference.
What am I doing wrong? Thanks.
qemu-ga -d -m unix-listen -p /var/run/qemu-ga.socket
I then attach to the socket using
socat - unix:/var/run/qemu-ga-socket
This then accepts JSON commands, but valid QMP commands don't seem to work
{ "execute": "qmp_capabilities" }
{"error": {"class": "CommandNotFound", "desc": "The command qmp_capabilities has not been found"}}
{ "execute": "query-commands" }
{"error": {"class": "CommandNotFound", "desc": "The command query-commands has not been found"}}
I am aware of the need to send a "qmp_capabilities" command to 'activate' the other commands, but this does not work. Stopping the existing qemu-agent using systemctl also has no effect on the outcome. I have also used rlwrap rather than socat directly, but this makes no difference.
What am I doing wrong? Thanks.