[Lxc-users] CentOS init.d services not started upon start
Shibashish
shib4u at gmail.com
Thu Jan 17 16:42:19 UTC 2013
Thanks Mike for the reply.
[root at myvm1 ~]# runlevel
3 3
I modified /etc/rc.d/rc.sysinit as suggested by
http://lxc.teegra.net/#_init_setup
and added the default gateway. On close inspection, i see that the default
gw is not pushed and the services are still not starting up. Also, this
behavior seems random as 2 other identical lxc vm are running on the same
host after the sysinit change, and their startup services are being run.
ShiB.
while ( ! ( succeed = try() ) );
On Thu, Jan 17, 2013 at 9:29 PM, Michael H. Warfield <mhw at wittsend.com>wrote:
> 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 --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20130117/9fa34ff5/attachment.html>
More information about the lxc-users
mailing list