I would like to have qemu started machines running in user space, but during development I would like to issue commands to it using virtsh
. (note, this is not because I need virtsh, but the QEMU developers only expose APIs that work with virtsh. I guess I could also ask "how to manipulate snapshots from a running QEMU via command line, not interactive qemu monitor sessions?" this virtsh question is following what qemu docs recommend)
The manual is not very clear how to attach qemu to libvirt instance with either qemu:///session
and qemu+unix:///session
, it just assumes you will let libvirt start all the hooks so it doesn't explain anything.
And what i think is the solution, qemu:///embed
is extremely lacking of details and cryptic for non libvirt developers https://libvirt.org/drvqemu.html#embedded-driver
$ ps aux | grep qemu
gcb ... qemu-system-x86_64 -machine pc...
$ virsh -c qemu+unix:///session list --all
Id Name State
--------------------
$ virsh -c qemu:///session list --all
Id Name State
--------------------
$ id
uid=1000(gcb) ...
How exactly libvirt looks for user-session qemu? And how can I simply use virtsh commands to interface with a running qemu from the same user as shown above?