Backup Education
What happens to a VM during a live migration? - Printable Version

+- Backup Education (https://backup.education)
+-- Forum: Hyper-V (https://backup.education/forumdisplay.php?fid=8)
+--- Forum: Questions IX (https://backup.education/forumdisplay.php?fid=17)
+--- Thread: What happens to a VM during a live migration? (/showthread.php?tid=993)



What happens to a VM during a live migration? - savas - 12-22-2018

When you think about live migration of a virtual machine (VM), it's kind of like moving all your stuff from one apartment to another without ever having to pack up and leave. The idea is that you can shift a VM from one physical host to another while it's still running, and users won’t even notice a thing. Pretty cool, right?

So, the process kicks off when you, or the system, decides that it's time to move the VM. It all starts with the source host, where the VM is currently running. The hypervisor—think of it as the software layer that manages the VMs—prepares the VM for the move. It takes a snapshot of the VM’s memory, capturing all the current state of the operating system, applications, and any processes that are running. It’s basically a quick snapshot of what the VM looks like at that moment.

Once that initial state is captured, the hypervisor begins transferring this memory data to the destination host. The clever part is that it doesn’t try to send everything all at once. Instead, it breaks the memory into chunks and starts sending those over to the new location, all while the VM is still actively running. This means that applications still respond to user requests, and any processes continue to run seamlessly.

As the chunks are being copied, a process called “dirty page tracking” kicks in. This means the hypervisor is constantly monitoring any parts of memory that the VM is changing while the migration is happening. If there’s any modification in the VM’s memory during the transfer, those changes are noted. This ensures that any new data is also sent to the destination host before we complete the migration. It's almost like having a friend who helps you move by carrying stuff out while still keeping track of what's in your boxes.

Once most of the memory has been copied and there are only a few changes left, the hypervisor initiates what's called a “final state transfer.” This is where the VM momentarily pauses, and those last few changes—essentially the “dirty pages”—are sent over. This small pause is usually so brief that users don’t even realize anything happened.

Finally, after everything has been transferred, the VM is powered back up on the new host, and it’s like you’ve just turned on the lights in your new place. The entire process happens swiftly and efficiently, allowing for load balancing, maintenance, and even disaster recovery without any noticeable downtime.

What’s even more impressive is that live migrations can happen across different physical servers, just as long as they’re in the same data center and have compatible hardware and storage. This incredible flexibility allows system administrators to optimize performance without disrupting the user experience, making it a crucial feature in today’s fast-paced IT environments.

I hope my post was useful. Are you new to Hyper-V and do you have a good Hyper-V backup solution? See my other post