Wilhelm Meier | 3 Jan 2006 17:44
Picon

OpenVZ and Gentoo

Hi,

I want to use OpenVZ with Gentoo. I did the install of OpenVZ as described in

http://dev.croup.de/proj/gentoo-vps/wiki

When I try to enter, I get:

gs ~ # vzctl start 2001
Starting VPS ...
VPS is mounted
Setting CPU units: 1000
VPS start in progress...
gs ~ # vzctl status 2001
VPSID 2001 exist mounted running
gs ~ # vzctl enter 2001
Unable to open pty: No such file or directory
enter failed
gs ~ #                        

and

gs ~ # vzctl exec 2001 ps aux
Error, do this: mount -t proc proc /proc
gs ~ # vzctl exec 2001 mount -t proc none /proc
gs ~ # vzctl exec 2001 ps aux
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.1   1368   480 ?        Ss   00:30   0:00 ini
root     22894  0.0  0.3   2372   832 ?        Rs   00:31   0:00 ps aux
gs ~ #    
(Continue reading)

Kirill Korotaev | 4 Jan 2006 04:50
Favicon

OpenVZ and Gentoo

so you run Gentoo inside VPS yeah?
the problem seems to be in your initscripts, which didn't mount /proc on 
VPS start and didn't create /dev/ptyX entries for terminal devices.
Looks like the only process in your VPS is init, strange...

kir <at>  who is in charge of Gentoo will be available after Jan 7 only, but 
I can check what's wrong with your VPS if you provide me the credentials 
in private email.

Kirill

> Hi,
> 
> I want to use OpenVZ with Gentoo. I did the install of OpenVZ as described in
> 
> http://dev.croup.de/proj/gentoo-vps/wiki
> 
> When I try to enter, I get:
> 
> gs ~ # vzctl start 2001
> Starting VPS ...
> VPS is mounted
> Setting CPU units: 1000
> VPS start in progress...
> gs ~ # vzctl status 2001
> VPSID 2001 exist mounted running
> gs ~ # vzctl enter 2001
> Unable to open pty: No such file or directory
> enter failed
> gs ~ #                        
(Continue reading)

Wilhelm Meier | 4 Jan 2006 10:26
Picon

OpenVZ and Gentoo

Am Mittwoch, 4. Januar 2006 09:51 schrieb Kirill Korotaev:
> so you run Gentoo inside VPS yeah?

Well, I try to ...

> the problem seems to be in your initscripts, which didn't mount /proc on
> VPS start and didn't create /dev/ptyX entries for terminal devices.
> Looks like the only process in your VPS is init, strange...

I created the needed /dev/ttyp0 and /dev/ttyp0 by hand 
in /vz/private/≤id>/dev/ and mount also /proc by hand. Then it is possible to 
enter the gentoo-VPS:

gs ~ # vzctl enter 2001
entered into VPS 2001
ovz01 / # ps aux
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.1   1368   480 ?        Ss   17:06   0:00 ini
root     14644  0.0  0.3   1740   780 ?        Ss   17:14   0:00 vzctl: ttyp0
root     15669  0.5  0.5   2244  1288 ttyp0    Ss   17:14   0:00 bash -i
root     15671  0.0  0.3   2376   836 ttyp0    R+   17:14   0:00 ps aux
ovz01 / #      

I also copied /etc/init.d/net.lo to the VPS and some additional scripts, which 
are apparently missing.
But in the gentoo-VPS I get still:

ovz01 / # /etc/init.d/net.venet0 start
 * Starting
 *       no interface module has been loaded
(Continue reading)

Wilhelm Meier | 5 Jan 2006 10:11
Picon

OpenVZ and Gentoo (partly solved)

The network issue is partly solved: I do not use the gentoo net.lo script for 
net.venet0 anymore, instead I setup the interfaces venet0 and venet0:0 with 
the attached workaround-script.

But, how do I bind-mount directories from to host to the VPS, e.g. to 
use /usr/portage in the VPD too. If I try to (on host)

gs ~ # mount /usr/portage /vz/private/2001/usr/portage/ -o bind,ro    

I get

