Method and apparatus for creating container, and storage medium
OwnerJieheng FENG, Chunming CHENinventors
Life of this patent
Estimating the term…
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.
Claims20
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.
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.
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.
Dependencies are inferred from the claim text.