vMotion is a VMware concept of moving a running VM from one ESXi host to another ESXi host. There is not service interruption when a VM moves from one host to another and also helps to load balance VM load across hosts. For example if there are multiple VMs running on an ESXi host which are causing the resource crunch on that host, then you can take few VMs from this host and move them to another host so the resource crunch doesn’t occur on any of the hosts.
There are certain prerequisites for a vMotion to occur as below:
- Shared storage is required so the VM once moved from one ESXi host to another should be able to access its file system present on a shared data store. Shared data store is accessible from multiple ESXi hosts.
- VM is also connected to a vSwitch. These vSwitch on both the ESXi hosts participating in vMotion need to have same configuration to provide VM connectivity as in vMotion we keep the IP on VM unchanged.
- VCenter is required to carry on the vMotion from once host to another.
Let us take an example below to understand vMotion concept
- We have a VM running on ESXi host 1 and we want to vMotion it to ESXi host 2.
- VMkernel port has been configured on each host to handle the vMotion traffic.
- Data Store is a shared storage so the files on data store are accessible via both ESXi hosts.
- The state of VM on ESXi host 1 is copied to ESXi host 2 via the VMkernel port. An exact copy is now created on the ESXi host 2. While the copying occurs any changes made on the VM on ESXi host 1 will also be copied over the duplicate copy now on ESXi host 2.
- Once the vMotion process is over the VM on the ESXi host 1 is halted and the VM on host 2 takes over.
- There won’t be any noticeable outage in this process.
In vSphere 6 we can take a VM running on host managed by one vCenter server to a host managed by another vCenter server.
VM can be migrated from one vSwitch to another using cross network vMotion.
Long distance vMotion is also now supported for connections under 150 milliseconds of latency.