Difference between revisions of "Ubuntu Trusty template creation"

From OpenVZ Virtuozzo Containers Wiki
Jump to: navigation, search
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
[[Category: HOWTO]]
+
[[Category:HOWTO]]
[[Category: Templates]]
+
[[Category:Templates]]
[[Category: Ubuntu]]
+
[[Category:Ubuntu]]
  
 
worked for me with a beta release of ubuntu 14.04. used part of the 12.04 howto as a guidline.
 
worked for me with a beta release of ubuntu 14.04. used part of the 12.04 howto as a guidline.
Line 11: Line 11:
 
'''howto:'''
 
'''howto:'''
  
<code>
+
<code>debootstrap --arch amd64 trusty /vz/private/2111 ftp://ftp.ubuntu.com/ubuntu
debootstrap --arch amd64 trusty /vz/private/2111 ftp://ftp.ubuntu.com/ubuntu
 
  
vzctl set 2111 --applyconfig basic --save  
+
vzctl set 2111 --applyconfig basic --save  
  
vzctl set 2111 --ostemplate ubuntu-12.04-x86_64 --save  
+
vzctl set 2111 --ostemplate ubuntu-14.04-x86_64 --save  
  
vzctl set 2111 --ipadd x.x.x.x --name trusty --hostname trusty.test.intern --save  
+
vzctl set 2111 --ipadd x.x.x.x --name trusty --hostname trusty.test.intern --save  
  
vzctl start 2111
+
vzctl start 2111
  
apt-get update
+
apt-get update
  
apt-get install vim
+
apt-get install vim
  
apt-get remove ntpdate
+
apt-get remove ntpdate
 +
</code>
  
</code>
 
 
add to the start of init script /etc/init.d/ondemad
 
add to the start of init script /etc/init.d/ondemad
  

Latest revision as of 14:21, 2 November 2016


worked for me with a beta release of ubuntu 14.04. used part of the 12.04 howto as a guidline.

I debootstrapped trusty on another ubuntu box before copying it to a CentOS HN. the debootstrap-script on CentOS didn't work for 14.04

please append/edit if you feel i missed something

howto:

debootstrap --arch amd64 trusty /vz/private/2111 ftp://ftp.ubuntu.com/ubuntu

vzctl set 2111 --applyconfig basic --save

vzctl set 2111 --ostemplate ubuntu-14.04-x86_64 --save

vzctl set 2111 --ipadd x.x.x.x --name trusty --hostname trusty.test.intern --save

vzctl start 2111

apt-get update

apt-get install vim

apt-get remove ntpdate

add to the start of init script /etc/init.d/ondemad

[ ! -f /etc/init/lxc-android-config.conf ] || exit 0
[ -d /proc/vz ] && [ ! -d /proc/bc ] && exit 0

or simply "exit 0"


fix rsyslog

sed -i -e 's/^\$ModLoad imklog/#\$ModLoad imklog/g' /etc/rsyslog.conf

disable sync

sed -i -e 's@\(space:\)\(/var/log/\)@\1-\2@' /etc/rsyslog.d/*.conf

delete unneeded init-jobs

rm -f /etc/init/console* /etc/init/tty*

comment the following lines in /etc/init/rc.conf

console output

env INIT_VERBOSE

change /etc/apt/sources.list to something like

deb http://archive.ubuntu.com/ubuntu trusty main universe multiverse

deb http://archive.ubuntu.com/ubuntu trusty-security main universe multiverse