Virtual machine startup control method and device based on data processing unit

By creating multiple virtual machine monitors on the host and uninstalling the monitor to the DPU, the problem of excessive time-consuming virtual machine concurrent startup in the existing technology is solved, and the rapid startup and management of virtual machines is realized, and users' rapid expansion needs are met.

CN118733196BActive Publication Date: 2025-03-14BEIJING VOLCANO ENGINE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410805425.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-20
Publication Date
2025-03-14
Estimated Expiration
2044-06-20

AI Technical Summary

Technical Problem

In the prior art, the process of concurrently starting multiple virtual machines is too time-consuming and cannot meet the business needs of users for rapid expansion.

Method used

By creating multiple virtual machine monitors on the host, using resources on the host to start multiple virtual machines concurrently, and after startup is completed, the virtual machine monitor is offloaded to the data processing unit DPU, and the startup virtual machine is managed using resources on the DPU.

Benefits of technology

It realizes rapid startup of multiple virtual machines, reduces the load pressure of the DPU and the information interaction between the host and the DPU, meets the user's needs for rapid capacity expansion, and reduces the load pressure of the host.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118733196B_ABST
    Figure CN118733196B_ABST
Patent Text Reader

Abstract

The disclosed embodiment provides a virtual machine startup control method and device based on a data processing unit, the method comprising: in response to a data processing unit DPU receiving startup instructions of multiple virtual machines, sending creation instructions of multiple virtual machine monitors to a host to which the DPU belongs, wherein one virtual machine monitor is used to manage a virtual machine; creating multiple virtual machine monitors through the host, and concurrently starting multiple virtual machines through the multiple virtual machine monitors using resources on the host; in response to the completion of concurrent startup of multiple virtual machines, unloading multiple virtual machine monitors from the host to the DPU, and managing the multiple virtual machines after startup using resources on the DPU through the multiple virtual machine monitors. The present application can meet the user's demand for rapid capacity expansion, and by unloading multiple virtual machine monitors from the host to the DPU, it can also reduce the load pressure of the host.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The disclosed embodiments relate to the field of cloud computing technology, and more particularly to a method and device for controlling virtual machine startup based on a data processing unit. Background Art

[0002] Virtualization technology is the foundation of the cloud computing industry. Host and virtual machine are two common virtualization concepts. From the perspective of the host, a virtual machine is equivalent to a process. User programs can run on both the host and the virtual machine, and user programs can hardly feel the difference in the underlying operating system.

[0003] In the current computing environment, in order to improve performance and efficiency, a common practice is to offload virtualized workloads to the data processing unit (DPU). By assigning virtualized workloads to a dedicated DPU, the load pressure on the host machine can be reduced, thereby improving the overall performance of the system.

[0004] The inventors have discovered that the prior art has at least the following technical problems: when multiple virtual machines need to be started concurrently, the process of concurrently starting multiple virtual machines in the prior art is too time-consuming and cannot meet the user's business needs for rapid capacity expansion. Summary of the invention

[0005] The embodiments of the present disclosure provide a method and device for controlling virtual machine startup based on a data processing unit, which can meet the user's demand for rapid capacity expansion.

[0006] In a first aspect, an embodiment of the present disclosure provides a virtual machine startup control method based on a data processing unit, comprising:

[0007] In response to a data processing unit DPU receiving startup instructions of multiple virtual machines, sending creation instructions of multiple virtual machine monitors to a host to which the DPU belongs, wherein one virtual machine monitor is used to manage one virtual machine;

[0008] Creating a plurality of virtual machine monitors through the host, and concurrently starting a plurality of virtual machines through the plurality of virtual machine monitors using resources on the host;

[0009] In response to completion of concurrent startup of the multiple virtual machines, the multiple virtual machine monitors are unloaded from the host to the DPU, and the multiple virtual machines that have been started are managed by the multiple virtual machine monitors using resources on the DPU.

[0010] In a second aspect, an embodiment of the present disclosure provides a virtual machine startup control device based on a data processing unit, comprising:

[0011] a sending unit, configured to send, in response to a data processing unit DPU receiving startup instructions for multiple virtual machines, a creation instruction for multiple virtual machine monitors to a host to which the DPU belongs, wherein one virtual machine monitor is used to manage one virtual machine;

[0012] A concurrent startup unit, configured to create a plurality of virtual machine monitors through the host, and concurrently start a plurality of virtual machines through the plurality of virtual machine monitors using resources on the host;

[0013] The unloading unit is used for unloading the multiple virtual machine monitors from the host to the DPU in response to the completion of the concurrent startup of the multiple virtual machines, and managing the started multiple virtual machines by using the resources on the DPU through the multiple virtual machine monitors.

[0014] In a third aspect, an embodiment of the present disclosure provides an electronic device, including: a processor and a memory;

[0015] The memory stores computer-executable instructions;

[0016] The processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the virtual machine startup control method based on the data processing unit as described in the first aspect and various possible designs of the first aspect.

[0017] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, in which computer execution instructions are stored. When a processor executes the computer execution instructions, a virtual machine startup control method based on a data processing unit as described in the first aspect and various possible designs of the first aspect is implemented.

[0018] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, including a computer program, which, when executed by a processor, implements the virtual machine startup control method based on a data processing unit as described in the first aspect and various possible designs of the first aspect.

[0019] The present embodiment provides a virtual machine startup control method and device based on a data processing unit, the method comprising: in response to the data processing unit DPU receiving startup instructions for multiple virtual machines, sending creation instructions for multiple virtual machine monitors to the host to which the DPU belongs, wherein one virtual machine monitor is used to manage a virtual machine; creating multiple virtual machine monitors through the host, and concurrently starting multiple virtual machines through the multiple virtual machine monitors using the resources on the host; in response to the completion of the concurrent startup of multiple virtual machines, unloading the multiple virtual machine monitors from the host to the DPU, and managing the multiple virtual machines after startup using the resources on the DPU through the multiple virtual machine monitors. In this technical solution, multiple virtual machines are started concurrently through the multiple virtual machine monitors created on the host, reducing the load pressure of the DPU and the information interaction between the host and the DPU, thereby ensuring the rapid startup of multiple virtual machines and meeting the user's demand for rapid capacity expansion. In addition, after the startup of multiple virtual machines is completed, the load pressure of the host can be reduced by unloading multiple virtual machine monitors to the DPU. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0021] Figure 1 Schematic diagram of a virtual machine startup control method based on a data processing unit provided by the prior art Figure 1 ;

[0022] Figure 2 A schematic diagram of a virtual machine startup control method based on a data processing unit provided in an embodiment of the present disclosure Figure 1 ;

