You can configure an image so that virtual machines deployed from the image can be resized while powered on.

You can enable live resize for the disk size, memory, vCPU, or any combination of these.

Note:

You cannot reboot a live resize-enabled instance with a volume attached. If you need to reboot the instance, detach the volume first.

Prerequisites

  • Do not create live resize-enabled instances using SR-IOV-enabled ports. Live resize is not compatible with SR-IOV.

  • Do not use live resize-enabled instances in tenant virtual data centers. Live resize is not compatible with tenant virtual data centers.

In addition, the following conditions apply for live resizing of disk size:

  • Use VMDK as the disk format for the image.

  • Use a SCSI virtual disk adapter type for the image. IDE adapter types are not supported.

  • Deploy virtual machines from the image as full clones. Linked clones cannot be live-resized.

Procedure

  1. Log in to the OpenStack Management Server.
  2. Create a new image with live resize enabled.
    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" --property img_linked_clone="false" --property os_live_resize="{vcpu | memory | disk}"

    Option

    Description

    image-name

    Enter the name of the source image.

    --disk-format

    Enter vmdk.

    --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. For disk live resize, you must specify a SCSI adapter.

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

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

    --property img_linked_clone

    Enter false.

    --property os_live_resize

    Specify vcpu, memory, disk, or any combination separated by commas (for example, vcpu,memory,disk).

Results

When you create virtual machines using the image that you defined in this procedure, those virtual machines can be resized without needing to be powered off.