*SOLVED* Trying to create an ubuntu-edgy template. [message #7308] |
Wed, 11 October 2006 01:49 |
frenchyp
Messages: 7 Registered: October 2006
|
Junior Member |
|
|
Hello OpenVZ community.
My goal is to create an ubuntu-edgy template for openvz.
This is how I proceed:
I use the ubuntu template provided on the openvz wiki.
I enable the repositories for testing, and run apt-get dist-upgrade.
I create the template by removing all the extra information (hostname, IP, history..) and tarring the /vz/private/VEID directory into an archive in /vz/template/cache.
I am then able to create other VPSes using this template and the vzctl create VEID .. command.
The VPS gets installed and starts normally, but I am then facing some issues:
First was that the network was down on bootup. I looked into the /etc/vz/dist/scripts files and it appears that in the debian-add-ip.sh (which this template is using), the ifup -a command is ineffective.
However I was able to fix that by adding /sbin/ifup -a in the /etc/rc.local file. Despite being totally inelegant it works. It makes me think that the starting script is trying to run this command too early during the boot process.
The second issue is that I can't get sshd to start on bootup.
I checked that the symlink to /etc/init.d/ssh was in my /etc/rc<runlevel>.d,
I tried to run it after rc.local,
I tried to add the /etc/init.d/ssh start command to rc.local after the ifup -a,
but I can't get sshd to start on boot.
If I enter the VPS and attempt to start it, it runs without any problem.
Does anyone have any idea on this issue? comments?
Thank you very much for your time and help.
[Updated on: Sat, 14 October 2006 06:31] by Moderator Report message to a moderator
|
|
|
|
|
|
|
|
|
|
Re: *SOLVED* Trying to create an ubuntu-edgy template. [message #9239 is a reply to message #7308] |
Fri, 22 December 2006 14:52 |
stec
Messages: 9 Registered: December 2006
|
Junior Member |
|
|
I just got it work, applying a very small patch on the /etc/init.d/rc script that avoid output to go to /dev/console (that is obviously not a good idea in a VE.)
To patch /etc/init.d/rc, just add comments as shown here, so QUIET is always yes:
#if grep -w -q quiet /proc/cmdline 2>/dev/null; then
QUIET=yes
#else
# QUIET=no
#fi
Duno why this is an issue, but later in the script, if QUIET=no, an stty command has been changed compare to dapper:
dapper: (no condition) stty onlcr 0>&1
edgy: stty onlcr </dev/console >/dev/console 2>&1
This seems to make the rc script abord and produce the init error: no more processes left in this runlevel.
[Updated on: Fri, 22 December 2006 14:55] Report message to a moderator
|
|
|
|
|