| CPC G06F 9/45558 (2013.01) [G06F 2009/4557 (2013.01); G06F 2009/45575 (2013.01); G06F 2009/45579 (2013.01); G06F 2009/45595 (2013.01)] | 12 Claims |

|
1. A virtual machine live migration method, applied to a source server on which a first virtual machine runs, wherein the method is used to migrate the first virtual machine to a destination server, wherein the source server comprises a single-root input/output virtualization (SR-IOV) network adapter, wherein the source server runs the first virtual machine, a first virtual network adapter used by the first virtual machine, a virtual machine manager, and a live migration module different from the virtual machine manager, wherein the first virtual network adapter is obtained through virtualization based on the SR-IOV network adapter, and wherein the method comprises:
delivering, by the virtual machine manager in the source server, a live migration command to the live migration module in the source server, wherein the live migration command is used to indicate that the first virtual machine in the source server is to be migrated to a second virtual machine in the destination server;
locking, by the live migration module, a first task queue of the first virtual network adapter, wherein the first task queue cannot receive a new task once it is locked, and wherein the first task queue is used to place a task delivered to the first virtual machine;
emptying, by a first virtual function driver of the first virtual machine, all existing tasks in the first task queue;
after locking the first task queue and emptying all the existing tasks in the first task queue, obtaining, by the live migration module according to the live migration command, information that needs to be migrated and that is about the first virtual machine, wherein the information that needs to be migrated and that is about the first virtual machine comprises state information of the first virtual network adapter and memory data of the first virtual machine;
reporting, by the live migration module, the information that needs to be migrated and that is about the first virtual machine to the virtual machine manager; and
sending, by the virtual machine manager, the state information and the memory data of the first virtual machine to the destination server.
|