12
edits
Changes
Disabled services added/fixed.
apt-get -y install debootstrap
cd /usr/share/debootstrap/scripts && ln -s gutsy trusty && cd -
debootstrap --arch $ARCH $DIST /var/lib/vz/template/$NAME -$ARCH http://$COUNTRY.archive.ubuntu.com/ubuntu chroot /var/lib/vz/template/$NAME-$ARCH
Note: Debootstrap can miss Trusty profile (as in Debian Wheezy), so you should create it manually as seen above.
locale-gen ru_RU.UTF-8
locale-gen en_US.UTF-8
echo 'LANG="en_US.UTF-8"' > /etc/default/locale
Configure packages:
echo $NAME > /etc/mailname
echo '
# dma-0.0.2010.xx syntax
SMARTHOST 192.0.2.2
DBOUNCEPROG dbounce-simple-safecat
:
DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends dma bsd-mailx safecat
'''14.04 note:''' config syntax for dma-0.9 was changed:
echo '
# dma-0.9 syntax
SMARTHOST 192.0.2.2
MAILNAME /etc/mailname
' > /etc/dma/dma.conf
Disable hardware-related configs:
:
Cleanup and leave chroot:
apt-get clean
find /var/cache/apt /var/lib/apt/lists -type f -delete
exit
rm -f /var/lib/vz/template/cache/ubuntu-$TMPL.tar.gz &&
tar czf /var/lib/vz/template/cache/ubuntu-$TMPL.tar.gz --numeric-owner -C /var/lib/vz/template/$NAME -$ARCH .
== How to create CT from template ==