<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi gurus,<br>
<br>
I'm scratching my head again. I'm using the following commands to
create an LXC container with a static IP address:<br>
<br>
<blockquote># lxc-create -n my-container-1 -t download -- -d ubuntu
-r xenial -a amd64<br>
<br>
# vi /var/lib/lxc/my-container-1/config<br>
<br>
Change:<br>
# Network configuration<br>
# lxc.network.type = veth<br>
# lxc.network.link = lxcbr0<br>
# lxc.network.flags = up<br>
# lxc.network.hwaddr = 00:16:3e:0d:ec:13<br>
lxc.network.type = macvlan<br>
lxc.network.link = eno1<br>
<br>
# vi /var/lib/lxc/my-container-1/rootfs/etc/network/interfaces<br>
<br>
Change:<br>
#iface eth0 inet dhcp<br>
iface eth0 inet static<br>
address xxx.xxx.xxx.4<br>
netmask 255.255.255.0<br>
network xxx.xxx.xxx.0<br>
broadcast xxx.xxx.xxx.255<br>
gateway xxx.xxx.xxx.1<br>
dns-nameservers xxx.xxx.0.66 xxx.xxx.128.66 8.8.8.8<br>
dns-search my.domain<br>
<br>
# lxc-start -n my-container-1 -d<br>
</blockquote>
<br>
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.<br>
<br>
Is there some step that I'm missing?<br>
<br>
Thanks for any help,<br>
<br>
Michael Peek<br>
</body>
</html>