Cross vCenter VM Mobility Fling – macOS?

The VMware Cross vCenter VM Mobility – CLI was recently updated so I decided to try it out. In short, this little Java based application allows you to easily move or clone VMs between disparate vCenter environments.

The Fling is listed with the following requirements:

  • JDK 1.7 or above
  • Two vCenter instances with ESX 6.0
  • Windows : Windows Server 2003 or above
  • Linux : RHEL 7.x or above, Ubuntu 11.04 or above

There is no mention of macOS there, but I decided to give it a go any way, and it turns out that it works just fine on macOS as well!
Just make sure you have the Java JDK installed locally. When I ran it the first time, I got the following error, since the JAVA_HOME environment variable was not set.

~/Downloads/xvc-mobility-cli_1.2$ sh xvc-mobility.sh
set JAVA_HOME to continue the operation

This is very easy to fix, just run the following command in your terminal of choice, and xvc-mobility.sh should work just fine on your Mac.

export JAVA_HOME=$(/usr/libexec/java_home)

Next up is running the fling with the correct parameters (this is a clone operation, not a relocate):

~/Downloads/xvc-mobility-cli_1.2$ sh xvc-mobility.sh -svc [source-vcenter] -su [source-vcenter-username]
-dvc [destination-vcenter] -du [destination-vcenter-username]
-vms [vm-name] -dh [destination-host]
-dds [destination-datastore] -op clone -cln [destination-vm-name]
...
13:41:40.591 [main] INFO com.vmware.sdkclient.vim.Task - CloneVM_Task | State = SUCCESS | Error = null | Result = com.vmware.vc.ManagedObjectReference@d9a221a7
13:41:40.597 [main] INFO com.vmware.sdkclient.vim.Task - Monitor task end
13:41:40.597 [main] INFO com.vmware.sdkclient.vim.Task - CloneVM_Task took : 0:51:33.728
13:41:40.603 [main] INFO c.v.s.helpers.CrossVcProvHelper - Successfully cloned the vm:[destination-vm-name]

I was able to clone a VM from my lab in Bergen to my lab in Oslo, without any problems what-so-ever. Not only is that a Cross vCenter vMotion, but also a Cross Country one, awesome!

Now this is just an example, please check the official documentation for all the parameters, and what the tool expects.

New Fling from VMware Labs: Makyo

VMware Labs has released a new fling called Makyo (魔境 makyō means “ghost cave” or “devil’s cave.”) which basically is a tool to copy VMs or vApps from one vCenter instance to another.

It works by doing an automated OVF export on the source vCenter, and then an import on the destination vCenter.

mayko-summary

 

The plugin integrates directly into the vSphere Web Client, and I hope to see this feature installed by default in future versions of the Web Client.

A small suggestion:

I hope that in future versions of Makyo, you could use the same tool to copy VMs or vApps from standalone ESXi hosts into your vCenter infrastructure. Today you can use VMware Workstation to move and copy between local to Workstation storage, standalone ESXi hosts and vCenter managed infrastructure and  adding the same kind of feature set to the Web Client would be great.

It would make it easier to migrate from small test environments to live production environments, all inside the vSphere Web Client.