US 11,809,888 B2
Virtual machine memory migration facilitated by persistent memory devices
Michael Tsirkin, Lexington, MA (US)
Assigned to Red Hat, Inc., Raleigh, NC (US)
Filed by RED HAT, INC., Raleigh, NC (US)
Filed on Apr. 29, 2019, as Appl. No. 16/398,036.
Prior Publication US 2020/0341797 A1, Oct. 29, 2020
Int. Cl. G06F 9/455 (2018.01); G06F 15/173 (2006.01); G06F 3/06 (2006.01)
CPC G06F 9/45558 (2013.01) [G06F 3/0604 (2013.01); G06F 3/067 (2013.01); G06F 3/0647 (2013.01); G06F 3/0664 (2013.01); G06F 15/17331 (2013.01); G06F 2009/4557 (2013.01); G06F 2009/45575 (2013.01); G06F 2009/45583 (2013.01)] 17 Claims
OG exemplary drawing
 
1. A method comprising:
receiving a request to migrate a virtual machine (VM) from a source host machine to a destination host machine;
mapping, by a hypervisor running on the source host machine, a first portion of a VM memory residing at a first local memory device of the source host machine to a network-attached persistent memory device and a second portion of the VM memory residing at the first local memory device of the source host machine to a second local memory device of the source host machine, wherein the network-attached persistent memory device is accessible by the source host machine and the destination host machine, and wherein the first portion of the VM memory mapped to the network-attached persistent memory device is larger than the second portion of the VM memory mapped to the second local memory device of the source host machine;
executing, by the hypervisor, one or more synchronization commands, wherein each synchronization command of the one or more synchronization commands initiates a synchronization operation, wherein the synchronization operation involves executing a remote direct memory access (RDMA) flush command to flush contents of the first portion of the VM memory to the network-attached persistent memory device;
copying memory pages of the second portion of the VM memory from the second local memory device of the source host machine to the destination host machine;
calculating a synchronization completion metric reflecting an average completion time period of the synchronization operation following an execution of the RDMA flush command to flush contents of the first portion of the VM memory, the completion time period measured over completion times of the one or more synchronization commands;
calculating a memory page copy metric reflecting a completion time to copy one or more memory pages of the second portion of the VM memory to the destination host machine; and
responsive to determining, in view of the calculated synchronization completion metric and the memory page copy metric, that a time period to complete the synchronization operation for the first portion of the VM memory and the copying of the memory pages of the second portion of the VM memory is below a threshold:
stopping the VM on the source host machine; and
starting the VM on the destination host machine.