Using MAAS 2.2.2 and newest CentOS image that uses cloud-init cloud-init-0.7.9+224.g681baff-1.el7.centos.noarch, network configuration re-created after reboot.
The configuration created was:
[centos@withkvm ~]$ cat /etc/sysconfig/network-scripts/ifcfg-eth0
# Created by cloud-init on instance boot automatically, do not edit.
#
BOOTPROTO=dhcp
DEVICE=eth0
HWADDR=52:54:00:03:02:6e
NM_CONTROLLED=no
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
I changed that to do:
[centos@withkvm ~]$ cat /etc/sysconfig/network-scripts/ifcfg-eth0
# Created by cloud-init on instance boot automatically, do not edit.
#
BOOTPROTO=static
DEVICE=eth0
HWADDR=52:54:00:03:02:6e
NM_CONTROLLED=no
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
IPADDR=192.168.122.3
NETMASK=255.255.255.0
GATEWAY=192.168.122.2
However, after I reboot, the network config is changed:
[centos@withkvm ~]$ sudo cat /etc/sysconfig/network-scripts/ifcfg-eth0
# Created by cloud-init on instance boot automatically, do not edit.
#
BOOTPROTO=dhcp
DEVICE=eth0
HWADDR=52:54:00:03:02:6e
NM_CONTROLLED=no
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
Using MAAS 2.2.2 and newest CentOS image that uses cloud-init cloud-init- 0.7.9+224. g681baff- 1.el7.centos. noarch, network configuration re-created after reboot.
The configuration created was:
[centos@withkvm ~]$ cat /etc/sysconfig/ network- scripts/ ifcfg-eth0 52:54:00: 03:02:6e
# Created by cloud-init on instance boot automatically, do not edit.
#
BOOTPROTO=dhcp
DEVICE=eth0
HWADDR=
NM_CONTROLLED=no
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
I changed that to do:
[centos@withkvm ~]$ cat /etc/sysconfig/ network- scripts/ ifcfg-eth0 52:54:00: 03:02:6e 192.168. 122.3 255.255. 255.0 192.168. 122.2
# Created by cloud-init on instance boot automatically, do not edit.
#
BOOTPROTO=static
DEVICE=eth0
HWADDR=
NM_CONTROLLED=no
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
IPADDR=
NETMASK=
GATEWAY=
However, after I reboot, the network config is changed:
[centos@withkvm ~]$ sudo cat /etc/sysconfig/ network- scripts/ ifcfg-eth0 52:54:00: 03:02:6e
# Created by cloud-init on instance boot automatically, do not edit.
#
BOOTPROTO=dhcp
DEVICE=eth0
HWADDR=
NM_CONTROLLED=no
ONBOOT=yes
TYPE=Ethernet
USERCTL=no