# US 12,001,877 B1 · Systems and methods for moving processes to a virtual machine

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

- Number: US 12,001,877 B1
- Document ID: US12001877B1
- Status: Granted
- Kind: B1
- Application number: 17/899,082
- Filed: 2022-08-30
- Granted: 2024-06-04
- Earliest claimed: 2020-09-30
- Assignees: Virtuozzo International GmbH
- Applicants: Virtuozzo International GmbH
- Inventors: Pavel Emelyanov
- Web page: https://patentgrep.com/patent/US12001877B1

## CPC

- G06F 9/45558: {Hypervisor-specific management and integration aspects}
- G06F 9/4856: {resumption being on a different machine, e.g. task migration, virtual machine migration (G06F9/5088 takes precedence)}
- G06F 12/1009: using page tables, e.g. page table structures
- G06F 2009/4557: {Distribution of virtual machine instances; Migration and load balancing}
- G06F 2009/45579: {I/O management, e.g. providing access to device drivers or storage}
- G06F 2009/45583: {Memory management, e.g. access or allocation}
- G06F 2212/151: Emulated environment, e.g. virtual machine
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Disclosed herein are systems and method for moving a process from a host to a virtual machine (VM). In one exemplary aspect, a method comprises freezing the process at a host operating system (OS) of the host; transferring at least one kernel object of the process from the host OS to a VM OS of the VM; reconfiguring at least one input-output (IO) resource of the process to point to a host-VM channel such that data flow between the host and the VM is enabled; remapping at least one page of the memory into the VM OS; in response to determining that at least one library mapped into the process matches between the host OS and the VM OS, configuring a corresponding memory map of the process to point to at least one library in the VM OS; and unfreezing the process at the VM OS.

## Claims

### Claim 1

A method for moving a process from a host to a virtual machine (VM), the method comprising:
freezing the process at a host operating system (OS) of the host;
transferring at least one kernel object of the process from the host OS to a VM OS of the VM;
reconfiguring at least one input-output (IO) resource of the process to point to a host-VM channel such that data flow between the host and the VM is enabled;
mapping memory utilized by the process to the VM by remapping at least one page of the memory into the VM OS;
determining whether at least one library mapped into the process matches between the host OS and the VM OS;
in response to determining that the at least one library matches, configuring a corresponding memory map of the process to point to at least one library in the VM OS; and
unfreezing the process at the VM OS.

### Claim 2 (depends on 1)

The method of claim 1, wherein transferring the at least one kernel object further comprises:
determining whether the host OS and the VM OS have same format of kernel objects; and
in response to determining that the host OS and the VM OS have the same format of kernel objects, copying the at least one kernel object from the host OS to the VM OS.

### Claim 3 (depends on 2)

The method of claim 2, further comprising:
in response to determining that the host OS and the VM OS do not have the same format of kernel objects, executing a live-migration technique to perform the transferring.

### Claim 4 (depends on 1)

The method of claim 1, wherein the host-VM channel comprises at least one of:
(1) a hypervisor channel, on a hypervisor side, configured to forward data between the VM and the host,
(2) a first proxy process, on a host side, configured to forward data between the hypervisor channel and the at least one IO resource, and
(3) a second proxy process, on a VM side, configured to forward data between the hypervisor channel and the process.

### Claim 5 (depends on 4)

The method of claim 4, further comprising:
in response to determining that the at least one IO resource is at least one of: a pipe or a unix socket, omitting the first proxy process such that a channel peer is attached to the hypervisor channel; and
in response to determining that the at least one IO resource is a local channel, omitting both the first proxy process and the second proxy process.

### Claim 6 (depends on 1)

The method of claim 1, further comprising:
in response to determining that the at least one IO resource is a network socket and that the VM has network access, creating a network socket on the VM side and re-configuring a network connection of the VM.

### Claim 7 (depends on 1)

The method of claim 1, wherein mapping the memory further comprises one of:
adding nested page table entries; or
altering shadow page tables.

### Claim 8 (depends on 1)

The method of claim 1, further comprising attaching the host-VM channel to the process.

### Claim 9 (depends on 1)

The method of claim 1, wherein at least one memory mapped file is proxied using the host-VM channel.

### Claim 10

A system for moving a process from a host to a virtual machine (VM), the system comprising:
a processor configured to:
freeze the process at a host operating system (OS) of the host;
transfer at least one kernel object of the process from the host OS to a VM OS of the VM;
reconfigure at least one input-output (IO) resource of the process to point to a host-VM channel such that data flow between the host and the VM is enabled;
map memory utilized by the process to the VM by remapping at least one page of the memory into the VM OS;
determine whether at least one library mapped into the process matches between the host OS and the VM OS;
in response to determining that the at least one library matches, configure a corresponding memory map of the process to point to at least one library in the VM OS; and
unfreeze the process at the VM OS.

### Claim 11 (depends on 10)

The system of claim 10, wherein the processor is configured to transfer the at least one kernel object by:
determining whether the host OS and the VM OS have same format of kernel objects; and
in response to determining that the host OS and the VM OS have the same format of kernel objects, copying the at least one kernel object from the host OS to the VM OS.

### Claim 12 (depends on 11)

The system of claim 11, wherein the processor is further configured to:
in response to determining that the host OS and the VM OS do not have the same format of kernel objects, execute a live-migration technique to perform the transferring.

### Claim 13 (depends on 10)

The system of claim 10, wherein the host-VM channel comprises at least one of:
(1) a hypervisor channel, on a hypervisor side, configured to forward data between the VM and the host,
(2) a first proxy process, on a host side, configured to forward data between the hypervisor channel and the at least one IO resource, and
(3) a second proxy process, on a VM side, configured to forward data between the hypervisor channel and the process.

### Claim 14 (depends on 13)

The system of claim 13, wherein the processor is further configured to:
in response to determining that the at least one IO resource is at least one of: a pipe or a unix socket, omit the first proxy process such that a channel peer is attached to the hypervisor channel; and
in response to determining that the at least one IO resource is a local channel, omit both the first proxy process and the second proxy process.

### Claim 15 (depends on 13)

The system of claim 13, wherein the processor is further configured to:
in response to determining that the at least one IO resource is a network socket and that the VM has network access, create a network socket on the VM side and re-configure a network connection of the VM.

### Claim 16 (depends on 10)

The system of claim 10, wherein the processor is configured to map the memory by performing one of:
adding nested page table entries; or
altering shadow page tables.

### Claim 17 (depends on 10)

The system of claim 10, wherein the processor is configured to attach the host-VM channel to the process.

### Claim 18 (depends on 10)

The system of claim 10, wherein at least one memory mapped file is proxied using the host-VM channel.

### Claim 19

A non-transitory computer readable medium storing thereon computer executable instructions for moving a process from a host to a virtual machine (VM), comprising instructions for:
freezing the process at a host operating system (OS) of the host;
transferring at least one kernel object of the process from the host OS to a VM OS of the VM;
reconfiguring at least one input-output (IO) resource of the process to point to a host-VM channel such that data flow between the host and the VM is enabled;
mapping memory utilized by the process to the VM by remapping at least one page of the memory into the VM OS;
determining whether at least one library mapped into the process matches between the host OS and the VM OS;
in response to determining that the at least one library matches, configuring a corresponding memory map of the process to point to at least one library in the VM OS; and
unfreezing the process at the VM OS.
