[libvirt] [PATCH] Openvz: how to use a nondefault config
Anton Protopopov
aspsk2 at gmail.com
Fri Mar 20 12:30:03 UTC 2009
2009/3/16 Anton Protopopov <aspsk2 at gmail.com>
> 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.)
>
> -----------
> Example of creating a machine with nondefault config:
>
> 1. Create /etc/vz/conf/ve-altlinux-test.conf-sample
> 2. Create /var/lib/vz/template/cache/altlinux-test.tar
> 3. Use libvirt with (hypothetical) XML:
> <domain type="openvz">
> <name>100</name>
> <memory>1</memory>
> <os><type>exe</type></os>
> <devices>
> <filesystem type="template">
> <source name="altlinux-test"/>
> <target dir="/"/>
> </filesystem>
> </devices>
> </domain>
>
> -----------
> Example of creating a machine with default config:
>
> 1. Ensure there is no /etc/vz/conf/ve-altlinux-test.conf-sample
> 2. Create /var/lib/vz/template/cache/altlinux-test.tar
> 3. Use libvirt with (the same as above) XML file
> -----------
>
ping?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20090320/c7776976/attachment-0001.htm>
More information about the libvir-list
mailing list