New Question

ConfigDrive - How to configure static networking?

asked 2015-01-27 00:21:59 +0300

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Using the ConfigDrive service, how do I go about statically configuring the NIC on my Windows instance?

I've tried creating a metadata.json file that points to /contents/0000 with a file called "networkconfig". However it doesn't seem to be picked up.

Let's assume the following details: iface eth0 inet static address netmask broadcast gateway dns-nameservers

How should I properly create the ConfigDrive's folder and file structure such that the Windows instance will be configured with the above details?

Please help me to understand the structure and the JSON contents...

/openstack/latest - meta_data.json

/openstack/content/0000 - network_config

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted

answered 2015-01-28 20:08:10 +0300

markoates gravatar image

With some hacking around, I was able to answer my own question.

Presently the networkconfig piece requires the following: - a "networkconfig" element in the JSON document - a "contentpath" key as a child of the "networkconfig" element that has a string to a file containing the debian formatted network configuration file - the aforementioned configuration file located at /openstack/content/<configuration file="" name="">

My example JSON: { "uuid": "fake-UUID", "hostname": "hostname", "networkconfig":{ "contentpath": "/content/0000/network_config" } }

Contents of the network_config file: iface eth0 inet static address netmask broadcast gateway dns-nameservers

Things of note: - the "0000" in the contentpath is ignored due to the split function in the code. I have submitted a pull request in github with a change that will correct this issue. - for the time being, I recommend placing the "networkconfig" file in the full path /openstack/content/0000/networkconfig and /openstack/content/networkconfig of your filesystem's data structure.


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

Question Tools

1 follower


Asked: 2015-01-27 00:21:59 +0300

Seen: 1,426 times

Last updated: Jan 28 '15