[libvirt] [PATCH] Openvz: how to use a nondefault config
Daniel P. Berrange
berrange at redhat.com
Fri Mar 27 11:14:08 UTC 2009
On Mon, Mar 16, 2009 at 06:12:07PM +0300, Anton Protopopov wrote:
> Hi all.
>
> When libvirt creates an OpenVZ machine, it does smth like
> # vzctl create $ctid --ostemplate `ostemplate`
> And we can't specify an --config `config` argument. In this case vzctl
> chooses
> a default config file (a value of CONFIG variable from /etc/vz/vz.conf).
>
> But there are cases when we want to specify a config file directly, as in
> # vzctl create $ctid --ostemplate `ostemplate` --config `config`
>
> I think, that we can try to use the same `ostemplate` name as --config
> value, if corresponding template exists,
> i.e., if there is a file /etc/vz/conf/ve-`ostemplate`.conf-sample, libvirt
> will run a command
> # vzctl create $ctid --ostemplate `ostemplate` --config `ostemplate`
> Otherwise, it will run it's default command
> # vzctl create $ctid --ostemplate `ostemplate`
> (the same arguments.)
I don't particularly like the fact that there are all these extra
hidden config parameters in the template config. We should aim to
get these all exposed in the libvirt XML and/or APIs as applicable.
That said, this patch you are suggesting seems like a reasonable
approach for this point in time.
Daniel
--
|: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
More information about the libvir-list
mailing list