OpenVZ Forum - RDF feed
type: channel
items: Re: OpenVZ and Gentoo (partly solved)
items: Re: Re: OpenVZ and Gentoo (partly solved)

Re: OpenVZ and Gentoo (partly solved)
type: item
description: 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) >>>>> >>>>>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) >>>gs ~ # >>> >>>in the VPS: >>> >>>ovz01 usr # ls >>>bin include libexec portage sbin src >>>i386-pc-linux-gnu lib local portage.vps share tmp >>>ovz01 usr # ls -l portage >>>total 0 >>>ovz01 usr # >>> >>> >>>>>I get >>>>> >>>>>ovz01 usr # ls …
creator: dev
date: 2006-01-05T16:15:56-00:00

Re: OpenVZ and Gentoo (partly solved)
type: item
description: 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: > >>>>>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,a…
creator: wimalopaan
date: 2006-01-05T16:25:57-00:00

Re: OpenVZ and Gentoo (partly solved)
type: item
description: >>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. huh... what file permisions do you have in /usr/portage? please, note, that UIDs can be different in VPS and host system. Also please check cat /proc/sys/fs/ve-area-access-check if it is non-zero value, then echo 0 to it. This check makes sure that your VPS has no access to trusted data or host system don't access to untrusted one. Just disable it as we did in recent kernel by default. >>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? yes. see scripts in /etc/sysconfig/vz-scripts >>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: >>>>> >>>>>>>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/r…
creator: dev
date: 2006-01-05T16:31:48-00:00

Re: OpenVZ and Gentoo (partly solved)
type: item
description: Am Donnerstag, 5. Januar 2006 17:31 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. > > huh... what file permisions do you have in /usr/portage? > please, note, that UIDs can be different in VPS and host system. > Also please check cat /proc/sys/fs/ve-area-access-check > if it is non-zero value, then echo 0 to it. o.k., that's it !!! thanks > This check makes sure that your VPS has no access to trusted data or > host system don't access to untrusted one. Just disable it as we did in > recent kernel by default. > > >>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? > > yes. see scripts in /etc/sysconfig/vz-scripts I placed the two scripts (see below), but they aren't executed :-( The scripts should mount/umount the bind-mounts. gs scripts # ls -l /usr/lib/vzctl/scripts/ total 32 -rwxr-xr-x 1 root root 69 Jan 5 19:38 2001.mount -rwxr-xr-x 1 root root 47 Jan 5 19:39 2001.umount -rwxr-xr-x 1 root root 1522 Jan 4 01:05 vps-create -rwxr-xr-x 1 root root 4037 Jan 4 01:05 vps-functions -rwxr-xr-x 1 root root 1354 Jan 4 01:05 vps-net_add -rwxr-xr-x 1 root root 1127 Jan 4 01:05 vps-net_del -rwxr-xr-x 1 root root 2308 Jan 4 01:05 vps-postcreate -rwxr-xr-x 1 root root 785 Jan 4 01:05 vps-stop gs scripts # vzctl --verbose start 2001 Unable to open /usr/lib/vzctl/modules/: No such file or directory Starting VPS ... Running: /usr/sbin/vzquota show 2001 Running: /usr/sbin/vzquota on 2001 -r 0 -b 1048676 -B 1153534 -i 200100 -I 220100 -e 0 -n 0 -s 0 Mounting root: /vz/root/2001 /vz/private/2001 VPS is mounted Running: /usr/sbin/vzquota st…
creator: wimalopaan
date: 2006-01-05T17:08:03-00:00

