Why is My Private IP Missing From My CentOS 7 Server?
Why is my private IP missing from my CentOS 7 server?
When restarting a CentOS 7 server after adding it to a private network, the configuration of the new private network interface might fail, leaving it without an IP address. This can be fixed by retrying after applying a small change to cloud-init:
# Patch cloud-init
sudo sed "s/== 'static'/in ['static', 'static6']/" -i /usr/lib/python2.7/site-packages/cloudinit/net/sysconfig.py
# Reset cloud-init
sudo cloud-init clean
# Reboot to apply
sudo reboot
This is only necessary if you are just doing a reboot. The IP configuration should always succeed after a reinstall. Other operating systems are also unaffected.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article