于 2010年11月11日 08:14, Justin Clift 写道:
Hi all,
Had a thought the other night, about a possible approach to having a "per user"
libvirt preferences file.
How about, in the user's home directory, we have a single text file, say
".libvirt-prefs", structured something like this:
[common]
default_uri = qemu+ssh://somehost/system
default_socket = /path/to/somewhere-socket
default_session_type = system
tls_client_cert = /path/to/somewhere.cert
tls_client_key = /path/to/somewhere.key
log_file=/path/to/logfile.log
some_other_preference=value
[gtk-vnc]
tls_client_cert = /path/that/overrides/the/common/section/if/present/somefile.cert
tls_client_key = /path/that/overrides/the/common/section/if/present/somefile.key
[virt-viewer]
more_overrides=/value/foo
The suggestion being, that we have a [common] section with preferences that general
libvirt client apps can use (ie virsh). But also allowing other libvirt client apps (ie
virt-viewer), to store overrides to that.
Just thinking it would be useful to have these things in one place, so sensible defaults
can be set once (ie for TLS certs), and things will then "automagically" use
them.
the "tls_client_cert" and "tls_client_key' are useful
it will allow user put the cert and key files where he wants.
For a non-root priviledge, could not get a system session,
so "default_session_type" is meaningless, and actually
you already specified it in "default_uri". :-)
it will be convenient for user who doesn't want to always input
characters. However, think there are not many configurable
preferences currently for the clients.
Anyway, I think it's a good idea.
- Osier
+ Justin
--
libvir-list mailing list
libvir-list(a)redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list