domingo, 26 de agosto de 2012

Como mover maquinas virtuales de un ESXi a otro ESXI

Basicamente tenemos que tener los dos Esxi en el mismo rango , tener paradas las maquinas virtuales en el origen y utilizar el cliente "VMware vsphere client " para realizar el proceso sin tener que pagar una licencia de vmotion.

This process will require that, at least temporary, the “source” ESXi server has access to some storage that will be used by the “destination” ESXi server. In my case, I use a NFS shared Datastore that is visible from both ESXi ; I expect a VMFS on FC or iSCSI to work as well.

As seen previously, you can’t migrate a “living” Virtual Machine ; it has to be paused or shutdown before it can be moved. This is quite expectable as there would be no reasons to pay for vMotion if it could be done by some other way…

What has to be know while dealing with ESXi migration is that, although we’re using virtual hardware, a running Virtual Machine has some kind of adherence to the physical CPU it is running on. In my case, I moved the VMs from a physical ESXi to a virtual one and the paused Virtual Machines couldn’t be restarted in their paused state. You can probably face the same problem if migrating between ESXi that have not the exact same CPU (and CPU features). The error I got was “Your virtual machine did not resume because of a correctable error”. I choose the “Delete” option and the VM started as if I had been savagely powered down. So my advice is to properly shutdown the Virtual Machine before migrating it from one ESXi server to another.

The migration process is then really simple ; at least as simple as seen in the previous section. We’ll assume that the Virtual Machine is already located in some shared space.:
 – Connect to the “source” ESXi server using the vSphere client ;
 – Execute “Shut Down Guest” on the Virtual Machine to be moved ;
 – Right-click on the Virtual Machine object and select “Remove from Inventory” ;
 – Connect to the “destination” ESXi server using the vSphere client ;
 – Open the shared Datastore browser ;
 – Browse to the location where the VM files are and select the VMX file ;
 – Right-click the object and select the “Add to Inventory” action ;
 – Follow the wizard to attach the Virtual Machine to the “destination” ESXi server ;

You can now start the Virtual Machine.

As seen previously, you’ll get a warning message telling you that “The Virtual Machine might have been moved or copied”.

If you’re a lucky Administrator, the Virtual Machine should now be up and running from the “destination” ESXi server. Note that it only takes a few seconds to migrate a Virtual Machine from one ESXi to another (since the VMs is powerred off).

miércoles, 15 de agosto de 2012