OpenVZ Forum


Home » General » Support » Ubuntu 10.04 precreated template (Lacks of some patch to work)
Ubuntu 10.04 precreated template [message #41074] Fri, 12 November 2010 21:36
narcisgarcia is currently offline  narcisgarcia
Messages: 41
Registered: May 2009
Member
(I cannot publish my email in bugzilla)

Ubuntu 10.04 templates lack of bodhi.zazen's patch for upstart. It's a simple text file saved as /vz/private/777/etc/init/openvz.conf and with the following content. Without this, on container upgrade networking is lost:

# OpenVZ - Fix init sequence to have OpenVZ working with upstart

description "Fix OpenVZ"

start on startup

task
pre-start script
mount -t devpts devpts /dev/pts
mount -t tmpfs varrun /var/run
mount -t tmpfs varlock /var/lock
mkdir -p /var/run/network
if [ ! -e /etc/mtab ]; then
cat /proc/mounts > /etc/mtab
fi
touch /var/run/utmp
chmod 664 /var/run/utmp
chown root.utmp /var/run/utmp
if [ "$(find /etc/network/ -name upstart -type f)" ]; then
chmod -x /etc/network/*/upstart || true
fi
end script

script
start networking
initctl emit filesystem --no-wait
initctl emit local-filesystems --no-wait
initctl emit virtual-filesystems --no-wait
init 2
end script


Also is necessary to put upstart, mountall and ifupdown on hold:

echo "mountall hold" | dpkg --set-selections
echo "upstart hold" | dpkg --set-selections
echo "ifupdown hold" | dpkg --set-selections



Narcis Garcia
 
Read Message
Previous Topic: Re: kernel security issue on RHEL5 x86_64
Next Topic: cannot find FAIR cpu scheduler in kernel
Goto Forum:
  


Current Time: Mon Sep 16 16:14:14 GMT 2024

Total time taken to generate the page: 0.04797 seconds