Re: OpenVZ and Gentoo (partly solved)
type: item
description: please, place your scripts in /etc/sysconfig/vz-scripts, not /usr/lib/vzctl/scripts... Kirill >>yes. see scripts in /etc/sysconfig/vz-scripts > > > I placed the two scripts (see below), but they aren't executed :-( The scripts > should mount/umount the bind-mounts. > > gs scripts # ls -l /usr/lib/vzctl/scripts/ > total 32 > -rwxr-xr-x 1 root root 69 Jan 5 19:38 2001.mount > -rwxr-xr-x 1 root root 47 Jan 5 19:39 2001.umount > -rwxr-xr-x 1 root root 1522 Jan 4 01:05 vps-create > -rwxr-xr-x 1 root root 4037 Jan 4 01:05 vps-functions > -rwxr-xr-x 1 root root 1354 Jan 4 01:05 vps-net_add > -rwxr-xr-x 1 root root 1127 Jan 4 01:05 vps-net_del > -rwxr-xr-x 1 root root 2308 Jan 4 01:05 vps-postcreate > -rwxr-xr-x 1 root root 785 Jan 4 01:05 vps-stop > gs scripts # vzctl --verbose start 2001 > Unable to open /usr/lib/vzctl/modules/: No such file or directory > Starting VPS ... > Running: /usr/sbin/vzquota show 2001 > Running: /usr/sbin/vzquota on 2001 -r 0 -b 1048676 -B 1153534 -i 200100 -I > 220100 -e 0 -n 0 -s 0 > Mounting root: /vz/root/2001 /vz/private/2001 > VPS is mounted > Running: /usr/sbin/vzquota stat 2001 -f > Running: vzquota setlimit 2001 -b 1048576 -B 1153434 -i 200000 -I 220000 -e 0 > -n 0 > Adding IP address(es): 192.168.39.21 > Running: /usr/lib/vzctl/scripts/vps-net_add > Running VPS script: /etc/vz/dists/scripts/gentoo-add_ip.sh > Setting CPU units: 1000 > Set hostname: ovz01 > Running VPS script: /etc/vz/dists/scripts/gentoo-set_hostname.sh > VPS start in progress... > gs scripts # 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) > gs scripts # > > >>>>Please note, on 2.6.8 kernel bind mount is still rw :( >>> >>>o.k. >>> >>> >>>>Kirill >>>> >>>> >…
creator: dev
date: 2006-01-06T17:58:29-00:00

Re: OpenVZ and Gentoo (partly solved)
type: item
description: neither true! With a Gentoo-Host you must place the scripts in /etc/vz, where the config-file are. Now it works.
creator: wimalopaan
date: 2006-01-09T13:49:31-00:00

Re: Re: OpenVZ and Gentoo (partly solved)
type: item
description: > neither true! > > With a Gentoo-Host you must place the scripts in /etc/vz, where the config-file are. Now it works. oh, sorry... I didn't know that gentoo differs even in this :) thanks a lot! I will ask kir@ to refine gentoo FAQ Kirill
creator: dev
date: 2006-01-09T14:20:14-00:00

Re: OpenVZ and Gentoo (partly solved)
type: item
description: Has anyone gotten Gentoo to work as a VPS (not the hardware node). At the end of this thread, did the poster say that they got it to work? I am having the same problem as described.. [root@uranus 5554]# vzctl --verbose start 5554 Unable to open /usr/lib/vzctl/modules/: No such file or directory Starting VPS ... Running: /usr/sbin/vzquota show 5554 Running: /usr/sbin/vzquota on 5554 -r 0 -b 22117297 -B 23234494 -i 10563969 -I 10920356 -e 259200 -n 259200 -s 0 Mounting root: /vz/root/5554 /vz/private/5554 VPS is mounted Running: /usr/sbin/vzquota stat 5554 -f Running: vzquota setlimit 5554 -b 22117197 -B 23234394 -i 10563869 -I 10920256 Adding IP address(es): 204.9.190.196 Running: /usr/lib/vzctl/scripts/vps-net_add arpsend: 204.9.190.196 is detected on another computer : 00:30:48:72:cd:ee vps-net_add WARNING: arpsend -c 1 -w 1 -D -e 204.9.190.196 eth0 FAILED Running VPS script: /etc/sysconfig/vz-scripts/dists/scripts/gentoo-add_ip.sh Setting CPU limit: 75 Setting CPU units: 14516 Set hostname: gentoo.com Running VPS script: /etc/sysconfig/vz-scripts/dists/scripts/gentoo-set_hostname. sh VPS start in progress... [root@uranus 5554]# vzlist | grep 5554 5554 1 running 204.9.190.196 gentoo.com [root@uranus 5554]# vzctl exec 5554 mount -t proc none /proc [root@uranus 5554]# vzctl exec 5554 ps axf PID TTY STAT TIME COMMAND 1 ? Ss 0:00 ini 9158 ? Rs 0:00 ps axf [root@uranus 5554]# vzctl enter 5554 enter failed [root@uranus 5554]# vzctl --verbose stop 5554 Unable to open /usr/lib/vzctl/modules/: No such file or directory Stopping VPS ... VPS was stopped Running: /usr/lib/vzctl/scripts/vps-net_del Running: /usr/sbin/vzquota stat 5554 -f Running: /usr/sbin/vzquota off 5554 VPS is unmounted Running: /usr/lib/vzctl/scripts/vps-stop [root@uranus 5554]# Any ideas?
creator: RapidVPS
date: 2006-01-31T03:12:00-00:00

Re: OpenVZ and Gentoo (partly solved)
type: item
description: Yes, some people successfully run Gentoo in VPS. Though there is no precached template still for it (I'll ask Kir for it). Have you been following FAQ on Gentoo VPS or how did you create it?
creator: dev
date: 2006-01-31T08:08:55-00:00