OpenVZ Forum


Home » Mailing lists » Users » custom location for OS template
custom location for OS template [message #42583] Tue, 03 May 2011 12:17 Go to next message
knawnd is currently offline  knawnd
Messages: 27
Registered: April 2011
Junior Member
From: *parallels.com
Hi!

Almost a month ago (on April 4th) I had posted a message [1] to
Discussion thread on OpenVZ forum but I still haven't got reply. So I am
trying to ask in OpenVZ mail list.
--------------- start quotation ---------------
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>

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

I think that way would provide more flexibility.

Should I submit a feature request on that?
--------------- end quotation ---------------

Thanks!
Nikolay.

[1]
http://forum.openvz.org/index.php?t=msg&goto=42369&& amp;srch=os+template+location#msg_42369
Re: custom location for OS template [message #42633 is a reply to message #42583] Sat, 07 May 2011 23:37 Go to previous messageGo to next message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

From: *parallels.com
On 05/03/2011 04:17 PM, knawnd@gmail.com 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?

> 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.

Maybe you have some specific use case for such feature -- please share the
scenario with us.

Kir.


Kir Kolyshkin
http://static.openvz.org/userbars/openvz-developer.png
Re: custom location for OS template [message #42666 is a reply to message #42633] Tue, 10 May 2011 13:43 Go to previous message
knawnd is currently offline  knawnd
Messages: 27
Registered: April 2011
Junior Member
From: *parallels.com
Kir Kolyshkin wrote on 08/05/11 03:37:
> On 05/03/2011 04:17 PM, knawnd@gmail.com 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.
Previous Topic: Re: Re: Debian libc update requres newer kernel ( was no subject)
Next Topic: CfP 6th Workshop on Virtualization in High-Performance Cloud Computing (VHPC'11) - Deadline Extensio
Goto Forum:
  


Current Time: Thu May 24 19:24:46 GMT 2018