Site icon UnixArena

Migrate VMs between vCenters – Cross vCenter Workload Migration

How to migrate VM’s between two vCenter servers ?  Is it possible ?  Nothing is impossible in VMware world. VMware flings community has developed a cool tool is called “Cross vCenter Workload Migration” utility. Using this utility , you could simply migrate the VM from one vCenter server to another vCenter without any downtime using the Cross-vCenter vMotion feature. It’s completely user interface driven workflow for VM migration. It also support for batch migration of multiple VMs in parallel if the workload permits. Another highlight of this tool is , you don’t need a shared storage to perform the migration. It supports both Live & cold migrations.

This utility works only on VMware vSphere 6.0 and above versions. You could also migrate the VM’s between vSphere 6.0 and 6.5 version.

Cross vCenter Workload Migration Utility

 

Let’s do the small test in LAB environment using this utility.

1.Download Cross vCenter Workload Migration utility from VMware labs on your laptop.

2. Unzip the file.

XVMotion Files

 

3. Open the command prompt and navigate to the directory where xvm-1.1.jar resides. Execute the following commands.

C:\test\xvm-1.1\xvm-1.1>java -jar xvm-1.1.jar

 

4. Once the utility is initialized like below , Open a browser.

C:\test\xvm-1.1\xvm-1.1>java -jar xvm-1.1.jar
00:06:36 INFO  Starting ApiController on INL-JYWKG32 with PID 8128 (C:\test\xvm-
1.1\xvm-1.1\xvm-1.1.jar started by lingeswaran.rangasam in C:\test\xvm-1.1\xvm-1
.1)
00:06:36 DEBUG Running with Spring Boot v1.5.1.RELEASE, Spring v4.3.6.RELEASE
00:06:36 INFO  No active profile set, falling back to default profiles: default
00:06:38 INFO  HV000001: Hibernate Validator 5.3.4.Final
00:06:43 INFO  Starting service Tomcat
00:06:43 INFO  Starting Servlet Engine: Apache Tomcat/8.5.11
00:06:44 INFO  Initializing Spring embedded WebApplicationContext
00:06:46 INFO  Context refreshed
00:06:46 INFO  Found 1 custom documentation plugin(s)
00:06:47 INFO  Scanning for api listing references
00:06:47 INFO  Initializing ProtocolHandler ["http-nio-8080"]
00:06:47 INFO  Starting ProtocolHandler [http-nio-8080]
00:06:47 INFO  Using a shared selector for servlet write/read
00:06:47 INFO  Started ApiController in 12.323 seconds (JVM running for 18.047)
00:06:47 INFO  Cross vCenter Workload Migration Utility Initialized!
00:07:28 INFO  Initializing Spring FrameworkServlet 'dispatcherServlet'

 

5. In the browser , access localhost with port 8080.  [  http://localhost:8080/  ] . Click on “Migrate” to supply the required information for migration.

Cross vCenter Workload Migration Utility Home page

 

6. You must register the required site on this page for migration.

Register – VCenter Server – Migration Request Information

 

Example:

Enter the vCenter IP or Hostname

 

7. Register the second site with different  vCenter.

Register Second site vCenter – on Migration Utility

 

8. Here is the list of registered sites with different vCenters.

List the Registered Sites – vCenters

 

9. You could go back to the command prompt and refer the logs if you get any errors while registering it.

01:44:43 INFO  Registering site BLR for vc: 192.168.3.20
01:44:43 DEBUG Loading xvm keystore
01:44:57 DEBUG Getting certificate from VC: 192.168.3.20
01:44:57 DEBUG Obtained valid certificate for https://192.168.3.20/sdk
01:45:02 INFO  Running session thread for 192.168.3.20
01:45:02 INFO  Successfully registered site BLR
01:45:55 INFO  Registering site CHE for vc: 192.168.3.22
01:45:55 DEBUG Loading xvm keystore
01:46:07 DEBUG Getting certificate from VC: 192.168.3.22
01:46:07 DEBUG Obtained valid certificate for https://192.168.3.22/sdk
01:46:11 INFO  Running session thread for 192.168.3.22
01:46:11 INFO  Successfully registered site CHE

 

10. Click on the migrate tab and enter the source & target information.

Select the Source & target cluster – VM Migration

 

11. Once you click on submit , VM will migrate from one site (vCenter) to another site (vCenter).

Migration status

 

So that test confirms that Cross vCenter Workload Migration Utility just works well. You could give a try in test or LAB environment.  Hope this article is informative to you.

Share it ! Comment it !! Be Sociable !!!

Exit mobile version