qemu-devel
[Top][All Lists]
Advanced

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

Re: proposal: deprecate -readconfig/-writeconfig


From: Paolo Bonzini
Subject: Re: proposal: deprecate -readconfig/-writeconfig
Date: Fri, 15 May 2020 12:19:43 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0

On 15/05/20 07:54, Markus Armbruster wrote:
>> I don't see QemuOpts going away anytime soon, but I do see more QMP/QAPI
>> and less command line in the future as far as management tools are
>> concerned.  QemuOpts and HMP will remain for direct usage, for the
>> foreseeable future.
> 
> I'd prefer not to have two separate configuration infrastructures.

We already have two, since the introduction of preconfig state.  The
question is more how to unify the code that implements them, than how to
reduce them to one.

For example, I can imagine (and have even discussed informally with John
Snow) a patch series that starts by adding a new preconfig command:

{ 'execute': 'set-argv', 'arguments': { 'argv': [ '-m', '2048'] } }

and progressively adds more preconfig commands until Libvirt can
reasonably configure a VM without set-argv.

An example implementation would be to special case chardev-add,
object-add etc. to stash their arguments in a QAPI struct in preconfig
mode, and the same for -chardev and -object.  Then the big ugly setup
code in main() would walk these structs instead of QemuOpts.  Bingo: you
have a QAPI-representable machine config.  It may not be the nicest one
(see the problems you raised in the past about chardev-add not using the
latest and greatest QAPI features) but I would love to see a proof of
concept for this.

Thanks,

Paolo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]