Ask Your Question
0

Other interfaces not getting IP address

asked 2017-01-16 23:10:44 -0500

DarkKnight gravatar image

updated 2017-04-27 02:12:22 -0500

I am trying to create an instance from an RHEL image. The RHEL image had one network interface. Now when i launch an instance using this image and attach the instance to more than one networks(3 actually in my case), what i notice is that although an "ip a " lists me three network interfaces, but the other two interface dont get an IP address. When i digged down, i found out that "ifcfg-eth1" and "ifcfg-eth2" files under the /etc/sysconfig/network-scripts/ directory were missing. Upon simply adding and restarting the network these two nw interfaces got the IP as well.

So i wanted to know from other people experience that how do they handle such a scenario? Also, i just cannot go ahead and create ifcfg-files because i am not sure as to what will be the interface name. It could be eth or enps or em.

Kindly suggest solutions on RHEL6 and RHEL7.

edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted
1

answered 2017-01-19 06:28:10 -0500

Moorthy gravatar image

updated 2017-01-19 06:48:23 -0500

You can try 'userdata' option of nova create along with cloud-config file to configure the second and third interface on boot.

http://cloudinit.readthedocs.io/en/la...

Also all the interfaces will be named eth* as they are VMs.

Another option is to create a new image from the already configured instance (with 3 interfaces) and use it for future instances.

edit flag offensive delete link more
0

answered 2017-01-19 09:49:56 -0500

dbaxps gravatar image

Check Guestfish on RHEL7.qcow2 ( it does work on CentOS 7 cloud images )
https://ask.openstack.org/en/question...
with ifcfg-eth(X)

edit flag offensive delete link more
0

answered 2017-02-03 21:57:07 -0500

DarkKnight gravatar image

updated 2017-04-27 02:12:47 -0500

I am posting what i did so that it may be helpful for others who encoounter the same issue. on the image that i used, i enabled networkmanager as a service to start on boot time. I also deleted all the ifcfg-eth* files from my image. Now when i spawn instances using the image, all interfaces comes up with ip address assigned

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2017-01-16 23:10:44 -0500

Seen: 575 times

Last updated: Apr 27 '17