You can enable live resize for OpenStack instances by configuring image metadata. With live resize, you can change the disk size, memory, and vCPUs of an instance while the instance is powered on.

The following limitations apply to live resizing:
  • Do not use live resize to create instances using SR-IOV-enabled ports. Live resize is not compatible with SR-IOV.
  • Do not use instances that have been enabled for live resize in tenant virtual data centers. The live resize is not compatible with tenant virtual data centers.
  • Do not add more than 3GB of memory to a Linux 64-bit or a Windows 7 32-bit operating system. For details, see KB 2008405.
Note: Live resize only supports increasing values for disk size, memory, and vCPUs of an instance.

Additionally, 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. There is no support for IDE adapter types.
  • Deploy virtual machines from the image as full clones. Linked clones cannot be live resized.

Procedure

  1. Log in to the Integrated OpenStack Manager as the root user and open the toolbox.
    ssh root@mgmt-server-ip
    toolbox
  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).

    Live resize instances in, out, and across tenant VDCs

    To live resize instances in, out, and across tenant VDCs, perform the following steps:

    • Configure the image for live resize as described in the previous two steps.
    • Create tenant-vdc1 in compute 1.
      viocli create tenant-vdc --name tvdc-01 --project-id ecbf813ee5d54420864247a2edcd76dc --compute compute-c05c9c49-c55
    • Create a flavor and update the flavor property.
      openstack flavor set --property vmware:tenant_vdc='746146ea-a8f2-4be2-8bef-1dabe1249de7' m1.tvdc-01
    • Create instance with the created flavor property which you can put under tvdc1 as follows:
      openstack server create --flavor m1.small --network 39f32be5-7079-4110-8f38-8c3948d3079d --image "Photon 3.0" resize-01
    • Create tenant-vdc1 in compute 1.
      viocli create tenant-vdc --name tvdc-02 --project-id ecbf813ee5d54420864247a2edcd76dc --compute compute-c05c9c49-c55
      • Move instance outside tenant VDC into tvdc-01.
        openstack server resize resize-01 --flavor m1.tvdc-01
        openstack server resize confirm resize-01
      • Move instance from tvdc-01 to tvdc-02.
        openstack server resize resize-01 --flavor m1.tvdc-02
        openstack server resize confirm resize-01
      • Move instance out of tvdc-02.
        openstack server resize resize-01 --flavor m1.small
        openstack server resize confirm resize-01

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.