OpenVZ Forum


Home » General » Support » creating a centos-5 os-template...
creating a centos-5 os-template... [message #31433] Mon, 30 June 2008 10:21 Go to next message
Rene is currently offline  Rene
Messages: 40
Registered: September 2006
Member
From: *147.32-78.tttmaxnet.com
I've been following the howto explained in "Re: Patch to turn a centos-4 metadata into a centos-5 version", i.e. essentially just downloaded and installed vztmpl-centos-5-2.0-3.i386.rpm, then ran vzpkgcache. This ran ok for a while, downloading a pile of rpms all without errors until in the end I get this error:

Complete!
sed: can't read /etc/init.d/syslog: No such file or directory
ERROR: Script install-post failed

What's going wrong, what am I missing?

Kernel 2.6.18-53.1.19.el5.028stab053.14
Re: creating a centos-5 os-template... [message #31460 is a reply to message #31433] Tue, 01 July 2008 07:03 Go to previous messageGo to next message
maratrus is currently offline  maratrus
Messages: 1495
Registered: August 2007
Location: Moscow
Senior Member
From: *sw.ru
Hi,

where have you downloaded vztmpl-centos-5-2.0-3.i386.rpm?
Re: creating a centos-5 os-template... [message #31484 is a reply to message #31460] Tue, 01 July 2008 13:31 Go to previous messageGo to next message
sliqua is currently offline  sliqua
Messages: 1
Registered: July 2008
Junior Member
From: *sliqua.com
I'm actually having the same problem occurring. This comes up after running the setx86_64 script found on the wiki for installing on x86_64 systems.
Re: creating a centos-5 os-template... [message #31495 is a reply to message #31433] Tue, 01 July 2008 23:25 Go to previous messageGo to next message
dowdle is currently offline  dowdle
Messages: 261
Registered: December 2005
Location: Bozeman, Montana
Senior Member
From: *coe.montana.edu
I think vzyum and vzpkgcache are flat broken in CentOS 5/x86_64 systems. I've been able to build a CentOS 5 OS Template with vzpkgcache on CentOS 4 i386 hosts.

I'd recommend you just use a pre-created CentOS 5 OS template (I uploaded fairly recent ones based on CentOS 5.2 that include yum installed to the contrib area) or build them (with the tmpl package you found in the forum) on CentoS 4 i386 host nodes.

Once you have an OS Template you are happy with, you can easily create newer, fresher OS Templates out of it. Just make a container, upgrade the container, stop the container, clean up container specific files (/etc/resolv.conf, /etc/hosts, ssh keys, temp files, logs, etc), and then tar -cvzf the private dir up to make a new OS Template.


--
TYL, Scott Dowdle
Belgrade, Montana, USA
Re: creating a centos-5 os-template... [message #31728 is a reply to message #31433] Tue, 08 July 2008 04:50 Go to previous messageGo to next message
wizap is currently offline  wizap
Messages: 1
Registered: July 2008
Junior Member
From: *hsd1.ga.comcast.net
I got it to work editing "/vz/template/centos/5/x86_64/config/install-post" and set syslog and syslog.conf sed replacements with exit status of "0":

http://www.linuxweblog.com/blogs/sandip/20080708/openvz-cent os-template-cache-creation-with-vzpkgcache
Re: creating a centos-5 os-template... [message #31855 is a reply to message #31433] Fri, 11 July 2008 06:22 Go to previous message
steve is currently offline  steve
Messages: 25
Registered: June 2007
Location: Orange County, California
Junior Member
From: *dsl.lsan03.pacbell.net
madsere-

Following Fedora's lead (F8) with CentOS 5.2 rsyslogd has become the default replacing sysklogd. As such you can comment out/change the following sections from /vz/template/centos/5/i386/config/install.post:


The following is no longer required as there is no separate klogd daemon in rsyslog:
# Disable klogd
#$VZCTL exec2 $VEID \
#       "sed -i -e 's/daemon\\ klogd/passed\\ klogd\\ skipped/' \
#               -e 's/killproc\\ klogd/passed\\ klogd\\ skipped/' \
#                       /etc/init.d/syslog"
# FIXME: fix '/etc/init.d/syslog status' to return 0
# even if klogd is not running

Change the /etc/syslog.conf to /etc/rsyslog.conf in the following area of the file:
# Disable fsync() in syslog
$VZCTL exec2 $VEID \
       'sed -i -e s@\\\([[:space:]]\\\)\\\(/var/log/\\\)@\\\1-\\\2@' \
               /etc/rsyslog.conf

Now your templates should build perfectly.
Previous Topic: iptables help please
Next Topic: Handling resources for several VPS
Goto Forum:
  


Current Time: Tue Jul 16 06:43:58 GMT 2019