Saturday, 5 March 2016

How VMware Virtual Machine vMotion works?

Or, How Virtual Machine vMotion works in backend in VMware?

Or, Understanding technical background processing of Virtual Machine’s vMotion.

Or, Sequence of Virtual Machine vMotion operation in VMware.

Virtual Machine vMotion: vMotion allows Virtual Machine to be migrated from one ESXi host to another ESXi host without causing any downtime to the Virtual Machine.

If you are performing a normal vMotion of a Virtual Machine, vMotion do not copy or migrate all contents of the Virtual Machine to destination host (e.g. datastore), it only copies the memory state(CPU and RAM information) of the Virtual Machine and migrate it to elected (manual or automatic) ESXi host using Pre-Copy Mechanism.

Pre-Copy Mechanism: Virtual Machine’s vMotion uses Pre-copy mechanism for migrating memory state of the virtual machine from one to another ESXi host which prevents any downtime or connectivity breakdown of the Virtual Machine which is being migrated.

Example: If a VM is having 16GB RAM capacity and its being migrated to another host, First It will initiate migration of free memory (e.g. 10GB, Please Note: - VMs use memory what needed by them up to maximum allocated capacity, if you have given 16GB memory, means not that the VM will always reserve 16GB RAM capacity for it) to the destination host. Now, the VM dirties 6GB Memory, it will again attempt migration of remaining 6GB memory and if still some dirties memory is remaining the same process will be initiated again till the time all memory state is migrated.

Once all the memory state is migrated successfully to destination ESXI host, the vMotion operation is completed successfully.
IMP Note: For Device state and CPU migration, Checkpoint mechanism works. Once all the Memory state is migrated to destination host, it free up the VM’s resources from source host.

Sequence of VM vMotion operation:
1. Pre-Copy Memory state from Source to Destination.
2. Quiese VM on Source Machine.
3. Transfer Device state from source to destination.
4. Resume VM on Destination.
5. Copy remainder of memory from source to destination.
6. Free VM resources from Destination.

Friends, I have written it based on my best possible understanding of this VM vMotion concept. Please write me about your feedback, suggestion or if you feel anything should be corrected…
Happy Learning. Cheers…

No comments:

Post a Comment