[0023] Figure 3 The process of the virtual machine startup control method based on the data processing unit provided in the embodiment of the present disclosure is Figure 1 ;

[0024] Figure 4 A schematic diagram of a virtual machine startup control method based on a data processing unit provided in an embodiment of the present disclosure Figure 2 ;

[0025] Figure 5 The process of the virtual machine startup control method based on the data processing unit provided in the embodiment of the present disclosure is Figure 2 ;

[0026] Figure 6A schematic diagram of a method for uninstalling a virtual machine monitor provided in an embodiment of the present disclosure Figure 1 ;

[0027] Figure 7 A schematic diagram of the structure of a virtual machine startup control device based on a data processing unit provided in an embodiment of the present disclosure;

[0028] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0029] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.

[0030] Some terms of the embodiments of the present disclosure are explained below:

[0031] Virtualization technology: It is the basic technology of the cloud computing industry. Among them, host machine and virtual machine are two common virtualization concepts. Under the KVM (Kernel-based Virtual Machine) solution, the host system is often the Linux operating system. On the host, a virtual machine can be simulated through hardware virtualization and other technologies. The virtual machine is equivalent to a process from the perspective of the host. User programs can run on both the host and the virtual machine, and user programs can hardly feel the difference in the underlying operating system. Virtual machines are one of the most widely used product forms of cloud computing, and virtualization technology is also the foundation technology of cloud computing.

[0032] VMM: Virtual Machine Monitor (Virtual Machine Manager) is a software that can be installed on physical hardware. It uses virtualization technology to decompose a single physical machine into many virtual machines, thereby running multiple operating systems on the same physical hardware. The QEMU process is currently the most widely used VMM.

[0033] VM: A virtual machine (English: Virtual Machine) is a computer system emulator. It can provide the functions of a physical computer by simulating a complete computer system with complete hardware system functions and running in a completely isolated environment through software.

[0034] QEMU (English: Quick Emulator) and KVM are currently the most mainstream virtualization solutions.

[0035] DPU (Data Processing Unit) is a data processing unit that is commonly used to accelerate computer vision, natural language processing and other artificial intelligence applications.

[0036] DPU is a special hardware that can perform highly parallel computing tasks and is more efficient than the general user's CPU. Among them, SoC (System on Chip) and FPGA (Field Programmable Gate Array) are the current mainstream DPU design solutions.

[0037] IaaS: Infrastructure as a Service (English: Infrastructure as a Service) refers to a service model that provides infrastructure as a service through the network and charges users based on their actual usage or occupation of resources. By using IaaS, users can deploy and run any software, including operating systems and application software, on the infrastructure provided by the cloud service provider.

[0038] ECS: Elastic Compute Service (ECS) is a secure, stable, and elastically scalable virtual server on the cloud. It includes CPU, memory, hard disk, network and other resources. It is a computer service that is superior to physical servers and has the characteristics of simplicity, efficiency, and security. It is called a computing unit in the industry.

[0039] PaaS: Platform as a Service (English: Platform as a Service), a cloud computing model that provides a platform to develop, run, and manage applications without the need to build and maintain the infrastructure typically associated with developing and launching applications. By using PaaS, developers can focus on building their applications and rely on the platform to handle tasks such as scaling, security, and availability. This can help reduce development time, reduce costs, and improve the overall quality of applications.

[0040] In the current computing environment, in order to improve performance and efficiency, a common practice is to offload virtualized workloads to the data processing unit (DPU). By assigning virtualized workloads to a dedicated DPU, the load pressure on the host machine can be reduced, thereby improving the overall performance of the system.

[0041] Among them, virtualized workloads include the creation, destruction, and management of virtual machines. More specifically, virtualized workloads can include VMM processes as well as QEMU processes. By offloading these tasks to the DPU, the CPU load can be reduced, allowing it to focus more on other important computing tasks. DPUs are generally characterized by high performance, low latency, and low power consumption, making them ideal for handling virtualized workloads.

[0042] In general, offloading virtualized workloads to the DPU can improve the overall performance, efficiency, and security of the system, and is a technology worthy of promotion.

[0043] DPU is a data processing unit, which is often used to accelerate computer vision, natural language processing and other artificial intelligence applications. In terms of physical form, DPU is an independent computing card that can be connected to a traditional server through interfaces such as PCIe. Its size and power consumption are comparable to those of a network card.

[0044] The widespread use of DPU is closely related to the gradual failure of Moore's Law. The widespread need for digitalization has led to a rapid increase in the demand for computing power, but the failure of Moore's Law has made it impossible to simply meet the demand for computing power by vertically expanding the capabilities of a single chip. Therefore, many customized chips have been produced to improve the overall computing power from the perspective of horizontal expansion. DPU is a typical example of server scenarios in data centers and cloud computing scenarios. By adding a special computing card, workloads that originally have weak CPU performance requirements and high parallelism can be offloaded to the DPU, thereby saving server resources. After inserting the DPU, the overall utilization rate, sales rate and power consumption of the server can be improved. Therefore, a large number of customized DPU computing cards have appeared in the industry, and the workloads used for offloading are also diverse. From security, storage, network to virtualization, various server management workloads can be offloaded to the corresponding customized DPU computing cards.

[0045] At present, with the rapid development of cloud computing, more and more enterprises and individual users choose to offload their business to cloud platforms. As one of the infrastructures of cloud computing, virtual machines are facing growing demand for expansion while meeting various business needs. Especially in the business scenario of elastic expansion, users need to quickly start multiple virtual machines concurrently to meet the high availability and flexibility of the business.

[0046] Both traditional virtual machine services (Infrastructure as a Service, IaaS) and cloud-native services (Platform as aService, PaaS) supported by secure containers need to face the business demand of rapid expansion of virtual machines. In the IaaS scenario, users need to quickly increase or decrease virtual machine instances according to changes in business load. For example, during the busy sales season, e-commerce platforms need to quickly expand capacity to cope with a large number of user access requests, while in the off-season, virtual machine instances can be appropriately reduced to save costs. Rapidly starting multiple virtual machines concurrently is the key to achieving elastic expansion, which can provide immediately available computing resources to meet users' high concurrency requirements. Or in a shorter time of the day, when the business is at its peak, a large number of orders pour into the e-commerce platform, or a large number of viewers pour into the short video platform, the e-commerce platform and the short video platform need to quickly expand capacity and create more VM instances to accommodate more computing needs of the business.

[0047] In the PaaS scenario, cloud-native applications are built and deployed based on container technology, which places higher demands on the rapid expansion and elastic scaling of services. The emergence of secure container technology makes the rapid expansion of virtual machines more efficient and flexible. For example, an emerging online education platform needs to quickly expand application services based on the growth of user registrations and course reservations to ensure a smooth user experience and high-quality teaching. With the support of secure containers, multiple virtual machine instances can be quickly started concurrently to provide stable and reliable services.

[0048] In short, in the face of business needs for rapid expansion of virtual machines, both traditional virtual machine businesses and cloud-native businesses supported by secure containers need to be able to quickly and concurrently start multiple virtual machine instances to meet users' business needs for elastic expansion. This will provide users with high availability, flexibility, and stability services, and further promote the development of cloud computing. In actual business scenarios, real business parties often receive requests from front-end customers for rapid concurrent startup, such as how many virtual machines can be started on 20 physical machines within 1 minute.

[0049] The inventors have found that the prior art has at least the following technical problems: Figure 1 As shown in the figure, during the concurrent startup process, the VM will frequently exit (VM Exit, a virtualization concept, that is, it is necessary to exit from the VM to the VMM (QEMU process) to simulate the state or operation). This exit process requires a large number of communication operations through the "communication channel between the DPU and the host". However, the communication channel between the DPU and the host side has low capacity, small bandwidth, and high latency, which will aggravate the latency, especially when there is a large amount of communication.

[0050] In addition, since the DPU itself has a small number of CPUs and weak capabilities, when the number of concurrent processes (the number of QEMU processes) exceeds the number of CPU cores of the DPU itself, there will be a large amount of scheduling contention on the DPU, causing some QEMU processes to not be scheduled for a long time, further increasing the time it takes for the QEMU process to process VM Exit. Therefore, the process of concurrently starting VMs in the prior art takes too long and cannot meet the user's business needs for rapid capacity expansion.

[0051] In view of the technical problems in the prior art, the inventors have the following technical ideas: in the concurrent startup phase, a VMM (i.e., QEMU process) is created on the host side, and when the virtual machine is running smoothly and the performance is relatively smooth, the QEMU process is dynamically unloaded to the DPU side, saving resources on the host side and avoiding the QEMU line (i.e., the user process) from competing with the user process to affect the performance of the virtual machine. Figure 2 As shown in the figure, in the concurrent startup phase, the QEMU process is started on the host side to make full use of the CPU resources on the host side. The host side has a large number of CPUs, and each CPU has a high processing power. Multiple QEMU processes can be quickly created to achieve rapid startup of multiple virtual machines and reduce the pressure on the communication channel between the DPU and the host.

[0052] Accordingly, the specific steps may include: first, in response to the data processing unit DPU receiving the startup instructions of multiple virtual machines, sending the creation instructions of multiple virtual machine monitors to the host to which the DPU belongs, wherein one virtual machine monitor is used to manage one virtual machine. Then, multiple virtual machine monitors are created through the host, and multiple virtual machines are started concurrently by using the resources on the host through the multiple virtual machine monitors. Finally, in response to the completion of the concurrent startup of multiple virtual machines, the multiple virtual machine monitors are unloaded from the host to the DPU, and the multiple virtual machines after startup are managed by using the resources on the DPU through the multiple virtual machine monitors.

[0053] In this technical solution, multiple virtual machine monitors are created on the host to enable concurrent startup of multiple virtual machines, reducing the load pressure of the DPU and the information interaction between the host and the DPU, thereby ensuring the rapid startup of multiple virtual machines and meeting the user's rapid capacity expansion needs. In addition, after the startup of multiple virtual machines is completed, the load pressure of the host can be reduced by offloading multiple virtual machine monitors to the DPU.

[0054] The following is a specific implementation process of the virtual machine startup control method and device based on a data processing unit involved in the embodiment of the present disclosure. Some examples are for illustrative purposes only and are not intended to be limiting. The execution subject of the virtual machine startup control method based on a data processing unit involved in the embodiment of the present disclosure is an electronic device, which can be a terminal, a server, etc.

[0055] Figure 3A flow chart of a virtual machine startup control method based on a data processing unit provided in an embodiment of the present disclosure Figure 1 ,like Figure 3 As shown, the virtual machine startup control method may include:

[0056] S301. In response to a data processing unit DPU receiving startup instructions of multiple virtual machines, a creation instruction of multiple virtual machine monitors is sent to a host to which the DPU belongs, wherein one virtual machine monitor is used to manage one virtual machine.

[0057] In the disclosed embodiment, the virtual machine monitor may include a VMM process. The VMM process may also be a QEMU process. A QEMU process is used to manage a virtual machine.

[0058] It should be noted that when the number of virtual machines to be started concurrently is small, multiple virtual machine monitors can be directly created through the DPU. When the number of virtual machines to be started concurrently is large, creation instructions for multiple virtual machine monitors are sent to the host to which the DPU belongs.

[0059] In some embodiments, this step may include: in response to the data processing unit DPU receiving startup instructions for multiple virtual machines, determining the number of multiple virtual machines; if the number of multiple virtual machines is greater than the number of CPU cores of the DPU itself, sending creation instructions for multiple virtual machine monitors to the host to which the DPU belongs; if the number of multiple virtual machines is less than or equal to the number of CPU cores of the DPU itself, not sending creation instructions for multiple virtual machine monitors to the host to which the DPU belongs, and creating multiple virtual machine monitors through the DPU.

[0060] S302: Create multiple virtual machine monitors through the host, and use the multiple virtual machine monitors to concurrently start multiple virtual machines using resources on the host.

[0061] In the disclosed embodiment, during the process of concurrently starting multiple virtual machines through multiple virtual machine monitors, the resources on the host are idle, that is, this step can use the idle resources on the host to concurrently start multiple virtual machines. In this process, the performance of the host will not be affected.

[0062] S303 . In response to completion of concurrent startup of multiple virtual machines, multiple virtual machine monitors are unloaded from the host to the DPU, and the multiple virtual machines that have been started are managed by the multiple virtual machine monitors using resources on the DPU.

[0063] In some embodiments, when a startup completion notification reported by a virtual machine is received and it is determined that the concurrent startup of multiple virtual machines is completed, multiple virtual machine monitors are unloaded from the host to the DPU.

[0064] In other embodiments, after executing concurrent startup of multiple virtual machines, operating indicators related to the multiple virtual machines are monitored, and the operating indicators include any one of logs, device operating status, and communication demand between the DPU and the host; and after determining that the concurrent startup of multiple virtual machines is completed based on the operating indicators related to the multiple virtual machines, the multiple virtual machine monitors are unloaded from the host to the DPU.

[0065] Optionally, the communication demand between the DPU and the host includes the number of virtual machine exit instructions. The virtual machine exit instruction is used to instruct to return the virtual machine from the client side to the host side, and obtain the configuration information corresponding to the virtual machine from the host side; accordingly, after executing the concurrent startup of multiple virtual machines, the number of virtual machine exit instructions related to the multiple virtual machines is monitored; the number of virtual machine exit instructions related to the multiple virtual machines is used as the operation indicator related to the multiple virtual machines to determine whether the concurrent startup of the multiple virtual machines is completed.

[0066] Accordingly, after determining that the concurrent startup of multiple virtual machines is completed based on the operating indicators related to the multiple virtual machines, the multiple virtual machine monitors are unloaded from the host to the DPU, including: when the changing trend of the number of virtual machine exit instructions is stable, determining that the concurrent startup of multiple virtual machines is completed, and unloading the multiple virtual machine monitors from the host to the DPU.

[0067] In some embodiments, the process of determining whether the changing trend of the number of virtual machine exit instructions is in a stable state includes: periodically obtaining the number of virtual machine exit instructions corresponding to the virtual machine; if the number of virtual machine exit instructions obtained within a first preset time period is less than or equal to the first preset number, then determining that the changing trend of the number of virtual machine exit instructions is in a stable state.

[0068] In the embodiment of the present disclosure, the values ​​of the first preset duration and the first preset number are not specifically limited and can be set and modified as needed. Optionally, due to different virtual machine configurations, when the performance of each virtual machine reaches a stable state, the number of virtual machine exit instructions is also different. Therefore, the first preset number can be adaptively adjusted according to the configuration information of each virtual machine.

[0069] In other embodiments, Figure 4 As shown, the virtual machine monitor is a QEMU process. In response to the completion of concurrent startup of multiple virtual machines and the stable performance of the virtual machines, the multiple QEMU processes are unloaded from the host to the DPU. Optionally, if the number of VM Exits obtained within a first preset time is less than or equal to a first preset number, it is determined that the virtual machine startup is completed and the virtual machine performance is stable.

[0070] The disclosed embodiment provides a virtual machine startup control method based on a data processing unit: in response to the data processing unit DPU receiving startup instructions for multiple virtual machines, sending creation instructions for multiple virtual machine monitors to the host to which the DPU belongs, wherein one virtual machine monitor is used to manage a virtual machine; creating multiple virtual machine monitors through the host, and concurrently starting multiple virtual machines through the multiple virtual machine monitors using resources on the host; in response to the completion of the concurrent startup of multiple virtual machines, unloading the multiple virtual machine monitors from the host to the DPU, and managing the multiple virtual machines after startup using resources on the DPU through the multiple virtual machine monitors. In this technical solution, multiple virtual machines are started concurrently through multiple virtual machine monitors created on the host, which reduces the load pressure of the DPU and the information interaction between the host and the DPU, thereby ensuring the rapid startup of multiple virtual machines and meeting the user's demand for rapid capacity expansion. In addition, after the startup of multiple virtual machines is completed, the load pressure of the host can be reduced by unloading multiple virtual machine monitors to the DPU.

[0071] Figure 5 A flow chart of a virtual machine startup control method based on a data processing unit provided in an embodiment of the present disclosure Figure 2 In the embodiment of the present disclosure, a dynamic uninstallation method of a virtual machine monitor is described in detail. Figure 5 As shown, the method of offloading multiple virtual machine monitors from a host to a DPU may include:

[0072] S501: Create a new virtual machine monitor on the DPU.

[0073] For example, Figure 6 As shown, the virtual machine monitor is a QEMU process, and a new QEMU process is started on the DPU.

[0074] S502: During the normal operation of the virtual machine, the operating status information of the virtual machine is obtained through the virtual machine monitor on the host.

[0075] For example, Figure 6 As shown, the virtual machine monitor on the host is the old QEMU process. During the normal operation of the virtual machine, the operating status information of the virtual machine is first obtained through the old QEMU process. Among them, the operating status information of the virtual machine can be any attribute information related to the virtual machine. For example, the configuration information, operating information, load information, etc. of the virtual machine.

[0076] S503: The running status information of the virtual machine acquired by the virtual machine monitor on the host is transmitted to the newly created virtual machine monitor on the DPU.

[0077] In some embodiments, Figure 6As shown, the virtual machine monitor can be a QEMU process. The virtual machine monitor on the host is the old QEMU process; the newly created virtual machine monitor on the DPU is the new QEMU process. In this case, the old QEMU process passes the running status information of the virtual machine to the new QEMU process. At this time, the old QEMU process still runs normally, and all the Exit instructions of the VM are processed by the old QEMU process, that is, the running status information of the virtual machine is still obtained through the old QEMU process.

[0078] S504. Periodically obtain the amount of running status information to be transmitted, and determine whether the virtual machine operation is stable based on the amount of running status information to be transmitted. The running status information to be transmitted includes the original running status information in the virtual machine monitor on the host before the virtual machine monitor is created on the DPU and the newly generated running status information of the virtual machine after the virtual machine monitor is created on the DPU.

[0079] In the disclosed embodiment, after the virtual machine is started and runs stably, the amount of newly generated running status information of the virtual machine is also relatively stable. Therefore, whether the running of the virtual machine is stable can be judged according to the amount of running status information to be transmitted.

[0080] In some embodiments, whether the operation of the virtual machine is stable is judged based on the amount of operating status information to be transmitted, including: if the amount of operating status information to be transmitted obtained each time within a second preset time period is less than or equal to the second preset amount, then the operation of the virtual machine is determined to be stable; if the amount of operating status information to be transmitted obtained each time within the second preset time period is greater than the second preset amount, then the operation of the virtual machine is determined to be unstable.

[0081] In the embodiment of the present disclosure, the values ​​of the second preset duration and the second preset number are not specifically limited and can be set and modified as needed.

[0082] In other embodiments, Figure 6 As shown, after most of the virtual machine state information is transmitted, the old QEMU process is stopped. Accordingly, judging whether the virtual machine is running stably according to the amount of running state information to be transmitted includes: obtaining the amount of running state information to be transmitted and the amount of running state information that has been transmitted; if the ratio of the amount of running state information to be transmitted to the amount of running state information that has been transmitted is less than a preset ratio, determining that the virtual machine is running stably.

[0083] In the embodiment of the present disclosure, the numerical value of the preset ratio is not specifically limited and can be set and modified as needed.

[0084] S505: If the virtual machine runs stably, suspend the virtual machine and transmit the running status information to be transmitted to the new virtual machine monitor.

[0085] For example, Figure 6 As shown, the virtual machine is stopped, all virtual machine state information is passed to the new QEMU process, and the new QEMU process is enabled.

[0086] S506: The virtual machine monitor on the control host exits, and the virtual machine is started, and the running status information of the virtual machine is obtained through the newly created virtual machine monitor on the DPU.

[0087] For example, Figure 6 As shown, after the new QEMU process is enabled, all Exit instructions of the VM are processed through the new QEMU process, that is, the running status information of the virtual machine is obtained through the new QEMU process.

[0088] It should be noted that when the remaining resources of the host are small, in order to avoid the impact of the QEMU process on the host performance, multiple QEMU processes can be unloaded from the host to the DPU. Accordingly, before creating multiple virtual machine monitors through the host and concurrently starting multiple virtual machines using the resources on the host through the multiple virtual machine monitors, the method also includes: obtaining the remaining resources of the host, wherein the remaining resources include CPU remaining resources and / or memory remaining resources; if the remaining resources of the host are less than the preset resource threshold, then unloading the multiple virtual machine monitors from the host to the DPU, and managing the multiple virtual machines after starting using the CPU resources on the DPU through the multiple virtual machine monitors.

[0089] In the disclosed embodiment, when the remaining resources of the host are small, multiple QEMU processes can be unloaded from the host to the DPU, thereby avoiding the impact of the QEMU process on the host performance and ensuring the stability of the host performance.

[0090] Figure 7 A schematic diagram of the structure of a virtual machine startup control device based on a data processing unit provided in an embodiment of the present disclosure, such as Figure 7 As shown, the virtual machine startup control device includes:

[0091] The sending unit 701 is used for sending, in response to a data processing unit DPU receiving startup instructions of multiple virtual machines, a creation instruction of multiple virtual machine monitors to a host to which the DPU belongs, wherein one virtual machine monitor is used to manage one virtual machine;

[0092] A concurrent starting unit 702 is used to create multiple virtual machine monitors through the host, and concurrently start multiple virtual machines through the multiple virtual machine monitors using resources on the host;

[0093] The unloading unit 703 is used to unload the multiple virtual machine monitors from the host to the DPU in response to the completion of the concurrent startup of the multiple virtual machines, and manage the started multiple virtual machines by using the resources on the DPU through the multiple virtual machine monitors.

[0094] According to one or more embodiments of the present disclosure, the unloading unit 703, in response to the completion of the concurrent startup of the multiple virtual machines, unloads the multiple virtual machine monitors from the host to the DPU, specifically including: receiving a startup completion notification reported by the virtual machine, and when it is determined that the concurrent startup of the multiple virtual machines is completed, unloading the multiple virtual machine monitors from the host to the DPU; or, after executing the concurrent startup of the multiple virtual machines, monitoring the operating indicators related to the multiple virtual machines, the operating indicators including any one of logs, device operating status, and communication demand between the DPU and the host; and, after determining that the concurrent startup of the multiple virtual machines is completed based on the operating indicators related to the multiple virtual machines, unloading the multiple virtual machine monitors from the host to the DPU.

[0095] According to one or more embodiments of the present disclosure, after executing concurrent startup of multiple virtual machines, the number of virtual machine exit instructions related to the multiple virtual machines is monitored; the virtual machine exit instruction is used to instruct to return the virtual machine from the client side to the host side, and obtain the configuration information corresponding to the virtual machine from the host side; accordingly, the unloading unit 703, after determining that the concurrent startup of the multiple virtual machines is completed based on the operating indicators related to the multiple virtual machines, unloads the multiple virtual machine monitors from the host to the DPU, specifically including: when the changing trend of the number of virtual machine exit instructions is stable, determining that the concurrent startup of the multiple virtual machines is completed, and unloading the multiple virtual machine monitors from the host to the DPU.

[0096] According to one or more embodiments of the present disclosure, the process by which the unloading unit 703 determines that the changing trend of the number of virtual machine exit instructions is in a stable state specifically includes: periodically obtaining the number of virtual machine exit instructions corresponding to the virtual machine; if the number of virtual machine exit instructions obtained within a first preset time period is less than or equal to the first preset number, then determining that the changing trend of the number of virtual machine exit instructions is in a stable state.

[0097] According to one or more embodiments of the present disclosure, the unloading unit 703 unloads the multiple virtual machine monitors from the host to the DPU, specifically including: creating a new virtual machine monitor on the DPU; obtaining the running status information of the virtual machine through the virtual machine monitor on the host during the normal operation of the virtual machine; passing the running status information of the virtual machine obtained by the virtual machine monitor on the host to the newly created virtual machine monitor on the DPU; periodically obtaining the number of running status information to be transmitted, and judging whether the operation of the virtual machine is stable according to the number of running status information to be transmitted, the running status information to be transmitted includes the original running status information in the virtual machine monitor on the host before the virtual machine monitor is created on the DPU and the newly generated running status information of the virtual machine after the virtual machine monitor is created on the DPU; if the virtual machine runs stably, pausing the virtual machine and passing the running status information to be transmitted to the new virtual machine monitor; controlling the virtual machine monitor on the host to exit, and starting the virtual machine, and obtaining the running status information of the virtual machine through the newly created virtual machine monitor on the DPU.

[0098] According to one or more embodiments of the present disclosure, the unloading unit 703 determines whether the operation of the virtual machine is stable based on the number of the operating status information to be transmitted, specifically including: if the number of the operating status information to be transmitted obtained each time within a second preset time period is less than or equal to the second preset number, then it is determined that the operation of the virtual machine is stable; if the number of the operating status information to be transmitted obtained each time within the second preset time period is greater than the second preset number, then it is determined that the operation of the virtual machine is unstable.

[0099] According to one or more embodiments of the present disclosure, the unloading unit 703 determines whether the operation of the virtual machine is stable based on the amount of the operating status information to be transmitted, specifically including: obtaining the amount of the operating status information to be transmitted and the amount of the operating status information that has been transmitted; if the ratio of the amount of the operating status information to be transmitted to the amount of the operating status information that has been transmitted is less than a preset ratio, determining that the operation of the virtual machine is stable.

[0100] According to one or more embodiments of the present disclosure, the unloading unit 703 is also used to obtain the remaining resources of the host, wherein the remaining resources include CPU remaining resources and / or memory remaining resources; if the remaining resources of the host are less than a preset resource threshold, the multiple virtual machine monitors are unloaded from the host to the DPU, and the CPU resources on the DPU are used by the multiple virtual machine monitors to manage the multiple virtual machines that are started.

[0101] According to one or more embodiments of the present disclosure, the sending unit 701, in response to the data processing unit DPU receiving startup instructions for multiple virtual machines, sends creation instructions for multiple virtual machine monitors to the host to which the DPU belongs, specifically including: in response to the data processing unit DPU receiving startup instructions for multiple virtual machines, determining the number of the multiple virtual machines; if the number of the multiple virtual machines is greater than the number of CPU cores of the DPU itself, sending creation instructions for multiple virtual machine monitors to the host to which the DPU belongs.

[0102] refer to Figure 8 , which shows a schematic diagram of the structure of an electronic device 800 suitable for implementing the embodiment of the present disclosure, and the electronic device 800 may be a terminal device or a server. The terminal device may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, personal digital assistants (PDAs), tablet computers (Portable Android Devices, PADs), portable multimedia players (PMPs), vehicle terminals (such as vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 8 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0103] like Figure 8 As shown, the electronic device 800 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage device 808 to a random access memory (RAM) 803. Various programs and data required for the operation of the electronic device 800 are also stored in the RAM 803. The processing device 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0104] Typically, the following devices may be connected to the I / O interface 805: input devices 806 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 807 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 808 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 809. The communication device 809 may allow the electronic device 800 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 8 The electronic device 800 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0105] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 809, or installed from a storage device 808, or installed from a ROM 802. When the computer program is executed by the processing device 801, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0106] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0107] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0108] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device executes the method shown in the above embodiment.

[0109] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0110] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0111] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of a unit does not limit the unit itself in some cases. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses".

[0112] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0113] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0114] In a first aspect, according to one or more embodiments of the present disclosure, a method for controlling virtual machine startup based on a data processing unit is provided, comprising:

[0115] In response to a data processing unit DPU receiving startup instructions of multiple virtual machines, sending creation instructions of multiple virtual machine monitors to a host to which the DPU belongs, wherein one virtual machine monitor is used to manage one virtual machine;

[0116] Creating a plurality of virtual machine monitors through the host, and concurrently starting a plurality of virtual machines through the plurality of virtual machine monitors using resources on the host;

[0117] In response to completion of concurrent startup of the multiple virtual machines, the multiple virtual machine monitors are unloaded from the host to the DPU, and the multiple virtual machines that have been started are managed by the multiple virtual machine monitors using resources on the DPU.

[0118] According to one or more embodiments of the present disclosure, in response to the completion of the concurrent startup of the multiple virtual machines, the multiple virtual machine monitors are unloaded from the host to the DPU, including: receiving a startup completion notification reported by the virtual machine, and when it is determined that the concurrent startup of the multiple virtual machines is completed, the multiple virtual machine monitors are unloaded from the host to the DPU; or, after executing the concurrent startup of the multiple virtual machines, monitoring the operating indicators related to the multiple virtual machines, the operating indicators including any one of logs, device operating status, and communication demand between the DPU and the host; and after determining that the concurrent startup of the multiple virtual machines is completed based on the operating indicators related to the multiple virtual machines, the multiple virtual machine monitors are unloaded from the host to the DPU.

[0119] According to one or more embodiments of the present disclosure, after executing concurrent startup of multiple virtual machines, the number of virtual machine exit instructions related to the multiple virtual machines is monitored; the virtual machine exit instruction is used to instruct to return the virtual machine from the client side to the host side, and obtain the configuration information corresponding to the virtual machine from the host side; accordingly, after determining that the concurrent startup of the multiple virtual machines is completed based on the operating indicators related to the multiple virtual machines, the multiple virtual machine monitors are unloaded from the host to the DPU, including: when the changing trend of the number of virtual machine exit instructions is stable, determining that the concurrent startup of the multiple virtual machines is completed, and unloading the multiple virtual machine monitors from the host to the DPU.

[0120] According to one or more embodiments of the present disclosure, the process of determining whether the changing trend of the number of virtual machine exit instructions is in a stable state includes: periodically obtaining the number of virtual machine exit instructions corresponding to the virtual machine; if the number of virtual machine exit instructions obtained within a first preset time period is less than or equal to the first preset number, then determining that the changing trend of the number of virtual machine exit instructions is in a stable state.

[0121] According to one or more embodiments of the present disclosure, the unloading of the multiple virtual machine monitors from the host to the DPU includes: creating a new virtual machine monitor on the DPU; obtaining the running status information of the virtual machine through the virtual machine monitor on the host during the normal operation of the virtual machine; passing the running status information of the virtual machine obtained by the virtual machine monitor on the host to the newly created virtual machine monitor on the DPU; periodically obtaining the number of running status information to be transmitted, and judging whether the operation of the virtual machine is stable according to the number of running status information to be transmitted, the running status information to be transmitted includes the original running status information in the virtual machine monitor on the host before the virtual machine monitor is created on the DPU and the newly generated running status information of the virtual machine after the virtual machine monitor is created on the DPU; if the virtual machine runs stably, pausing the virtual machine and passing the running status information to be transmitted to the new virtual machine monitor; controlling the virtual machine monitor on the host to exit, and starting the virtual machine, and obtaining the running status information of the virtual machine through the newly created virtual machine monitor on the DPU.

[0122] According to one or more embodiments of the present disclosure, judging whether the operation of the virtual machine is stable based on the number of the operating status information to be transmitted includes: if the number of the operating status information to be transmitted obtained each time within a second preset time period is less than or equal to the second preset number, determining that the operation of the virtual machine is stable; if the number of the operating status information to be transmitted obtained each time within the second preset time period is greater than the second preset number, determining that the operation of the virtual machine is unstable.

[0123] According to one or more embodiments of the present disclosure, judging whether the operation of the virtual machine is stable based on the amount of the operation status information to be transmitted includes: obtaining the amount of the operation status information to be transmitted and the amount of the operation status information that has been transmitted; if the ratio of the amount of the operation status information to be transmitted to the amount of the operation status information that has been transmitted is less than a preset ratio, determining that the operation of the virtual machine is stable.

[0124] According to one or more embodiments of the present disclosure, before creating multiple virtual machine monitors through the host and concurrently starting multiple virtual machines through the multiple virtual machine monitors using resources on the host, the method also includes: obtaining remaining resources of the host, wherein the remaining resources include remaining CPU resources and / or remaining memory resources; if the remaining resources of the host are less than a preset resource threshold, unloading the multiple virtual machine monitors from the host to the DPU, and managing the started multiple virtual machines through the multiple virtual machine monitors using the CPU resources on the DPU.

[0125] According to one or more embodiments of the present disclosure, in response to the data processing unit DPU receiving startup instructions for multiple virtual machines, sending creation instructions for multiple virtual machine monitors to the host to which the DPU belongs, includes: in response to the data processing unit DPU receiving startup instructions for multiple virtual machines, determining the number of the multiple virtual machines; if the number of the multiple virtual machines is greater than the number of CPU cores of the DPU itself, sending creation instructions for multiple virtual machine monitors to the host to which the DPU belongs.

[0126] In a second aspect, according to one or more embodiments of the present disclosure, a virtual machine startup control device based on a data processing unit is provided, comprising:

[0127] a sending unit, configured to send, in response to a data processing unit DPU receiving startup instructions for multiple virtual machines, a creation instruction for multiple virtual machine monitors to a host to which the DPU belongs, wherein one virtual machine monitor is used to manage one virtual machine;

[0128] A concurrent startup unit, configured to create a plurality of virtual machine monitors through the host, and concurrently start a plurality of virtual machines through the plurality of virtual machine monitors using resources on the host;

[0129] The unloading unit is used for unloading the multiple virtual machine monitors from the host to the DPU in response to the completion of the concurrent startup of the multiple virtual machines, and managing the started multiple virtual machines by using the resources on the DPU through the multiple virtual machine monitors.

[0130] According to one or more embodiments of the present disclosure, the unloading unit, in response to the completion of the concurrent startup of the multiple virtual machines, unloads the multiple virtual machine monitors from the host to the DPU, specifically including: receiving a startup completion notification reported by the virtual machine, and when it is determined that the concurrent startup of the multiple virtual machines is completed, unloading the multiple virtual machine monitors from the host to the DPU; or, after executing the concurrent startup of the multiple virtual machines, monitoring the operating indicators related to the multiple virtual machines, the operating indicators including any one of logs, device operating status, and communication demand between the DPU and the host; and after determining that the concurrent startup of the multiple virtual machines is completed based on the operating indicators related to the multiple virtual machines, unloading the multiple virtual machine monitors from the host to the DPU.

[0131] According to one or more embodiments of the present disclosure, after executing concurrent startup of multiple virtual machines, the number of virtual machine exit instructions related to the multiple virtual machines is monitored; the virtual machine exit instruction is used to instruct to return the virtual machine from the client side to the host side, and obtain the configuration information corresponding to the virtual machine from the host side; accordingly, the unloading unit, after determining that the concurrent startup of the multiple virtual machines is completed based on the operating indicators related to the multiple virtual machines, unloads the multiple virtual machine monitors from the host to the DPU, specifically including: when the changing trend of the number of virtual machine exit instructions is stable, determining that the concurrent startup of the multiple virtual machines is completed, and unloading the multiple virtual machine monitors from the host to the DPU.

[0132] According to one or more embodiments of the present disclosure, the process by which the unloading unit determines that the changing trend of the number of virtual machine exit instructions is in a stable state specifically includes: periodically obtaining the number of virtual machine exit instructions corresponding to the virtual machine; if the number of virtual machine exit instructions obtained within a first preset time period is less than or equal to the first preset number, then determining that the changing trend of the number of virtual machine exit instructions is in a stable state.

[0133] According to one or more embodiments of the present disclosure, the unloading unit unloads the multiple virtual machine monitors from the host to the DPU, specifically including: creating a new virtual machine monitor on the DPU; obtaining the running status information of the virtual machine through the virtual machine monitor on the host during the normal operation of the virtual machine; passing the running status information of the virtual machine obtained by the virtual machine monitor on the host to the newly created virtual machine monitor on the DPU; periodically obtaining the number of running status information to be transmitted, and judging whether the operation of the virtual machine is stable according to the number of running status information to be transmitted, the running status information to be transmitted includes the original running status information in the virtual machine monitor on the host before the virtual machine monitor is created on the DPU and the newly generated running status information of the virtual machine after the virtual machine monitor is created on the DPU; if the virtual machine runs stably, pausing the virtual machine and passing the running status information to be transmitted to the new virtual machine monitor; controlling the virtual machine monitor on the host to exit, and starting the virtual machine, and obtaining the running status information of the virtual machine through the newly created virtual machine monitor on the DPU.

[0134] According to one or more embodiments of the present disclosure, the unloading unit determines whether the operation of the virtual machine is stable based on the number of the operating status information to be transmitted, specifically including: if the number of the operating status information to be transmitted obtained each time within a second preset time period is less than or equal to the second preset number, then it is determined that the operation of the virtual machine is stable; if the number of the operating status information to be transmitted obtained each time within the second preset time period is greater than the second preset number, then it is determined that the operation of the virtual machine is unstable.

[0135] According to one or more embodiments of the present disclosure, the unloading unit determines whether the operation of the virtual machine is stable based on the amount of the operating status information to be transmitted, specifically including: obtaining the amount of the operating status information to be transmitted and the amount of the operating status information that has been transmitted; if the ratio of the amount of the operating status information to be transmitted to the amount of the operating status information that has been transmitted is less than a preset ratio, determining that the operation of the virtual machine is stable.

[0136] According to one or more embodiments of the present disclosure, the unloading unit is also used to obtain the remaining resources of the host, wherein the remaining resources include CPU remaining resources and / or memory remaining resources; if the remaining resources of the host are less than a preset resource threshold, the multiple virtual machine monitors are unloaded from the host to the DPU, and the CPU resources on the DPU are used by the multiple virtual machine monitors to manage the multiple virtual machines that are started.

[0137] According to one or more embodiments of the present disclosure, the sending unit, in response to the data processing unit DPU receiving startup instructions for multiple virtual machines, sends creation instructions for multiple virtual machine monitors to the host to which the DPU belongs, specifically including: in response to the data processing unit DPU receiving startup instructions for multiple virtual machines, determining the number of the multiple virtual machines; if the number of the multiple virtual machines is greater than the number of CPU cores of the DPU itself, sending creation instructions for multiple virtual machine monitors to the host to which the DPU belongs.

[0138] In a third aspect, according to one or more embodiments of the present disclosure, there is provided an electronic device, comprising: at least one processor and a memory;

[0139] The memory stores computer-executable instructions;

[0140] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the virtual machine startup control method based on the data processing unit as described in the first aspect and various possible designs of the first aspect above.

[0141] In a fourth aspect, according to one or more embodiments of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer execution instructions. When a processor executes the computer execution instructions, the virtual machine startup control method based on the data processing unit as described in the first aspect and various possible designs of the first aspect is implemented.

[0142] In a fifth aspect, according to one or more embodiments of the present disclosure, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, the virtual machine startup control method based on a data processing unit as described in the first aspect and various possible designs of the first aspect is implemented.

[0143] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0144] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0145] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.

Claims

1. A virtual machine startup control method based on a data processing unit, characterized in that: include: In response to a data processing unit DPU receiving startup instructions of multiple virtual machines, sending creation instructions of multiple virtual machine monitors to a host to which the DPU belongs, wherein one virtual machine monitor is used to manage one virtual machine; Creating a plurality of virtual machine monitors through the host, and concurrently starting a plurality of virtual machines through the plurality of virtual machine monitors using resources on the host; In response to completion of concurrent startup of the multiple virtual machines, the multiple virtual machine monitors are unloaded from the host to the DPU, and the multiple virtual machines that have been started are managed by the multiple virtual machine monitors using resources on the DPU; Among them, the unloading of the multiple virtual machine monitors from the host to the DPU includes: creating a new virtual machine monitor on the DPU; obtaining the running status information of the virtual machine through the virtual machine monitor on the host during the normal operation of the virtual machine; passing the running status information of the virtual machine obtained by the virtual machine monitor on the host to the newly created virtual machine monitor on the DPU; periodically obtaining the number of running status information to be transmitted, and judging whether the operation of the virtual machine is stable according to the number of running status information to be transmitted; if the virtual machine is running stably, pausing the virtual machine and passing the running status information to be transmitted to the new virtual machine monitor; controlling the virtual machine monitor on the host to exit, and starting the virtual machine, and obtaining the running status information of the virtual machine through the newly created virtual machine monitor on the DPU.

2. The method according to claim 1, characterized in that In response to the completion of concurrent startup of the multiple virtual machines, unloading the multiple virtual machine monitors from the host to the DPU includes: receiving a startup completion notification reported by a virtual machine, and when determining that the concurrent startup of the multiple virtual machines is completed, unloading the multiple virtual machine monitors from the host to the DPU; or, After executing concurrent startup of multiple virtual machines, operating indicators related to the multiple virtual machines are monitored, wherein the operating indicators include any one of logs, device operating status, and communication demand between the DPU and the host; and after determining that the concurrent startup of the multiple virtual machines is completed based on the operating indicators related to the multiple virtual machines, the multiple virtual machine monitors are unloaded from the host to the DPU.

3. The method according to claim 2, characterized in that After executing the concurrent startup of multiple virtual machines, the number of virtual machine exit instructions related to the multiple virtual machines is monitored; the virtual machine exit instruction is used to instruct to return the virtual machine from the client side to the host side, and obtain the configuration information corresponding to the virtual machine from the host side; Accordingly, after determining that the concurrent startup of the multiple virtual machines is completed based on the operation indicators related to the multiple virtual machines, the multiple virtual machine monitors are unloaded from the host to the DPU, including: When the change trend of the number of virtual machine exit instructions is in a stable state, it is determined that the concurrent startup of the multiple virtual machines is completed, and the multiple virtual machine monitors are unloaded from the host to the DPU.

4. The method according to claim 3, characterized in that: The process of determining that the change trend of the number of virtual machine exit instructions is in a stable state includes: Periodically obtaining the number of virtual machine exit instructions corresponding to the virtual machine; If the number of the virtual machine exit instructions acquired within the first preset time period is less than or equal to the first preset number, it is determined that the change trend of the number of the virtual machine exit instructions is in a stable state.

5. The method according to claim 1, characterized in that The determining, according to the amount of the running status information to be transmitted, whether the running of the virtual machine is stable includes: If the amount of operation status information to be transmitted obtained each time within the second preset time period is less than or equal to the second preset amount, it is determined that the virtual machine is running stably; If the number of the running status information to be transmitted obtained each time within the second preset time period is greater than the second preset number, it is determined that the running of the virtual machine is unstable.

6. The method according to claim 1, characterized in that The determining, according to the amount of the running status information to be transmitted, whether the running of the virtual machine is stable includes: Obtaining the amount of running status information to be transmitted and the amount of running status information that has been transmitted; If the ratio of the amount of running status information to be transmitted to the amount of running status information that has been transmitted is less than a preset ratio, it is determined that the virtual machine is running stably.

7. The method according to claim 1, characterized in that Before creating multiple virtual machine monitors through the host and concurrently starting multiple virtual machines using resources on the host through the multiple virtual machine monitors, the method further includes: Acquire remaining resources of the host, wherein the remaining resources include remaining CPU resources and / or remaining memory resources; If the remaining resources of the host are less than a preset resource threshold, the multiple virtual machine monitors are unloaded from the host to the DPU, and the multiple virtual machines that are started are managed by the multiple virtual machine monitors using the CPU resources on the DPU.

8. The method according to claim 1, characterized in that In response to a data processing unit DPU receiving startup instructions of multiple virtual machines, sending creation instructions of multiple virtual machine monitors to a host to which the DPU belongs, including: In response to a data processing unit DPU receiving a startup instruction of a plurality of virtual machines, determining the number of the plurality of virtual machines; If the number of the multiple virtual machines is greater than the number of CPU cores of the DPU itself, a creation instruction for multiple virtual machine monitors is sent to the host to which the DPU belongs.

9. A virtual machine startup control device based on a data processing unit, characterized in that: include: a sending unit, configured to send, in response to a data processing unit DPU receiving startup instructions for multiple virtual machines, a creation instruction for multiple virtual machine monitors to a host to which the DPU belongs, wherein one virtual machine monitor is used to manage one virtual machine; A concurrent startup unit, configured to create a plurality of virtual machine monitors through the host, and concurrently start a plurality of virtual machines through the plurality of virtual machine monitors using resources on the host; an unloading unit, configured to, in response to completion of concurrent startup of the multiple virtual machines, unload the multiple virtual machine monitors from the host to the DPU, and manage the started multiple virtual machines by using the resources on the DPU through the multiple virtual machine monitors; Among them, the unloading unit unloads the multiple virtual machine monitors from the host to the DPU, including: creating a new virtual machine monitor on the DPU; obtaining the running status information of the virtual machine through the virtual machine monitor on the host during the normal operation of the virtual machine; passing the running status information of the virtual machine obtained by the virtual machine monitor on the host to the newly created virtual machine monitor on the DPU; periodically obtaining the number of running status information to be transmitted, and judging whether the operation of the virtual machine is stable according to the number of running status information to be transmitted; if the virtual machine runs stably, pausing the virtual machine and passing the running status information to be transmitted to the new virtual machine monitor; controlling the virtual machine monitor on the host to exit, and starting the virtual machine, and obtaining the running status information of the virtual machine through the newly created virtual machine monitor on the DPU.

10. An electronic device, characterized in that: include: Processor and memory; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor executes the virtual machine startup control method based on a data processing unit according to any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions. When the processor executes the computer-executable instructions, the virtual machine startup control method based on the data processing unit as described in any one of claims 1 to 8 is implemented.

12. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the virtual machine startup control method based on a data processing unit as described in any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Virtual machine system and start-up method thereof

    CN101493781A

  • Resource processing method, operating system and equipment

    CN104714846A