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

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. Prepare the volume for migration.

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

    viocli ds-migrate-prep [-d DEPLOYMENT] DC_NAME DS_NAME

    Option

    Description

    -d DEPLOYMENT

    Indicates the name of the VMware Integrated OpenStack deployment.

    DC_NAME

    Indicates the data center name.

    DS_NAME

    Indicates the datastore name.

  4. Log in to the vSphere Web Client.
  5. Locate the virtual machine that corresponds to the Nova instance to which the volume is attached.
  6. Use the Storage vMotion feature in the vSphere Web Client 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.

    See the vSphere product documentation about using Storage vMotion.

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