# US 2021/0342232 A1 · Recovering a virtual machine after failure of post-copy live migration

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2021/0342232 A1
- Document ID: US20210342232A1
- Status: Published application
- Kind: A1
- Application number: 17/242,508
- Filed: 2021-04-28
- Published: 2021-11-04
- Earliest claimed: 2020-04-29
- Assignees: The Research Foundation for The State University of New York
- Applicants: The Research Foundation for The State University of New York
- Inventors: Kartik Gopalan; Ping Yang; Dinuni K. Fernando; Jonathan Terner
- Web page: https://patentgrep.com/patent/US20210342232A1

## CPC

- G06F 11/1484: {involving virtual machines}
- G06F 9/45558: {Hypervisor-specific management and integration aspects}
- G06F 11/0772: {Means for error signaling, e.g. using interrupts, exception flags, dedicated error registers}
- G06F 11/0793: {Remedial or corrective actions (recovery from an exception in an instruction pipeline G06F9/3861; by retry G06F11/1402; for recovering from a failure of a protocol instance or entity H04L69/40)}
- G06F 11/1451: {by selection of backup contents}
- G06F 11/1471: involving logging of persistent data for recovery
- G06F 11/301: {where the computing system is a virtual computing platform, e.g. logically partitioned systems (virtual machines G06F9/45533; logical partitioning of resources G06F9/5077)}
- G06F 2009/4557: {Distribution of virtual machine instances; Migration and load balancing}
- G06F 2009/45575: {Starting, stopping, suspending or resuming virtual machine instances}
- G06F 2009/45583: {Memory management, e.g. access or allocation}
- G06F 2201/84: Using snapshots, i.e. a logical point-in-time copy of the data
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Post-copy is one of the two key techniques (besides pre-copy) for live migration of virtual machines in data centers. Post-copy provides deterministic total migration time and low downtime for write-intensive VMs. However, if post-copy migration fails for any reason, the migrating VM is lost because the VM's latest consistent state is split between the source and destination nodes during migration. PostCopyFT provides a new approach to recover a VM after a destination or network failure during post-copy live migration using an efficient reverse incremental checkpointing mechanism. PostCopyFT was implemented and evaluated in the KVM/QEMU platform. Experimental results show that the total migration time of post-copy remains unchanged while maintaining low failover time, downtime, and application performance overhead.

## Claims

### Claim 1

A method for migration of a virtual machine from a source to a destination, comprising:
communicating an execution state of the virtual machine executing tasks at the source to the destination;
initiating execution of the tasks by the virtual machine at the destination, based on the communicated execution state of the virtual machine;
transferring a respective memory page from the source to the destination in response to a page fault due to unavailability of the respective memory page occurring at the destination;
communicating an incremental checkpoint from the virtual machine executing at the destination; and
recovering execution of the virtual machine at the source based on at least the communicated incremental checkpoint from the virtual machine executing at the destination.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the incremental checkpoint comprises memory pages modified by the virtual machine since a prior incremental checkpoint, a central processing unit state of the virtual machine, and an input/output state of the virtual machine.

### Claim 3 (depends on 1)

The method according to claim 1, further comprising:
determining a failure of successful migration if execution of the tasks by the virtual machine at the destination fails; and
upon failure of successful migration, recovering the virtual machine at the source.

### Claim 4 (depends on 3)

The method according to claim 3, wherein the virtual machine at the source is recovered in a state subsequent to the initiation of execution of the tasks by the virtual machine at the destination.

### Claim 5 (depends on 1)

The method according to claim 1, further comprising proactively transferring memory pages from the source to the destination independent of occurrence of a page fault.

### Claim 6 (depends on 1)

The method according to claim 1, further comprising ceasing execution of tasks by the virtual machine at the source before initiating execution of the tasks by the virtual machine at the destination.

### Claim 7 (depends on 1)

The method according to claim 1, further comprising defining an execution state of the virtual machine at the source before communicating the execution state of the virtual machine from the source.

### Claim 8 (depends on 1)

The method according to claim 1, further comprising communicating the incremental checkpoint from the virtual machine executing at the destination, while the migration of the virtual machine to the destination is in progress.

