OpenVZ Forum


Home » General » Support » creating template by tarring an existing vps
creating template by tarring an existing vps [message #4710] Sat, 22 July 2006 02:41 Go to next message
hello-world is currently offline  hello-world
Messages: 30
Registered: June 2006
Member

Hi folks,

Would it be possible to create a template by just tarring up an existing vps? I would like to have a template that has some specific utiliities.

Thanks.
Re: creating template by tarring an existing vps [message #4711 is a reply to message #4710] Sat, 22 July 2006 04:51 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
Yes, it's possible.
Here is an exampe of template creation using this way:
http://forum.openvz.org/index.php?t=post&reply_to=4710&a mp;
Re: creating template by tarring an existing vps [message #4713 is a reply to message #4711] Sat, 22 July 2006 07:54 Go to previous messageGo to next message
hello-world is currently offline  hello-world
Messages: 30
Registered: June 2006
Member
vass wrote on Sat, 22 July 2006 00:51

Yes, it's possible.
Here is an exampe of template creation using this way:
http://wiki.openvz.org/Slackware_template_creation




That link is opening a reply page to the same thread. Could u plese post teh correct thread?

Thanks.

[Updated on: Sat, 22 July 2006 08:07] by Moderator

Report message to a moderator

Re: creating template by tarring an existing vps [message #4714 is a reply to message #4711] Sat, 22 July 2006 08:18 Go to previous messageGo to next message
hello-world is currently offline  hello-world
Messages: 30
Registered: June 2006
Member
vass wrote on Sat, 22 July 2006 00:51

Yes, it's possible.
Here is an exampe of template creation using this way:
http://forum.openvz.org/index.php?t=post&reply_to=4710&a mp;a mp;




Ok i got the right link. But that's a handful, and anyway, what i gather from the link is that, if i have to create a template from an already running vps, all i need to do is:

tar -czf vps-template.tgz /vz/private/101

Is that right?

Thanks a lot for your time.
Re: creating template by tarring an existing vps [message #4715 is a reply to message #4714] Sat, 22 July 2006 08:25 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
Almost all.
You have to remove information inside this VE, that is specific to this VE only. Well, some data, IP information, etc...

Good luck.
Re: creating template by tarring an existing vps [message #4716 is a reply to message #4715] Sat, 22 July 2006 09:03 Go to previous messageGo to next message
hello-world is currently offline  hello-world
Messages: 30
Registered: June 2006
Member


I just want to create a vps-template with some more packages installed than the original one. So what i do is this:

vzctl create 50 --ostemplate centos-default

i am not assigining any ips or anything.

vzyum 50 install yum

tar -czf centos-default-with-yum.tgz /vz/private/50

i am not even starting up the vps. Just create, install using vzyum, and package again.

Thanks.

Re: creating template by tarring an existing vps [message #4717 is a reply to message #4716] Sat, 22 July 2006 09:25 Go to previous messageGo to next message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
Then feel free to just tar VE.
Re: creating template by tarring an existing vps [message #4734 is a reply to message #4713] Mon, 24 July 2006 14:43 Go to previous messageGo to next message
hello-world is currently offline  hello-world
Messages: 30
Registered: June 2006
Member

Hi,

I tarred up the thing and created my own template, but now when i use that template, it says 'unable to get full ostemplatename' and then it fails to set any of the limits properly and teh vps doesn't start. It is possible that i am not doing it right at all, but any help would be apprecieated.

Thanks
Re: creating template by tarring an existing vps [message #4735 is a reply to message #4734] Mon, 24 July 2006 16:03 Go to previous messageGo to next message
hello-world is currently offline  hello-world
Messages: 30
Registered: June 2006
Member

Sorry.

It was all my fault. The thing is openVZ seems to be reusing the conf files of destroyed vpses. There is a file called as 100.conf.destroyed, which contains some parameters. What is this? And why is this used when i create a vps with teh same id?

Thanks.
Re: creating template by tarring an existing vps [message #4745 is a reply to message #4735] Tue, 25 July 2006 06:59 Go to previous message
Vasily Tarasov is currently offline  Vasily Tarasov
Messages: 1345
Registered: January 2006
Senior Member
Quote:

There is a file called as 100.conf.destroyed, which contains some parameters. What is this? And why is this used when i create a vps with teh same id?


This file is created when you destroy VE with appropriate VEID. After that "100.conf.destroyed" is never used! I.e. new config file will be created when you create new VE with the same VEID.
Previous Topic: Problem with Configuration
Next Topic: *SOLVED* arpsend: x.x.x.x is detected on another computer
Goto Forum:
  


Current Time: Thu Jul 18 10:23:57 GMT 2024

Total time taken to generate the page: 0.02572 seconds