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

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article

Modified on Fri, 4 Oct at 4:22 PM

Can’t find what you’re looking for?

Get in Touch

Do you have a pre-sales question?