Upstart issues

From Linux-VServer

Revision as of 02:36, 16 November 2009 by 95.223.145.189 (Talk)

Jump to: navigation, search

Contents

running an upstart based guest

currently upstart based guests need some manual tweaking to make them work inside a vserver guest.

prepare the host

First of all you need to set the init style of your vserver to plain

# echo plain > /etc/vservers/<vservername>/apps/init/style

remove low level services inside the guest

Then you need to get rid of anything in /etc/init/ that tries to fiddle with your Server's Hardware or other low-level Stuff that's already handled by your host's kernel/system. Having one such scriptlet still enabled might cause the whole upstart system to fail (like not beeing able to open /dev/console or failing to start the udev system). Just remove these scriptlets, move them out of the way or rename them to something not ending in .conf. Be aware that upstart also parses subfolders of /etc/init/ for .conf files.

This is what I deleted on a basic Ubuntu 9.10 guest:

dmesg.conf
hostname.conf
hwclock-save.conf
hwclock.conf
mountall-net.conf
mountall-reboot.conf
mountall-shell.conf
mountall.conf
network-interface.conf
networking.conf
procps.conf
rsyslog-kmsg.conf
tty1.conf
tty2.conf
tty3.conf
tty4.conf
tty5.conf
tty6.conf
upstart-udev-bridge.conf

fake low level events inside the guest

Finally you need to fake emit the events that some of these scripts would do during regular boot. Probably the cleanest approach is to add a scriptlet vserver.conf to /etc/init/ with this content:

start on startup
script
       initctl emit virtual-filesystems
       initctl emit local-filesystems
       initctl emit remote-filesystems
       initctl emit filesystem
end script
Personal tools