<div dir="ltr">Thanks Mike for the reply.<div><br></div><div><div>[root@myvm1 ~]# runlevel </div><div>3 3</div></div><div><br></div><div style>I modified /etc/rc.d/rc.sysinit as suggested by <a href="http://lxc.teegra.net/#_init_setup">http://lxc.teegra.net/#_init_setup</a></div>

<div style><br></div><div style>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.</div>

</div><div class="gmail_extra"><br clear="all"><div>ShiB.<br>while ( ! ( succeed = try() ) );</div>
<br><br><div class="gmail_quote">On Thu, Jan 17, 2013 at 9:29 PM, Michael H. Warfield <span dir="ltr"><<a href="mailto:mhw@wittsend.com" target="_blank">mhw@wittsend.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="im">On Thu, 2013-01-17 at 20:48 +0530, Shibashish wrote:<br>
> Hi,<br>
<br>
> My runlevel services, i.e. whatever is in /etc/init.d/ is not started when<br>
> I start a container using "/usr/bin/lxc-start -d -n myvm1". How do I start<br>
> those automatically?<br>
<br>
> I'm on CentOS 6.3, lxc built from git branch staging.<br>
<br>
</div>Strange.  I have a couple of CenOS 6.3 containers running just fine and<br>
all the services that are configured to autostart are starting properly.<br>
<br>
First question.  What runlevel is your container starting in?  Run the<br>
"runlevel" command and you should see something like "N 3".  The first<br>
number is the previous level (none in this case) and the second number<br>
is the current runlevel (3 in this case).<br>
<br>
The services in /etc/init.d are available to start but must be linked to<br>
startup links in the appropriate /etc/rc.d/rc[runlevel].d<br>
(/etc/rc.d/rc3.d in my example above).  Links that begin with an S<br>
followed by two numbers (like S55sshd) are startup links when entering<br>
that runlevel.<br>
<br>
Services to be autostarted are normally managed by chkconfig.  Just type<br>
"chkconfig" and look down the column of services for your runlevel and<br>
see what's "on".  You can use chkconfig to turn services on or off as<br>
well.<br>
<br>
If you're in runlevel 1 or S (single user), you'll need to figure out<br>
why and correct it.  You might check /etc/inittab for the "id" (init<br>
default) line.  Most likely you are going to want 3.<br>
<br>
If you are in runlevel 3 and you have services configured to start,<br>
which are not starting, then you should probably look<br>
in /var/log/messages to see if you're getting errors.<br>
<div class="im"><br>
> Thanks.<br>
<br>
> ShiB.<br>
> while ( ! ( succeed = try() ) );<br>
<br>
</div>Regards,<br>
Mike<br>
<span class="HOEnZb"><font color="#888888">--<br>
Michael H. Warfield (AI4NB) | (770) 985-6132 |  mhw@WittsEnd.com<br>
   /\/\|=mhw=|\/\/          | (678) 463-0932 |  <a href="http://www.wittsend.com/mhw/" target="_blank">http://www.wittsend.com/mhw/</a><br>
   NIC whois: MHW9          | An optimist believes we live in the best of all<br>
 PGP Key: 0x674627FF        | possible worlds.  A pessimist is sure of it!<br>
</font></span></blockquote></div><br></div>