[Lxc-users] What is the latest status for Nested Containers in Ubuntu 12.10 and 13.04
brian mullan
bmullan.mail at gmail.com
Thu Apr 18 03:03:55 UTC 2013
Found my answer indirectly.
Thinking back to the lxc-webpanel application I mentioned on the list a few
days ago (http://lxc-webpanel.github.io/index.html)
I installed lxc-webpanel in the "parent-container".
Once installed from my HOST computer's desktop web browser I could access
the lxc-webpanel running in the "parent-container" using the
parent-container address of 10.0.3.103.
http://10.0.3.103:5000
Using the LX Web Panel I could then easily create, start, stop etc more
"child-containers"... in my case I wanted to test out OpenQRM's use of LXC
virtualization.
All 3 of the openqrm-xxx containers are "child-containers" of a
"parent-container" called "openqrm" (not shown) where the lxc-webpanel is
running with openqrm itself.
So I guess the answer to my question is that once you make the changes and
configure the 1st "nested" container... you can just keep creating more.
In my use-case this should work out great in that I can test openqrm and
its ability to create/manage VM's ... which all reside in LXC containers...
cool beans.
thanks again Stephane.
[image: Inline image 3]
On Wed, Apr 17, 2013 at 10:26 PM, brian mullan <bmullan.mail at gmail.com>wrote:
> Stephane
>
> note: I am using Ubuntu 13.04
>
> Made the changes you suggested to my container config:
>
> - lxc.aa_profile = lxc-container-default-with-nesting
> - lxc.hook.mount = /usr/share/lxc/hooks/mountcgroups
>
>
> but at that point I followed your blog post instructions (/
> https://www.stgraber.org/2012/05/04/lxc-in-ubuntu-12-04-lts/)
>
> 1. Started the parent-container
> 2. Stopped LXC
> 3. Checked /etc/default/lxc in the "parent-container" and saw its
> network/subnet = 10.0.3
> 4. So again per your blog I changed all of the 10.0.3 to 10.0.4 subnet
> in /etc/default/lxc
> 5. Restarted LXC
> 6. then finally
> 7. created a "child-container"
> 8. started the "child-container"
> 9. logged in successfully to the new "child-container"
>
>
> and it worked... thank you.
>
> However... my question now ... if you wanted to create multiple
> "child-containers"
>
> Do you have to re-edit the /etc/default/lxc file and manually change the
> IP network/subnet each time ...
> or is there a way to have it automated so each new "child-contianer" is
> allocated a good Network/Subnet as its created?
>
> If someone wanted to create say 20-30 child-containers... this would
> become tedious and error prone to do manually.
>
> thanks
> brian
>
>
> sudo lxc-start -n parent-container
> (in parent-container) sudo apt-get install lxc
> (in parent-container) sudo stop lxc
> (in parent-container) sudo sed -i "s/10.0.3/10.0.4/g" /etc/default/lxc
> (in parent-container) sudo start lxc
> (in parent-container) sudo lxc-create -n child-container -t ubuntu
> (in my-host-container) sudo lxc-start -n child-container #log into new child-container -- successful
>
>
> ---------- Forwarded message ----------
> From: "Stéphane Graber" <stgraber at ubuntu.com>
> To: lxc-users at lists.sourceforge.net
> Cc:
> Date: Tue, 16 Apr 2013 19:40:01 +0200
> Subject: Re: [Lxc-users] What is the latest status for Nested Containers
> in Ubuntu 12.10 and 13.04
> Hi,
>
> Yes, starting with Ubuntu 12.10 we ship a
> "lxc-container-default-with-nesting" profile that can be set as
> lxc.aa_profile in your container config which should work fine for
> nested containers.
>
> In Ubuntu 13.04, you likely also want to add the following to your config:
> lxc.hook.mount = /usr/share/lxc/hooks/mountcgroups
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20130417/44892f99/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 96823 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20130417/44892f99/attachment.png>
More information about the lxc-users
mailing list