Genz
Rajesh Radhakrishnan
25/02/2018 Published 3 weeks ago
Share
https://vmarena.com/wp-content/uploads/2024/11/cloud-services-isometric-composition-with-flat-silhouette-pictograms-big-cloud-storage-with-people-vector-illustration_1284-30499.jpg

VMotion

VMware vMotion enables the live migration of running virtual machines from one physical server to another with zero downtime, continuous service availability, and complete transaction integrity. VMotion is a key enabling technology for creating the dynamic, automated, and self optimizing data center .

vMotion allow users to do below

  • Automatically optimize and allocate entire pools of resources for maximum hardware utilization, flexibility and availability.
  • Perform hardware maintenance without scheduled downtime.
  • Proactively migrate virtual machines away from failing or underperforming servers.

Working of vMotion

Live migration of a virtual machine from one physical server to another with VMotion is enabled by three underlying technologies.

First, the entire state of a virtual machine is encapsulated by a set of files stored on shared storage such as Fibre Channel or iSCSI Storage Area Network (SAN) or Network  Attached Storage (NAS).VMware’s clustered Virtual Machine File System (VMFS) allows multiple installations of ESX Server to access the same virtual machine files concurrently.

 

 

Second, the active memory and precise execution state of the virtual machine is rapidly transferred over a high speed network,allowing the virtual machine to instantaneously switch from running on the source ESX Server to the destination ESX Server. VMotion keeps the transfer period imperceptible to users by keeping track of on-going memory transactions in a bitmap. Once the entire memory and system state has been copied over to the target ESX Server, VMotion suspends the source virtual machine, copies the bitmap to the target ESX Server, and resumes the virtual machine on the target ESX Server. This entire process takes less than two seconds on a Gigabit Ethernet network.

 

 

Third, the networks being used by the virtual machine are also virtualized by the underlying ESX Server, ensuring that even after the migration, the virtual machine network identity and network connections are preserved. VMotion manages the virtual MAC address as part of the process. Once the destination machine is activated, VMotion pings the network router to ensure that it is aware of the new physical location of the virtual MAC address. Since the migration of a virtual machine with VMotion preserves the precise execution state, the network identity, and the active network connections, the result is zero downtime and no disruption to users.

More Detailed Information about vMotion 

1.Storage Subsystem Plays the First Key Role

Instead the server’s hard drives are also virtualized and set either on a Storage Attached Network (SAN) via FibreChannel or iSCSI, or mounted on a Network File System (NFS) volume on Network attached Storage (NAS). While there are other technologies that VMWare can use (VSAN, Hyper-Converged computing, or even storage migration), we are going to focus on this most common configuration.

With the server’s disk virtualized and encapsulated on the network, VMWare uses a Virtual Machine FileSystem (VMS) file, which  can be shared with multiple physical servers running VMWare’s ESXi bare-metal hypervisor. These physical servers all work together to share read-write access to this virtual hard drive. That alone is a pretty amazing feat when you think about the logistics of it!

 

 

Before the VMotion begins a “shadow copy” of the VMware guest’s OS configuration is created on the receiving ESXi host, but is not yet visible in VSphere.  This ghost is just a shell which will receive the memory contents next.

2.The Memory Manager Plays the Second Key Role

The virtualized computer’s memory is also mapped and virtualized it allows VMWare’s VMotion to do something amazing. VMotion takes a snapshot of the system RAM, a copy if you will, and starts the rapid transfer of this memory over the Ethernet network to the chosen host computer.  This includes the states of other system buffers, and even the video RAM.  VMWare engineers refer to this original snapshot as a “precopy”.

While this snapshot is being transferred VMotion maintains a change log buffer of any changes that have happened since the original snapshot was made. This is where faster network speeds are better, allowing a faster VMotion to occur .

 

 

VMotion will continue to make make and copy these change buffers (and integrate them into memory) to the receiving host until the next set of change buffers is small enough that it can be transferred over the network in less than roughly 500ms.  When that occurs, VMotion halts the virtual CPU(s) execution of the guest virtual machine, copies the last buffer and integrates it into the guest’s OS virtual RAM.  VMotion discontinues disk access on the sending host, and starts it on the receiving host.  Lastly VMotion starts the virtual CPU(s) on the receiving machine.

3.The Virtual Switch Network Plays the Final Role

After the virtual CPU(s) are started, VMotion has one final task at hand.  VMWare ESXi runs and controls one or more virtual switches on the local network. This is what the virtual network adapter on the guest OS connects to. And just like any other network, physical or virtual, all of the switches maintain a map of network MAC addresses and what port they are connected to. Since the machine is likely no longer connected to the same physical switch, VMotion instructs the ESXi hosts network subsystem to send out a Reverse ARP (RARP) on the receiving host.  This causes all of the switches, both physical and virtual to update the mappings so that network traffic will arrive at the new host, rather than the old.