[libvirt] [virsh] [PATCH BZ#732364] please add a .virsh/rc file

Feniks Gordon Freeman feniksgordonfreeman at gmail.com
Mon Feb 27 16:24:47 UTC 2012


As i understand, when libvirt init from application, it parse conf
file $HOME/.libvirt/libvirt.conf and set params. Also libvirt have
env param LIBVIRT_DEFAULT_CONNECT_URI, which set default connection uri.

I will extend libvirt.conf file with default connect uri parameter.
Also, i think it will be good idea to make env variable
LIBVIRT_DEFAULT_CONNECT_URI higher priority over conf file value (it
will be usefull for user scripts).

Thanks

2012/2/27 Daniel P. Berrange <berrange at redhat.com>:
> On Mon, Feb 27, 2012 at 04:56:01PM +0200, Feniks Gordon Freeman wrote:
>> Hi, libvirt developers
>>
>> I found very interesting libvirt and i wrote patch for BZ#732264
>> I added support for parsing ~/.virsh/rc file.
>> rc file in format KEY = VALUE
>> symbol '#' - comment
>> Now, only one value added for parsing - VIRSH_DEFAULT_CONNECT_URI.
>> This value can be overwrite by env variable VIRSH_DEFAULT_CONNECT_URI.
>
> Hmm, I didn't know we had a VIRSH_DEFAULT_CONNECT_URI - we also
> have LIBVIRT_DEFAULT_CONNECT_URI, which applies to any libvirt
> app. We also already have a $HOME/.libvirt/libvirt.conf for
> configuring client apps. I think it'd be better to extend that
> existing config file so the defaults affect all apsp (eg virt-top,
> virt-install, etc) - chances are if you want to change one, you
> want to change them all. And to deprecate usage of VIRSH_DEFAULT_CONNECT_URI
> too while we're at it.
>
>
> Regards,
> Daniel
> --
> |: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
> |: http://libvirt.org              -o-             http://virt-manager.org :|
> |: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
> |: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|



-- 
With best wishes, Maxim Sditanov




More information about the libvir-list mailing list