[lxc-users] LXC containers w/ static IPs work on some hosts, not on others
Ron Kelley
rkelleyrtp at gmail.com
Thu Oct 20 17:50:53 UTC 2016
hmmm, seems you are running the “original” version of lxc and not the new lxc/lxd software. Please ignore my comments then…
On Oct 20, 2016, at 1:47 PM, Michael Peek <peek at nimbios.org> wrote:
# lxc profile show
The program 'lxc' is currently not installed. You can install it by typing:
apt install lxd-client
Maybe that's part of the problem? Am I missing a package? Here are the packages I have installed for lxc:
# dpkg -l | grep lxc | cut -c1-20
ii liblxc1
ii lxc
ii lxc-common
ii lxc-templates
ii lxc1
ii lxcfs
ii python3-lxc
Michael
On 10/20/2016 01:43 PM, Ron Kelley wrote:
> "lxc profile show”. Usually, you have a default profile that gets applied to your container unless you have created a new/custom profile.
>
>
>
>
>
> On Oct 20, 2016, at 1:41 PM, Michael Peek <peek at nimbios.org <mailto:peek at nimbios.org>> wrote:
>
> How do I tell?
>
> Michael
>
>
>
> On 10/20/2016 01:35 PM, Ron Kelley wrote:
>> What profile(s) are you using for your LXC containers?
>>
>>
>>
>> On Oct 20, 2016, at 1:33 PM, Michael Peek <peek at nimbios.org <mailto:peek at nimbios.org>> wrote:
>>
>> Hi gurus,
>>
>> I'm scratching my head again. I'm using the following commands to create an LXC container with a static IP address:
>>
>> # lxc-create -n my-container-1 -t download -- -d ubuntu -r xenial -a amd64
>>
>> # vi /var/lib/lxc/my-container-1/config
>>
>> Change:
>> # Network configuration
>> # lxc.network.type = veth
>> # lxc.network.link = lxcbr0
>> # lxc.network.flags = up
>> # lxc.network.hwaddr = 00:16:3e:0d:ec:13
>> lxc.network.type = macvlan
>> lxc.network.link = eno1
>>
>> # vi /var/lib/lxc/my-container-1/rootfs/etc/network/interfaces
>>
>> Change:
>> #iface eth0 inet dhcp
>> iface eth0 inet static
>> address xxx.xxx.xxx.4
>> netmask 255.255.255.0
>> network xxx.xxx.xxx.0
>> broadcast xxx.xxx.xxx.255
>> gateway xxx.xxx.xxx.1
>> dns-nameservers xxx.xxx.0.66 xxx.xxx.128.66 8.8.8.8
>> dns-search my.domain
>>
>> # lxc-start -n my-container-1 -d
>>
>> It failed to work. I reviewed my notes from past posts to the list but found no discrepancies. So I deleted the container and tried it on another host -- and it worked. Next I deleted that container and went back to the first host, and it failed. Lastly, I tried the above steps on multiple hosts and found that it works fine on some hosts, but not on others, and I have no idea why. On hosts where this fails there are no error messages, but the container can't access the network, and nothing on the network can access the container.
>>
>> Is there some step that I'm missing?
>>
>> Thanks for any help,
>>
>> Michael Peek
>> _______________________________________________
>> lxc-users mailing list
>> lxc-users at lists.linuxcontainers.org <mailto:lxc-users at lists.linuxcontainers.org>
>> http://lists.linuxcontainers.org/listinfo/lxc-users <http://lists.linuxcontainers.org/listinfo/lxc-users>
>>
>>
>> _______________________________________________
>> lxc-users mailing list
>> lxc-users at lists.linuxcontainers.org <mailto:lxc-users at lists.linuxcontainers.org>
>> http://lists.linuxcontainers.org/listinfo/lxc-users <http://lists.linuxcontainers.org/listinfo/lxc-users>
> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org <mailto:lxc-users at lists.linuxcontainers.org>
> http://lists.linuxcontainers.org/listinfo/lxc-users <http://lists.linuxcontainers.org/listinfo/lxc-users>
>
>
> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org <mailto:lxc-users at lists.linuxcontainers.org>
> http://lists.linuxcontainers.org/listinfo/lxc-users <http://lists.linuxcontainers.org/listinfo/lxc-users>
_______________________________________________
lxc-users mailing list
lxc-users at lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20161020/9d0824e9/attachment.html>
More information about the lxc-users
mailing list