IP Library Granted Patent US 12,417,112
Granted Patent B2
US 12,417,112 · App. 17/485,071 · Granted Sep 16, 2025

Virtual machine migration method and system

Inventors: Xiao Zheng (Shanghai, CN); Lixiang Lin (Shanghai, CN); Xin Long (Hangzhou, CN)
Assignee: Alibaba Group Holding Limited
G06F9/45558G06F9/4856G06T1/60G06F2009/4557
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,417,112
App. No.
17/485,071
Granted
Sep 16, 2025
Kind
B2
Abstract

A migration method and a migration system of a virtual machine are disclosed. The method includes: a virtual machine detecting whether a migration instruction is received, wherein the virtual machine runs on a first processor of a first host machine; the virtual machine calling and obtaining video memory data generated in the first processor if the migration instruction is detected; and the virtual machine migrating the video memory data to a second processor of a second host machine. The present disclosure solves the technical problem that a virtual machine using a GPU pass-through mode fails to perform a live migration between host machines in the existing technologies.

Claims (60)

1. A method comprising:

executing a virtual machine using a graphics processor unit (GPU) pass-through mode on a first processor of a first host machine;

intercepting calling information of a first preset interface and a second preset interface of each processing unit of the first processor for analysis originally from the virtual machine, wherein the first preset interface includes at least a calling interface and an execution interface, the second preset interface includes at least a video memory allocation interface and the calling information includes task execution information and video memory information, wherein the corresponding calling information is transferred to a real interface of a corresponding processing unit of the first processor for execution before receiving a migration instruction for the virtual machine;

detecting that the migration instruction is received;

in response to detecting that the migration instruction is received, determining whether all processing units in the first processor finish executing according to the task execution information obtaining video memory data generated in the first processor according to the video memory information;

triggering the virtual machine running on the first processor to unload an image processor driver of the first host machine, and triggering a first host machine virtualization management component of the first processor to detach a first image processor hardware component of the first host machine;

after the image processor driver of the first host machine is unloaded from the virtual machine and the first image processor hardware component of the first host machine is detached, migrating the video memory data to a second processor of a second host machine, wherein the second processor is also operated in a GPU pass-through mode; and

after the video memory data is migrated to the second processor of the second host machine, triggering a second host virtualization management component of the second processor to attach a second image processor hardware component of the second host machine, and triggering the virtual machine running on the second processor to load an image processor driver of the second host machine.

2. The method of claim 1 , further comprising: controlling processing units in the first processor to suspend receiving new tasks or release a video memory of the first processor in response to the migration instruction is detected.

3. The method of claim 2 , wherein in response to the migration instruction is detected, the method further comprises:

storing the video memory data generated by the first processor in response to all the processing units in the first processor finish executing.

4. The method of claim 3 , wherein determining whether all the processing units in the first processor finish executing comprises:

obtaining the task execution information, wherein the task execution information includes at least information for instructing the processing units to finish executing; and

determining whether each processing unit in the first processor finishes executing according to the task execution information.

5. The method of claim 3 , wherein in response to the migration instruction is detected, the method further comprises:

obtaining the video memory information, wherein the video memory information includes at least a video memory amount and a storage position currently used by an application program running on the virtual machine; and

storing the video memory information.

6. The method of claim 5 , further comprising:

restoring the video memory data to a video memory of the second processor according to the video memory information after the video memory data is migrated to the second processor of the second host machine.

7. A system comprising:

a virtual machine running on a first processor of a first host machine that is operated in a graphics processor unit (GPU) pass-through mode; and

a migration module running on the virtual machine and used for,

intercepting calling information of a first preset interface and a second preset interface of each processing unit of the first processor for analysis from the virtual machine, wherein the first preset interface includes at least a calling interface and an execution interface, the second preset interface includes at least a video memory allocation interface and the calling information includes task execution information and video memory information,

transferring the calling information of the first preset interface and the second preset interface to a real interface of a corresponding processing unit of the first processor for execution if receiving a migration instruction,

