Deferred I/O Device Assignment in Post-Copy VM Migration
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing virtual machine migration methods, particularly post-copy migration, are ineffective for virtual machines supporting Direct Memory Access (DMA) by I/O devices due to the reliance on page fault mechanisms, which I/O devices do not trigger and cannot tolerate.
Innovation Solution
Implementing a deferred assignment of devices in virtual machine live migration by starting the virtual machine in post-copy migration mode, ensuring all memory pages associated with I/O devices are successfully migrated before creating entries in the guest I/O table, and allowing access to I/O devices only after complete migration, with pre-copying of memory pages used by I/O devices to accelerate the process.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If post-copy migration is used to improve migration speed, then migration duration is reduced, but I/O devices cannot function because they do not trigger page faults and cannot tolerate the migration approach
Solution Approach 1:
The patent applies preliminary action by pre-copying memory pages associated with I/O devices before the migration is completed. This ensures that all necessary data is transferred in advance, allowing I/O devices to be assigned to the destination host without functional issues, thus resolving the contradiction between fast post-copy migration and I/O device reliability.
2Ease of operation
If I/O devices are assigned early in migration, then device access is enabled, but memory pages may not have been migrated yet causing data inconsistency
Solution Approach 1:
The patent implements feedback by continuously monitoring the migration status of memory pages and using this information to control I/O device assignment. The system waits for confirmation that all associated memory pages have been successfully migrated before assigning I/O devices, ensuring both device accessibility and memory consistency.
3Stability of the object's composition
If all memory pages are migrated before starting the virtual machine, then data consistency is ensured, but migration duration increases significantly
Solution Approach 1:
The patent applies preliminary action selectively by pre-copying only the memory pages associated with I/O devices rather than all memory pages. This targeted approach ensures data consistency for I/O operations while minimizing the time overhead, thus resolving the contradiction between memory consistency and migration duration.
Data Source
AI summary
Systems and methods for deferred assignment of devices in virtual machine migration. An example method comprises: starting, by a processing device of a first host computer system, a virtual machine being migrated from a second host computer system in a post-copy migration mode; receiving a request to associate an input/output (I/O) device with the virtual machine; and responsive to receiving, from the second host computer system, one or more memory pages comprised by a memory buffer associated with the I/O device, performing at least one of: associating an identifier of the I/O device with the memory buffer or allowing the virtual machine to access the I/O device.


