Virtual Machine Migration via Optimistic Locking and State Copying
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The migration of virtual machine instances across host computer systems is often lengthy and disruptive, as existing methods require halting the virtual machine, copying its state, and restarting it on a new host, leading to user interaction restrictions and potential operational issues due to volatile resources.
Innovation Solution
The proposed solution involves managing virtual machine instance migration in phases, with optimistic locking during the critical migration phase, where memory and state are copied before locking, and API requests are classified to minimize disruptions. This includes creating a new virtual machine instance with the same configuration, forwarding changes, and allowing only non-mutating requests during the migration, while blocking or rescheduling mutating requests to ensure minimal downtime.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If the virtual machine is halted and its state is copied to a different host computer system, then the migration can be completed, but the migration process takes a significant amount of time and user interaction is eliminated or severely restricted
Solution Approach 1:
The patent applies preliminary action by copying the memory and system state of the virtual machine to the target host before halting the virtual machine. This allows the migration to be completed more quickly because the state transfer occurs while the virtual machine is still running, avoiding the need to halt it first for state capture
Solution Approach 2:
The migration process is segmented into distinct phases: (1) copying state while running, (2) halting the virtual machine, (3) completing the migration. This segmentation allows the time-consuming state copy operation to occur during the running phase, minimizing the downtime during which user interaction is restricted
2Reliability
If the virtual machine is halted for state copying, then the migration can proceed, but the ability of users to interact with the virtual computer system is eliminated or severely restricted
Solution Approach 1:
By performing the state copy operation before halting the virtual machine, the patent allows users to continue interacting with the system during the migration preparation phase. The virtual machine remains operational and accessible until the final halt, maintaining ease of operation throughout most of the migration process
3Stability of the object's composition
If attached storage and network connections are accessed during migration, then the virtual machine can maintain its operational state, but the volatile nature of these resources introduces the possibility that the migrated virtual computer system may differ significantly from the original
Solution Approach 1:
The patent captures the state of attached storage and network connections as part of the preliminary state copy operation. By freezing the state of these volatile resources before migration completes, it ensures that the migrated virtual machine has an identical view of these resources, maintaining both compositional stability and migration reliability
Solution Approach 2:
The patent creates a copy of the virtual machine's complete state, including the state of attached storage and network connections. This copying approach ensures that the migrated instance has a faithful replica of the original's resource states, preventing discrepancies that would arise from accessing volatile resources during the migration process
Data Source
AI summary
Techniques for managing the migration of virtual machine instances are described herein. A migration of a first virtual machine instance is started by preparing an appropriate target location to receive the first virtual machine instance. Next, a second virtual machine instance at the target location is enabled by first copying state information from the first virtual machine instance to the second virtual machine instance, by next creating connections between the second virtual machine instance and resources associated with the first virtual machine instance, and by finally starting packet forwarding between the two virtual machine instances. Finally, the first virtual machine instance is locked, the copy is finalized, and the second virtual machine instance is started.


