Use the viocli volume-migrate command to migrate one or more non-attached Cinder volumes from one datastore to another.
To migrate attached volumes, you must migrate the entire instance.
To migrate volumes for shadow virtual machines, use the viocli ds-migrate-prep command and then complete the migration using the vSphere Web Client.
The viocli volume-migrate command uses the following syntax.
viocli volume-migrate [-d NAME] {--volume-ids UUID1[,UUID2...] | --source-dc SRC-DC-NAME --source-ds SRC-DS-NAME] DEST-DC-NAME DEST-DS-NAME [--ignore-storage-policy]
Parameter | Mandatory or Optional | Description |
---|---|---|
-d NAME or --deployment NAME |
Optional |
Name of the deployment to use. If you do not enter a value, the default deployment is used. |
--volume-ids UUID1 |
Mandatory unless --source-dc and --source-ds are used. |
Migrates one or more volumes specified by UUID. To specify multiple volumes, separate the UUIDs with commas. For example, the following command migrates two volumes to datastore DS-01 in data center DC-01.
|
--source-dc SRC-DC-NAME |
Mandatory unless --volume-ids is used. |
Identifies the source data center. This option must be used together with the --source-ds option. |
--source-ds SRC-DS-NAME |
Mandatory unless --volume-ids is used. |
Identifies the source datastore. This option must be used together with the --source-dc option. For example, the following command migrates all the volumes from datastore DS-01 in data center DC-01 to datastore DS-02 in data center DC-02.
|
DEST-DC-NAME |
Mandatory |
Specifies the destination data center. |
DEST-DS-NAME |
Mandatory |
Specifies the destination datastore. |
--ignore-storage-policy |
Optional |
Ignores storage policy compliance check. This parameter enables volume migration when the destination datastore does not comply with the storage policy of the migrated volume. |
You can also run viocli volume-migrate -h or viocli volume-migrate --help to display the parameters for the command.