# US 2025/0094203 A1 · Method and apparatus for creating container, and storage medium

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

- Number: US 2025/0094203 A1
- Document ID: US20250094203A1
- Status: Published application
- Kind: A1
- Application number: 18/962,230
- Filed: 2024-11-27
- Published: 2025-03-20
- Earliest claimed: 2022-06-02
- Applicants: Huawei Technologies Co., Ltd.
- Inventors: Jieheng FENG; Chunming CHEN
- Web page: https://patentgrep.com/patent/US20250094203A1

## CPC

- G06F 9/45558: {Hypervisor-specific management and integration aspects}
- 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/45562: {Creating, deleting, cloning virtual machine instances}
- 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 2009/45587: {Isolation or security of virtual machine instances}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

This application discloses example methods and apparatuses for creating a container, and a storage medium, and relates to the field of computer communication technologies. One example method is performed by a first node in a container cluster, and includes obtaining a first creation request that indicates to create a secure container. A first virtual machine is created based on the first creation request, and the secure container is run in the first virtual machine, where a physical resource of a memory of the first virtual machine is a first physical storage space in a first storage node.

## Claims

### Claim 1

A method for creating a container, applied to a first node, wherein the method comprises:
obtaining a first creation request, wherein the the first creation request indicates to create a target container and comprises a resource parameter of a first virtual machine in which the target container runs, and wherein the target container is a secure container;
creating the first virtual machine based on the first creation request, wherein a physical resource of a memory of the first virtual machine is a first physical storage space in a first storage node; and
running the target container in the first virtual machine.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the first node accesses the first physical storage space via remote direct memory access (RDMA).

### Claim 3 (depends on 1)

The method according to claim 1, wherein the first physical storage space is a persistent memory medium.

### Claim 4 (depends on 1)

The method according to claim 1, wherein, before the creating the first virtual machine based on the first creation request, the method further comprises:
determining a memory size of the first virtual machine based on the first creation request;
applying to the first storage node for the first physical storage space based on the memory size of the first virtual machine, wherein the first physical storage space is greater than or equal to the memory size of the first virtual machine; and
determining the first physical storage space as the physical resource of the memory of the first virtual machine.

### Claim 5 (depends on 4)

The method according to claim 4, wherein the method further comprises:
determining a second physical storage space of a data processing unit (DPU) in the first node as a physical resource of a cache of the first virtual machine; and
indicating the DPU to establish a mapping relationship between the second physical storage space and the first physical storage space, wherein the DPU is configured to access the first physical storage space via the RDMA and to write data in the second physical storage space into the first physical storage space.

### Claim 6 (depends on 5)

The method according to claim 5, wherein the DPU is configured to read hot data of the target container from the first physical storage space.

### Claim 7 (depends on 1)

The method according to claim 1, wherein:
the first node is any node in a container cluster, and the container cluster further comprises a second node; and
when the target container is migrated to the second node, a physical resource of a memory of a second virtual machine in which the target container runs and that is on the second node is the first physical storage space.

### Claim 8 (depends on 1)

The method according to claim 1, wherein the first node is any node in a container cluster, the container cluster further comprises a third node, the third node is configured to create a backup container of the target container, a third virtual machine in which the backup container runs and that is on the third node is in a pause state, and a physical resource of a memory of the third virtual machine is the first physical storage space.

### Claim 9 (depends on 8)

The method according to claim 8, wherein when the first virtual machine is in a fault state or in a pause state, the third virtual machine is in a running state.

### Claim 10

A method for creating a container, applied to a second node, wherein the method comprises:
receiving a container migration request, wherein the container migration request indicates to migrate, to the second node, a target container that runs in a first virtual machine on a first node, and the container migration request indicates to the second node to create a second virtual machine for running the target container, wherein the target container is a secure container;
determining a first physical storage space in a first storage node as a physical resource of a memory of the second virtual machine, wherein the first physical storage space is a physical resource of a memory of the first virtual machine;
creating the second virtual machine based on the physical resource of the memory of the second virtual machine; and
running the target container in the second virtual machine.

### Claim 11 (depends on 10)

The method according to claim 10, wherein the container migration request comprises an identity (ID) of the target container, and the determining a first physical storage space in a first storage node as a physical resource of a memory of the second virtual machine comprises:
sending a memory request message to the first storage node, wherein the memory request message comprises the ID of the target container, and the memory request message is used to request to obtain an address of the first physical storage space that has a correspondence with the ID of the target container;
receiving the address of the first physical storage space that is returned by the first storage node; and
determining the first physical storage space indicated by the address as the physical resource of the memory of the second virtual machine.

### Claim 12 (depends on 10)

The method according to claim 10, wherein the container migration request comprises an identity (ID) of the first virtual machine, and the determining a first physical storage space in a first storage node as a physical resource of a memory of the second virtual machine comprises:
sending a memory request message to the first storage node, wherein the memory request message comprises the ID of the first virtual machine, and the memory request message is used to request to obtain an address of the first physical storage space that has a correspondence with the ID of the first virtual machine;
receiving the address of the first physical storage space that is returned by the first storage node; and
determining the first physical storage space indicated by the address as the physical resource of the memory of the second virtual machine.

### Claim 13

An apparatus for creating a container, wherein the apparatus comprises at least one processor and at least one non-transitory storage medium configured to store program instructions, wherein the at least one processor is coupled to the at least one non-transitory storage medium, wherein the at least one processor is configured to execute the program instructions to perform the operations of:
obtaining a first creation request, wherein the the first creation request indicates to create a target container and comprises a resource parameter of a first virtual machine in which the target container runs, and wherein the target container is a secure container;
creating the first virtual machine based on the first creation request, wherein a physical resource of a memory of the first virtual machine is a first physical storage space in a first storage node; and
running the target container in the first virtual machine.

### Claim 14 (depends on 13)

The apparatus according to claim 13, wherein the first node accesses the first physical storage space via remote direct memory access (RDMA).

### Claim 15 (depends on 13)

The apparatus according to claim 13, wherein the first physical storage space is a persistent memory medium.

### Claim 16 (depends on 13)

The apparatus according to claim 13, wherein, before the creating the first virtual machine based on the first creation request, the operations further comprise:
determining a memory size of the first virtual machine based on the first creation request;
applying to the first storage node for the first physical storage space based on the memory size of the first virtual machine, wherein the first physical storage space is greater than or equal to the memory size of the first virtual machine; and
determining the first physical storage space as the physical resource of the memory of the first virtual machine.

### Claim 17 (depends on 16)

The apparatus according to claim 16, wherein the operations further comprise:
determining a second physical storage space of a data processing unit (DPU) in the first node as a physical resource of a cache of the first virtual machine; and
indicating the DPU to establish a mapping relationship between the second physical storage space and the first physical storage space, wherein the DPU is configured to access the first physical storage space via the RDMA, and to write data in the second physical storage space into the first physical storage space.

### Claim 18 (depends on 17)

The apparatus according to claim 17, wherein the DPU is further configured to read hot data of the target container from the first physical storage space.

### Claim 19 (depends on 13)

The apparatus according to claim 13, wherein:
the first node is any node in a container cluster, and the container cluster further comprises a second node; and
when the target container is migrated to the second node, a physical resource of a memory of a second virtual machine in which the target container runs and that is on the second node is the first physical storage space.

### Claim 20 (depends on 13)

The apparatus according to claim 13, wherein the first node is any node in a container cluster, the container cluster further comprises a third node, the third node is configured to create a backup container of the target container, a third virtual machine in which the backup container runs and that is on the third node is in a pause state, and a physical resource of a memory of the third virtual machine is the first physical storage space.
