Sign up for the quarterly Flings Newsletter here!

Cross vCenter Workload Migration Utility

This Fling allows users to easily migrate virtual machines in bulk from a graphical user interface between vCenter Servers using the Cross-vCenter vMotion feature.

Key Features

  • Completely UI-driven workflow for VM migration
  • Provides REST API for managing migration tasks
  • Works with vCenters not part of the same SSO domain
  • Support for batch migration of multiple VMs in parallel
  • Auto-populate inventory for ease of management
  • Supports both live as well as cold migration of VMs
  • Performs storage vMotion, not requiring shared storage
  • Flexible network mappings between source/destination sites

Also see: Bulk VM Migration using new Cross vCenter Workload Migration vMotion Utility Fling.

  • vCenter Servers 6.0 or above
  • Java Runtime Environment 1.8-10
  • Web Browser
  • Please review https://kb.vmware.com/kb/2106952 for Cross vCenter vMotion requirements
  1. Run the utility jar file from a shell window
    Java 8:
    $ java -jar xvm-2.0.jar
    Java 9/10:
    $ java --add-modules java.se.ee -jar xvm-2.0.jar
    Default app port is 8080 which can be changed (e.g., 31000) by providing an additional flag:
    $ java -jar -Dserver.port=31000 xvm-2.0.jar
  2. Connection to the app from the browser. Use IP address/hostname of the machine (127.0.0.1 for localhost) where the utility is running as 'host'
    http://<host>:<port>
  3. Register vCenter servers for migration operations on the 'Register' tab. Provide required parameters:
    Sitename: a name to identify the vCenter server
    vCenter Hostname/IP address, username, password
    Trust server: select to skip SSL verification during VC connection
    
  4. Initiate VM migration operations from the 'Migrate' tab. Progress of migration tasks can be monitored on the home page. Provide required parameters (select values from menu):
    Operation type: supported operations are relocate/clone
    Source and target sites: select sites from already registered sites
    Source VMs: select datacenter and VMs from the source site for migration
    Placement target: select target compute resource (host or cluster)
    Target datastore: select target datastore for placement
    Network mappings: select networks to map from source to target sites
    

APIs

REST APIs for automating migration tasks can be accessed/executed from the API link in the top navigation bar which links to the Swagger UI. Here are examples of site registration and performing migration task through the API:
Site registration
curl -X POST http://127.0.0.1:8080/api/sites  -H "Content-type: application/json" -d '{"sitename":"site1", "hostname":"myvcenter.server.hostname","username":"myusername","password":"mypassword","insecure":false}'

Migration task
curl -X POST http://127.0.0.1:8080/api/tasks  -H "Content-type: application/json" -d '{"operationType":"relocate","sourceSite":"site1","targetSite":"site2","sourceDatacenter":"Datacenter","vmList":["vm1", "vm2", "vm3"],"targetDatacenter":"Datacenter","targetCluster":"Cluster","targetHost":null,"targetDatastore":"Datastore","networkMap":{"Private Network":"Internval Network", "VM Network":"VM Network"}}'

Notes

  • Application logs are stored in xvm.log file
  • The app stores its state in memory, implying a restart of the app loses data about registered sites and migration tasks
  • Duplicate object names (networks, vms) in the same datacenter can cause the inventory to not display properly and the utility to misbehave.
  • Please refer to this KB article for supported configurations for Cross vCenter vMotion https://kb.vmware.com/kb/2106952
https://www.youtube.com/watch?v=r_kG8ny-qss

Version 2.3, October 18, 2018

  • Added support for migration within a single vCenter server

Version 2.2, July 16, 2018

  • Support for vSphere Resource Pool and VM folder for placement under advanced options
  • Support for VMware Cloud on AWS (VMC) by specifying resource pool and folder options

Version 2.1, June 21, 2018

  • Increased simultaneous migration limit to 100 from 10
  • Added check to ignore unknown fields for inventory info
  • Fixed source/target site names in task status view
  • Updated status API to include version number

Version 2.0, May 4, 2018

  • Added support to select individual host as the placement target
  • Added support for migrating VMs with shared datastore
  • Added clone functionality in addition to relocate
  • Added resource summary details for placement targets
  • Added a prompt to verify site thumbprint during SSL verification
  • Added a link to refresh vm list in the inventory view
  • Updated REST APIs to add operation type parameter

Version 1.1.0, March 30, 2018

  • Added a detailed task info view for migration tasks
  • Fixed an issue with site name containing “DOT” characters
  • Display VM resource (CPU, Mem, Disk) info
  • Add a button to clear selected inventory data

Add a Comment
Report a Bug