[Lxc-users] CentOS init.d services not started upon start

Michael H. Warfield mhw at WittsEnd.com
Thu Jan 17 15:59:16 UTC 2013


On Thu, 2013-01-17 at 20:48 +0530, Shibashish wrote:
> Hi,

> My runlevel services, i.e. whatever is in /etc/init.d/ is not started when
> I start a container using "/usr/bin/lxc-start -d -n myvm1". How do I start
> those automatically?

> I'm on CentOS 6.3, lxc built from git branch staging.

Strange.  I have a couple of CenOS 6.3 containers running just fine and
all the services that are configured to autostart are starting properly.

First question.  What runlevel is your container starting in?  Run the
"runlevel" command and you should see something like "N 3".  The first
number is the previous level (none in this case) and the second number
is the current runlevel (3 in this case).

The services in /etc/init.d are available to start but must be linked to
startup links in the appropriate /etc/rc.d/rc[runlevel].d
(/etc/rc.d/rc3.d in my example above).  Links that begin with an S
followed by two numbers (like S55sshd) are startup links when entering
that runlevel.

Services to be autostarted are normally managed by chkconfig.  Just type
"chkconfig" and look down the column of services for your runlevel and
see what's "on".  You can use chkconfig to turn services on or off as
well.

If you're in runlevel 1 or S (single user), you'll need to figure out
why and correct it.  You might check /etc/inittab for the "id" (init
default) line.  Most likely you are going to want 3.

If you are in runlevel 3 and you have services configured to start,
which are not starting, then you should probably look
in /var/log/messages to see if you're getting errors.

> Thanks.

> ShiB.
> while ( ! ( succeed = try() ) );

Regards,
Mike
-- 
Michael H. Warfield (AI4NB) | (770) 985-6132 |  mhw at WittsEnd.com
   /\/\|=mhw=|\/\/          | (678) 463-0932 |  http://www.wittsend.com/mhw/
   NIC whois: MHW9          | An optimist believes we live in the best of all
 PGP Key: 0x674627FF        | possible worlds.  A pessimist is sure of it!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 482 bytes
Desc: This is a digitally signed message part
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20130117/6b23fb17/attachment.pgp>


More information about the lxc-users mailing list