Installing Ubuntu 10.10 Maverick as guest

From Linux-VServer

Revision as of 04:15, 21 April 2011 by Alberts (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


NOTE: This was done on a CentOS 5.5 host; however, I believe none of these instructions are dependent on the host OS.

Installing Ubuntu 10.10 Maverick as a guest


Use the latest debootstrap package

echo '' > \

Create the new guest

vserver <guest name> build -m debootstrap --context <context #> \
--hostname <hostname> --force --interface eth0:<ipaddress>/<netmask> \
-- -d maverick -m \
-- --arch=amd64 --exclude=udev --initstyle default

Update guest fstab

Add the following to /etc/vservers/<guestname>/fstab

none    /var/run        tmpfs   size=16m,nosuid,mode=0755       0 0
none    /var/lock       tmpfs   size=16m,noexec,nosuid,nodev    0 0

Service Cleanup

Remove Upstart services that aren't needed in a guest

 for x in console-setup.conf 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 \
plymouth*.conf udev*.conf ureadahead*.conf control-alt-delete.conf module-init-tools.conf mounted-dev.conf \
network-interface-security.conf; do rm -f /vservers/<guestname>/etc/init/${x}; done

Upstart script

Put the following in /vservers/mschef03/etc/init/vserver.conf

start on startup
      touch /var/run/utmp
      chown root:utmp /var/run/utmp
      chmod 664 /var/run/utmp
      initctl emit virtual-filesystems --no-wait
      initctl emit local-filesystems --no-wait
      initctl emit remote-filesystems --no-wait
      initctl emit filesystem --no-wait
end script

Start your guest

That's it. Now just

vserver <guestname> start.
Personal tools