<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">2014-05-15 16:16 GMT+08:00 Fajar A. Nugraha <span dir="ltr"><<a href="mailto:list@fajar.net" target="_blank">list@fajar.net</a>></span>:<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"><div class="gmail_extra"><div class="gmail_quote">
<div class="">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><div>you should be able to add "---mirror http://..." in the end without editing anything.</div><div class=""><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><div>I'd say you should investigate that</div><div class=""><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><div>Try also including /var/lock/*/* in there. Perhaps a subsystem refused to start since it sees a stale lockfile.</div>
<div class="">
<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><div>I'm pretty sure you don't need that</div><div class=""><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><div>Can you try <a href="http://wiki.1tux.org/wiki/Lxc/Installation/Guest/Centos/6" target="_blank">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>
<span class=""><font color="#888888">
<div><br></div><div>-- </div><div>Fajar</div></font></span></div></div></div>
<br></blockquote></div><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">Thanks for replaying me.</div><div class="gmail_extra">I also tried some times in different configuration, here are details:</div>
<div class="gmail_extra">I corrected the line in fstab "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" to right path, failed.</div>
<div class="gmail_extra">I comment the line above, failed.</div><div class="gmail_extra">I change the whole fstab using <a href="http://wiki.1tux.org/wiki/Lxc/Installation/Guest/Centos/6" target="_blank">http://wiki.1tux.org/wiki/Lxc/Installation/Guest/Centos/6</a> provides, failed. TAT</div>
<div class="gmail_extra">All the things happened as the same.</div><div class="gmail_extra">I also changed the lxcguest.conf (the original one is provided by the package lxcguest) to this (which is found in a previous mail list):</div>
<div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_extra">start on startup</div><div class="gmail_extra"><br></div><div class="gmail_extra">env container</div><div class="gmail_extra">env LIBVIRT_LXC_UUID</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">script</div><div class="gmail_extra"> rm -rf /var/run/*.pid</div><div class="gmail_extra"> rm -rf /var/run/network/*</div><div class="gmail_extra">
/sbin/initctl emit stopped JOB=udevtrigger --no-wait</div><div class="gmail_extra"> /sbin/initctl emit started JOB=udev --no-wait</div><div class="gmail_extra">end script</div><div class="gmail_extra"><br></div>
<div class="gmail_extra">Failed as well, but the /sbin/init shows different result:</div><div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_extra">init: Handling startup event</div><div class="gmail_extra">
init: lxcguest goal changed from stop to start</div><div class="gmail_extra">init: lxcguest state changed from waiting to starting</div><div class="gmail_extra">init: hostname goal changed from stop to start</div><div class="gmail_extra">
init: hostname state changed from waiting to starting</div><div class="gmail_extra">init: Handling starting event</div><div class="gmail_extra">init: lxcguest state changed from starting to pre-start</div><div class="gmail_extra">
init: lxcguest state changed from pre-start to spawned</div><div class="gmail_extra">init: lxcguest main process (4)</div><div class="gmail_extra">init: lxcguest state changed from spawned to post-start</div><div class="gmail_extra">
init: lxcguest state changed from post-start to running</div><div class="gmail_extra">init: Handling starting event</div><div class="gmail_extra">init: hostname state changed from starting to pre-start</div><div class="gmail_extra">
init: hostname state changed from pre-start to spawned</div><div class="gmail_extra">init: hostname main process (5)</div><div class="gmail_extra">init: hostname state changed from spawned to post-start</div><div class="gmail_extra">
init: hostname state changed from post-start to running</div><div class="gmail_extra">init: Handling started event</div><div class="gmail_extra">init: Handling started event</div><div class="gmail_extra">init: hostname main process (5) exited normally</div>
<div class="gmail_extra">init: hostname goal changed from start to stop</div><div class="gmail_extra">init: hostname state changed from running to stopping</div><div class="gmail_extra">init: Handling stopping event</div>
<div class="gmail_extra">init: hostname state changed from stopping to killed</div><div class="gmail_extra">init: hostname state changed from killed to post-stop</div><div class="gmail_extra">init: hostname state changed from post-stop to waiting</div>
<div class="gmail_extra">init: Handling stopped event</div><div class="gmail_extra">init: Connection from private client</div><div class="gmail_extra">init: Handling stopped event</div><div class="gmail_extra">init: Connection from private client</div>
<div class="gmail_extra">init: Handling started event</div><div class="gmail_extra">init: lxcguest main process (4) exited normally</div><div class="gmail_extra">init: lxcguest goal changed from start to stop</div><div class="gmail_extra">
init: lxcguest state changed from running to stopping</div><div class="gmail_extra">init: Handling stopping event</div><div class="gmail_extra">init: lxcguest state changed from stopping to killed</div><div class="gmail_extra">
init: lxcguest state changed from killed to post-stop</div><div class="gmail_extra">init: lxcguest state changed from post-stop to waiting</div><div class="gmail_extra">init: Handling stopped event</div><div class="gmail_extra">
<br></div><div class="gmail_extra">Regards,</div><div class="gmail_extra">Stephen</div></div><div><br></div></div></div>