You can import images using the command-line interface on the OpenStack Management Server.

The following image formats are supported:
  • VMDK
  • ISO
  • OVA
  • RAW
  • QCOW2
  • VDI
  • VHD
Note: ISO images cannot be used to create volumes.

Procedure

  1. Log in to the OpenStack Management Server as viouser.
  2. Load the credentials file for your user account.
    source user-credentials.rc
  3. Run the openstack image create command to obtain, define, and import the image.
    openstack image create image-name --disk-format {vmdk | iso} --container-format bare --file image-file {--public | --private} [--property vmware_adaptertype="vmdk-adapter-type" [--property vmware_disktype="{sparse | preallocated | streamOptimized}"] --property vmware_ostype="operating-system"
    Option Description
    image-name

    Enter the name of the source image.

    --disk-format

    Enter the disk format of the source image. You can specify iso or vmdk.

    For images in other formats, including OVA, RAW, QCOW2, VDI, or VHD, use vmdk as the disk format.

    --container-format

    Enter bare. The container format argument is not currently used by Glance.

    --file

    Specify the image file to upload.

    {--public | --private}

    Include --public to make the image available to all users or --private to make the image available only to the current user.

    --property vmware_adaptertype

    Specify the adapter type of the VMDK disk.

    If you do not include this parameter, the adapter type is determined by introspection.

    Note:
    • For disks using paravirtual adapters, include this parameter and set it to paraVirtual.
    • For disks using LSI Logic SAS adapters, include this parameter and set it to lsiLogicsas.
    --property vmware_disktype

    Specify sparse, preallocated, or streamOptimized.

    If you do not include this parameter, the disk type is determined by introspection.

    --property vmware_ostype

    Specify the operating system on the image.

What to do next

You can launch OpenStack instances using the imported image. See Start an OpenStack Instance from an Image. You can also run the openstack image list command to see all images in your project.