You can make images available for use in instances by importing images to the Image Service datastore .

During import, the VMDK disk type is introspected to capture its disk type property, but you have the option of specifying disk type using the vmware_disktype property.

vmware_disktype Property

Description

sparse

This disktype property applies to monolithic sparse disks.

preallocated

This disktype property applies to VMFS flat disks, including thick, zeroedthick, or eagerzeroedthick.

This is the default property if none is specified.

streamOptimized

This disktype property applies to Monolithic Sparse disks, optimized for streaming. You can convert disks dynamically to and from this format with minimal computational costs.

To import an image in a non-supported format such as RAW, QCOW2, VDI, or VHD, see the VMware Integrated OpenStack Administrator Guide.

Verify that you configured one or more Image Service datastores.

Obtain the image, for example, ubuntuLTS-sparse.vmdk.

Verify that the images are packaged in the ISO, VMDK, or OVA format.

1

Log in to the OpenStack management cluster as a user with administrative privileges to upload the image to the Image Service component.

2

Run the glance command to obtain, define, and import the image.

glance  --os-auth-token $token --os-image-url http://123.456.7.8:9292 \
        image-create name="ubuntu-sparse" \
        disk_format=vmdk \
        container_format=bare is_public=true \
        --property vmware_disktype="sparse" \
        --property vmware_ostype="ubuntu64Guest" < ubuntuLTS-sparse.vmdk

This example uses the following parameters and settings.

Parameter or Setting

Description

--os-image-url http://123.456.7.8:9292

The URL of the source image.

ubuntu-sparse

The name of the source image.

disk_format=vmdk

The disk format of the source image. You specify ISO, VMDK, or OVA.

is_public=true

The privacy setting for the image in OpenStack. When set to true, the image is available to all users. When set to false, the image is available only to the current user.

ubuntuLTS-sparse.vmdk

The name of the image file after it is imported to the Image Service.

3

(Optional) In the Compute component, confirm that the image was successfully imported.

$ glance image-list

The command returns a list of all images that are available in the Image Service.