Ask Your Question

Ways to inject networking configuration on instance boot

asked 2015-03-16 17:23:34 -0600

jne100 gravatar image

updated 2015-03-16 17:24:27 -0600

Hello, I have a question regarding networking configuration injection. As everybody knows Nova can inject some data to instance on boot, for example root password, ssh keys or just arbitrary files. Data can be injected using config-drive and fs-injection via libguestfs.

After internet search and quick investigation of Nova source code I found two features, associated with networking configuration injection, but it seems none of them appropriate.

At first, using fs-injection via libguestfs, in some cases (depending on global configuration file and boot command parameters) Nova can create /etc/network/interfaces file inside guest OS. But this activity makes no sense for RHEL based distros as far as I know.

At second, using config-drive, we can specify Cloudinit configuration file which will create resolv.conf file inside guest OS, but not so many things can be configured using resolv.conf.

Moreover, we always can manually inject some distro specific files (e.g. /etc/sysconfig/network-scripts/ifcfg-eth0), but this method is too complex (thereafter unreliable) and guest OS dependent.

So, don't you know another generic ways to inject networking configuration? Maybe somebody can share some relevant experience?

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2015-03-17 00:20:19 -0600

Praveen N gravatar image

Hi, One possible way to inject the data is by Cloud-init /userdata (YAML scripts) passed during the instance boot time. These links supports about cloudinit

edit flag offensive delete link more


network-interfaces section of cloud-init metadata file is usefull for me, thank you. For some reason network-interfaces description missing in

jne100 gravatar imagejne100 ( 2015-03-17 10:45:26 -0600 )edit

answered 2015-03-17 03:54:51 -0600

dbaxps gravatar image

I am not sure that it's addressing your question, however on any RH RDO recent system like Juno, IceHouse.
Neutron is involved by nova-compute driver ( libvirt or docker) when instance is booting up.
View (page 23)
image description

edit flag offensive delete link more


This information is usefull too for my understending of subject, thank you.

jne100 gravatar imagejne100 ( 2015-03-17 11:02:45 -0600 )edit

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



Asked: 2015-03-16 17:23:34 -0600

Seen: 9,414 times

Last updated: Mar 17 '15