Live Migration of Virtual Machine in Google Cloud

Published: 21 June 2021
on channel: Decode ITES
2,729
14

#DecodeITeS

Live Migration of VM instances in GCP
Live Migration of VM instances is a key feature of the Google Cloud Platform Compute Engine.
 
In Google words “Compute Engine offers live migration to keep your virtual machine instances running even when a host system event, such as a software or hardware update, occurs. Compute Engine migrates your running instances to another host in the same zone instead of requiring your VMs to be rebooted. This allows Google to perform maintenance that is integral to keeping infrastructure protected and reliable without interrupting any of your VMs. When a VM is scheduled to be live migrated, Google provides a notification to the guest that migration is imminent.”
 
That means when Google needs downtime for host maintenance list BIOS upgrade, patches, hardware correction, etc., your VM instance will be migrated to another host without any downtime. This is a need of an hour in today's time when systems are busy 24X7 and downtime planning is most difficult task for user-facing systems.
 
Live Migration supports the VM running with Local SSDs whereas VM instances with GPU and Preemptible instance do not support Live Migration, instance will be terminated.

It’s Completely Free.


What can trigger Live Migrations?

Several conditions can trigger Live Migration, some of them are listed below for reference.
 
Timely maintenance and upgrades infrastructure.
Maintenance Network and power grid maintenance.
Replacement of End of live hardware
Hardware failures like memory, CPU, network interface cards, disks, power, and so on.
Host OS, firmware, and BIOS upgrades.
Security-related patches with urgent deployment.
System configuration changes, including changing the size of the host root partition, for storage of the host image and packages


Live Migration Process

The live migration process is one of the key features of Google Cloud Compute Engine. It moves the VM from one host to another and complete migration is transparent to the guest OS and connected users.
 
VM Live migration process begins with notification to move VM due to multiple factors that need host maintenance like BIOS update, patching, etc.
 
Google Cluster management keeps watching such events and triggers migration as per set policies and schedules. 


Live Migration Stages

Once VM is selected by Google Cluster Managers, the Migration process triggers and ask the destination host to keep new empty VM ready for migration. This is the 3 stage process.
 
During pre-migration brownout: This is the initial phase where VM instances are still running on the source or original host and VM state are already send to the destination or new host. Google engine copies all files and memory to target VM. The time required in the pre-migration state copy completely depends on VM size.  

During blackout: This is the 2nd phase and the most crucial one. This is the time when VM is not running on any host. VM is paused to send all state to the target host. The blackout phase is restricted to 5 seconds. In a blackout, the system clock jumps forward to 5 seconds, and in case of blackout is not completed in this time, process break and VM Live Migration will be cancelled.  

During post-migration brownout: The last phase where VM is online on new target host and Source VM from the original host is still available for any sort of data required or till the network catch up with the connection on new VM. In the meantime, any connection received by the source VM will be forwarded to the new target host.


Watch video Live Migration of Virtual Machine in Google Cloud online without registration, duration hours minute second in high quality. This video was added by user Decode ITES 21 June 2021, don't forget to share it with your friends and acquaintances, it has been viewed on our site 2,729 once and liked it 14 people.