On 03/19/2012 11:33 AM, Paolo Bonzini wrote:
Il 19/03/2012 17:31, Anthony Liguori ha scritto:
It also plumbs the existing command line options through QemuOpts via
a special
'system' section. This means that any command line option can be
specified via
readconfig and that the combination of -nodefconfig and -writeconfig
should give
you exactly the same guest in a repeatable fashion.
I don't like this because it turns command-line options into ABI.
It's already an ABI, no?
Right, sorry. Into configuration file ABI, which is supposed to be the
"cleaner" ABI.
Right, the basic premise of this series is "perfect is the enemy of good". I
think we do ourselves more harm than good trying to come up with a clean new
interface instead of just cleaning up the bits behind what we previously had.
If you look at the goodness that comes from taking the interface as we have it
now instead of trying to arrive at the perfect interface, I think going with the
good approach has a lot of short term return.
Also, it puts there some options for which -writeconfig is actually
able to produce a QemuOpts equivalent, such as -monitor.
That may be a bug depending on what your concern is. Can you be more
specific?
If you write "-monitor stdio" with your series, do you get one or two
monitors in the resulting configuration file?
Two, I now understand what you're saying. Let me look into fixing that. This
is more about -writeconfig. We need to record the origin of a particular
QemuOpt and have -writeconfig spit out only things that came from -readconfig.
Essentially, we need "-writeconfig of what's been changed from -readconfig" and
"-writeconfig that is used strictly with -nodefconfig".
One of the nice things about GKeyFile is that it has intelligence to preserve
comments so we can make -writeconfig be very non-intrusive.
Regards,
Anthony Liguori
Paolo