<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, May 15, 2014 at 2:56 PM, Stephen Zhang <span dir="ltr"><<a href="mailto:zsrkmyn@gmail.com" target="_blank">zsrkmyn@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Hi all,<div>  I installed a ubuntu maverick (really an old release, but I have to use it) using the following command:</div>
<div>           lxc-creat -t ubuntu -n ubuntu -f config -- -r maverick</div><div>the official repository is invalid now, so I changed it to <a href="http://mirror.usu.ru/ubuntu/" target="_blank">http://mirror.usu.ru/ubuntu/</a> in debootstap script and lxc-ubuntu template.</div>
</div></blockquote><div><br></div><div>you should be able to add "---mirror http://..." in the end without editing anything.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr"><div><div>init: lxcguest pre-start process (4) exited normally</div><div></div></div></div></blockquote><div><br></div><div>I'd say you should investigate that</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr"><div><div>init: lxcguest state changed from pre-start to spawned</div>
<div>init: lxcguest state changed from spawned to post-start</div><div>init: lxcguest state changed from post-start to running</div><div>init: Handling started event</div></div><div><br></div><div>And my lxcguest.conf in /etc/init/ is here (removing this file also failed to start the container):</div>

<div><br></div><div><div>description "track if this is lxc instance"</div><div><br></div><div>start on startup</div><div><br></div><div>env container</div><div>env LIBVIRT_LXC_UUID</div><div><br></div><div>pre-start script</div>

<div>   [ -z $container ] && [ -z $LIBVIRT_LXC_UUID ] && stop</div><div>   # clean up /var/run - in case the container shutdown did not</div><div>   rm -rf /var/run/*</div><div>   touch /var/run/utmp</div>

<div>   chown root:utmp /var/run/utmp</div><div>   exit 0</div><div>end script</div></div><div><br></div></div></blockquote><div><br></div><div><br></div><div>Try also including /var/lock/*/* in there. Perhaps a subsystem refused to start since it sees a stale lockfile.</div>
<div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><div>none<span style="white-space:pre-wrap">                     </span>/lxc/rootfs.ubuntu/dev/pts<span style="white-space:pre-wrap">                      </span>devpts<span style="white-space:pre-wrap">  </span>defaults<span style="white-space:pre-wrap">                </span>0<span style="white-space:pre-wrap">       </span>0</div>
</div></div></blockquote><div><br></div><div>I'm pretty sure you don't need that</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr"><div>
<div>sysfs<span style="white-space:pre-wrap">                     </span>sys<span style="white-space:pre-wrap">                                             </span>sysfs<span style="white-space:pre-wrap">   </span>ro,defaults<span style="white-space:pre-wrap">             </span>0<span style="white-space:pre-wrap">       </span>0</div>

<div>proc<span style="white-space:pre-wrap">                      </span>proc<span style="white-space:pre-wrap">                                            </span>proc<span style="white-space:pre-wrap">    </span>nodev,noexec,nosuid <span style="white-space:pre-wrap">    </span>0 <span style="white-space:pre-wrap">      </span>0</div>

<div>/proc/sys<span style="white-space:pre-wrap">         </span>/home/stephen/lxc/ubuntu/rootfs/proc/sys<span style="white-space:pre-wrap">                </span>none<span style="white-space:pre-wrap">    </span>ro,bind<span style="white-space:pre-wrap"> </span>0<span style="white-space:pre-wrap">       </span>0</div>

<div>/etc/resolv.conf <span style="white-space:pre-wrap"> </span>/home/stephen/lxc/ubuntu/rootfs/etc/resolv.conf<span style="white-space:pre-wrap"> </span>none<span style="white-space:pre-wrap">    </span>ro,bind<span style="white-space:pre-wrap"> </span>0<span style="white-space:pre-wrap">       </span>0</div>

</div><div><br></div><div>So, what's wrong with my container?</div><div><br></div><div>[1]<a href="http://blog.bodhizazen.net/linux/lxc-configure-ubuntu-lucid-containers/" target="_blank">http://blog.bodhizazen.net/linux/lxc-configure-ubuntu-lucid-containers/</a></div>

<div><br></div></div></blockquote><div><br></div><div>Can you try <a href="http://wiki.1tux.org/wiki/Lxc/Installation/Guest/Centos/6">http://wiki.1tux.org/wiki/Lxc/Installation/Guest/Centos/6</a>, look for "fstab" (both the config and rootfs part)? My hunch is that your /dev/pts line made it worse.</div>
<div><br></div><div>-- </div><div>Fajar</div></div></div></div>