after receiving the migration instruction and before migrating video memory data into a second processor of a second host machine that is also operated in a GPU pass-through mode:

determining whether all processing units in the first processor finish executing according to the task execution information and obtaining video memory data generated in the first processor according to the video memory information,

storing the video memory data,

triggering the virtual machine to unload an image processor driver of the first host machine, and

triggering a first host virtualization management component of the first processor to detach a first image processor hardware component of the first host machine; and

migrating the video memory data to the second processor of the second host machine.

8. The system of claim 7 , wherein the migration module comprises:

a tracking unit used for controlling processing units in the first processor to pause receiving tasks and determining whether all the processing units in the first processor finish executing when the migration module receives the migration instruction;

a save/restore unit used for storing the video memory data generated by the first processor after the tracking unit determines that all the processing units finish executing; and

a control unit used for migrating the video memory data to the second processor, wherein the video memory data is restored to a video memory of the second processor after the video memory data is migrated to the second processor.

9. The system of claim 8 , wherein:

the task execution information includes at least information for instructing the processing units of the first processor to finish executing, and

the tracking unit is connected with an interception unit of the migration module.

10. The system of claim 9 , wherein:

the interception unit is further used for obtaining the video memory information, wherein the video memory information includes at least a video memory amount and a storage location currently used by an application program running on the virtual machine; and

the tracking unit stores the video memory information.

11. The system of claim 7 , wherein the first processor runs a target application, and the migration module runs between the target application and corresponding processing unit of the first processor.

12. The system of claim 7 , wherein the migration module comprises at least one interface disposed outside of a dynamic library of processing units.

13. The system of claim 8 , wherein the second processor is initiated in the second host machine.

14. The system of claim 8 , wherein the migration module is further used for triggering a second host virtualization management component of the second processor to attach a second image processor hardware component of the second host machine, and triggering the virtual machine running on the second processor to load an image processor driver of the second host machine after the migration module migrates the video memory data to the second processor of the second host machine.

15. A method comprising:

executing a virtual machine using a graphics processor unit (GPU) pass-through mode on a first processor of a first host machine;

intercepting calling information of a first preset interface and a second preset interface of each processing unit of the first processor for analysis, wherein the first preset interface includes at least a calling interface and an execution interface, the second preset interface includes at least a video memory allocation interface and the calling information includes task execution information and video memory information, wherein the corresponding calling information is transferred to a real interface of a corresponding processing unit of the first processor for execution before receiving a migration instruction for the virtual machine;

detecting that the migration instruction is received;

determining that the first processor enters a migration state in response to the migration instruction is detected by determining that all processing units in the first processor finish executing according to the task execution information;

obtaining video memory data generated in the first processor according to the video memory information;

triggering the virtual machine to unload an image processor driver of the first host machine, and triggering a first host machine virtualization management component of the first processor to detach a first image processor hardware component of the first host machine;

migrating the video memory data to a second processor of a second host machine in response to the first processor enters the migration state, wherein the second processor is also operated in a GPU pass-through mode; and

triggering a second host virtualization management component of the second processor to attach a second image processor hardware component of the second host machine, and triggering the virtual machine running on the second processor to load an image processor driver of the second host machine.

16. The method of claim 15 , wherein the task execution information comprises at least information for instructing processing units to finish executing.

17. The method of claim 15 , further comprising controlling processing units in the first processor to suspend receiving new tasks or release a video memory of the first processor in response to the migration instruction is detected.

18. The method of claim 17 , wherein in response to the migration instruction is detected, the method further comprises:

obtaining the video memory information, wherein the video memory information includes at least a video memory amount and a storage position currently used by an application program running on the virtual machine; and

storing the video memory information.

19. The method of claim 18 , further comprising:

