To migrate an attached Cinder volume to a different datastore, you must migrate the virtual machine that corresponds to the instance to which it is attached.

Prerequisites

Detach any snapshots that are attached to the volume.

Procedure

  1. Log in to the OpenStack Management Server and prepare the volume for migration.

    This step prepares all volumes on the specified datastore for migration.

    sudo viocli ds-migrate-prep dc-name ds-name

    Option

    Description

    DC_NAME

    Enter the data center that contains the desired volume.

    DS_NAME

    Enter the datastore that contains the desired volume.

  2. In the vSphere Web Client, locate the virtual machine that corresponds to the compute instance to which the volume is attached.
  3. Use Storage vMotion to migrate the virtual machine to a different datastore.

    The volume migrates to the new datastore, but only the disk of the shadow VM moves to the new datastore. The shadow VM remains on the old datastore with no disk.

  4. (Optional) To fix the disk of the shadow VM, run a volume detach procedure.

    The detach operation disconnects the volume from the instance. Failures to read or write from the volume might occur.