Atom feed of this document
 

 VMware VMDK driver

The VMware VMDK driver enables management of OpenStack Block Storage volumes on vCenter-managed datastores. Volumes are backed by VMDK files on datastores using any VMware compatible storage technology (such as, NFS, iSCSI, FiberChannel, and vSAN).

 Configuration

The recommended OpenStack Block Storage volume driver is the VMware vCenter VMDK driver. When configuring the driver, you must match it with the appropriate OpenStack Compute driver from VMware and both drivers must point to the same server.

For example, in the nova.conf file, the volume driver setting is:

compute_driver=vmwareapi.VMwareVCDriver

In the cinder.conf file, the volume driver setting is:

volume_driver=cinder.volume.drivers.vmware.vmdk.VMwareVcVmdkDriver

The following table lists various options that the drivers support for the OpenStack Block Storage configuration (cinder.conf):

Table 7.18. Description of configuration options for vmware
Configuration option=Default value Description
vmware_api_retry_count=10 (IntOpt) Number of times VMware ESX/VC server API must be retried upon connection related issues.
vmware_host_ip=None (StrOpt) IP address for connecting to VMware ESX/VC server.
vmware_host_password=None (StrOpt) Password for authenticating with VMware ESX/VC server.
vmware_host_username=None (StrOpt) Username for authenticating with VMware ESX/VC server.
vmware_image_transfer_timeout_secs=7200 (IntOpt) Timeout in seconds for VMDK volume transfer between Cinder and Glance.
vmware_max_objects_retrieval=100 (IntOpt) Max number of objects to be retrieved per batch. Query results will be obtained in batches from the server and not in one shot. Server may still limit the count to something less than the configured value.
vmware_task_poll_interval=5 (IntOpt) The interval used for polling remote tasks invoked on VMware ESX/VC server.
vmware_volume_folder=cinder-volumes (StrOpt) Name for the folder in the VC datacenter that will contain cinder volumes.
vmware_wsdl_location=None (StrOpt) Optional VIM service WSDL Location e.g http://<server>/vimService.wsdl. Optional over-ride to default location for bug work-arounds.

 VMDK disk type

The VMware VMDK drivers support creating VMDK disk files of type: thin, thick and eagerZeroedThick. The VMDK disk file type is specified using the vmware:vmdk_type extra spec key with the appropriate value. The following table captures the mapping between the extra spec entry and the VMDK disk file type:

Table 7.19. Extra spec entry to VMDK disk file type mapping
Disk file type Extra spec key Extra spec value
thin vmware:vmdk_type thin
thick vmware:vmdk_type thick
eagerZeroedThick vmware:vmdk_type eagerZeroedThick

If no vmdk_type extra spec entry is specified, the default disk file type is thin.

The example below shows how to create a thick VMDK volume using the appropriate vmdk_type:

        $ cinder type-create thick_volume
        $ cinder type-key thick_volume set vmware:vmdk_type=thick
        $ cinder create --volume-type thick_volume --display-name volume1 1

 Clone type

With the VMware VMDK drivers, you can create a volume from another source volume or from a snapshot point. The VMware vCenter VMDK driver supports clone types full and linked/fast. The clone type is specified using the vmware:clone_type extra spec key with the appropriate value. The following table captures the mapping for clone types:

Table 7.20. Extra spec entry to clone type mapping
Clone type Extra spec key Extra spec value
full vmware:clone_type full
linked/fast vmware:clone_type linked

If not specified, the default clone type is full.

The following is an example of linked cloning from another source volume:

        $ cinder type-create fast_clone
        $ cinder type-key fast_clone set vmware:clone_type=linked
        $ cinder create --volume-type fast_clone --source-volid 25743b9d-3605-462b-b9eb-71459fe2bb35 --display-name volume1 1

Note: The VMware ESX VMDK driver ignores the extra spec entry and always creates a full clone.

 Supported operations

The following operations are supported by the VMware vCenter and ESX VMDK drivers:

  • Create volume

  • Create volume from another source volume. (Supported only if source volume is not attached to an instance.)

  • Create volume from snapshot

  • Create volume from glance image

  • Attach volume (When a volume is attached to an instance, a reconfigure operation is performed on the instance to add the volume's VMDK to it. The user must manually rescan and mount the device from within the guest operating system.)

  • Detach volume

  • Create snapshot (Allowed only if volume is not attached to an instance.)

  • Delete snapshot (Allowed only if volume is not attached to an instance.)

  • Upload as image to glance (Allowed only if volume is not attached to an instance.)

[Note]Note

Although the VMware ESX VMDK driver supports these operations, it has not been extensively tested.

 Datastore selection

When creating a volume, the driver chooses a datastore that has sufficient free space and has the highest freespace/totalspace metric value.

When a volume is attached to an instance, the driver attempts to place the volume under the instance's ESX host on a datastore that is selected using the strategy above.

Log a bug against this page


loading table of contents...