restoring the video memory data to a video memory of the second processor according to the video memory information after the video memory data is migrated to the second processor of the second host machine.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 29, 2026
From: ALIBABA GROUP HOLDING LIMITED
To: CLOUD INTELLIGENCE ASSETS HOLDING (SINGAPORE) PRIVATE LIMITED
Reel/Frame 075499/0384 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 1, 2022
From: ZHENG, XIAO; LIN, LIXIANG; LONG, XIN
To: ALIBABA GROUP HOLDING LIMITED
Reel/Frame 059139/0535 →
Priority Claims (1)
CN 201910227209.4 · Mar 25, 2019 · national
Continuity (2)
Continuation PCTCN2020079127 · Mar 13, 2020
Related Publication 20220012087A1 · Jan 13, 2022
References Cited (42)
US 6115763A · Douskey · 2000 [cited by examiner]
US 8659590B1 · Stam · 2014 [cited by examiner]
US 9189261B2 · Masood · 2015 [cited by examiner]
US 10180852B2 · Spracklen · 2019 [cited by examiner]
US 10534730B1 · Nadarajah · 2020 [cited by examiner]
US 12034740B1 · Carmack · 2024 [cited by examiner]
US 20100262722A1 · Vauthier · 2010 [cited by examiner]
US 20110084973A1 · Masood · 2011 [cited by applicant]
US 20110131576A1 · Ikegaya et al. · 2011 [cited by applicant]
US 20110145471A1 · Corry et al. · 2011 [cited by applicant]
US 20120042034A1 · Goggin · 2012 [cited by examiner]
US 20130254368A1 · Guay · 2013 [cited by examiner]
US 20140173628A1 · Ramakrishnan Nair · 2014 [cited by examiner]
US 20150033220A1 · Venkat · 2015 [cited by examiner]
US 20170132744A1 · Wilt · 2017 [cited by examiner]
US 20170371696A1 · Prziborowski · 2017 [cited by examiner]
US 20180113731A1 · Cheng · 2018 [cited by examiner]
US 20180146020A1 · McClure · 2018 [cited by examiner]
US 20180349162A1 · Tian · 2018 [cited by examiner]
US 20180373556A1 · Tian · 2018 [cited by examiner]
US 20190121663A1 · Guo · 2019 [cited by examiner]
US 20190213032A1 · Eyal · 2019 [cited by examiner]
US 20190377594A1 · Xie · 2019 [cited by examiner]
US 20200364091A1 · Xia · 2020 [cited by examiner]
CN 101419558A · 2009 [cited by applicant]
CN 102446119A · 2012 [cited by applicant]
CN 103812823A · 2014 [cited by applicant]
CN 106020929A · 2016 [cited by applicant]
CN 106569876A · 2017 [cited by applicant]
CN 106991007A · 2017 [cited by applicant]
CN 108874506A · 2018 [cited by applicant]
WO WO2018040112A1 · 2018 [cited by applicant]
WO WO2019000358A1 · 2019 [cited by applicant]
James Gleeson et al.,, “Crane—Fast and Migratable GPU Passthrough for OpenCL applications”, May 22, 2017, SYSTOR '17: Proceedings of the 10th ACM International Systems and Storage Conference, pp. 1-13 (Year: 2017). [cited by examiner]
International Search Report malled Jun. 15, 2020, from PCT Application No. PCT/CN2020/079127, 2 pages. [cited by applicant]
Written Opinion mailed Jun. 15, 2020, from PCT Application No. PCT/CN2020/079127, 4 pages. [cited by applicant]
Extended European Search Report mailed Nov. 23, 2022 for European Patent Application No. 20779006.4, 9 pages. [cited by applicant]
Takizawa, et al., “CheCUDA: A Checkpoint/Restart Tool for CUDA Applications”, 2009 International Conference on Parallel and Distributed Computing, Applications and Technologies, Dec. 8, 2009, pp. 408-413. [cited by applicant]
English Translation of Chinese First Office Action for corresponding Chinese Application No. 201910227209.4, dated Feb. 6, 2024. [cited by applicant]
English Translation of Chinese First Search Report for corresponding Chinese Application No. 201910227209.4, dated Feb. 6, 2024. [cited by applicant]
European Office Action mailed Mar. 12, 2024 for European Application No. 207790. [cited by applicant]
Examination Report for European Application No. 20779006.4, Dated Apr. 14, 2025, 5 pages. [cited by applicant]