Optimistic Locking for Virtual Machine Migration
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing virtual machine migration processes are inefficient, particularly when migrating large or complex virtual systems, as they often require halting the system, copying memory, and restarting, which can take significant time and result in user interaction restrictions and operational issues due to volatile system resources.
Innovation Solution
The migration is managed in phases, with a focus on minimizing downtime by optimistically locking the source virtual machine during the critical migration phase, classifying and processing API requests, and rescheduling or canceling requests that cause changes, ensuring the new virtual machine instance is synchronized with the original before locking, thereby minimizing user impact and maintaining system stability.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If the virtual machine is halted and memory is copied during migration, then the migration can be completed, but the migration time becomes significant and user interaction is restricted
Solution Approach 1:
The patent applies preliminary action by copying the virtual machine memory and state to the target host before halting the source virtual machine. This allows the migration to be completed more quickly because the bulk of the data transfer occurs while the virtual machine is still running, reducing the overall migration time and minimizing user interaction restrictions.
2Manufacturing precision
If the virtual machine is halted for migration, then the system state can be copied, but user interaction capability is eliminated or severely restricted
Solution Approach 1:
The patent performs the system state copying operation before halting the virtual machine by transferring memory and state data to the target host while the source virtual machine is still running. This preliminary copying action ensures accurate system state transfer while minimizing the duration during which user interaction is restricted, as the virtual machine can be quickly switched to the target host.
3Productivity
If attached storage and network connections are accessed during migration, then the virtual machine can remain operational, but the migrated system may differ significantly from the original due to volatile resources
Solution Approach 1:
The patent applies preliminary action by capturing and freezing the virtual machine's memory state and system configuration before migration completes. This ensures that the migrated virtual machine starts from a known, consistent state, preventing discrepancies that would arise from changes to volatile resources like attached storage and network connections during the migration process.
Solution Approach 2:
The patent uses copying by creating a complete copy of the virtual machine's memory and system state to the target host. This copying process ensures that the migrated virtual machine is an accurate replica of the original at the moment of migration initiation, maintaining system consistency even if the original virtual machine continues to operate and modify its state.
4Manufacturing precision
If the source virtual machine is locked early in migration, then the system state can be frozen for accurate copying, but the migration duration increases and user impact worsens
Solution Approach 1:
The patent performs the system state copying and synchronization to the target host as a preliminary action before locking the source virtual machine. This approach minimizes migration duration because the time-consuming data transfer and synchronization operations are completed while the virtual machine is still running, allowing the lock to be applied only for the brief moment needed to switch to the target host.
Data Source
AI summary
Techniques for optimistic locking of virtual machine instances during a migration are described herein. Application programming interface requests are classified by type. When a request such as an application programming interface request is received during the migration of a virtual machine instance from a source location to a target location, the request is classified according to the type and according to the state of the migration. Based on that classification, it is determined whether to block the request, allow the request, or cancel the migration.


