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

Procedure

  1. Log in to the OpenStack Management Server and switch to the root user.
    sudo su -
  2. Execute the cloudadmin.rc file.
    source ~/cloudadmin.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 create OpenStack instances using the imported image. Run the openstack image list command to see all images in your environment.