# US 2010/0250824 A1 · Migrating Virtual Machines Configured With Pass-Through Devices

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

- Number: US 2010/0250824 A1
- Document ID: US20100250824A1
- Status: Published application
- Kind: A1
- Application number: 12/410,695
- Filed: 2009-03-25
- Published: 2010-09-30
- Earliest claimed: 2009-03-25
- Assignees: VMware, Inc.
- Inventors: Adam M. BELAY
- Web page: https://patentgrep.com/patent/US20100250824A1

## CPC

- G06F 9/45558: {Hypervisor-specific management and integration aspects}
- G06F 2009/4557: {Distribution of virtual machine instances; Migration and load balancing}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Virtual machines that utilize pass-through devices are migrated from a source host computer to a destination host computer. During preparation for migration, the pass-through device is substituted with an emulation handler that simulates the pass-through device experiencing errors. Upon successful migration, an error reporting signal is triggered to cause the device driver in the virtual machine to initiate a reset of the pass-through device at the destination host computer, upon which the pass-through device is mapped to the migrated virtual machine.

## Claims

### Claim 1

A method for preparing a virtual machine configured with a pass-through device for migration from a source host computer to a destination host computer, the method comprising:
generating an emulation handler that simulates the pass-through device experiencing errors;
replacing the pass-through device with the emulation handler, such that a device driver in the virtual machine corresponding to the pass-through device now interacts with the emulation handler instead of the pass-through device; and
transmitting a current state of the virtual machine to the destination host computer, wherein the current state does not include a state of the pass-through device.

### Claim 2 (depends on 1)

The method of claim 1, wherein the errors are of a type requiring a reset of the pass-through device for recovery.

### Claim 3 (depends on 1)

The method of claim 1, further comprising freeing resources of the pass-through device used by the virtual machine.

### Claim 4 (depends on 1)

The method of claim 1, wherein the current state of the virtual machine includes a state of the emulation handler.

### Claim 5 (depends on 1)

The method of claim 1, wherein the emulation handler drops write requests from the device driver and returns all “1” bits in response to read requests from the device driver.

### Claim 6 (depends on 1)

The method of claim 1, wherein the replacing step occurs after a pre-copying process, wherein the pre-copying process comprises transmitting a least a portion of the current state of the virtual machine to the destination host computer while the virtual machine continues to operate on the source host computer.

### Claim 7 (depends on 6)

The method of claim 6, further comprising transmitting to the destination host computer changes in the transmitted portion of the current state of the virtual machine, wherein the changes are a result of direct memory access (DMA) operations performed by the pass-through device into the virtual machine's memory space.

### Claim 8

A method for recovering, on a destination host computer, a migrated virtual machine configured with a pass-through device on a source host computer, the method comprising:
loading a state of the migrated virtual machine into the destination host computer, wherein the state includes a device driver and a corresponding emulation handler that simulates the pass-through device experiencing errors;
transmitting an error reporting signal for receipt by a guest operating system of the migrated virtual machine;
intercepting a request to reinitialize the pass-through device from the device driver;
mapping a pass-through device of the destination host computer to the migrated virtual machine;
forwarding the reinitialization request to the pass-through device of the destination host computer; and
reinitializing the pass-through device of the destination host computer to restore functionality to the device driver.

### Claim 9 (depends on 8)

The method of claim 8, wherein the error reporting signal is an Advanced Error Reporting (AER) signal for a fatal uncorrectable error.

### Claim 10 (depends on 9)

The method of claim 9, wherein the error reporting signal is received by an AER driver that triggers a callback to the device driver.

### Claim 11 (depends on 8)

The method of claim 8, wherein the pass-through device on the source host computer and the second pass-through device of the destination host computer share the same software-visible hardware interface.

### Claim 12 (depends on 8)

The method of claim 8, further comprising: removing the emulation handler.

### Claim 13 (depends on 8)

The method of claim 8, wherein an I/O Memory Management Unit (IOMMU) is used to provide a physical-to-machine address mapping of the migrated virtual machine to the pass-through device of the destination host computer.

### Claim 14 (depends on 8)

The method of claim 8, further comprising: allocating a partition of resources for the migrated virtual machine in the pass-through device of the destination host computer.

### Claim 15

A computer readable storage medium having stored therein a computer program used to migrate a virtual machine configured with a pass-through device from a source host computer to a destination host computer, wherein the source host computer executing the computer program carries out steps of:
generating an emulation handler that simulates the pass-through device experiencing errors;
replacing the pass-through device with the emulation handler, such that a device driver in the virtual machine corresponding to the pass-through device now interacts with the emulation handler instead of the pass-through device; and
transmitting a current state of the virtual machine to the destination host computer, wherein the current state does not include a state of the pass-through device.

### Claim 16 (depends on 15)

The computer readable storage medium of claim 15, wherein the errors are of a type requiring a reset of the pass-through device for recovery.

### Claim 17 (depends on 15)

The computer readable storage medium of claim 15, wherein the source host computer executing the computer program further carries out the step of freeing resources of the pass-through device used by the virtual machine.

### Claim 18 (depends on 15)

The computer readable storage medium of claim 15, wherein the destination host computer executing the program carries out the steps of:
loading a state of the migrated virtual machine into the destination host computer, wherein the state includes a device driver and a corresponding emulation handler that simulates the pass-through device experiencing errors;
transmitting an error reporting signal for receipt by the device driver;
intercepting a request to reset the pass-through device from the device driver;
mapping a pass-through device of the destination host computer to the device driver;
forwarding the reset request to the pass-through device of the destination host computer; and
resetting the pass-through device of the destination host computer to restore functionality to the device driver.

### Claim 19 (depends on 18)

The computer readable storage medium of claim 18, wherein the error reporting signal is an Advanced Error Reporting (AER) signal for a fatal uncorrectable error.

### Claim 20 (depends on 18)

The computer readable storage medium of claim 18, wherein the pass-through device and the second pass-through device of the destination host computer share the same software-visible hardware interface.
