Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

move a virtual machine from one vCenter to another vCenter

Tags:

vmware

esxi

I have the following problem: There two separate vCenters (ESXi). They cannot see each other or communicate in any way. I can create a Clone of a VM in vCenter1 but then I want to move that Clone in vCenter2. Is there a way that I can copy the Cloned VM (files) on an external HDD and move them in the other vCenter?

like image 574
PinkSheep Avatar asked Jul 27 '11 14:07

PinkSheep


People also ask

Can you migrate VMs from one vCenter instance to another vCenter instance?

vSphere 6.0 or later lets you migrate virtual machines between vCenter Server instances. Migration of virtual machines across vCenter Server systems is helpful in certain VM provisioning cases.


2 Answers

I've figure it out the solution to my problem:

  • Step 1: from within the vSphere client, while connected to vCenter1, select the VM and then from "File" menu select "Export"->"Export OVF Template" (Note: make sure the VM is Powered Off otherwise this feature is not available - it will be gray). This action will allow you to save on your machine/laptop the VM (as an .vmdk, .ovf and a .mf file).
  • Step 2: Connect to the vCenter2 with your vSphere client and from "File" menu select "Deploy OVF Template..." and then select the location where the VM was saved in the previous step.

That was all!
Thanks!

like image 116
PinkSheep Avatar answered Oct 20 '22 19:10

PinkSheep


Yes, you can do this.

  1. Copy all of the cloned VM's files from its directory, and place it on its destination datastore.
  2. In the VI client connected to the destination vCenter, go to the Inventory->Datastores view.
  3. Open the datastore browser for the datastore where you placed the VM's files.
  4. Find the .vmx file that you copied over and right-click it.
  5. Choose 'Register Virtual Machine', and follow whatever prompts ensue. (Depending on your version of vCenter, this may be 'Add to Inventory' or some other variant)

The VM registration process should finish with the cloned VM usable in the new vCenter!

Good luck!

like image 42
Evan Powell Avatar answered Oct 20 '22 19:10

Evan Powell