Thursday, 4 July 2024

vSphere 8 vMotion | Concepts | Requirements | Configurations| General Information - Episode#6

 How vMotion Works

There are on broader level 2 types of migration for workloads depending on their status (Either Power-on or Power-off). If the workload is Power-off and you migrate the VM then it is call or known as Cold migration. But if the workload is Powered On and you migrate than it is called or known as Hot Migration.

Where do we do hot migrations and what are the benefits? 

  • Migrate VM when its powered on and users are connected without loosing Connectivity and data.
  • Hardware maintenance of Hyper-visor is not a problem if workload is Powered on and connected
  • This migration can be done automatically depending on Hardware resources availability using DRS

Lets, talk about this in more details

If an application that represents a Business and Business availability then it should not be unavailable by any means. Whether you update or upgrade Hardware/Software or do maintenance activity while 100s and 1000s of people are connected to that Application.

If someone says that we can achieve this by having redundancy of application interfaces than the answer to that response is "Yes" but not 100% if number of connections are served by 1 Interfaces of Application Which runs on top of a hardware that require upgrade or maintenance than Connection are required to be lost resulting in Application unavailability or interruption.

So, vMotion is a technology that keep the Virtuali machine available even in the process of underlying hardware update or upgrades. And even in the event of software upgrades of hyper-visors (ESXi hosts) without letting users know about it while these users are connected to the very same instance of VM.

Requirements!

  • Configure VMKernel ports for ESXi host to ESXi host communication
  • 250 Mbps minimum required.
  • Configure common (Shared Storage) Data-store for VMs amongst the ESXi hosts
  • ESXi hosts must have common type of CPU (Family = Intel / AMD)
  • VMs must not connected to the local hardware resources like DVD, CPU Pinning or local Datastore

If you comply with the above points then you have configured your vMotion configuration easily and you paved the path to configure DRS which is the automated (AI based) and VM score based service to identify VM requirements for resource need.

how to initiate vMotion for a VM?

  • Just right click the VM and from the pop-up menu select migrate
  • Choose "Compute" migration and select the "Target" host.

Step#1 From Pop-up menu choose "Migrate"




































Step#2 Choose type of migration "Compute"









Step#3 Choose compute (i.e. Target ESXi host where you want to migrate selected VM)











Step#4 is to select network if VM was on virtual standard Switch but if VM is on distributed switch then no need to go for network stuff because network state and configuration moves with the VM (or remain the same accross ESXi host only if target ESXi host falls under same vDS)

Step#5 you also choose VMotion priority. By default is the "Normal" priority but you can set it to high priority while having multiple VMs migration. This is a system setting doesnt require any numbers to set (like Higher number high priority etc). 

If you set high priority for VMs then allocation of resources like CPU and Memory will be provided at higher priority (first) amongst other VMs.

And at the last page when your migration is about to initiate, it tells you whether you can migrate the VM/VMs or not (may be because of compatlity issues or some other problems).

As soon as you initiate the migration the VM(s) migration process initiates and finishes up without connected users of that Workload know about migration. 

So what happens in this migration?

As we mentioned above in "Requirements" that a single vMotion require 250Mbps. Why is it needed and what kind of data it moves?

  • VM occupied Memory on source ESXi host migrates to the Target ESXi host using vMotion VMkernel
  • Because Memory pages update and managed so quickly then after copying complete memory from source ESXi host to Target ESXi host any new changes are then copied as "Bitmap" images until minor changes just completed
  • Then comes a quick pause to switch over from source to target esxi host known as "Quise"
  • During this phase a reverse ARP / Gratituious ARP initiated by target ESXi host letting first hope physical switch know for updating CAM table to initiate VM traffic right after VM switch-over happens.
  • Because VM data files are located on a single (Datastore) storage so its access by Target host is required which will be assessed and verified before migration initiates.

We shall discuss "Cross-vCenter vMotion" later. I hope you enjoyed the topic. stay tuned!

No comments:

Post a Comment

My Posts

vSphere 8 HA | Isolation Addresses | Admission control Policy - Skill Enhancement Series - Advanced Administration - Episode#8

 In my last blog about vSphere HA basic concept, I explained the conceptual part of vSphere HA with some design tips. Now, in the continuat...