Sorry for very delayed reply ... On Thu, Dec 02, 2021 at 07:57:38AM +0100, Markus Armbruster wrote: > 1. QMP only > > Management applications need to use QMP for monitoring anyway. They > may want to use it for initial configuration, too. Libvirt does. > > They still need to bootstrap a QMP monitor, and for that, CLI is fine > as long as it's simple and stable.
libguestfs actually does not use the QMP monitor but manages to configure eveything from the command line just fine. I've attached below a typical example. (Of course we can use libvirt too, but still for many configurations libvirt causes problems unfortunately). > Human users struggle with inconsistent syntax, insufficiently expressive > configuration files, and huge command lines. One advantage of "huge command lines" is that they document the configuration of qemu quite well. I know it's only an approximation, but in many cases it's exactly what we want. It is frequently the case when troubleshooting that we ask the user "what is the qemu command line", and they can get that from the libvirt log file or through "ps". So we need to consider this and make sure that everything is changed so we don't regress. libguestfs will need substantial changes and libvirt must dump the full configuration (qinfo or whatever) to the log file. I don't really disagreee with anything else you wrote however. Rich. libguestfs example: /usr/bin/qemu-kvm \ -global virtio-blk-pci.scsi=off \ -no-user-config \ -nodefaults \ -display none \ -machine accel=kvm:tcg,graphics=off \ -cpu max \ -m 1280 \ -no-reboot \ -rtc driftfix=slew \ -no-hpet \ -global kvm-pit.lost_tick_policy=discard \ -kernel /var/tmp/.guestfs-1000/appliance.d/kernel \ -initrd /var/tmp/.guestfs-1000/appliance.d/initrd \ -object rng-random,filename=/dev/urandom,id=rng0 \ -device virtio-rng-pci,rng=rng0 \ -device virtio-scsi-pci,id=scsi \ -drive file=/tmp/libguestfs9bBO1w/scratch1.img,cache=unsafe,format=raw,id=hd0,if=none \ -device scsi-hd,drive=hd0 \ -drive file=/var/tmp/.guestfs-1000/appliance.d/root,snapshot=on,id=appliance,cache=unsafe,if=none \ -device scsi-hd,drive=appliance \ -device virtio-serial-pci \ -serial stdio \ -chardev socket,path=/run/user/1000/libguestfsGIlAlu/guestfsd.sock,id=channel0 \ -device virtserialport,chardev=channel0,name=org.libguestfs.channel.0 \ -append "panic=1 console=ttyS0 edd=off udevtimeout=6000 udev.event-timeout=6000 no_timer_check printk.time=1 cgroup_disable=memory usbcore.nousb cryptomgr.notests tsc=reliable 8250.nr_uarts=1 root=UUID=9e6e8889-f991-45a3-bb41-67acebe7b062 selinux=0 guestfs_verbose=1 TERM=xterm-256color" -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://people.redhat.com/~rjones/virt-df/