# US 2019/0317785 A1 · Method and apparatus for simultaneously running multiple virtual machines, and electronic device

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

- Number: US 2019/0317785 A1
- Document ID: US20190317785A1
- Status: Published application
- Kind: A1
- Application number: 16/457,016
- Filed: 2019-06-28
- Published: 2019-10-17
- Earliest claimed: 2016-12-29
- Assignees: Cloudminds (Shenzhen) Robotics Systems Co., Ltd.
- Applicants: CloudMinds (Shenzhen) Robotics Systems Co., Ltd.
- Inventors: Yanfei WEN; Yonghui WANG
- Web page: https://patentgrep.com/patent/US20190317785A1

## CPC

- G06F 9/45545: {Guest-host, i.e. hypervisor is an application program itself, e.g. VirtualBox}
- G06F 9/45558: {Hypervisor-specific management and integration aspects}
- G06F 9/45537: {Provision of facilities of other operating environments, e.g. WINE (I/O emulation G06F13/105)}
- G06F 9/45541: {Bare-metal, i.e. hypervisor runs directly on hardware}
- G06F 9/461: {Saving or restoring of program or task context}
- G06F 9/5077: {Logical partitioning of resources; Management or configuration of virtualized resources (specific details on emulation or internal functioning of virtual machines G06F9/455)}
- G06F 2009/45579: {I/O management, e.g. providing access to device drivers or storage}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

The present invention provides a method and apparatus for simultaneously running multiple virtual machines, and an electronic device. The method includes: initiating a request of running a second operating system in Qemu; triggering abnormality to a Hypervisor of a currently running first operating system in a KVM module; storing a context of the Hypervisor of the first operating system in the Hypervisor of the first operating system, and loading the context of the Hypervisor of the second operating system; and storing the context of the first operating system in the Hypervisor of the second operating system, and loading the context of the second operating system. By adoption of the solution provided by the present application, multiple virtual machines can be run simultaneously, and the respective functions can be run independently.

## Claims

### Claim 1

A method for simultaneously running multiple virtual machines, comprising:
initiating a request of running a second operating system in Qemu;
triggering abnormality to a Hypervisor of a currently running first operating system in a KVM module;
storing a context of the Hypervisor of the first operating system in the Hypervisor of the first operating system, and loading the context of the Hypervisor of the second operating system; and
storing the context of the first operating system in the Hypervisor of the second operating system, and loading the context of the second operating system.

### Claim 2 (depends on 1)

The method according to claim 1, further comprising:
when the termination of the running of the second operating system is monitored in the Qemu, storing the context of the second operating system in the Hypervisor of the second operating system, and loading the context of the first operating system;
triggering abnormality to the Hypervisor of the second operating system in the KVM module; and
storing the context of the Hypervisor of the second operating system in the Hypervisor of the second operating system, and loading the context of the Hypervisor of the first operating system.

### Claim 3 (depends on 1)

The method according to claim 1, wherein the storing a context of the Hypervisor of the first operating system in the Hypervisor of the first operating system, and loading the context of the Hypervisor of the second operating system is specifically as follows: calling back the KVM module in the Hypervisor of the first operating system, storing the context of the Hypervisor of the first operating system in the KVM module, and loading the context of the Hypervisor of the second operating system.

### Claim 4 (depends on 1)

The method according to claim 1, wherein the first operating system is a Host operating system, the Hypervisor of the first operating system is a platform Hypervisor, the second operating system is a Guest operating system, and the Hypervisor of the second operating system is a third-party Hypervisor.

### Claim 5 (depends on 1)

The method according to claim 1, wherein the kernel of the first operating system is a Host Linux kernel, and the kernel of the second operating system is a Guest Linux kernel.

### Claim 6 (depends on 1)

An electronic device, comprising: a memory, one or more processors, and one or more modules;
the one or more modules are stored in the memory and are configured to be executed by the one or more processors, and the one or more modules comprise instructions for executing each step in the method according to claim 1.

### Claim 7 (depends on 6)

The electronic device according to claim 6, further comprising:
when the termination of the running of the second operating system is monitored in the Qemu, storing the context of the second operating system in the Hypervisor of the second operating system, and loading the context of the first operating system;
triggering abnormality to the Hypervisor of the second operating system in the KVM module; and
storing the context of the Hypervisor of the second operating system in the Hypervisor of the second operating system, and loading the context of the Hypervisor of the first operating system.

### Claim 8 (depends on 6)

The electronic device according to claim 6, wherein the storing a context of the Hypervisor of the first operating system in the Hypervisor of the first operating system, and loading the context of the Hypervisor of the second operating system is specifically as follows: calling back the KVM module in the Hypervisor of the first operating system, storing the context of the Hypervisor of the first operating system in the KVM module, and loading the context of the Hypervisor of the second operating system.

### Claim 9 (depends on 6)

The electronic device according to claim 6, wherein the first operating system is a Host operating system, the Hypervisor of the first operating system is a platform Hypervisor, the second operating system is a Guest operating system, and the Hypervisor of the second operating system is a third-party Hypervisor.

### Claim 10 (depends on 6)

The method according to claim 6, wherein the kernel of the first operating system is a Host Linux kernel, and the kernel of the second operating system is a Guest Linux kernel.
