[Lxc-users] How to make a container init DIE after finishing runlevel 0

Michael H. Warfield mhw at WittsEnd.com
Tue Jan 26 05:52:21 UTC 2010


On Mon, 2010-01-25 at 23:19 -0500, Brian K. White wrote: 
> From lxc-check/lxc-waiton-init:
> > # We use to be able to use lxc-ls but it now prints active VM's twice

> Only if you ran lxc-create and then lxc-start.

Very true and that's been discussed a bit on the -devel list.

> If you just run...

> lxc-start -f config -n name

> ...with no prior lxc-create, then lxc-ls only shows the container name once.

Also very true.  But, if you haven't done that then none of my scripts
will work at all, IAC, because they are all predicated upon being able
to find the hot configuration in ${LXC_VAR}/${VM} particularly to find
the rootfs and dereferences through the fstab.  End of discussion.  If
you don't do that or have some other standard location for the config
files, I don't see how any of it will work, so it's not even really
worth worrying about on my part and I'm not really interested in
supporting those cases.  In that case, please feel free to use my
scripts as an example of how you might roll your own for your own way of
managing things.  Which is all they are really offered up for, anyways.
I do try to comment the daylights out of them so others have some
insight into my thinking when I wrote them that way and why.

> Obviously assumes 0.6.5+  or whatever version first allowed skipping 
> lxc-create.

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/20100126/71c7cafd/attachment.pgp>


More information about the lxc-users mailing list