You can configure Metacloud to write metadata to a special configuration drive that attaches to the instance when it boots. For example, a configuration drive can be used to pass an IP address configuration to an instance. The instance can mount this drive and read files from it to get information that is normally available through the metadata service. This metadata is different from the user data.
In the current version of Metacloud Compute, live migration with the configuration drive on a local disk is forbidden because of a
libvirtbug in copying a read-only disk; however, if you use the VFAT format, live migration works effectively.
Any operating system capable of mounting a VFAT file system can use a configuration drive. By default, the format of the configuration drive is set to the VFAT file system. Live migration works in the following cases:
- using shared storage (NFS or CEPH) and VFAT as the format of
- using local storage and VFAT as the format of
- using local storage and FAT32 as the format of
Requirements and Guidelines
You must adhere to the following requirements:
- Compute Host Requirements
You must first install the genisoimage package on each compute host; otherwise, instances do not boot properly. Set the
mkisofs_cmdflag to the path of the genisoimage program. If the genisoimage program is in same path as the Compute service, you do not need to set this flag.
You must set the
mkisofs_cmdvalue to the full path of an
mkisofs.exeinstallation. Additionally, you must set the
qemu_img_cmdvalue in the
hypervconfiguration section to the full path of a
- Bare Metal
You do not need to prepare anything because the Bare Metal service treats the configuration drive properly.
- Image Requirements
- An image built with a recent version of the cloud-init package can automatically access metadata passed through the configuration drive. The cloud-init package version 0.7.1 works with Ubuntu, Fedora-based images (such as Red Hat Enterprise Linux), and openSUSE-based images (such as SUSE Linux Enterprise Server).
- If an image does not have the cloud-init package installed, you must customize the image to run a script that performs the following tasks in order:
- mount the configuration drive on boot
- read the data from the drive
- take appropriate action, such as adding the public key to an account
When you create images that access configuration drive data and multiple directories are under the
openstack directory, always select the highest, supported API version by date. For example, if your guest image supports the 2012-03-05, 2012-08-05, and 2013-04-13 versions, try 2013-04-13 first and revert to a previous version if 2013-04-13 is not present.
Enabling the Configuration Drive
--config-drive true option in your
openstack server create request when launching an instance.
An administrator cannot disable the configuration drive.
The files that appear on the configuration drive depend on the arguments that you pass to the
openstack server create command using the
--user-data and the
--file options. See Launching an Instance.
openstack/2012-08-10/meta_data.json openstack/2012-08-10/user_data openstack/content openstack/content/0000 openstack/content/0001 openstack/latest/meta_data.json openstack/latest/user_data