OpenVZ Forum


Home » General » Discussions » custom location for OS template (the question about a possibility to specify custom location for OS templates)
custom location for OS template [message #42369] Thu, 07 April 2011 08:16 Go to next message
knawnd is currently offline  knawnd
Messages: 27
Registered: April 2011
Junior Member
Hi!

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 feature request on that?

Thanks!
Nikolay.
Re: custom location for OS template [message #45046 is a reply to message #42369] Tue, 24 January 2012 01:49 Go to previous messageGo to next message
Schorschi is currently offline  Schorschi
Messages: 1
Registered: January 2012
Junior Member
Same here, want to be able to save templates to mount point or directy I specify. Also, want to save or place VFSs to directory structure I can specify as well.
Re: custom location for OS template [message #45604 is a reply to message #42369] Wed, 21 March 2012 17:58 Go to previous messageGo to next message
devonblzx is currently offline  devonblzx
Messages: 127
Registered: December 2006
Senior Member
Why not create a symlink to the file/directory?

rmdir /vz/template/cache
ln -s /path/to /vz/template/cache


http://static.openvz.org/userbars/openvz-user-2.png
ByteOnSite President
Re: custom location for OS template [message #45607 is a reply to message #45604] Thu, 22 March 2012 06:33 Go to previous message
knawnd is currently offline  knawnd
Messages: 27
Registered: April 2011
Junior Member
devonblzx wrote on Wed, 21 March 2012 20:58
Why not create a symlink to the file/directory?

because OpenVZ enabled hardware nodes (HN) are managed by a cloud platform (OpenNebula) what passes a set of files (including a VM template) for each VM into separate dir on HN like
/srv/vm/01/<OS1-template>
/srv/vm/02/<OS2-template>
/srv/vm/03/<OS3-template>
....

and it would be much more convenient to specify an absolute unique path to each VM template during VM creation.

Previous Topic: CentOS 6 x64 Minimal Template
Next Topic: chkpnt dump to stdout?
Goto Forum:
  


Current Time: Tue Mar 19 03:55:16 GMT 2024

Total time taken to generate the page: 0.02293 seconds