What is live migration?
Live migration is the process of moving a virtual machine (VM) from one host to another without interrupting access to the VM. The time between suspending the old VM and starting the new one is brief, making it possible to avoid service interruptions during migrations. Live migration is used in situations like planned maintenance or to balance workload resources. Live migration involves the transfer of VM memory, network connectivity, and storage to a new destination within the cluster.
What are the types of VM migration?
When it comes to migrating virtual machines, there are multiple types of migration with the two most common being live migration and cold migration.
Live (hot) migration
This is when a VM continues to run on the source host machine while its memory pages are being transferred to the destination host. When the migration is almost complete, the VM will briefly pause then resume on the destination host. Because live migration doesn’t involve shutting down VMs, your downtime is kept to a minimum or imperceptible. This is a good option for VMs that require constant uptime. However, if a VM can modify memory pages faster than they can be transferred, like VMs under heavy input-out (I/O load), then cold migration must be used instead.
Cold migration
This type of migration is also considered non-live migration. It involves shutting down a running VM before transitioning from the source host to the destination host. While the VM is shutdown, its configuration and memory is copied to the destination host, and then the VM resumes on the new host. This creates downtime resulting in your system being temporarily unavailable or inoperative. However, it is a reliable migration process and a good option for VMs under heavy memory load.
Warm migration
This type of migration reduces downtime by copying most of the VM data during a precopy stage while the VMs are running. During the cutover stage, the VMs are stopped and the rest of the data is copied.
Red Hat resources
What are the reasons for migrating VMs?
Migrating VMs can be useful for:
- Load balancing: VMs can be moved to host machines with lower usage if their host becomes overloaded or if another host is under-utilized. Through load balancing, you can improve VMs capacity and network performance.
- Hardware independence: Hardware independence is facilitated by the hypervisor, which isolates the operating system (OS) and resources from the VMs. Because they run as isolated environments, VMs aren't dependent on any specific hardware. In many situations, you can migrate a VM from one piece of hardware to another without experiencing any downtime. (There are some limitations to this however, such as when switching from one CPU architecture to another.)
- Energy saving: VMs can be redistributed to other hosts, and the unloaded host systems can thus be powered off to save energy and cut costs during low usage periods.
- Geographic migration: VMs can be moved to another physical location for lower latency or when required for other reasons, like balancing for fault tolerance or disaster recovery.
What are some well known VM live migration tools?
All popular virtualization platforms include live migration tools. Some of these technologies include:
Red Hat® OpenShift® Virtualization live migration: Based on the KubeVirt project, OpenShift Virtualization includes a live migration tool built in. Live migration moves a virtual machine from one node to another in the OpenShift cluster.
VMware vSphere vMotion: vSphere vMotion is VMware’s live migration process that eliminates downtime while enabling a running VM to be moved from one physical server to another.
Hyper-V from Microsoft Windows Server: As a Hyper-V feature in Windows Server, live migration allows VMs to move from one Hyper-V host to another.
Nutanix: Nutanix AHV’s live migration feature lets a guest VM move from one AHV host to another AHV host or cluster if the chosen host has available resources.
The step-by-step process of live migration
Live migration takes place in several steps. The steps can vary based on the platform and use cases, but the goal of live migration remains the same. Below are the steps on how OpenShift Virtualization achieves live migration.
Step 1: Preparation
The source node prepares the VM for migration, and the scheduler that exists at the cluster level (which in this case is OpenShift scheduler) chooses the desired destination node. Because live migration depends on shared storage, both the source and destination mount, or access, the same storage at the same time when the VM image is stored.
Step 2: Request
Next, the source node initiates a migration request to the destination node. The destination node starts loading the VM image and reserves the correct container size. This step also requires a virtualization platform to allow the VMs resources to be distributed between the two environments and run without interruption. If there are no resources available, the VM continues running in the source node with no impact.
Step 3: Transfer
The hypervisor, a software that creates and runs VMs, copies the memory from the source node to the destination. In both nodes, there is a paused copy of the VM, but the source node is considered the main node to allow migration to continue in the event of a failure.
Step 4: Finalize
Once the transfer has taken place, the destination node signals to the source node that it has received the OS image and executed the migration transaction. Now, the destination node becomes the primary node. The source node can now terminate the original VM.
Step 5: Completion
With a new primary node, live migration is done. The migrated VM runs on the destination node, and operations can continue as usual.
Why choose Red Hat to support live migration?
Is OpenShift Virtualization right for your VMs? Video duration: 1:57
Red Hat’s portfolio of solutions for VMs and virtualization can support you in your live migration process.
Migrate your VMs and maintain your momentum
Red Hat’s trusted products and partner ecosystem deliver comprehensive virtualization solutions. Migrate your virtual machines now to Red Hat OpenShift Virtualization, a modern app platform–based on KVM and KubeVirt–that integrates virtual and containerized workloads to provide flexibility without added complexity. Or, for a dedicated virtualization solution, explore Red Hat OpenShift Virtualization Engine, a streamlined, cost-effective offering to deploy, manage, and scale VMs exclusively. The included migration toolkit for virtualization provides the tools you need to start your migration in a few simple steps.
Automate your migration
Use automation to accelerate delivery with Red Hat Ansible® Automation Platform–from migration at scale to Day 2 operations and remediation. With this flexible approach, you can automate tasks to improve speed and efficiency of IT operations.
Manage and modernize at your own pace
Monitor the security and performance of your VMs from a single console with Red Hat Advanced Cluster Management. With additional support options and partner integrations, you can rely on Red Hat to keep your virtual infrastructure running smoothly throughout the hybrid cloud–and help you modernize when you’re ready.
Migrate and manage virtual infrastructure
Companies are reassessing their virtualization platforms to ensure they have the right combination of consistency and support. Download to read more.