ovz01 usr # ls
bin  i386-pc-linux-gnu  include  lib  libexec  local  portage  sbin  share  
src  tmp
ovz01 usr # ls portage
ovz01 usr #   

on the VPS ovz01. Whats wrong?

- Wilhelm

Am Mittwoch, 4. Januar 2006 17:28 schrieb Wilhelm Meier:
> Am Mittwoch, 4. Januar 2006 09:51 schrieb Kirill Korotaev:
> > so you run Gentoo inside VPS yeah?
>
> Well, I try to ...
>
> > the problem seems to be in your initscripts, which didn't mount /proc on
> > VPS start and didn't create /dev/ptyX entries for terminal devices.
> > Looks like the only process in your VPS is init, strange...
(Continue reading)

Kirill Korotaev | 5 Jan 2006 10:25
Picon

OpenVZ and Gentoo (partly solved)

> The network issue is partly solved: I do not use the gentoo net.lo script for 
> net.venet0 anymore, instead I setup the interfaces venet0 and venet0:0 with 
> the attached workaround-script.
> 
> But, how do I bind-mount directories from to host to the VPS, e.g. to 
> use /usr/portage in the VPD too. If I try to (on host)
> 
> gs ~ # mount /usr/portage /vz/private/2001/usr/portage/ -o bind,ro    
try /vz/root/2001/usr/portage after VPS is mounted.

> I get
> 
> ovz01 usr # ls
> bin  i386-pc-linux-gnu  include  lib  libexec  local  portage  sbin  share  
> src  tmp
> ovz01 usr # ls portage
> ovz01 usr #   
> 
> on the VPS ovz01. Whats wrong?
> 
> - Wilhelm
> 
> Am Mittwoch, 4. Januar 2006 17:28 schrieb Wilhelm Meier:
> 
>>Am Mittwoch, 4. Januar 2006 09:51 schrieb Kirill Korotaev:
>>
>>>so you run Gentoo inside VPS yeah?
>>
>>Well, I try to ...
>>
(Continue reading)

Wilhelm Meier | 5 Jan 2006 11:21
Picon

OpenVZ and Gentoo (partly solved)

Am Donnerstag, 5. Januar 2006 15:25 schrieb Kirill Korotaev:
> > The network issue is partly solved: I do not use the gentoo net.lo script
> > for net.venet0 anymore, instead I setup the interfaces venet0 and
> > venet0:0 with the attached workaround-script.
> >
> > But, how do I bind-mount directories from to host to the VPS, e.g. to
> > use /usr/portage in the VPD too. If I try to (on host)
> >
> > gs ~ # mount /usr/portage /vz/private/2001/usr/portage/ -o bind,ro
>
> try /vz/root/2001/usr/portage after VPS is mounted.

does not solve the problem.

on host:

gs ~ # vzctl mount 2001
VPS is mounted
gs ~ # mount /usr/portage /vz/root/2001/usr/portage -o bind,ro
gs ~ # mount
/dev/hda1 on / type ext3 (rw,noatime)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
udev on /dev type tmpfs (rw,nosuid)
devpts on /dev/pts type devpts (rw)
/dev/hdb1 on /tftproot type ext3 (rw,noatime)
shm on /dev/shm type tmpfs (rw,noexec,nosuid,nodev)
192.168.39.1:/home/lmeier on /root/lmeier type nfs (rw,addr=192.168.39.1)
none on proc type proc (rw)
/usr/portage on /vz/root/2001/usr/portage type none (ro,bind)
(Continue reading)

Kirill Korotaev | 5 Jan 2006 11:38
Favicon

OpenVZ and Gentoo (partly solved)

can you give me an access? it will be much faster...
if so, send me a private mail with login please.

Kirill

