vSphere vMotion process
vSphere vMotion works by migrating the entire state of a virtual machine from one host to another, including the memory content and all the information that define the virtual machine, such as BIOS, devices, MAC addresses, etc. Let’s take a closer look at the vMotion migration process (image source: VMware):
In the picture above you can see that the VM is being transfered from the source ESXi host to the destination ESXi host (esx02). Here is a description of each step in the migration process:
1. An ESXi administrator initiates a vMotion migration.
2. the VM’s memory state is copied from the source to the destination ESXi host over the vMotion network. Users continue to access the VM and update pages in memory. A list of modified pages is kept in a memory bitmap on the source host. This process occurs iteratively.
3. After the VM’s memory is copied to the target host, the VM on the source host is quiesced. This means that it is still in memory but is no longer servicing client requests for data. The memory bitmap file and the VM device state is then transferred to the target.
4. The destination host (esx02) reads the addresses in the memory bitmap file and requests the contents of those addresses from the source host.
5. After the content of the memory referred to in the memory bitmap file is transferred to the destination host, the VM starts running on that host. A Reverse Address Resolution Protocol (RARP) message is sent to notify the subnet that the VM’s MAC address is now on a new switch port.
6. After the VM is successfully operating on the destination host, the memory the VM was using on the source host is marked as free.