Problems with Gentoo template creation [message #5059] |
Wed, 09 August 2006 15:54 |
Ronald Tanner
Messages: 8 Registered: August 2006
|
Junior Member |
|
|
Hi
On a Gentoo/OpenVZ system with kernel 2.6.16-026test015 I created a
gentoo template by following the instructions on
http://wiki.openvz.org/Gentoo_template_creation
I am now encountering several problems with the VPS
that are created using this template
I cannot find the "random" devices that are needed for example
to generate the host key for ssh. The problem is maybe somehow
related with the link of /etc/mtab -> /proc/mounts.
After removing the link and adding the following
line into /etc/mtab on the VPS:
proc /proc proc rw 0 0
at least the device urandom exists and I am able to create the
host keys. But now I cannot ping the VPS:
VPSID NPROC STATUS IP_ADDR HOSTNAME
500 3 running 10.0.186.10 -
ping 10.0.186.10 (no answer)
entering works:
vzctl enter 500
Thanks for any help.
Ronald
|
|
|
|
|
Re: Problems with Gentoo template creation [message #5066 is a reply to message #5064] |
Thu, 10 August 2006 08:21 |
|
Ronald Tanner wrote:
> No problem, I can create these devices.
> However after a reboot they are lost because /dev is mounted
> on tmpfs and gentoo uses udev.
>
Can you make it NOT use udev? The thing is udev is really useless in a VE.
Probably setting RC_DEVICES="static" in /etc/conf.d/rc helps.
> Besides: do you have any idea why I have to set the routes
>
> /sbin/route add -net 191.255.255.1 netmask 255.255.255.255 dev venet0
> /sbin/route add default gw 191.255.255.1
>
> on the VE by hand to get the net working?
>
This is a trick to have everything routed to venet0. To set it
automatically (by vzctl) you have to name your template
gentoo-(something), so vzctl will guess this is gentoo (by looking at
the value of OSTEMPLATE in /etc/vz/conf/NNN.conf) and will apply the
appropriate scripts when doing vzctl set NNN --ipadd --save
Can you try this instead:
/sbin/route add default dev venet0
and check if it will work for you?
|
|
|
|
Re: Problems with Gentoo template creation [message #5068 is a reply to message #5067] |
Thu, 10 August 2006 12:20 |
|
Ronald Tanner wrote:
> Thanks. Setting RC_DEVICES to static on the gentoo VE seems to fix
> the dev problem.
>
Can you put this finding (as well as anything else you found) to the
appropriate wiki page?
> I am currently not able to check the routing as I must rebuild
> the kernel to include iptables. We want to use NAT for our VEs.
>
> I will come back.
> Ronald
>
> Kir Kolyshkin wrote:
>
>> Ronald Tanner wrote:
>>
>>> No problem, I can create these devices.
>>> However after a reboot they are lost because /dev is mounted
>>> on tmpfs and gentoo uses udev.
>>>
>>>
>> Can you make it NOT use udev? The thing is udev is really useless in a VE.
>> Probably setting RC_DEVICES="static" in /etc/conf.d/rc helps.
>>
>>> Besides: do you have any idea why I have to set the routes
>>>
>>> /sbin/route add -net 191.255.255.1 netmask 255.255.255.255 dev venet0
>>> /sbin/route add default gw 191.255.255.1
>>>
>>> on the VE by hand to get the net working?
>>>
>>>
>> This is a trick to have everything routed to venet0. To set it
>> automatically (by vzctl) you have to name your template
>> gentoo-(something), so vzctl will guess this is gentoo (by looking at
>> the value of OSTEMPLATE in /etc/vz/conf/NNN.conf) and will apply the
>> appropriate scripts when doing vzctl set NNN --ipadd --save
>>
>> Can you try this instead:
>> /sbin/route add default dev venet0
>> and check if it will work for you?
>>
>
|
|
|
|
|
Re: Problems with Gentoo template creation [message #5111 is a reply to message #5099] |
Fri, 11 August 2006 16:31 |
|
Ronald Tanner wrote:
> And there is another step in the preparation of the os template which
> needs some explanation. Why do I have to replace /etc/mtab with
> a link to /proc/mounts?
This is because VE root filesystem is mounted by the host system, not
the guest -- and therefore root fs will not appear in /etc/mtab. It will
lead to df command non-working.
If you will replace /etc/mtab with a symlink to /proc/mounts, you will
always have up-to-date information of what is mounted in /etc/mtab.
|
|
|
Re: Problems with Gentoo template creation [message #5140 is a reply to message #5111] |
Tue, 15 August 2006 07:45 |
Ronald Tanner
Messages: 8 Registered: August 2006
|
Junior Member |
|
|
Thanks. I have just updated the wiki page
http://wiki.openvz.org/Gentoo_template_creation
with your comments.
one last (?) question remains:
Don't you think that the steps described in "Set up udev"
http://wiki.openvz.org/Gentoo_template_creation#Set_up_udev
are obsolete when RC_DEVICES is set to "static" in /etc/conf.d/rc?
Regards
Ronald
Kir Kolyshkin wrote:
> Ronald Tanner wrote:
>> And there is another step in the preparation of the os template which
>> needs some explanation. Why do I have to replace /etc/mtab with
>> a link to /proc/mounts?
> This is because VE root filesystem is mounted by the host system, not
> the guest -- and therefore root fs will not appear in /etc/mtab. It will
> lead to df command non-working.
>
> If you will replace /etc/mtab with a symlink to /proc/mounts, you will
> always have up-to-date information of what is mounted in /etc/mtab.
--
Ronald Tanner
SEMAFOR Informatik & Energie AG tel. +41 61 690 9888
Sperrstrasse 104B fax. +41 61 690 9880
CH 4057 Basel Switzerland mailto:tanner@semafor.ch
|
|
|