Kir Kolyshkin wrote on 08/05/11 03:37:
On 05/03/2011 04:17 PM, [email protected] wrote:
Is there any way to specify a location for os templates? The default one
is written in /etc/vz/vz.conf as
template=/vz/template

but I would like to have a possibility to specify the custom one e.g.
with absolute path:
$ vzctl create --ostemplate /vz/tmpl/centos-5-x86.tar.gz <CTID>

Why such a feature would be needed? Is that a problem to put a tarball (or just a symlink)
to /vz/template/cache?
For my needs I am trying to implement OpenVZ support in OpenNebula [1] with minimal changes in OpenNebula code. OpenNebula creates directory on remote host (cluster node) like $VM_DIR/<VM_ID>/ with some files inside it including VM deployment (a.k.a config) file, OS template/image, etc. All VMs on remote nodes are running under unprivileged user belonging to certain group (e.g. oneadmin:cloud). So it seems that the easiest way to create VM from certain OS template would be to do something like
$ vzctl create --ostemplate <path_to_OS_template> <CTID>
but indeed it looks like such approach would break the /etc/vz/dists/* logic of choosing proper distscripts.
So probably I will try to use symlinks. Thanks for idea!

Regards,
Nikolay.

[1] http://www.opennebula.org

with corresponding value for ostemplate variable in VE config:
ostemplate="/vz/tmpl/centos-5-x86.tar.gz"

This will definitely break the /etc/vz/dists/* logic of choosing proper distscripts.

I think that way would provide more flexibility.

There are infinite ways to provide more flexibility for vzctl -- the question is
which ones are worth implementing.


Kir.
_______________________________________________
Users mailing list
[email protected]
https://openvz.org/mailman/listinfo/users

Reply via email to