Install qmp-shell
pip3 install qmp.qmp
This should have added the qemu-shell
command to your shell.
You need to connect then to the qemu qmp socket. If you are starting the qemu vm yourself add this to your qemu launch command:
-chardev socket,id=char-qmp,path=PATH_TO_YOUR_QMP_SOCKET,server=on,wait=off -qmp chardev:char-qmp
If you are using lima/colima or other tools do: