I am testing virt-qemu-run from master, not sure where to report/discuss this. I would expect virt-qemu-run to use my user or system configuration by default. That is, load or copy $HOME/.config/libvirt or /etc/libvirt configuration files.
I think you're mis-understanding what virt-qemu-run is for. We introduced a concept of an embedded libvirt QEMU driver, which is completely independent of / isolated from the existing system/session drivers. The virt-qemu-run tool is a command for running a QEMU guest using the embedded QEMU driver and thus completely isolated from any other QEMU on the host. As such it will never load $HOME/.config/libvirt nor /etc/libvirt. If not args are used, it will create a temporary directory to storing all files, or you can give an explicit path to a virtual root.
(In reply to Daniel Berrangé from comment #1) > I think you're mis-understanding what virt-qemu-run is for. We introduced a > concept of an embedded libvirt QEMU driver, which is completely independent > of / isolated from the existing system/session drivers. The virt-qemu-run > tool is a command for running a QEMU guest using the embedded QEMU driver > and thus completely isolated from any other QEMU on the host. As such it > will never load $HOME/.config/libvirt nor /etc/libvirt. If not args are > used, it will create a temporary directory to storing all files, or you can > give an explicit path to a virtual root. But can it have some libvirtd.conf/qemu.conf ?
It uses a virtual root directory this the layout described here: https://libvirt.org/drvqemu.html#uriembedded There is not concept of a libvirtd.conf as there is no daemon involved. You can give a qemu.conf but you'll need to explicitly tell it what directory to use instead of having it create a throwaway temp dir. The general intention is that we should never need to use qemu.conf for any aspect related to guest config - we want anything commonly used to be configurable via the domain XML, but we do have some gaps in this area right now.
(In reply to Daniel Berrangé from comment #3) > It uses a virtual root directory this the layout described here: > > https://libvirt.org/drvqemu.html#uriembedded > > There is not concept of a libvirtd.conf as there is no daemon involved. You > can give a qemu.conf but you'll need to explicitly tell it what directory to > use instead of having it create a throwaway temp dir. The general intention > is that we should never need to use qemu.conf for any aspect related to > guest config - we want anything commonly used to be configurable via the > domain XML, but we do have some gaps in this area right now. The intent is sensible, but I think a lot of qemu.conf is still nice to have, and having another mechanism, such as more options or environment variables, or having to be explicit in the XML, all have drawbacks. Could we have system/user qemu.conf loaded/copied by default, and have a --no-config option or similar?
(In reply to Marc-Andre Lureau from comment #4) > (In reply to Daniel Berrangé from comment #3) > The intent is sensible, but I think a lot of qemu.conf is still nice to > have, and having another mechanism, such as more options or environment > variables, or having to be explicit in the XML, all have drawbacks. You can still use qemu.conf, but you'll need to set it up ahead of time. > Could we have system/user qemu.conf loaded/copied by default, and have a > --no-config option or similar? Definitely not - there could be completely arbitrarily settings in qemu.conf that will negatively impact with the embedded driver. Being completely separated from the session/system drivers is a core goal.
(In reply to Daniel Berrangé from comment #5) > > Could we have system/user qemu.conf loaded/copied by default, and have a > > --no-config option or similar? > > Definitely not - there could be completely arbitrarily settings in qemu.conf > that will negatively impact with the embedded driver. Being completely > separated from the session/system drivers is a core goal. I don't get what's wrong with having qemu.conf loaded. I mean, virt-qemu-run behaves as if there was a common qemu.conf with default values already.
(In reply to Marc-Andre Lureau from comment #6) > (In reply to Daniel Berrangé from comment #5) > > > Could we have system/user qemu.conf loaded/copied by default, and have a > > > --no-config option or similar? > > > > Definitely not - there could be completely arbitrarily settings in qemu.conf > > that will negatively impact with the embedded driver. Being completely > > separated from the session/system drivers is a core goal. > > I don't get what's wrong with having qemu.conf loaded. I mean, virt-qemu-run > behaves as if there was a common qemu.conf with default values already. Again, the embedded driver is intended to be completely independent of the system/session drivers. Changes to configuration of the those drivers, must NEVER affect operation of applications using the embedded driver.
(In reply to Daniel Berrangé from comment #7) > (In reply to Marc-Andre Lureau from comment #6) > > I don't get what's wrong with having qemu.conf loaded. I mean, virt-qemu-run > > behaves as if there was a common qemu.conf with default values already. > > Again, the embedded driver is intended to be completely independent of the > system/session drivers. Changes to configuration of the those drivers, must > NEVER affect operation of applications using the embedded driver. We could make virt-qemu-run more sensible and user friendly, without touching the embedded driver behaviour.