Open main menu

OpenVZ Virtuozzo Containers Wiki β

Changes

Ubuntu Precise template creation

44 bytes added, 15:09, 22 July 2014
m
Trusty details moved from bottom to head.
* Templates: Ubuntu 12.04 (Precise Pangolin) and 14.04 (Trusty Tahr).
== Setup variables for 12.04 (Precise Pangolin) ==
ARCH="i386"
export COUNTRY="de"
TMPL="12.04-x86"
 
== Setup variables for 14.04 (Trusty Tahr) ==
 
ARCH="i386"
export DIST="trusty"
export NAME="ubuntu1404"
export COUNTRY="de"
TMPL="14.04-x86"
== Prepare directory ==
apt-get -y install debootstrap
cd /usr/share/debootstrap/scripts && ln -s gutsy trusty && cd -
debootstrap --arch $ARCH $DIST /var/lib/vz/template/$NAME http://$COUNTRY.archive.ubuntu.com/ubuntu
chroot /var/lib/vz/template/$NAME
 
Note: Debootstrap can miss Trusty profile (as in Debian Wheezy), so you should create it manually as seen above.
== Steps in chroot ==
vzctl create $ID --ostemplate ubuntu-12.04-x86 --hostname … --name … --layout simfs
vzctl set $ID --save --onboot yes --nameserver 192.0.2.2 --ipadd 192.0.2.$ID
 
== Trusty notes ==
 
Debootstrap can miss Trusty profile (as in Debian Wheezy), so create it manually (and adopt DIST,NAME,TMPL):
...
export DIST="trusty"
export NAME="ubuntu1404"
TMPL="14.04-x86"
...
apt-get install -y debootstrap
cd /usr/share/debootstrap/scripts && ln -s gutsy trusty
debootstrap ...
12
edits