I am running LXC on CentOS7. I know Ubuntu/Debian is preferred but My job uses RHEL distros so I want to maintain my practice with such systems. I am running ESXi with several CentOS images providing various services and I am running Low on RAM which lead me to discovering this thing called LXC. I have played around a little and have a question about assigning IP addresses. I set up a bridge interface on host and edited a container config with:
lxc.network.ipv4 =192.168.0.90/24 192.168.0.255
lxc.ipv4.gateway = 192.168.0.1
It has the ip and I can ping no problem. Name resolution however does not work.
I made another container and left it default DHCP. It pulls an IP address and can ping and DNS resolution fine.
Do I have to designate the DNS server in the container config?
Should I leave default and Assign the static IPs in the containers themself? /etc/sysconfig/network-scripts/interface?
Or is assigning the IPs via their config file the best way to give static ips.