### Claim 9 (depends on 1)

The method according to claim 1, further comprising providing a checkpoint manager, configured to:
store a checkpoint of the source comprising the execution state of the virtual machine at the source; and
store the incremental checkpoint from the virtual machine executing at the destination.

### Claim 10 (depends on 1)

The method according to claim 1, further comprising communicating the incremental checkpoint from the virtual machine executing at the destination to a checkpoint manager.

### Claim 11 (depends on 1)

The method according to claim 1, further comprising concurrently transferring the respective memory page from the source to the destination in response to the page fault occurring at the destination, and communicating the incremental checkpoint from the virtual machine executing at the destination.

### Claim 12 (depends on 1)

The method according to claim 1, wherein the communicated incremental checkpoint comprises a virtual CPU state, an input/output state, and a memory state of the virtual machine executing at the destination prior to a persistent change of a state outside of the virtual machine since a prior communicated incremental checkpoint.

### Claim 13 (depends on 1)

The method according to claim 1, wherein the incremental checkpoint is committed before external environment changes are made by the virtual machine.

### Claim 14 (depends on 1)

The method according to claim 1, further comprising, upon initiation of migration of the virtual machine, informing a system resource which manages at least one of input operations, output operations, and memory pages of the migration of the virtual machine between the source and the destination.

### Claim 15 (depends on 1)

The method according to claim 1, further comprising buffering communications from the virtual machine at the destination of uncommitted changes to an external environment, before committing of the changes to the external environment, until the incremental checkpoint is communicated reflecting the uncommitted changes to the external environment.

### Claim 16 (depends on 1)

The method according to claim 1, wherein contingent upon at least one of a failure of the virtual machine at the destination, and a failure of at least one communication from the destination, a hypervisor at the source initiates recovery of the virtual machine.

### Claim 17 (depends on 1)

The method according to claim 1, further comprising:
recovering the virtual machine at the source from a last consistent copy of each memory page from a series of incremental checkpoints from the destination;
buffering outgoing packet transmissions to external resources between successive incremental checkpoints; and
immediately delivering incoming network from external resources between successive incremental checkpoints.

### Claim 18 (depends on 1)

The method according to claim 1, further comprising:
determining memory pages modified by the virtual machine at the destination;
generating a first partial checkpoint of the modified memory pages without pausing execution of the virtual machine;
pausing execution of the virtual machine;
generating a second partial checkpoint of an execution state of a CPU of the virtual machine, an input/output state of the virtual machine, and modified memory pages;
combining the first and second partial checkpoints to generate the incremental checkpoint with subsequent modified memory pages preempting preceding modified memory pages, and
resuming execution of the virtual machine,
wherein the source loads a plurality of incremental checkpoints from the destination to build a virtual machine image concurrent with execution of the virtual machine at the destination.

### Claim 19

A virtual machine, comprising:
a communication port configured to receive an initial execution state of the virtual machine and to transmit incremental checkpoints; and
an automated processor configured to:
execute the virtual machine initiated based on the initial execution state,
request memory pages through the communication port during a migration of the virtual machine, in response to page faults during execution of the virtual machine, and
transmit incremental checkpoints through the communication port.
wherein the automated processor is configured to generate the incremental checkpoint in two phases,
a first phase comprising determining memory pages modified by the virtual machine during which the virtual machine is operational; and
a second phase comprising execution state of a CPU of the virtual machine, an input/output state of the virtual machine, and modified memory pages, during which the virtual machine is paused.

### Claim 20

A system for migration of a virtual machine from a source to a destination, comprising:
a memory configured to store an execution state of the virtual machine;
a communication port configured to communicate the stored execution state to a destination;
an automated processor at the destination configured to:
execute the virtual machine at the destination, based on the communicated execution state,
request memory pages in response to page faults due to incomplete migration, during execution of the virtual machine, and
communicate incremental checkpoints to a checkpoint manager, while the migration of the virtual machine to the destination is in progress; and
an automated processor configured to recover the virtual machine in event of failure of migration based on at least a preceding checkpoint communicated from the destination to the checkpoint manager.
