[Users] Some basic startup related issues

Scott Dowdle dowdle at montanalinux.org
Thu Jul 8 11:54:31 EDT 2010


Greetings,

----- Original Message -----
> I doubt. For instance, in another container (102) that is running, I have:
> 
> # cat /etc/fstab
> none /dev/pts devpts rw 0 0
> 
> # mount
> /dev/simfs on / type simfs (rw)
> /proc on /proc type proc (rw)
> /sys on /sys type sysfs (rw)
> none on /dev/pts type devpts (rw)
> none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
> 
> So wonder where these extra entries came from?

Forgive me, but I'm jumping into the middle of this discussing without having closely read all of the previous posts.

To the best of my knowledge, vzctl make sures that /proc shows up in the container once it has started... and that is why you don't need an entry for it in the container's /etc/fstab.

If I understand correctly you have done a physical-2-virtual migration, right?  If so, have you checked out this wiki page?

http://wiki.openvz.org/P2v

> I added proc to /etc/fstab in 50 too but it still does not get mounted
> during start.

Please note that according to the OpenVZ documentation, you aren't supposed to use numbers 1-100 as container IDs because those numbers are reserved.  I'm not saying using 50 affects anything, but I'd rather not encourage that practics.

> > mmmm looked a little more deeply to your config
> >
> > correct it by adding, correcting values
> >
> > in 50.conf
> >
> > HOSTNAME="foo.example.com"
> > VE_ROOT="/vz/root/$VEID"
> > VE_PRIVATE="/vz/private/$VEID"
> > OSTEMPLATE="centos"
> > ORIGIN_SAMPLE="vps.basic"
> > NAMESERVER="8.8.8.8 8.8.4.4"
> > NAME="foo"
> >
> > *nameservers I entered public google dns servers, enter yours
> 
> Still does not help. I compared with 102.conf (another container that
> gets interface address) I don't have nameserver configured. It still
> gets IP address (though netmask is wrong so basically useless).
> 
> Here is the output from 102 :
> 
> [root at localhost /]# ip addr ls
> 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue
> link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
> inet 127.0.0.1/8 scope host lo
> inet6 ::1/128 scope host
> valid_lft forever preferred_lft forever
> 3: venet0: <BROADCAST,POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1500 qdisc
> noqueue
> link/void
> inet 127.0.0.1/32 scope host venet0
> inet 10.33.11.60/32 brd 10.33.11.60 scope global venet0:0
> [root at localhost /]# route add default gw 10.33.11.1
> SIOCADDRT: Network is unreachable
> [root at localhost /]#
> 
> Here is the output from 50 :
> 
> [root at localhost /]# vzctl start 50
> Starting container ...
> Container is mounted
> Adding IP address(es): 10.33.11.55
> Setting CPU units: 1000
> Configure meminfo: 65536
> Container start in progress...
> [root at localhost /]# vzctl enter 50
> entered into CT 50
> Unable to get tty name: Bad file descriptor
> -bash-3.2#
> -bash-3.2# ip addr ls
> 1: lo: <LOOPBACK> mtu 16436 qdisc noop
> link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
> 3: venet0: <BROADCAST,POINTOPOINT,NOARP> mtu 1500 qdisc noop
> link/void
> -bash-3.2#

I'd strongly suggest you copy your 102.conf to 50.conf and then edit 50.conf to change the container specific info (hostname, IP address, etc).  I say that because from the previous comments, it isn't clear that you have a complete config.

When a container is started up, vzctl looks at the config for the OSTEMPLATE value.  It then looks in /etc/vz/dists/ for the script that matches the distro and in that script are defined various other scripts (in /etc/vz/dists/scripts/) that are used to inject various parameters into the container's filesystem each time the container starts.

Just look at those scripts to see how they are injecting the info.  Either they aren't getting called (because vzctl can't figure out which ones to use) or they are failing at their job.  You'll have to compare what they are supposed to do and what they actually get done to figure it out.

I hope I've given you some additional info to get your problem solved.

TYL,
-- 
Scott Dowdle
704 Church Street
Belgrade, MT 59714
(406)388-0827 [home]
(406)994-3931 [work]


More information about the Users mailing list