OpenVZ Forum


Home » General » Support » OS template creation
OS template creation [message #14272] Thu, 21 June 2007 07:51 Go to next message
jmelyn is currently offline  jmelyn
Messages: 27
Registered: June 2007
Junior Member
Hi there,

I've discovered OpenVZ and I've just tested it. Well, not yet confident in the way to make it working. I have few questions, surely obvious for most of you:

* At the present moment, is it better to have a host OS limited to 32 bit or 64 bit OS works fine?

* In case of 32 bit host OS, can I have VEs using 64 bit templates? And the other way: 64 bit host OS with 32 bit VEs?

* I'd like to have VEs using SLC4 (Scientific Linux CERN 4) based on RHEL4 (working with RPM and YUM). There is of course no template created yet, so I have to create one. Did not found any good explanation of what and how to do that job, just tricks and recipes. Maybe I'm a bit limited Sad .

For the last point, can someone give me the way to create a template from scratch? Maybe just the address of a good paper. If there is no and I succeed in setting everything up and running, I can write some wiki for newbies (OpenVZ for dummies Razz )
Re: OS template creation [message #14274 is a reply to message #14272] Thu, 21 June 2007 10:08 Go to previous messageGo to next message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

jmelyn wrote on Thu, 21 June 2007 11:51

* At the present moment, is it better to have a host OS limited to 32 bit or 64 bit OS works fine?


64 bit OS works fine, but template tools are limited to 32-bit. That means you have to create 64-bit template in a more manual fashion.

Quote:

* In case of 32 bit host OS, can I have VEs using 64 bit templates? And the other way: 64 bit host OS with 32 bit VEs?


64 bit host OS handles 32 bit VEs just fine -- but not the other way!

Quote:

* I'd like to have VEs using SLC4 (Scientific Linux CERN 4) based on RHEL4 (working with RPM and YUM). There is of course no template created yet, so I have to create one. Did not found any good explanation of what and how to do that job, just tricks and recipes. Maybe I'm a bit limited Sad .


If for 32 bit, start from learning what vztmpl-centos-4 consists of (that all should be pretty straightforward), then modify it to use SLC repositories, then run vzpkgcache to create SLC templates. Any questions -- ask here.


Kir Kolyshkin
http://static.openvz.org/userbars/openvz-developer.png
Re: OS template creation [message #14286 is a reply to message #14274] Thu, 21 June 2007 14:54 Go to previous messageGo to next message
jmelyn is currently offline  jmelyn
Messages: 27
Registered: June 2007
Junior Member
Fine! Thank you for your comments, kir Smile. Now just three specific questions about dir and files:

* Are the files *.list in config dir just the list returned by rpm -qa on the OS that has to become a VE?

* Are the names of the different *.list files used as <os_name> when creating a new VE: vzctl create 101 --ostemplate <os_name> ...?

* Do I need a vz-addons dir? What is it used for?

[Updated on: Thu, 21 June 2007 14:56]

Report message to a moderator

Re: OS template creation [message #14289 is a reply to message #14286] Thu, 21 June 2007 15:04 Go to previous messageGo to next message
sspt is currently offline  sspt
Messages: 100
Registered: August 2006
Location: Portugal
Senior Member
jmelyn



* Are the files *.list in config dir just the list returned by rpm -qa on the OS that has to become a VE?


Those files are the 'base' rpms you want to install
Yum will install these packages and it's dependencies

jmelyn


* Are the names of the different *.list files used as <os_name> when creating a new VE: vzctl create --ostemplate <os_name> ...?



/vz/template/$os/$ver/$arch/config/$xxxx.list
vzctl create 10001 --ostemplate $os-$ver-$arch-$xxxx

E.g.
/vz/template/cern/4/i386/config/minimal.list
vzctl create 10001 --ostemplate cern-4-i386-minimal

jmelyn


* Do I need a vz-addons dir? What is it used for?

Yes, you'll need the makedev, vzdev since it'll create your vps devices /dev/ (udev don't work inside a VE)


http://static.openvz.org/userbars/openvz-user.png
Re: OS template creation [message #14290 is a reply to message #14289] Thu, 21 June 2007 15:06 Go to previous messageGo to next message
sspt is currently offline  sspt
Messages: 100
Registered: August 2006
Location: Portugal
Senior Member
For cern 4.5 you can use CentOS 4 metadata with the following yum.conf based on centOS 4 yum.conf
[main]
cachedir=/vz/template/cern/4/i386/yum-cache/
# Ugly hack to make yum disregard /etc/yum.repos.d/*repo files
# from both the host system and from inside VPS
reposdir=/dev/null
# Fix for bug #78 - we do not want to install dummy,
# we want to upgrade it.
installonlypkgs=''

[cern4-vz-addons]
name=OpenVZ add-ons for Cern 4 - i386
baseurl=file:///vz/template/cern/4/i386/vz-addons/
enabled=1
gpgcheck=0

[cern4-base]
name=Cern 4 - i386 - Base
baseurl=ftp://linuxsoft.cern.ch/cern/slc44/i386/yum/os
enabled=1
gpgcheck=1

[cern4-updates-released]
name=Cern 4 - i386 - Released Updates
baseurl=ftp://linuxsoft.cern.ch/cern/slc44/i386/yum/updates
enabled=1
gpgcheck=1



http://static.openvz.org/userbars/openvz-user.png

[Updated on: Thu, 21 June 2007 15:06]

Report message to a moderator

Re: OS template creation [message #14312 is a reply to message #14290] Fri, 22 June 2007 07:06 Go to previous messageGo to next message
jmelyn is currently offline  jmelyn
Messages: 27
Registered: June 2007
Junior Member
Thanx for the information, sspt.

* *.list in config dir: If I want to create my own template of Scientific Linux, I should put only the base package list (.rpm) so that I get all of them at the end of VE's installation. But I don't know how to get them (only the base ones), so I suppose providing all (about 1000!) won't be an error.

* yum.conf: I modified the file from the centos-4 template and got roughly the one you gave me. I'm in the right direction Smile.

* vz-addons: I don't understand yet the use of those files, but you told me that to access its own private files, a VE needs them. In order to create the Scientific Linux template from CentOS, should I change them or just make a simple copy? Because there is a dummy-centos-4-1.0-3.swsoft.i386.rpm file that must be specific to CentOS... Maybe I can change the name to dummy-SLC4.swsoft.i386.rpm?
Re: OS template creation [message #14323 is a reply to message #14312] Fri, 22 June 2007 11:26 Go to previous message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

No need to change the name -- dummy-centos4 should be fine.

Kir Kolyshkin
http://static.openvz.org/userbars/openvz-developer.png
Previous Topic: *CONTRIB* vztmpl for FC6,7 inside
Next Topic: *RESOLVED* iptables
Goto Forum:
  


Current Time: Sun Aug 11 10:28:44 GMT 2024

Total time taken to generate the page: 0.02951 seconds