Can't set static IP to Fedora 27 (or 26) lxc container

Bogdan Dumitru

Active Member
May 6, 2018
5
1
43
43
Hello,

I've been struggling with this for a few hours still.
Steps:
1. Install Proxmox from latest iso
2. pveam update && apt update && apt full-upgrade
3. Download fedora 27 container template
4. Create new CT with fixed ip (ex: 10.10.0.18/24)
5. Start container. The container has a DHCP address.
6. If I install NetworkManager in container it will get the fixed ip set by proxmox but only after I do a ifdown eth0 && ifup eth0 in the container. Before that it will have a DHCP address.
I've checked the /etc/sysconfig/network-scripts/ifcfg-eth0 file and looks good.
Help. I need latest FreeIPA (the one in CentOS 7 has a bug that I _need_ to avoid) and it will only work on fedora properly.
 
I'm giving up for now using LXC because I can't properly set static IP to fedora 27. I'll use kvm VM.
Interested in a response so I can come back to lxc as it is so much lighter.
 
Default Fedora starts systemd-networkd, but Proxmox uses the former network scripts to set up static IP.
Try:
Code:
systemctl stop systemd-networkd
systemctl start network