Migrate Tenant Storage

You can migrate all vApps, independent disks, and catalog items of one or more organizations from one or more datastores to different datastores.

Before you decommission a datastore, you must migrate all the items stored on that datastore to a new datastore. You might also want to migrate an organization to a new datastore that has more storage capacity or uses a newer storage technology such as VMware vSAN.

Important:

Tenant storage migration is a resource-intensive operation that can run for a long time, especially when there are many assets to migrate. For more information about migrating tenant storage, see https://kb.vmware.com/kb/2151086.

Prerequisites

  • For each storage policy containing a source datastore that you want to migrate, verify that there is at least one destination datastore to which to migrate. You can create destination datastores or use existing ones.
  • Create a vCloud API session as a system administrator or with a role that has the Organization: Migrate Tenant Storage right.

Procedure

  1. Retrieve the XML representation of the vSphere platform extensions.
    Use a request like this one.
    GET https://vcloud.example.com/api/admin/extension
  2. Examine the response to locate the Link element that contains the URL for migrating tenant storage.
    <Link
       type="application/vnd.vmware.cloud.tenantMigrationParams+xml"/>"
       rel="add"
       href="https://vcloud.example.com/api/admin/extension/action/migrateTenant"/>
  3. Create a TenantMigrationParams element that includes the source and the target datastores and references one or more organizations to migrate.
  4. POST the TenantMigrationParams element you created in Step 3 to the URL described in Step 2.
    See the request portion of Migrate Tenant Storage.

Example: Migrate Tenant Storage

This example migrates items owned by organization with reference https://vcloud.example.com/api/org/26 from datastore https://vcloud.example.com/api/admin/extension/datastore/100 to datastore https://vcloud.example.com/api/admin/extension/datastore/200.

Request:
POST https://vcloud.example.com/api/admin/extension/action/migrateTenant
Content-type: application/vnd.vmware.cloud.tenantMigrationParams+xml
...
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<vmext:TenantMigrationParams
   xmlns="http://www.vmware.com/vcloud/v1.5"
   xmlns:vmext="http://www.vmware.com/vcloud/extension/v1.5"
   name="example">
   <Description>Example migration params</Description>
   <vmext:orgs>
      <Org href="https://vcloud.example.com/api/org/26" />
   </vmext:orgs>
   <vmext:sourceDatastores>
      <vmext:Datastore
         href="https://vcloud.example.com/api/admin/extension/datastore/100" />
   </vmext:sourceDatastores>
   <vmext:targetDatastores>
      <vmext:Datastore
         href="https://vcloud.example.com/api/admin/extension/datastore/200" />
   </vmext:targetDatastores>
</vmext:TenantMigrationParams>

The response includes a Task that tracks the migration.

Response:
202 Accepted
Content-Type: application/vnd.vmware.vcloud.task+xml
...
<Task ... >
   ...
</Task>