(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