After the deployment operation, I’ve changed the hostname and the IP in the file /etc/sysconfig/network-scripts/ifcfg-eth0 but those settings are lost after rebooting.
I’ve been researching a bit and it seems that those settings are controlled by cloud-init.
Could you provide a guidance to change the IP server address using cloud-init, please?
In my opinion, being able to change the IP address should be a basic operation available in a production solution like PMM.
this is currently being processed by the PMM development team but we have a workaround you might wanna give a try for changing OVA PMM to static. Before changing IP of PMM please take a snapshot of current instance. Moreover, please test it before on a preprod instance.
Login via console to PMM instance with the following credentials:
login: root
password: percona
You will be asked for changing root’s password.
Add the following to the bottom of /etc/cloud/cloud.cfg file (vi edit can be used):
network:
config: disabled
Note, that cloud.cfg is YAML file, so space matters.
Execute the below command to obtain name of NM’s connection:
# nmcli dev
DEVICE TYPE STATE CONNECTION
eth0 ethernet connected [B]System eth0[/B]
Execute the following NetworkManager’s commands to change bootproto from dhcp to static.
# IP Address in CIDR notation
nmcli con mod "System eth0" ipv4.addresses 192.168.1.250/24
# Default gateway
nmcli con mod "System eth0" ipv4.gateway 192.168.1.1
# DNS
nmcli con mod "System eth0" ipv4.dns "8.8.8.8 8.8.4.4"
nmcli con mod "System eth0" ipv4.method manual
nmcli con mod "System eth0" connection.autoconnect yes
Reboot your PMM instance.
Your IP instance will changed to static. Again, please note that this is a workaround and the above might not work in future releases.
Easier solution is yum erase cloud-init, then you can setup network as normal and it survives reboot. This solution does not depend on a config option that may disappear on update.