On Tue, Jan 18, 2022 at 08:07:32PM -0500, John Snow wrote: > On Tue, Jan 18, 2022 at 5:01 AM Daniel P. Berrangé <berra...@redhat.com> > wrote: > > > > With the current 'qmp-shell' tool developers must first spawn QEMU with > > a suitable -qmp arg and then spawn qmp-shell in a separate terminal > > pointing to the right socket. > > > > With 'qmp-shell-wrap' developers can ignore QMP sockets entirely and > > just pass the QEMU command and arguments they want. The program will > > listen on a UNIX socket and tell QEMU to connect QMP to that. > > > > For example, this: > > > > # qmp-shell-wrap -- qemu-system-x86_64 -display none > > > > Is roughly equivalent of running: > > > > # qemu-system-x86_64 -display none -qmp qmp-shell-1234 & > > # qmp-shell qmp-shell-1234 > > > > Except that 'qmp-shell-wrap' switches the socket peers around so that > > it is the UNIX socket server and QEMU is the socket client. This makes > > QEMU reliably go away when qmp-shell-wrap exits, closing the server > > socket. > > > > Signed-off-by: Daniel P. Berrangé <berra...@redhat.com> > > Thanks, I think this is pretty useful. > > Can you look at setup.cfg and see about adding a qmp-shell-wrap entry > point there? I had intended to wean people off of using /scripts for > things that rely on the QMP packages, because I'm gonna fork them out > and then these little forwards won't work without installing something > anyway. > > Also, as an FYI: Stuff that sticks around in /python/qemu/qmp/ is > going to get forked out and uploaded to PyPI; stuff that gets added to > /python/qemu/utils is going to stay local to our tree and has more > freedom to be changed liberally. If you don't think this script > belongs on PyPI, we could always stick it in util.
IMHO it belongs anywhere that the existing qmp-shell lives Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|