OpenVZ Forum


Home » General » Support » Red Hat Linux 8 Template or Metadata?
Re: Red Hat Linux 8 Template or Metadata? [message #2186 is a reply to message #2185] Fri, 24 March 2006 08:27 Go to previous messageGo to previous message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

Yes, it is possible to create a template or a VPS from any Linux distro. Basically, the only requirements are it should be compatible with kernel 2.6, and boot scripts should work without console (say, in SUSE you have to comment out one line in /sbin/rc script). Some distros (SUSE again) also require sysfs support (networking won't start without /sys); as sysfs is quite resource hungry, it is currently only turned on for suse unconditionally.

A template can be created from a VPS by just tarring its private area, like that:
vzctl stop 456
cd /vz/private/456
tar czf /vz/template/distroname-version-arch.tar.gz .


Note that vzctl has a number of configs scripts to support different distros (in /etc/sysconfig/vz-scripts/dists) -- this is mostly for networking configuration inside a VPS. Thus, vzctl has to know what distro it is; so you should name your template cache file (the tarball) accordingly (say, "slackware-..."). In case you use a distro with quite a different networking setup inside, you have to create your own script (or file a bug).

Speaking of metadata, now it can be created only for distros that have yum-enabled repository of packages. So, you are unlucky with RHL8; still if you put all the packages to some place and run createrepo on that, you already have a repository and thus can try to create metadata for RHL8. There is no much documentation on it -- so just look at the metadata for some other distro and use it as a template/example. It is not that complex as it seems to be, if you know yum a bit and some shell scripting (there a a few small scripts in metadata, to do some little pre- and post-install tricks).


Kir Kolyshkin
http://static.openvz.org/userbars/openvz-developer.png
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: *SOLVED* VPS automatic reboot at 4:30 a.m.???
Next Topic: Split a server into security units - what is the best way?
Goto Forum:
  


Current Time: Wed Sep 11 11:10:26 GMT 2024

Total time taken to generate the page: 0.05484 seconds