You can modify the Glance API server
configuration file to specify the datastore backend that is used to
store images.
About this task
IBM® Cloud
Manager with OpenStack provides
the Glance vSphere
datastore backend function. When you want to deploy a VMware virtual
machine disk file (VMDK) image, you can configure Glance to support
the datastore backend. This configuration reduces the time that it
takes for virtual machine deployment.To configure the Glance vSphere
datastore backend, complete the following instructions.
Procedure
- Edit the /etc/glance/glance-api.conf file,
as follows:
[DEFAULT]
vmware_server_username = VCENTER_USERNAME
vmware_server_password = VCENTER_PASSWORD
vmware_datacenter_path = DATACENTER_NAME
vmware_datastore_name = DATASTORE_NAME
vmware_store_image_dir = /openstack_glance
show_image_direct_url = True
[glance_store]
default_store = vsphere
stores = file, vmware_datastore, glance.store.vmware_datastore.Store
- Restart the glance-api service to enable
the change.
- Verify the Glance vSphere
datastore backend is enabled.
- After you complete the configuration, create an image.
- Deploy a virtual machine with the image you created in step 3a.
- If the deployment in step 3a is successful, a folder that is named
"X.X.X.X_folder" displays in the datastore that
is specified in vCenter. The IP address is the IP address for the
compute node in use. There is also a sub folder under X.X.X.X_folder,
named using the image UUID in step 3a and the virtual disk file is
in this sub folder.
- The virtual machine folder displays in the specified datastore
(configured in nova.conf), which is named with
the corresponding instance UUID in OpenStack.
What to do next
Note:
- This function applies for VMDK image deployment only. Template
images are not supported.
- If you use Glance vSphere
datastore backend function, "show_image_direct_url = True" is
required in the glance-api.conf configuration
file.
- The cookbook for the VMware driver supports
this function.