Re: [PATCH] qemu: introduce load qemu.conf for "virt-qemu-run"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jan 28, 2025 at 03:13:04PM +0100, Adam Julis wrote:
> Adding a new option --config (or -c) for specifying a custom
> qemu.conf file.
> 
> Previously, virt-qemu-run loaded default configuration values for
> QEMU via qemuStateInitialize(). The configuration was loaded from
> a temporary ../etc/ directory using virQEMUDriverConfigLoadFile(),
> and any qemu.conf file present in that directory was also loaded
> automatically.
> 
> This patch allows users to specify a custom configuration file,
> which is copied into the temporary directory (or a permanent
> folder if the -r option is used) before loading the
> configuration. If an existing qemu.conf is present, it is
> properly backed up and restored in case of a permanent folder.
> The custom qemu.conf is always removed when the program exits.

IMHO if the user is passing a '-r' option, then they can already ensure
that directory they're pointing to contains a suitable qemu.conf, and
we shouldn't try to relpace that.

The patch is adding an unreasonable amount of complexity with backups &
restore, for the -r case, that just isn't compelling to exist. Similarly
it doesn't seem compelling to deep copy the file contents since this is
a read-only file. Without that, the whole patch would be little more than
two API calls g_mkdir_with_parents() followed by symlink().

With 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 :|



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux