Container processing method based on host machine, host machine, system, equipment and medium

By deploying virtual service containers on the host to create a virtual operating system in parallel, the problem of virtual operating system creation time growth when large-scale operating system container creation requests is solved, and efficient parallel processing of operating system containers is achieved.

CN119248419APending Publication Date: 2025-01-03SHENZHEN QIANHAI HUANRONG LIANYI INFORMATION TECHNOLOGY SERVICES CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411279440.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-11
Publication Date
2025-01-03

AI Technical Summary

Technical Problem

In the prior art, when large-scale operating system container creation requests are created, the creation and running time of virtual operating systems will increase linearly, resulting in the user waiting time being too long.

Method used

By deploying a virtualized service container on the host, listening for creation requests for multiple operating system containers, and creating a virtual operating system in parallel in the virtualized service container, the common resources are loaded only once for the creation of multiple operating system containers, avoiding the Serial processing wait time.

Benefits of technology

The parallel creation of multiple operating system containers is realized, reducing the creation time of virtual operating systems and improving processing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119248419A_ABST
    Figure CN119248419A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of container processing, and provides a container processing method based on a host machine, the host machine, a system, equipment and a medium so as to improve the virtual system creation efficiency, the invention provides the container processing method based on the host machine, the host machine is deployed with a virtualization service container, and the virtual system creation efficiency is improved. The host machine is deployed with the virtualization service container, the virtualization service container runs a virtualization service starting monitoring mode so as to monitor a creation request triggered by a client of each operating system container, and the creation request is used for requesting to create a virtual operating system; when a plurality of creation requests are monitored, loading an operating system mirror image corresponding to each creation request based on a mirror image storage path of the operating system container; and correspondingly creating each virtual operating system in the virtualization service container in parallel based on the loading resources on the host machine and the operating system mirror image corresponding to each creation request.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of container processing, and in particular to a host-based container processing method, host, system, device and medium. Background Art

[0002] At present, the existing technical solutions can realize the co-operation of multiple Windows containers on a host machine, that is, multiple Windows containers can be deployed on the host machine. Windows containers refer to containers used to deploy the Windows system. Each Windows container will run a virtualization service (such as qemu). The virtualization service on the Windows container needs to load some common environment configurations and pre-resources of the host machine, and these operations themselves cannot be executed in parallel, but can only be executed serially in a certain order. In other words, the virtual machine will be created on the Windows container only after the virtualization service is started. For example, if the startup time of a Windows container is 3 minutes, then if 3 Windows containers are created at the same time, the second container needs to be started after nearly 3 minutes, and the third container needs to be started after nearly 6 minutes, and so on. The actual effect is to create Windows containers in series.

[0003] It can be seen that although the traditional solution can run multiple Windows containers, each Windows container will run a virtualization service. The virtualization service itself cannot be executed in parallel, but can only be executed serially in a certain order. This will cause the startup time of the Windows container to create a virtual operating system to overlap. If a large number of Windows container creation requests come, the running time of creating the virtual operating system will increase linearly. Summary of the invention

[0004] Based on this, it is necessary to provide a host-based container processing method, host, system, device and medium technology to address the above technical problems, so as to solve the technical problem that when a large number of operating system container creation requests come, the running time of creating a virtual operating system will increase linearly.

[0005] In order to solve the above technical problems, the following technical solutions are provided: In a first aspect, a container processing method based on a host machine is provided, wherein the host machine is deployed with a virtualized service container, and the virtualized service container runs a virtualized service, and the method comprises: The virtualization service starts a monitoring mode to monitor a creation request triggered by a client of each operating system container, wherein the creation request is used to request the creation of a virtual operating system; When a plurality of the creation requests are monitored, the virtualization service loads the operating system image corresponding to each of the creation requests based on the image storage path of the operating system container; The virtualization service creates each virtual operating system in the virtualization service container in parallel based on the loaded resources on the host machine and the operating system image corresponding to each creation request.

[0006] Furthermore, the operating system container includes an operating system container deployed on the host machine and / or an operating system container deployed on other host machine nodes.

[0007] Furthermore, before the virtualized service starts the monitoring mode, the method further includes: The virtualization service obtains an operating system image corresponding to the operating system container; The virtualization service stores the operating system image in the host machine, and mounts the image storage path corresponding to the operating system image to the virtualization service container.

[0008] Furthermore, the virtualization service stores the operating system image in the host machine and mounts the corresponding image storage path to the virtualization service container, including: The virtualization service stores the operating system container image corresponding to the operating system container in the host machine, and mounts the image storage path corresponding to the operating system container image to the virtualization service container, wherein the operating system container image includes the operating system image.

[0009] In a second aspect, a host machine is provided, wherein a virtualized service container is deployed on the host machine, and the virtualized service container runs a virtualized service, wherein the virtualized service is used to: Start a monitoring mode to monitor a creation request triggered by a client of each operating system container, wherein the creation request is used to request the creation of a virtual operating system; When multiple creation requests are monitored, based on the image storage path of the operating system container, the operating system image corresponding to each creation request is loaded; Based on the loaded resources on the host machine and the operating system image corresponding to each creation request, each virtual operating system is created in parallel in the virtualization service container.

[0010] In a third aspect, a container processing system is provided, the container processing system comprising N host nodes, a first host node among the N host nodes having a virtualized service container deployed thereon, the virtualized service container running a virtualized service, the virtualized service being used to: Start a monitoring mode to monitor a creation request triggered by a client of each operating system container, wherein the creation request is used to request the creation of a virtual operating system; When multiple creation requests are monitored, based on the image storage path of the operating system container, the operating system image corresponding to each creation request is loaded; Based on the loaded resources on the first host node and the operating system image corresponding to each creation request, each virtual operating system is created in parallel in the virtualization service container.

[0011] Furthermore, the operating system container includes a first operating system container and / or a second operating system container; the first operating system container is deployed on the first host node, and the second operating system container is deployed on a second host node among the N host nodes, and the second host node and the first host node are different host nodes.

[0012] Furthermore, the second host node is an edge node in the container processing system, and the virtualization service is further used for: Based on an edge scheduling algorithm, the second operating system container is deployed to an edge node in the container processing system.

[0013] In a fourth aspect, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the container processing method as described in any one of the preceding items are implemented.

[0014] In a fifth aspect, the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the container processing method as described in any one of the above items are implemented.

[0015] It can be seen that in one of the solutions provided by the present application, when a large number of operation container creation requests are received, the client of each operating system container can jointly call the virtualization service container, so that when the virtualization service in the virtualization service container faces multiple creation requests, it can only load the common resources of the host machine once for parallel creation of virtual operating systems, that is, the resources loaded once can be used for creation calls of multiple operating system containers, effectively avoiding the serial processing waiting time caused by each operating system container separately enabling its own running virtualization service, thereby achieving the effect of parallel execution of multiple operating system containers to create virtual operating systems, reducing the running time of creating virtual operating systems, and improving processing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0017] Figure 1 This is a schematic diagram of a calling process of a host machine in one embodiment of the present application; Figure 2 This is a schematic diagram of a mirror processing process of a host machine in one embodiment of the present application; Figure 3 This is a schematic diagram of a calling process when a virtualized service container and an operating system container are on the same host node in an embodiment of the present application; Figure 4 It is a schematic diagram of a calling process when the virtualized service container and the operating system container are on the same host machine and on different host machines in one embodiment of the present application; Figure 5 This is another schematic diagram of a calling process when the virtualized service container and the operating system container are on the same host machine and on different host machines in one embodiment of the present application; Figure 6 This is a schematic diagram of a process of a container processing method in an embodiment of the present application; Figure 7 It is a structural schematic diagram of a computer device in one embodiment of the present application. DETAILED DESCRIPTION

[0018] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0019] In traditional solutions, a virtual operating system is created on the operating system container only after the virtualization service is started. For example, taking the Windows operating system as an example, if the startup time of a Windows container is 3 minutes, then if three Windows containers are created at the same time, the second container needs to be started after nearly 3 minutes, and the third container needs to be started after nearly 6 minutes, and so on. The actual effect is to create Windows virtual systems on Windows containers in series, that is, Windows virtual machines.

[0020] It can be seen that although the traditional solution can run multiple operating system containers on the same host machine, each operating system container will run a virtualization service, and the virtualization service needs to load some common loading resources of the host machine. The virtualization service itself cannot be executed in parallel, but can only be executed serially in a certain order, which will cause the overall creation and startup time of multiple operating system containers to overlap. If a large number of virtual operating system creation requests come, the creation and running time of the operating system container will increase linearly, causing users to wait for a long time. In order to solve this technical problem, the embodiments of the present application provide a mechanism that enables multiple operating system containers to be processed in parallel, and each embodiment is described in detail below.

[0021] First, to facilitate understanding of the embodiments of the present application, a container processing system provided in the embodiments of the present application is described.

[0022] A container processing system provided in an embodiment of the present application includes N host nodes, and a first host node among the N host nodes is deployed with a virtualized service container, wherein the first host node may refer to any one or more host nodes among the N host nodes, without specific limitation. The first host node is deployed with a virtualized service container, that is, the first host node, as a host, can deploy a container for running a virtualized service, and the container implementation type of the virtualized service container may include but is not limited to container types such as Docker containers and Podman containers, without specific limitation. Exemplarily, the virtualized service includes but is not limited to qemu or other virtualized service modules, without specific limitation. The virtualized service qemu is a virtual simulator or manager for managing virtual resources such as virtual machines.

[0023] In the embodiment of the present application, the virtualization service is used to: Start a monitoring mode to monitor a creation request triggered by a client of each operating system container, wherein the creation request is used to request the creation of a virtual operating system; When multiple creation requests are monitored, based on the image storage path of the operating system container, the operating system image corresponding to each creation request is loaded; Based on the loaded resources on the first host node and the operating system image corresponding to each creation request, each virtual operating system is created in parallel in the virtualization service container.

[0024] An operating system image refers to a template file of an operating system virtual machine, which is used to load and generate an operating system virtual machine, also known as a virtual operating system.

[0025] In this embodiment, for the first host node, a virtualized service container is deployed on the first host node, a virtualized service is running on the virtualized service container, and the virtualized service running on the first host node has a plurality of different working modes, including a monitoring mode, which is used to monitor various requests sent to the virtualized service container. The types of the above requests include but are not limited to creation requests triggered by the client of the operating system container for requesting to create a virtual operating system.

[0026] like Figure 1 As shown, clients of multiple operating system containers can respectively send creation requests through the container interface information of the virtualized service container by calling. The container interface information of the virtualized service container includes the container IP address, port and path corresponding to the virtualized service container. For example, Figure 1 In the example, the port is 16509 and the path is / sysetm. Each client can call the virtualization service container based on the above container interface information to send a creation request respectively.

[0027] It should be noted that in the embodiment of the present application, the current operating system container does not refer to a container that has an operating system deployed on it, but refers to a container that needs to be used to send a request to the virtualization service container. At this time, the operating system container can be understood as an "empty shell container" used to act as a client to initiate a request to create a virtual operation to the virtualization service container, but after the corresponding virtual operating system is created and started, it will perform actual tasks, but it actually occupies the resources of the host machine where the virtualization service container is located. The client of each operating system container can send the above creation request to the virtualization service running on the first host node, so that the virtualization service can listen to multiple creation requests after starting the monitoring mode.

[0028] In addition, the embodiment of the present application will store the operating system image corresponding to each operating system container in advance. When the virtualization service listens to multiple creation requests, it will load the operating system image corresponding to each creation request based on the image storage path of the operating system container; then, based on the loading resources on the host machine (i.e., the first host machine node) and the operating system image corresponding to each creation request, each virtual operating system is created in parallel in the virtualization service container. The above-mentioned virtual operating system includes but is not limited to virtual machine systems such as Windows and Linux. Correspondingly, the operating system container includes but is not limited to Windows container, Linux container, etc., and is not specifically limited.

[0029] For example, as an example, the above processing is explained here by taking the operating system as Windows: Assume that there are N creation requests, N is greater than or equal to 2, and the N creation requests come from the clients of Windows container 1, Windows container 2, ..., Windows container N, respectively, for respectively requesting to create Windows virtual systems, such as Windows virtual machines. After the virtualization service listens to the above N creation requests, the virtualization service will load the Windows image based on the image storage path of each Windows container, and based on the loading resources and Windows image on the host machine, create a Windows virtual system corresponding to each creation request in the virtualization service container in parallel, and obtain multiple Windows virtual machines, wherein the loading resources on the host machine include some common environment configurations and pre-resources of the host machine required to create the virtual operating system.

[0030] It can be seen that the embodiment of the present application provides a container processing system. When a large number of operation container creation requests are received, the client of each operating system container can jointly call the virtualization service container, so that when the virtualization service in the virtualization service container faces multiple operating system container creation requests, it can only load the host machine's public resources once for parallel creation of virtual operating systems, that is, the resources loaded once can be used for the creation calls of multiple operating system containers, effectively avoiding the serial processing waiting time caused by each operating system container separately enabling its own running virtualization service. There will be no dependency between the operating system containers, and the running programs are completely independent, thereby achieving the effect of multiple operating system containers creating virtual operating systems and executing them in parallel. By using this solution, when multiple operating system containers are started at the same time, all containers can be executed in parallel, reducing the creation time and improving the processing efficiency.

[0031] It is worth noting that after each virtual operating system is created, each operating system container can execute the required actual tasks or applications based on its own virtual operating system, which will not be described in detail here.

[0032] In one embodiment, if Figure 2 As shown, before starting the monitoring mode, the virtualization service is also used to obtain the operating system image corresponding to the operating system container, store the operating system image in the host machine, and mount the image storage path corresponding to the operating system image to the virtualization service container.

[0033] In this embodiment, an operating system image storage processing mechanism corresponding to an operating system container is provided. Before the virtualization service starts the listening mode, the operating system image corresponding to the operating system container is obtained in advance, and the operating system image is stored in the first host node, and then the corresponding image storage path is mounted on the virtualization service container. Through this step, the virtualization service container is equivalent to mounting a certain path of the first host node, that is, the image storage path, and this image storage path is also the operating system image path of all operating system containers. For example, before the virtualization service starts the listening mode, the virtualization service will obtain the windows image corresponding to the windows container in advance, and store the windows image on the first host node, and then mount the corresponding image storage path of the windows image to the virtualization service container.

[0034] In the container processing system provided in this embodiment, the operating system images corresponding to all operating system containers can be viewed through mounting through the virtualization service, and it is beneficial to quickly load the operating system image for subsequent parallel creation and use, further improving the processing efficiency.

[0035] In one embodiment, specifically, the virtualization service is used to store the operating system container image corresponding to the operating system container in the host machine, and mount the image storage path corresponding to the operating system container image to the virtualization service container, and the operating system container image includes the operating system image.

[0036] That is, in this embodiment, before the virtualization service starts the monitoring mode, the virtualization service can also obtain the operating system container image corresponding to the operating system container in advance, then store the operating system container image on the first host node, and mount the image storage path corresponding to the operating system container image on the virtualization service container. For example, before the virtualization service starts the monitoring mode, the windows container image corresponding to the windows container is obtained in advance, and the windows container image is stored on the first host node, and then the image storage path corresponding to the windows container image is mounted on the virtualization service container.

[0037] The difference from the above embodiment is that this embodiment mounts a container image on the virtualization service container, while the above embodiment mounts a system image. Compared with the two, in this implementation, the virtualization service can view the container images corresponding to all operating system containers. The container image includes the operating system image, and the operating system image can be quickly loaded to create a virtual operating system. Moreover, since the container image also includes other container information, it is convenient to perform other processing based on the operating system container image in the future, so as to expand other application scenarios.

[0038] In one embodiment, if Figure 3 or Figure 4 As shown, the operating system container includes a first operating system container and / or a second operating system container; the first operating system container is deployed on the first host node, and the second operating system container is deployed on a second host node among the N host nodes, and the second host node and the first host node are different host nodes. Figure 3 or Figure 4 Two clients and four clients are used as examples for illustration, and the specific examples are not limited.

[0039] In this embodiment, the creation request sent to the virtualization service is sent by a client deployed on the operating system container, wherein, based on different application scenarios, there may be multiple triggering situations for the creation request, which may include any of the following situations: In the first case, the operating system container where the creation request is triggered includes multiple operating system containers deployed on the first host node, that is, the virtualization service can receive creation requests respectively triggered by clients of multiple operating system containers deployed on the same host; In the second case, the operating system container where the creation request is triggered includes multiple operating system containers deployed on the second host node, that is, the virtualization service can receive creation requests triggered by clients of multiple operating system containers deployed on other host machines respectively; In a third case, the operating system container triggering the creation request includes an operating system container deployed on the first host node and multiple operating system containers deployed on the second host node, that is, the virtualization service can receive a creation request triggered by a client of an operating system container deployed on the same host, and receive creation requests triggered by clients of multiple operating system containers deployed on other hosts respectively; In a fourth case, the operating system container where the creation request is triggered includes multiple operating system containers deployed on the first host node and one operating system container deployed on the second host node, that is, the virtualization service can receive creation requests respectively triggered by clients of multiple operating system containers deployed on the same host, and receive a creation request triggered by a client of an operating system container deployed on other hosts; In a fifth case, the operating system container triggering the creation request includes an operating system container deployed on the first host node and an operating system container deployed on the second host node, that is, the virtualization service can receive a creation request triggered by a client of an operating system container deployed on the same host, and receive a creation request triggered by a client of an operating system container deployed on another host; In the sixth case, the operating system container that triggers the creation request includes multiple operating system containers deployed on the first host node and multiple operating system containers deployed on the second host node, that is, the virtualization service can receive creation requests triggered by clients of multiple operating system containers deployed on the same host, and receive creation requests triggered by clients of multiple operating system containers deployed on other host machines.

[0040] It can be seen that in the container processing system provided in this embodiment, the operating system container where the creation request is triggered can be an operating system container on the same host machine as the virtualized service container, or an operating system container on a different host machine than the virtualized service container, or both. The above method increases the actual application scenarios, so that there can be a variety of flexible change processing methods when deploying containers, increasing the adaptability and flexibility of the solution to meet the needs of various actual application scenarios.

[0041] In the above situation, the virtualization service container and the operating system container can be on the same host node. As an example, in this case, the container orchestration mechanism can be further utilized to orchestrate and deploy the containers on the container processing system to ensure that the virtualization service container and the operating system container are on the same host node; when the virtualization service container and the operating system container are not on the same host node, this implementation method requires the virtualization service to pull the operating system container image or the operating system image to the local host in advance to ensure the implementation of the solution.

[0042] In addition, when the virtualization service container and the operating system container are on the same host node, since the host disk can be shared on the same host, the image (container image or system image) corresponding to the operating system container can be directly downloaded to the host for subsequent virtualization service use. Therefore, the processing flow will be simpler and the hardware resources of the system cluster can be used to the greatest extent. In addition, since the host only uses one virtualization service at a time, single point failures can be reduced.

[0043] When the virtualization service container and the operating system container are not on the same host node, all host nodes in the container processing system cluster can request virtualization services, and there is no need to adopt container orchestration mechanisms (including node selection deployment strategies) to control deployment on the same host node. Therefore, from a global system perspective, the implementation is simpler.

[0044] like Figure 5 As shown, as an example, the operating system is Windows. Assume that there are 4 creation requests, 3 creation requests come from 4 Windows containers, two of which come from the same host machine as the virtualization service container, and the other 2 come from other host machines; the 4 requests are used to request the creation of Windows virtual machines, that is, Windows virtual systems. After the virtualization service listens to the above 4 creation requests, the virtualization service loads the Windows image based on the image storage path of each Windows container, and creates a Windows virtual system corresponding to each creation request in the virtualization service container in parallel based on the loading resources and the Windows image on the host machine, and obtains 4 Windows virtual systems, that is, 4 Windows virtual systems are running on the virtualization service container, wherein the loading resources on the host machine include some common environment configurations and pre-resources of the host machine required to create a virtual operating system. After each virtual system is started, it will execute actual tasks, but actually occupies the resources of the host machine where the virtualization service is located.

[0045] In one embodiment, the second host node is an edge node in the container processing system, and the virtualization service is further used to: Based on an edge scheduling algorithm, the second operating system container is deployed to an edge node in the container processing system.

[0046] In this embodiment, the operating system container can be deployed to the edge node in the container processing system based on the edge scheduling algorithm, thereby improving the utilization rate of the edge node and maximizing the use of the edge node to participate in the creation and application of the virtual operating system.

[0047] In one embodiment, the operating system container deployed on the host machine and / or the operating system container deployed on other host machine nodes, where the client host triggers the creation request, can be used to create different types of virtual operating systems, such as Windows virtual systems, Linux virtual systems, etc., without specific limitation.

[0048] In the above embodiment, the container processing system provided in the embodiment of the present application is described. The following describes the container processing method provided in the embodiment of the present application based on the container processing system.

[0049] In one embodiment, if Figure 6 As shown, a container processing method based on a host machine is provided, wherein the host machine is deployed with a virtualized service container, and the virtualized service container runs a virtualized service, and the method includes: S10: The virtualization service starts a monitoring mode to monitor a creation request triggered by a client of each operating system container, where the creation request is used to request the creation of a virtual operating system; S20: When multiple creation requests are monitored, the virtualization service loads the operating system image corresponding to each creation request based on the image storage path of the operating system container; S30: The virtualization service creates each virtual operating system in the virtualization service container in parallel based on the loaded resources on the host machine and the operating system image corresponding to each creation request.

[0050] It can be seen that the embodiment of the present application provides a container processing method. When a large number of operation container creation requests are received, the client of each operating system container can jointly call the virtualization service container, so that when the virtualization service in the virtualization service container faces multiple creation requests, it can only load the common resources of the host machine once for parallel creation of virtual operating systems, that is, the resources loaded once can be used for creation calls of multiple operating system containers, effectively avoiding the serial processing waiting time caused by each operating system container separately enabling its own running virtualization service, thereby achieving the effect of multiple operating system containers creating virtual operating systems for parallel execution, reducing creation time and improving processing efficiency.

[0051] In one embodiment, the operating system container includes an operating system container deployed on the host machine and / or an operating system container deployed on other host machine nodes.

[0052] In this embodiment, the creation request sent to the virtualization service is sent by a client deployed on the operating system container, wherein, based on different application scenarios, there may be multiple triggering situations for the creation request, which may be one of the following situations: In the first case, the operating system container where the creation request is triggered includes multiple operating system containers deployed on the first host node, that is, the virtualization service can receive creation requests respectively triggered by clients of multiple operating system containers deployed on the same host; In the second case, the operating system container where the creation request is triggered includes multiple operating system containers deployed on the second host node, that is, the virtualization service can receive creation requests triggered by clients of multiple operating system containers deployed on other host machines respectively; In a third case, the operating system container triggering the creation request includes an operating system container deployed on the first host node and multiple operating system containers deployed on the second host node, that is, the virtualization service can receive a creation request triggered by a client of an operating system container deployed on the same host, and receive creation requests triggered by clients of multiple operating system containers deployed on other hosts respectively; In a fourth case, the operating system container where the creation request is triggered includes multiple operating system containers deployed on the first host node and one operating system container deployed on the second host node, that is, the virtualization service can receive creation requests respectively triggered by clients of multiple operating system containers deployed on the same host, and receive a creation request triggered by a client of an operating system container deployed on other hosts; In a fifth case, the operating system container triggering the creation request includes an operating system container deployed on the first host node and an operating system container deployed on the second host node, that is, the virtualization service can receive a creation request triggered by a client of an operating system container deployed on the same host, and receive a creation request triggered by a client of an operating system container deployed on another host; In the sixth case, the operating system container that triggers the creation request includes multiple operating system containers deployed on the first host node and multiple operating system containers deployed on the second host node, that is, the virtualization service can receive creation requests triggered by clients of multiple operating system containers deployed on the same host, and receive creation requests triggered by clients of multiple operating system containers deployed on other host machines.

[0053] In the container processing method provided in this embodiment, the operating system container where the creation request is triggered can be an operating system container on the same host machine as the virtualized service container, or an operating system container on the same host machine as the virtualized service container, or both. The above method increases the actual application scenarios, so that there can be a variety of flexible and variable processing methods when deploying containers, increasing the adaptability and flexibility of the solution to meet the needs of various actual application scenarios.

[0054] In one embodiment, before the virtualized service starts the monitoring mode, the method further includes: S101: The virtualization service obtains an operating system image corresponding to the operating system container; S102: The virtualization service stores the operating system image in the host machine, and mounts the image storage path corresponding to the operating system image to the virtualization service container.

[0055] In the container processing method provided in this embodiment, the virtualization service can view the operating system images corresponding to all operating system containers by mounting, and is conducive to quickly loading the operating system image for subsequent parallel creation and use, further improving the processing efficiency.

[0056] In one embodiment, the virtualization service stores the operating system image in the host machine and mounts the corresponding image storage path to the virtualization service container, including: The virtualization service stores the operating system container image corresponding to the operating system container in the host machine, and mounts the image storage path corresponding to the operating system container image to the virtualization service container, wherein the operating system container image includes the operating system image.

[0057] In the container processing method provided in this embodiment, a certain path of the host machine, namely, the image storage path, can be mounted on the virtualized service container, and this image storage path is the image path of the operating system container image of all operating system containers. The difference from the above embodiment is that this embodiment mounts the container image on the virtualized service container, while the above embodiment mounts the system image. Compared with the two, in this implementation, the virtualization service can view the container images corresponding to all operating system containers. The container image includes the operating system image, and the operating system image can be quickly loaded to create a virtual operating system. Moreover, since the container image also includes other container information, it is convenient to perform other processing based on the operating system container image in the future, and it is convenient to expand other application scenarios.

[0058] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0059] For various details and possible implementations of the container processing method, please refer to the description of the aforementioned system embodiment, and the specific details will not be repeated here.

[0060] In the above embodiment, the container processing method provided in the embodiment of the present application is described. The host machine provided in the embodiment of the present application is described below.

[0061] In one embodiment, a host machine is provided, wherein a virtualized service container is deployed on the host machine, and the virtualized service container runs a virtualized service, wherein the virtualized service is used to: Start a monitoring mode to monitor a creation request triggered by a client of each operating system container, wherein the creation request is used to request the creation of a virtual operating system; When multiple creation requests are monitored, based on the image storage path of the operating system container, the operating system image corresponding to each creation request is loaded; Based on the loaded resources on the host machine and the operating system image corresponding to each creation request, each virtual operating system is created in parallel in the virtualization service container.

[0062] It can be seen that the embodiment of the present application provides a host machine, in which a virtualization service container is deployed, and the virtualization service container runs a virtualization service. When a large number of operation container creation requests are received, the client of each operating system container can jointly call the virtualization service container, so that when the virtualization service in the virtualization service container faces multiple creation requests, it can only load the public resources of the host machine once for parallel creation of virtual operating systems, that is, the resources loaded once can be used for creation calls of multiple operating system containers, effectively avoiding the serial processing waiting time caused by each operating system container separately enabling its own running virtualization service, thereby achieving the effect of multiple operating system containers creating virtual operating systems for parallel execution, reducing creation time, and improving processing efficiency.

[0063] In one embodiment, the operating system container includes an operating system container deployed on the host machine and / or an operating system container deployed on other host machine nodes.

[0064] In this embodiment, the creation request sent to the virtualization service is sent by a client deployed on the operating system container, wherein, based on different application scenarios, there may be multiple triggering situations for the creation request, which may be one of the following situations: In the first case, the operating system container where the creation request is triggered includes multiple operating system containers deployed on the first host node, that is, the virtualization service can receive creation requests respectively triggered by clients of multiple operating system containers deployed on the same host; In the second case, the operating system container where the creation request is triggered includes multiple operating system containers deployed on the second host node, that is, the virtualization service can receive creation requests triggered by clients of multiple operating system containers deployed on other host machines respectively; In a third case, the operating system container triggering the creation request includes an operating system container deployed on the first host node and multiple operating system containers deployed on the second host node, that is, the virtualization service can receive a creation request triggered by a client of an operating system container deployed on the same host, and receive creation requests triggered by clients of multiple operating system containers deployed on other hosts respectively; In a fourth case, the operating system container where the creation request is triggered includes multiple operating system containers deployed on the first host node and one operating system container deployed on the second host node, that is, the virtualization service can receive creation requests respectively triggered by clients of multiple operating system containers deployed on the same host, and receive a creation request triggered by a client of an operating system container deployed on other hosts; In a fifth case, the operating system container triggering the creation request includes an operating system container deployed on the first host node and an operating system container deployed on the second host node, that is, the virtualization service can receive a creation request triggered by a client of an operating system container deployed on the same host, and receive a creation request triggered by a client of an operating system container deployed on another host; In the sixth case, the operating system container that triggers the creation request includes multiple operating system containers deployed on the first host node and multiple operating system containers deployed on the second host node, that is, the virtualization service can receive creation requests triggered by clients of multiple operating system containers deployed on the same host, and receive creation requests triggered by clients of multiple operating system containers deployed on other host machines.

[0065] In the host provided by this embodiment, the operating system container where the creation request is triggered can be an operating system container on the same host as the virtualized service container, or an operating system container on the same host as the virtualized service container, or both. The above method increases the actual application scenarios, so that there can be a variety of flexible change processing methods when deploying containers, increasing the adaptability and flexibility of the solution to meet the needs of various actual application scenarios.

[0066] In one embodiment, the virtualization service of the host machine is also used to: Obtaining an operating system image corresponding to the operating system container; The operating system image is stored in the host machine, and the image storage path corresponding to the operating system image is mounted to the virtualization service container.

[0067] In the host machine provided by this embodiment, the virtualization service of the host machine can view the operating system images corresponding to all operating system containers by mounting, and is conducive to quickly loading the operating system image for subsequent parallel creation and use, further improving the processing efficiency.

[0068] In one embodiment, the virtualization service of the host machine is further used to: The operating system container image corresponding to the operating system container is stored in the host machine, and the image storage path corresponding to the operating system container image is mounted on the virtualization service container, and the operating system container image includes the operating system image.

[0069] In the host machine provided in this embodiment, a virtualized service container can be mounted with a certain path of the host machine, namely, the image storage path, and this image storage path is the image path of the operating system container image of all operating system containers. In this embodiment, the container image is mounted on the virtualized service container, while the above embodiment is the system image. Compared with the two, in this implementation, the virtualization service can view the container images corresponding to all operating system containers. The container image includes the operating system image, and the operating system image can be quickly loaded to create a virtual operating system. Moreover, since the container image also includes other container information, it is convenient to perform other processing based on the operating system container image in the future, and it is convenient to expand other application scenarios.

[0070] It should be understood that for various details and possible implementations in the host machine, reference may also be made to the relevant description of the aforementioned system embodiment. To avoid redundant description, the specific descriptions are not repeated here one by one.

[0071] In one embodiment, a computer device is provided. The computer device can be used as a host in the above example. The computer device is deployed with a virtualized service container. The virtualized service container runs a virtualized service. The virtualized service is used to implement the steps in a container processing method. The internal structure diagram thereof can be as follows: Figure 7 As shown. The computer device includes a processor and a memory connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The computer device also includes a computer-readable storage medium and a memory. When the computer-readable instructions are executed by the processor, a step of virtualizing services in a container-based processing method is implemented. The computer-readable storage medium provided in this embodiment includes a non-volatile readable storage medium and a volatile readable storage medium.

[0072] In one embodiment, a computer device is provided, including a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor. When the processor executes the computer-readable instructions, the steps of virtualizing services in the aforementioned container-based processing method are implemented.

[0073] In one embodiment, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the step of virtualizing the service in the container processing method as described in any of the above is implemented.

[0074] It should be noted that for more details and technical effects achieved by the computer device or computer-readable storage medium, please refer to the records of the aforementioned method embodiments, and the specific description will not be repeated here.

[0075] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing related hardware through computer-readable instructions, and the computer-readable instructions can be stored in a non-volatile readable storage medium or a volatile readable storage medium. When the computer-readable instructions are executed, they may include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0076] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0077] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A container processing method based on a host machine, characterized in that: The host machine is deployed with a virtualized service container, and the virtualized service container runs a virtualized service. The method includes: The virtualization service starts a monitoring mode to monitor a creation request triggered by a client of each operating system container, wherein the creation request is used to request the creation of a virtual operating system; When a plurality of the creation requests are monitored, the virtualization service loads the operating system image corresponding to each of the creation requests based on the image storage path of the operating system container; The virtualization service creates each virtual operating system in the virtualization service container in parallel based on the loaded resources on the host machine and the operating system image corresponding to each creation request.

2. The container processing method according to claim 1, characterized in that: The operating system container includes an operating system container deployed on the host machine and / or an operating system container deployed on other host machine nodes.

3. The container processing method according to any one of claims 1 or 2, characterized in that: Before the virtualization service starts the monitoring mode, the method further includes: The virtualization service obtains an operating system image corresponding to the operating system container; The virtualization service stores the operating system image in the host machine, and mounts the image storage path corresponding to the operating system image to the virtualization service container.

4. The container processing method according to claim 3, characterized in that: The virtualization service stores the operating system image in the host machine, and mounts the image storage path corresponding to the operating system image to the virtualization service container, including: The virtualization service stores the operating system container image corresponding to the operating system container in the host machine, and mounts the image storage path corresponding to the operating system container image to the virtualization service container, wherein the operating system container image includes the operating system image.

5. A host machine, characterized in that: The host machine is deployed with a virtualized service container, the virtualized service container runs a virtualized service, and the virtualized service is used to: Start a monitoring mode to monitor a creation request triggered by a client of each operating system container, wherein the creation request is used to request the creation of a virtual operating system; When multiple creation requests are monitored, based on the image storage path of the operating system container, the operating system image corresponding to each creation request is loaded; Based on the loaded resources on the host machine and the operating system image corresponding to each creation request, each virtual operating system is created in parallel in the virtualization service container.

6. A container processing system, characterized in that: The container processing system includes N host nodes, a first host node among the N host nodes is deployed with a virtualized service container, the virtualized service container runs a virtualized service, and the virtualized service is used to: Start a monitoring mode to monitor a creation request triggered by a client of each operating system container, wherein the creation request is used to request the creation of a virtual operating system; When multiple creation requests are monitored, based on the image storage path of the operating system container, the operating system image corresponding to each creation request is loaded; Based on the loaded resources on the first host node and the operating system image corresponding to each creation request, each virtual operating system is created in parallel in the virtualization service container.

7. The container processing system according to claim 6, characterized in that The operating system container includes a first operating system container and / or a second operating system container; The first operating system container is deployed on the first host node, and the second operating system container is deployed on a second host node among the N host nodes, and the second host node and the first host node are different host nodes.

8. The container processing system according to claim 7, characterized in that The second host node is an edge node in the container processing system, and the virtualization service is further used for: Based on an edge scheduling algorithm, the second operating system container is deployed to an edge node in the container processing system.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the container processing method according to any one of claims 1 to 4 are implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the container processing method according to any one of claims 1 to 4 are implemented.

Citation Information

Cited By

  • Cloud service deployment method and device, electronic equipment, storage medium and program

    CN121462580A