> Am Donnerstag, 5. Januar 2006 15:25 schrieb Kirill Korotaev:
> 
>>>The network issue is partly solved: I do not use the gentoo net.lo script
>>>for net.venet0 anymore, instead I setup the interfaces venet0 and
>>>venet0:0 with the attached workaround-script.
>>>
>>>But, how do I bind-mount directories from to host to the VPS, e.g. to
>>>use /usr/portage in the VPD too. If I try to (on host)
>>>
>>>gs ~ # mount /usr/portage /vz/private/2001/usr/portage/ -o bind,ro
>>
>>try /vz/root/2001/usr/portage after VPS is mounted.
> 
> 
> does not solve the problem.
> 
> on host:
> 
> gs ~ # vzctl mount 2001
> VPS is mounted
> gs ~ # mount /usr/portage /vz/root/2001/usr/portage -o bind,ro
> gs ~ # mount
> /dev/hda1 on / type ext3 (rw,noatime)
> proc on /proc type proc (rw)
> sysfs on /sys type sysfs (rw)
(Continue reading)

Kirill Korotaev | 5 Jan 2006 11:56
Picon

OpenVZ and Gentoo (partly solved)

sure! it's ok.
I asked one guy to check it. it should work.

Kirill

>>can you give me an access? it will be much faster...
>>if so, send me a private mail with login please.
> 
> 
> Sorry, thats not possible ...
> 
> 
>>Kirill
>>
>>
>>>Am Donnerstag, 5. Januar 2006 15:25 schrieb Kirill Korotaev:
>>>
>>>>>The network issue is partly solved: I do not use the gentoo net.lo
>>>>>script for net.venet0 anymore, instead I setup the interfaces venet0
>>>>>and venet0:0 with the attached workaround-script.
>>>>>
>>>>>But, how do I bind-mount directories from to host to the VPS, e.g. to
>>>>>use /usr/portage in the VPD too. If I try to (on host)
>>>>>
>>>>>gs ~ # mount /usr/portage /vz/private/2001/usr/portage/ -o bind,ro
>>>>
>>>>try /vz/root/2001/usr/portage after VPS is mounted.
>>>
>>>does not solve the problem.
>>>
(Continue reading)

Kirill Korotaev | 5 Jan 2006 12:15
Picon

OpenVZ and Gentoo (partly solved)

found it!
you need to start VPS and then do bind mount, since vzctl redo mounts on 
VPS start, so my 1st proposal for you was wrong. sorry :)
the best way you can do it actually is to insert your special mounts in 
VPS mount script which will be automatically run on VPS start.
Please note, on 2.6.8 kernel bind mount is still rw :(

Kirill

> Am Donnerstag, 5. Januar 2006 16:27 schrieb Kirill Korotaev:
> 
>>can you give me an access? it will be much faster...
>>if so, send me a private mail with login please.
> 
> 
> Sorry, thats not possible ...
> 
> 
>>Kirill
>>
>>
>>>Am Donnerstag, 5. Januar 2006 15:25 schrieb Kirill Korotaev:
>>>
>>>>>The network issue is partly solved: I do not use the gentoo net.lo
>>>>>script for net.venet0 anymore, instead I setup the interfaces venet0
>>>>>and venet0:0 with the attached workaround-script.
>>>>>
>>>>>But, how do I bind-mount directories from to host to the VPS, e.g. to
>>>>>use /usr/portage in the VPD too. If I try to (on host)
>>>>>
(Continue reading)

Wilhelm Meier | 5 Jan 2006 12:25
Picon

OpenVZ and Gentoo (partly solved)

Am Donnerstag, 5. Januar 2006 17:15 schrieb Kirill Korotaev:
> found it!
> you need to start VPS and then do bind mount, since vzctl redo mounts on
> VPS start, so my 1st proposal for you was wrong. sorry :)

no problem. It tried it already, and now I get "permissin denied" if I try to 
access the directory from inside the VPS.

> the best way you can do it actually is to insert your special mounts in
> VPS mount script which will be automatically run on VPS start.

This must be done on the host. Is there a possibility to execute scripts by 
vzctl start?

> Please note, on 2.6.8 kernel bind mount is still rw :(

o.k.

>
> Kirill
>
> > Am Donnerstag, 5. Januar 2006 16:27 schrieb Kirill Korotaev:
> >>can you give me an access? it will be much faster...
> >>if so, send me a private mail with login please.
> >
> > Sorry, thats not possible ...
> >
> >>Kirill
> >>
> >>>Am Donnerstag, 5. Januar 2006 15:25 schrieb Kirill Korotaev:
(Continue reading)


Gmane