You can migrate Cinder volumes that are unattached to instances to specified target datastores.

Prerequisites

Verify that the volume does not have any snapshots attached. If so, you must detach them first.

Procedure

  1. Using SSH, log in to the VMware Integrated OpenStack manager.
  2. Switch to root user.
    sudo su -
  3. Migrate the volume.
    viocli volume-migrate [-d [NAME]] \
                          [--source-dc [SRC_DC_NAME]] [--source-ds [SRC_DS_NAME]] \
                          [--volume-ids [VOLUME_UUIDS]] [--ignore-storage-policy] \
                          DEST_DC_NAME DEST_DS_NAME [-h] [-v]

    Parameter

    Mandatory or Optional

    Description

    -d, --deployment NAME

    Automatic

    Name of the deployment in which the volumes will be migrated.

    Applied automatically. The default value is the name of the current deployment.

    --source-dc SRC_DC_NAME

    Mandatory unless VOLUME_UUIDS is specified.

    Identifies the source datacenter.

    Used with the --source-ds parameter to uniquely identify the datastore.

    --source-ds SRC_DS_NAME

    Mandatory unless VOLUME_UUIDS is specified.

    Used with the --source-dc parameter to uniquely identify the datastore.

    For example, the following command migrates all the volumes from datastore DS-01 in datacenter DC-01 to datastore DS-02 in datacenter DC-02.

    viocli volume-migrate --source-dc DC-01 --source-ds DS-01 DC-02 DS-02

    --volume-ids VOLUME_UUIDS

    Mandatory unless SRC_DC_NAME and SRC_DS_NAME are specified.

    Migrates one or more individual volumes specified by UUID value. To specify more than one volume, separate the UUIDs by commas.

    For example, the following command migrates two volumes specified by their UUID values to datastore DS-01 in datacenter DC-01.

    viocli volume-migrate --volume-ids 25e121d9-1153-4d15-92f8-c92c10b4987f, 4f1120e1-9ed4-421a-b65b-908ab1c6bc50 DC-01 DS-01

    --ignore-storage-policy

    Optional

    Ignores storage policy compliance check.

    Include this parameter to prevent migration failure if the migrated volume includes a storage policy with which the destination datastore does not comply.

    DEST_DC_NAME

    Mandatory

    Specifies the destination datacenter.

    DEST_DS_NAME

    Mandatory

    Specifies the destination datastore.

    -h, --help

    Optional

    Show the use and arguments for this command.

    -v, --verbose

    Optional

    Enter verbose mode.