Hi! As promised, I'm publishing today what I was able to advance on this topic. I basically took the original lxc-ubuntu script and remove everything that didn't make sense for the task, and added some stuff. The resulting script is meant to be run under a turnkeylinux environment with tklpatch installed, as it uses tklpatch-extract-iso to explode the iso.
So to test this, you'll:
1. Download a turnkey iso.
2. Run tkl2lxc turnkey.iso
The script will result in a rootfs which you should be able to use under LXC. Just move it to /var/lib/lxc/mycontainername/ and add a config and fstab file (you can use the standar ubuntu files which lxc-ubuntu creates).
- Init scripts are broken. The same that happened with ovz containers, so I think that Jed latests improvements on those could come handy here. Basically, one of them hangs and the others don't get run (inithooks never get runned). Meanwhile, you can ssh to the container and start up services manually.
I have included in the script a function called tkl_extras, here we could add what's needed. Speaking of inithooks, there's an fgconsole command that doesn't work under lxc, so I commented it. There must be other things but I haven't have time to finish the script.
Feel free to modify/republish to see if we get this running!