OVA server change IP

Hi, I’ve installed pmm-server from the OVA file.

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.

Kind regards,
jpage.

Hello jpage
Acknowledging your request and to say that we are looking at this currently.
Hope to have something practical for you soon.

Hi jpage,

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.

  1. Login via console to PMM instance with the following credentials:
  • login: root
  • password: percona
  1. You will be asked for changing root’s password.

  2. 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.

  1. Execute the below command to obtain name of NM’s connection:
# nmcli dev
DEVICE TYPE STATE CONNECTION
eth0 ethernet connected [B]System eth0[/B]
  1. 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
  1. 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.

Thank you so much for your responses!

Looking forward for an official solution, in the meantime I’ll try the workaround that laudares suggestted.

KR,
jpage

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.

Do we still have to follow the solution provided by laudares for PMM 2.0.0 or is there a new solution for it?