[virt-tools-list] virt-install patch: get default options from config file

Cole Robinson crobinso at redhat.com
Wed Jan 25 00:11:24 UTC 2012


On 01/13/2012 06:17 AM, Pall Sigurdsson wrote:
> Hi all,
> 
> I have made a patch to virt-install so that it can read default parameters from config file if none are provided from the command line (github link is provided below).
> 
> https://github.com/palli/python-virtinst/commit/0f54c9d6ab5d026546590cffe3d808adf0d234f2
> 
> This gives users ability to create site-defaults (like install location, disk size, virt-type) without specifying them from the command-line every time.
> 
> I think this is a solid feature. In my field i see a lot of virt-install powerusers create their own shell-script wrappers for this purpose.
> 
> Below is an example of a configuration file that might be well suited for a stock rhel/fedora machine.
> 

Hi Pall,

I like the idea! Probably not something we would ship by default, but
certainly something to document.

A few ideas though:
- Check ~/.virtinst/defaults.conf or to allow users to override defaults.
- Definitely log the whole file content
- Use a standard format like ini, python standard library comes with parsers
for it
- Worth thinking about how to handle defaults for other virt-tools apps, maybe
the file should be called virtinst/virt-install.conf?

Though I wonder how much libosinfo will let us solve this. One of the goals of
libosinfo is to allow the user to add site specific OS entries in the
database, complete with settings like recommended ram, disk size, optimal
devices, install media locations, etc. Users could add their own site specific
config, or just used the stock ones shipped with fedora.

Granted virtinst doesn't use libosinfo yet but it will eventually.

Thanks,
Cole




More information about the virt-tools-list mailing list