Valerio Pachera <siri...@gmail.com> writes: > Hi, I'm interested about the option -writeconfig/-readconfig. > I'm looking for some documentation about the format of the file, the > syntax of all possible options and if there's a library that helps to > read and write this file from external applications. > > I've been writing a sort of a cli to manage guests across different > servers and I wish to manage guest settings by qemu config file. > > Thank you in advance.
-readconfig and -writeconfig are documented badly. They use an INI file format[*]. Unfortunately, it covers only a subset of the command line options. The (flawed!) QMP command query-command-line-options currently shows exactly the covered ones. I second Laszlo's recommendation to check out existing solutions such as libvirt before rolling your own. [*] https://en.wikipedia.org/wiki/INI_file