From IBM® Cloud
Manager with OpenStack 4.3 FP8 ifix1, IBM Cloud
Manager with OpenStack can support to specify datastore to store the
VMware instance snapshot.
About this task
To fulfill this, complete the following instructions:
Procedure
-
Let the IBM Cloud
Manager with OpenStack VMware driver create a VM
template in vCenter when you take a snapshot. Otherwise, the VMware driver creates a VMDK file when
it takes a snapshot. The default value of
snapshot_image_format
is
vmdk
.
Edit the snapshot_image_format
to template
in
nova-discovery.conf and nova compute configuration file,
as follows:
[vmware]
snapshot_image_format = template
-
Modify the Glance API server configuration file to specify the datastore backend that is used
to store images.
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 = TARGET_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
Note:
The value of vmware_datastore_name
is the target datastore name that will store
the instance snapshot, and it must be in the same cluster with the datastore of the booted vmware
instance.
-
Modify the nova configuration.
In nova compute configuration file, add what follows:
[vmware]
image_datastore = TARGET_DATASTORE_NAME
Note: The target datastore must be the same as the value of vmware_datastore_name
in glance-api.conf.
-
Restart the
openstack-glance-api
, openstack-nova-api
,
openstack-nova-compute
and nova-discovery
services.