Static IP for cloud instances

asked 2014-12-07 23:54:29 -0600

Can I make bit change to cloud-init if I want to force usage of static IP inside VM?

Is it bad practice to put static IP in virtual images and what are considerations?

edit retag flag offensive close merge delete


What's your use case for static? Most applications should listen on which would help out if you are in need of statics. Your 'static address' is going to come from floating IPs.

mpetason gravatar imagempetason ( 2014-12-08 14:18:29 -0600 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2014-12-08 04:27:09 -0600

Prateek K gravatar image


If you want to assign static IP's via cloud-init then you should get to know about config drives in openstack.

IT is recommended that the subnet in which your VM is present should not have DHCP enabled because that will make the VM get the IP leased from DHCP server.

Also please note that in order for the features of cloud-init to work the images of VM should have the package of cloud-init installed and the metadata agents should be configured properly in openstack.


edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2014-12-07 23:54:29 -0600

Seen: 1,204 times

Last updated: Dec 08 '14