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

  • Determine the storage policies used by the organization VDCs of the target organizations. See #GUID-45D11F58-E150-4AA4-8370-D9B33FD8DF6E.
  • 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. For further information about determining the datastores in the storage policies used by the target organizations, see the vSphere Storage documentation.
  • Create a VMware Cloud Director API session as a system administrator or with a role that has the Organization: Migrate Tenant Storage right.

Procedure

  1. Log in to the VMware Cloud Director Service Provider Admin Portal as a system administrator or with a role that has the Organization: Migrate Tenant Storage right.
  2. Start the Migrate Tenant Storage wizard.
    • Under Cloud Resources, select Organizations and click Migrate Tenant Storage.
    • Under vSphere Resources, select Datastores and click Migrate Tenant Storage.
  3. Select one or more organizations with storage items that you want to migrate, and click Next.
  4. Select one or more source datastores to migrate, and click Next.
    The wizard lists all datastores in the system.
  5. Select one or more destination datastores, and click Next.
  6. Review the Ready to Complete page, and click Finish to begin the migration.
  7. Retrieve the XML representation of the vSphere platform extensions.
    Use a request like this one.
    GET https://vcloud.example.com/api/admin/extension
  8. 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"/>
  9. Create a TenantMigrationParams element that includes the source and the target datastores and references one or more organizations to migrate.
  10. POST the TenantMigrationParams element you created in Step 9 to the URL described in Step 8.
    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>

What to do next

#GUID-1ADE6AA9-86CB-4CEB-AE85-D764B8E3D249