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

The following image formats are supported:
  • VMDK
  • ISO
  • OVA

To upload images in another format, see Import Images in Unsupported Formats.

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.
    glance image-create --name image-name --file image-path --disk-format {vmdk | iso} --container_format bare --visibility {public | private} [--property vmware_adaptertype="adapter-type"] [--property vmware_disktype="disk-type"] [--property vmware_ostype="operating-system"]
    Option Description
    --name

    Enter a name for the image file in the image service.

    --file

    Enter the path to the desired image file.

    --disk_format

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

    For images in OVA format, use vmdk as the disk format.

    --container_format

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

    --visibility

    Enter 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 glance 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.