<div dir="ltr">On Fri, Apr 5, 2013 at 10:33 AM, David Parks <span dir="ltr"><<a href="mailto:davidparks21@yahoo.com" target="_blank">davidparks21@yahoo.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<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 lang="EN-US" link="blue" vlink="purple"><div><p class="">
I’ve got an environment set up now where the host OS has a static IP directly connected to the LAN. I’m bridging the containers to have their own static LAN IP as well.<u></u><u></u></p><p class=""><u></u></p></div></div>
</blockquote><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 lang="EN-US" link="blue" vlink="purple">
<div><p class="">When I start my container eth0 is *<b>not</b>* configured. If I manually add `eth0=eth0` in /run/network/ifstate and `service restart networking`, it gets configured properly.<u></u><u></u></p><p class="">
<u></u></p></div></div></blockquote><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 lang="EN-US" link="blue" vlink="purple">
<div><p class=""><u></u> <u></u></p><p class="">After looking at dmesg output I noticed that there are (unexpected) references to em1, which is the host’s physical NIC.<u></u><u></u></p><p class=""><u></u> <u></u></p><p class="">
The bridging all works, networking is fine, it’s just when I start the container, rebooting reproduces the problem, then manually updating ifstate and rebooting resolves it.<u></u><u></u></p><p class=""><u></u> <u></u></p>
<p class="">I’m not sure how to configure it so it configure eth0 on reboot as I would expect.<u></u><u></u></p><p class=""><u></u></p></div></div></blockquote><div><br></div><div style>Well, a description on which distro/version you're running as host and container would be nice.</div>
<div style><br></div><div style>Short version is if you use Ubuntu (preferably quantal/raring for newer lxc version, but precise is also fine), then it will just work. If you use some other combination (e.g. Centos for container), then be prepared for hickups.</div>
<div style><br></div><div style>I had problems with Centos container, and the "fix" was to force-clean /var/run and /var/lock/subsys on container startup: <a href="https://github.com/fajarnugraha/lxc/blob/centos-template/templates/lxc-centos.in#L90">https://github.com/fajarnugraha/lxc/blob/centos-template/templates/lxc-centos.in#L90</a></div>
<div style><br></div><div style>-- </div><div style>Fajar</div></div></div></div>