Skip to main content
5 of 10
added 34 characters in body

I was not able to reach the Internet from the container and the problem seemed to be partially related to the 169.254.x.x address range. Finally, this helped me setup the static IPs for the container interface using private networking and the host:

Assign static IP address to systemd-nspawn container (private networking mode).

Note: if you are running dnsmasq on the host, you may experience a conflict with the DHCP service provided by the systemd-networkd service. Since the IPs are static, you can deactivate DHCP assignment by DHCPServer=no setting to prevent this collision.