What is configuration drive (config-drive)?

Note! Please do not store data on config_drive.

It is a tool used to perform initial setup on cloud nodes, including networking, SSH keys, timezone, user data injection, and more. It is a service that runs on the guest machine and supports Linux and Windows.

Metadata source
It is the source of configuration data for Cloud-init that typically come from the user (user_data) or come from the stack that creates the metadata ( configuration data). Typical userdata would include files, yaml, and shell scripts while typical metadata would include server name, instance id, display name and other cloud specific details.

It is another kind of configuration provider for Cloud-Init used by OpenStack. It  transfers some information to guest machine when guest machine is booting. 


Practically speaking, config-drive and Metadata source offer the same information.
The difference is:

  • Config-drive doesn’t rely on network and directly gets information from a device, which causes better performance and low running cost.
  • Metadata source is compatible with AWS (Amazon Cloud Service), but has less performance and higher running cost compared to config-drive.

Example 1: When DHCP is unavailable, guest machine can get network configuration from config_drive.

Example 2: When creating a complex guest machine

nova boot --config-drive=true --image my-image-name --key-name mykey --flavor 1 --user-data ./my-user-data.txt myinstance --file /etc/network/interfaces=/home/myuser/instance-interfaces --file known_hosts=/home/myuser/.ssh/known_hosts --meta role=webservers --meta essential=false

All the specific information can be retrieved from config_drive.

Note! Config-drive can only be specified when creating guest machine. Afterward, even though the configuration of guest machine is changed, the content of config-drive won’t change. 


Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License
Changes were made based on the original Openstack User guide



Was this article helpful?
0 out of 0 found this helpful



Please sign in to leave a comment.