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. Switch to the root user and load the cloud administrator credentials file.
    sudo su -
    source ~/cloudadmin.rc
  3. Create the image in Glance.
    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 run the openstack image list command to see the name and status of the images in your deployment.

Tenants can launch OpenStack instances using the imported image. For instructions, see Start an OpenStack Instance from an Image.