Method and device for managing super aggregation host based on LIBVIRT

Through libvirt to manage super aggregation hosts, the limitations of distributed virtualization technology in resource utilization are solved, unified management and efficient resource scheduling of multiple virtualization hosts are realized, and high-performance computing needs are met.

CN119759488APending Publication Date: 2025-04-04CHINA TELECOM CLOUD TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411782520.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-05
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

The existing distributed virtualization technology has limitations in resource utilization and is difficult to meet the needs of high-performance computing, especially CPU and memory-intensive services, and the demand for resources exceeds the carrying capacity of a single physical node.

Method used

Manage super aggregation hosts through libvirt, receive resource requests from virtual machines, determine the host corresponding to the virtual machine based on the pre-set virtual processor configuration and hardware resource identification, and realize unified management and scheduling of distributed CPU resources through libvirt.

Benefits of technology

It realizes unified and centralized management of multiple virtualized hosts, improves the utilization rate and scheduling efficiency of computing resources, simplifies management processes, reduces system coupling, and supports diversified virtualization management needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119759488A_ABST
    Figure CN119759488A_ABST
Patent Text Reader

Abstract

The invention provides a method and device for managing a super aggregation host based on LIBVIRT, and the method comprises the steps: receiving a resource request of a virtual machine, the resource request being a hardware resource identifier; configuring a virtual operating system command of a bottom layer corresponding to the hardware resource identifier according to a preset virtual processor; determining a host corresponding to the virtual machine according to the virtual operating system command of the bottom layer; according to the host, resource allocation is carried out on the multiple virtual machines corresponding to the host, unified management and scheduling of distributed CPU resources are achieved through libvirt, and the utilization rate and scheduling efficiency of computing resources are improved. According to the management mode, an original single-node management mode is changed into a one-to-many mode, so that a plurality of virtualization hosts can share one CPU resource pool, and efficient aggregation and allocation of resources are realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of cloud computing virtualization, and in particular to a method and device for managing a super-aggregated host based on LIBVIRT. Background Art

[0002] In the current cloud computing and virtualization fields, traditional technologies mainly focus on resource management and virtualization on a single physical server. By abstracting the physical resources of computing nodes into virtual resources, cloud hosts can run on these virtual resources to provide an efficient and isolated computing environment. However, this technology has limitations in resource utilization and is difficult to meet the needs of high-performance computing such as modern big data mining, AI model training, and chip simulation. In particular, the resource requirements of CPU (CENTRAL PROCESSING UNIT) central processing unit-intensive and memory-intensive businesses exceed the carrying capacity of a single physical node. Therefore, distributed virtualization technology has become an important trend to solve these problems.

[0003] Existing distributed virtualization technology requires data transmission between nodes to achieve data synchronization and resource utilization, but this approach will result in higher data transmission latency and face cache consistency and memory consistency issues. Summary of the invention

[0004] The present application shows a method and device for managing a super-aggregated host based on libvirt.

[0005] In a first aspect, the present application shows a method for managing a super-aggregated host based on libvirt, the method comprising:

[0006] receiving a resource request of a virtual machine, wherein the resource request is a hardware resource identifier;

[0007] The underlying virtual operating system command corresponding to the hardware resource identifier according to the preset virtual processor configuration;

[0008] Determining a host corresponding to the virtual machine according to the underlying virtual operating system command;

[0009] According to the host, resources are allocated to multiple virtual machines corresponding to the host, and the unified management and scheduling of distributed CPU (CENTRAL PROCESSING UNIT) central processing unit resources are achieved through libvirt.

[0010] Optionally, the method further comprises:

[0011] The host's memory is allocated according to the pre-set memory block name, wherein multiple virtual machines use the same CXL memory.

[0012] Optionally, the method further comprises:

[0013] Manage the lifecycle of aggregated hosts through libvirt;

[0014] Specifically include:

[0015] Modify the virtual machine XML file through libvirt, wherein the XML file at least includes the IP address information of multiple hosts and the central processing unit (CENTRAL PROCESSING UNIT) actually used by each host;

[0016] Initialize the connection to the host's libvirt, and connect to each slave through the libvirt API (APPLICATIONPROGRAMMINGINTERFACE) protocol interface;

[0017] Based on the host, parsing and processing the virtual machine XML file to obtain a processed virtual machine XML file;

[0018] The virtual machine is started according to the processed virtual machine XML file and the processed disk information.

[0019] Optionally, the virtual machine XML file is modified by libvirt, wherein the XML file includes at least IP address information of multiple hosts and the central processing unit (CENTRAL PROCESSING UNIT) actually used by each host, including:

[0020] Based on the virtual machine XML file, an identification tag of the host is added, and the identification is used to describe the configuration information of the host; the configuration information at least includes the IP address of each node, the number of virtual machines corresponding to each IP address, whether the current IP address is the master node, the CXL memory block name and memory size.

[0021] Optionally, the initializing connection to the libvirt of the host and connecting to each slave through the API (APPLICATION PROGRAMMING INTERFACE) protocol interface of libvirt includes:

[0022] Use the virConnectOpen function to connect the master node and each slave node;

[0023] When all connections are successfully established, the master node will hold the connection handles of all slave nodes, which are used for virtual machine management operations.

[0024] Optionally, the parsing and processing the virtual machine XML file based on the host to obtain a processed virtual machine XML file includes:

[0025] Determine whether the current computing node is a host node;

[0026] If it is the master node, the slave node is remotely called through the virtual machine monitor; the virDomainDefineXML function is called to define the virtual machine on each node so that the definition process of all slave nodes is consistent;

[0027] If it is not the master node, the virtual machine XML file parsed by the virtual machine monitor function is saved.

[0028] Optionally, the processing, according to the host, the disk information of the virtual machine to obtain the processed disk information includes:

[0029] If the host identification tag exists and the current node is a host node, retain and parse the disk information, and save the disk information on the host;

[0030] If the current node is not a host node, the parsing and processing of disk information is skipped, and only the computing resources of the node are processed.

[0031] In a second aspect, the present application shows a device for managing a super-aggregated host based on libvirt, the device comprising:

[0032] A receiving module, used to receive a resource request of a virtual machine, wherein the resource request is a hardware resource identifier;

[0033] A calling module, used for configuring the underlying virtual operating system command corresponding to the hardware resource identifier according to the preset virtual processor;

[0034] A determination module, used to determine a host corresponding to the virtual machine according to the underlying virtual operating system command;

[0035] The allocation module is used to allocate resources to multiple virtual machines corresponding to the host according to the host, and realize the unified management and scheduling of distributed CPU (CENTRAL PROCESSING UNIT) central processing unit resources through libvirt.

[0036] Optionally, the allocation module is used to:

[0037] The host's memory is allocated according to the pre-set memory block name, wherein multiple virtual machines use the same CXL memory.

[0038] Optionally, the allocation module is used to:

[0039] Manage the lifecycle of aggregated hosts through libvirt;

[0040] Specifically include:

[0041] Modify the virtual machine XML file through libvirt, wherein the XML file at least includes the IP address information of multiple hosts and the central processing unit (CENTRAL PROCESSING UNIT) actually used by each host;

[0042] Initialize the connection to the host's libvirt, and connect to each slave through the libvirt API (APPLICATIONPROGRAMMINGINTERFACE) protocol interface;

[0043] Based on the host, parsing and processing the virtual machine XML file to obtain a processed virtual machine XML file;

[0044] The virtual machine is started according to the processed virtual machine XML file and the processed disk information.

[0045] Optionally, the allocation module is used to:

[0046] Based on the virtual machine XML file, an identification tag of the host is added, and the identification is used to describe the configuration information of the host; the configuration information at least includes the IP address of each node, the number of virtual machines corresponding to each IP address, whether the current IP address is the master node, the CXL memory block name and memory size.

[0047] Optionally, the allocation module is used to:

[0048] Use the virConnectOpen function to connect the master node and each slave node;

[0049] When all connections are successfully established, the master node will hold the connection handles of all slave nodes, which are used for virtual machine management operations.

[0050] Optionally, the allocation module is used to:

[0051] Determine whether the current computing node is a host node;

[0052] If it is the master node, the slave node is remotely called through the virtual machine monitor; the virDomainDefineXML function is called to define the virtual machine on each node so that the definition process of all slave nodes is consistent;

[0053] If it is not the master node, the virtual machine XML file parsed by the virtual machine monitor function is saved.

[0054] Optionally, the allocation module is used to:

[0055] If the host identification tag exists and the current node is a host node, retain and parse the disk information, and save the disk information on the host;

[0056] If the current node is not a host node, the parsing and processing of disk information is skipped, and only the computing resources of the node are processed.

[0057] In a third aspect, the present application shows an electronic device, which includes: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute the method described in any of the above aspects.

[0058] In a fourth aspect, the present application illustrates a non-temporary computer-readable storage medium, which, when instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to execute a method as described in any of the above aspects.

[0059] In a fifth aspect, the present application illustrates a computer program product. When instructions in the computer program product are executed by a processor of an electronic device, the electronic device is enabled to execute the method described in any of the above aspects.

[0060] The technical solution provided by this application may have the following beneficial effects:

[0061] Unified management: No need to manually operate multiple virtualization hosts. The integrated system provided by libvirt fully manages the virtualization environment.

[0062] Simplified operation: The operation process is simplified. Users do not need to understand the underlying command line parameters. Advanced management functions are implemented through the libvirt interface, reducing operation complexity.

[0063] Increase flexibility: Maintain the existing single host operation mode, support diverse virtualization management requirements, and enhance system adaptability and scalability.

[0064] Reduce system coupling: The client is decoupled from the libvirt instance and only needs to interact with the master node, reducing dependencies between components. When the system is expanded, only the master node needs to be adjusted, and the client does not need to be modified, reducing the complexity of expansion and upgrade.

[0065] Simplify the learning curve: Improvements are made to the original libvirt interface so that users can use the required advanced functions without having to learn the new API (APPLICATION PROGRAMMING INTERFACE) protocol. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] Figure 1 This is a flowchart of the steps of a method for managing a super-aggregated host based on libvirt in the present application;

[0067] Figure 2 It is a schematic diagram of the overall structure of a super aggregation host of the present application;

[0068] Figure 3 It is a method of libvirt managing super aggregated hosts in this application;

[0069] Figure 4 This is a schematic diagram of the result of comparing the method of managing super-aggregated hosts in the present application with the method of managing super-aggregated hosts in libvirt;

[0070] Figure 5 It is a processing detail of libvirt managing super-aggregated hosts in this application, and a logical schematic diagram for processing newly added tags and disk information;

[0071] Figure 6 It is a flowchart of a life cycle of a libvirt management super-aggregated host in the present application;

[0072] Figure 7 This is a structural block diagram of a libvirt-based super-aggregated host management device of the present application;

[0073] Figure 8 is a block diagram of an electronic device of the present application;

[0074] Fig. 9 It is a block diagram of a computer-readable storage medium of the present application. DETAILED DESCRIPTION

[0075] 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.

[0076] The embodiment of the present application proposes a method for aggregating the physical resources of multiple computing nodes, constructing a memory pool shared by multiple nodes as the hardware base of a super-aggregated host, thereby breaking the resource isolation between computing nodes. Figure 1The overall structure and usage of the super-aggregated host are demonstrated.

[0077] On this basis, the present application embodiment describes the management method for distributed virtualization libvirt side. By integrating libvirt to build a management layer tool, the solution not only retains the advantages of resource aggregation, but also realizes centralized and unified management of aggregated hosts. Such integration is intended to simplify the management process and expand management, thereby greatly improving the management efficiency and ease of use of the virtualization environment.

[0078] Reference Figure 1 , shows a flow chart of the steps of a method for managing a super-aggregated host based on libvirt in the present application, which can be applied to electronic devices, wherein the method specifically may include the following steps:

[0079] S101, receiving a resource request of a virtual machine, wherein the resource request is a hardware resource identifier;

[0080] The current super-aggregation host has realized the separation of CPU (CENTRAL PROCESSING UNIT) central processing unit pool, memory pool, and storage pool resources in terms of hardware. In the distributed virtualization technology, the aggregation development of KVM (KEYBOARDVIDEOMOUSE) port and QEMU simulation processor software has also been completed. Among multiple aggregation hosts, one is designated as the master node and the others are slave nodes. The master node manages all aggregation machines, and the client scheduling platform can only operate the master node machine.

[0081] Among them, the master is the main node; the slave node plays an important role in the distributed computing system. They are computing nodes managed by the master node, responsible for receiving and executing tasks assigned by the master, and then returning the results to the master. The functions of the slave node include load balancing, parallel computing, high reliability and elastic scaling.

[0082] QEMU is a processor simulation software written by Fabrice Bellard and distributed under the GPL license. It is widely used on the GNU / Linux platform.

[0083] Libvirt is an open source API (Application Programming Interface) protocol, background program and management tool for managing virtualization platforms. It supports multiple virtualization technologies and provides a unified interface to manage these virtualization platforms.

[0084] The main features of Libvirt include:

[0085] Managing virtualization platforms: Libvirt supports multiple virtualization platforms and manages them through a unified API (APPLICATIONPROGRAMMING INTERFACE) protocol.

[0086] Manage virtual machine lifecycle: including operations such as start, stop, pause, save, resume, and live migration.

[0087] Manage virtual networks and storage: Provides management functions for virtual networks and storage, supports multiple storage formats and remote management.

[0088] The API (APPLICATION PROGRAMMING INTERFACE) protocol (Application Programming Interface) is a set of predefined functions or protocols designed to provide applications and developers with the ability to access a set of routines without having to access the source code or understand the details of the internal working mechanism. The main purpose of the API (APPLICATION PROGRAMMING INTERFACE) protocol is to facilitate communication and data exchange between different software systems.

[0089] S102, configuring the underlying virtual operating system command corresponding to the hardware resource identifier according to the preset virtual processor;

[0090] libvirt has two parameters in XML to manage the CPU (CENTRAL PROCESSING UNIT) central processor, namely CPU (CENTRAL PROCESSING UNIT) central processor and VCPU (CPU virtualization technology). The CPU (CENTRAL PROCESSING UNIT) central processor is mainly to avoid multiple virtual machines on a host competing for resources; but when actually starting the virtual machine, libvirt will call the underlying QEMU simulation processor software command according to the configuration information of VCPU (CPU virtualization technology) to implement it. The local-cpu parameter was added when the aggregate host was developed on the qemu side, so vcpu and local-cpu need to be bound when developing on the libvirt side.

[0091] XML is Extensible Markup Language (XML), which is a subset of standard general markup language. It can be used to mark data and define data types. It is a source language that allows users to define their own markup language.

[0092] S103, determining a host corresponding to the virtual machine according to the underlying virtual operating system command;

[0093] S104. Allocate resources to multiple virtual machines corresponding to the host according to the host, and implement unified management and scheduling of distributed CPU (CENTRAL PROCESSING UNIT) central processing unit resources through libvirt.

[0094] On the QEMU emulated processor software side of the aggregate host, VCPU (CPU virtualization technology) resources are allocated by local-CPU. Therefore, on the libvirt side, VCPU (CPU virtualization technology) needs to be bound to local-CPU to ensure effective and reasonable use of resources.

[0095] In this application, one host is selected as the master and the rest as slaves, and libvirt is used to remotely manage a single host (i.e. the selected host), so that data synchronization and resource utilization are performed with the host through libvirt. This is different from what is mentioned in the background technology: "Existing distributed virtualization technology requires data transmission between nodes to achieve data synchronization and resource utilization, but this method will result in higher data transmission delays."

[0096] The embodiment of the present application provides a method for managing super-aggregated hosts based on libvirt, so that unified and centralized management of multiple virtualized hosts across computing nodes can be achieved on the basis of maintaining the single host operation mode on the existing computing node. This method aims to solve the problem of the lack of a unified management method after resource aggregation in the current distributed virtualization technology, while overcoming the limitations of libvirt in multi-host resource management across computing nodes, providing more flexible and efficient computing resources in the cloud environment, further simplifying the management process and improving system flexibility. It meets the needs of modern big data processing, high-performance computing, AI model training and other application scenarios, and promotes the further development of cloud computing and virtualization technology.

[0097] The aggregate computing technology proposed in the embodiment of the present application, wherein the overall architecture of the super aggregate host includes four main parts, such as Figure 2 As shown: (1) Hardware level: CPU (CENTRAL PROCESSING UNIT) central processing unit pool, memory pool, storage pool; (2) Kernel and operating system level: implement CXL memory adaptation; (3) Distributed virtualization level: composed of KVM (KEYBOARDVIDEO MOUSE) port, QEMU simulation processor software and libvirt. (4) Unified platform scheduling; This invention focuses on the implementation of distributed virtualization technology libvirt side, and the specific goals are as follows:

[0098] Among them, CXL (Compute Express Link) is a new type of high-speed interconnect technology designed to provide higher data throughput and lower latency to meet the needs of modern computing and storage systems. Libvirt is an open source API (APPLICATION PROGRAMMING INTERFACE) protocol, background program and management tool for managing virtualization platforms. It can be used to manage KVM (KEYBOARD VIDEO MOUSE) ports, Xen, VMware ESX, QEMU simulated processor software and other virtualization technologies.

[0099] CPU (CENTRAL PROCESSING UNIT) central processing unit resource pool management: libvirt is used to achieve unified management and scheduling of distributed CPU (CENTRAL PROCESSING UNIT) central processing unit resources, improving the utilization and scheduling efficiency of computing resources. This management method changes the original single-node management mode to a one-to-many mode, allowing multiple virtualized hosts to share a CPU (CENTRAL PROCESSING UNIT) central processing unit resource pool, thereby achieving efficient aggregation and allocation of resources.

[0100] Based on self-developed distributed virtualization technology: The current super-aggregated host has realized the separation of CPU (CENTRAL PROCESSING UNIT) central processing unit pool, memory pool, and storage pool resources in hardware, and has also completed the aggregation development of KVM (KEYBOARDVIDEO MOUSE) port and QEMU simulation processor software in distributed virtualization technology.

[0101] Leverage libvirt's remote management capabilities: Although libvirt is currently mainly used to manage a single host, it provides powerful remote management capabilities, connecting to the virtual machine monitor of the remote machine. Based on this feature of libvirt, a solution can be designed to achieve unified management of multiple cloud hosts through libvirt.

[0102] The present application provides a method and device for managing super-aggregated hosts based on LIBVIRT, including: receiving a resource request from a virtual machine, the resource request being a hardware resource identifier; configuring the underlying virtual operating system command corresponding to the hardware resource identifier according to a pre-set virtual processor; determining the host corresponding to the virtual machine according to the underlying virtual operating system command; allocating resources to multiple virtual machines corresponding to the host according to the host, and realizing unified management and scheduling of distributed CPU (CENTRAL PROCESSING UNIT) central processing unit resources through libvirt, thereby improving the utilization rate and scheduling efficiency of computing resources. This management method changes the original single-node management mode to a one-to-many mode, so that multiple virtualized hosts can share a CPU (CENTRAL PROCESSING UNIT) central processing unit resource pool, thereby realizing efficient aggregation and allocation of resources.

[0103] Another embodiment of the present application further supplements the method for managing a super-aggregated host based on libvirt provided in the above embodiment.

[0104] In some embodiments of the present application, the method may further include: allocating memory of the host according to a preset memory block name, wherein multiple virtual machines use the same CXL memory.

[0105] Specifically, CXL shared memory is used at the bottom layer of aggregate computing, so device adaptation is required in libvirt, and the memory size of the super-aggregated host can be specified as needed. In order to be compatible with the operation mode of libvirt managing a single host, the memory needs to come from multiple memory backends, so it is necessary to set the flag and use the memory-backend parameter on the QEMU simulated processor software side and the original memory in XML to jointly manage memory resources.

[0106] Among them, memory-backend is mainly used to support the hot-plug function of memory in QEMU, which can refer to different back-end technologies for memory management, including basic RAM hot-plug and using files as memory back-end; memory means storage.

[0107] The specific steps are:

[0108] The current test development environment is the CXL device simulated by the QEMU simulated processor software.

[0109] Create the required region and namespace in the simulated CXL device, which manages the memory size and memory block name.

[0110] In the XML, specify the name of the memory block to be used as the memory backend of the super-converged host. If the memory parameter is larger than the CXL memory, the local memory can still be used.

[0111] Allows the memory backend to be passed as a parameter to the QEMU emulated processor software for further use in the QEMU emulated processor software.

[0112] The embodiment of the present application can also be used for CXL memory pool resource management. CXL memory is designated as the memory backend through libvirt, and the memory size is allocated on demand. Through the unified interface of libvirt, the CXL memory pool is managed and allocated to ensure the consistency and efficient use of memory resources across nodes. In this way, multiple virtualization hosts can share a memory pool, realize flexible scheduling and efficient management of memory resources, and break through the limitations of traditional single-node memory.

[0113] Furthermore, the method also includes managing the life cycle of the aggregated host through libvirt. Specifically, the virtual machine XML file can be modified through libvirt, wherein the XML file at least includes the IP address information of multiple hosts and the CPU (CENTRAL PROCESSING UNIT) central processing unit actually used by each host; the host's libvirt is initialized to connect, and connected to each slave through the libvirt API (APPLICATION PROGRAMMING INTERFACE) protocol interface; based on the host, the virtual machine XML file is parsed and processed to obtain the processed virtual machine XML file; according to the processed virtual machine XML file and the processed disk information, the virtual machine is started.

[0114] Lifecycle management can provide a unified interface for aggregated hosts to implement virtual machine lifecycle management, including operations such as creation, startup, suspension, resumption, and destruction, simplifying the management process and improving management efficiency. Through unified lifecycle management, multiple virtualization hosts can be centrally controlled and managed, improving the flexibility and reliability of the system.

[0115] In addition, you can modify the virtual machine XML file through libvirt, where the XML file includes at least the IP address information of multiple hosts and the CPU (CENTRAL PROCESSING UNIT) actually used by each host, including:

[0116] Based on the virtual machine XML file, a host identification tag is added, and the identification is used to describe the configuration information of the host; the configuration information at least includes the IP address of each node, the number of virtual machines corresponding to each IP address, whether the current IP address is the master node, the CXL memory block name and memory size.

[0117] In some embodiments of the present application, the host's libvirt is initialized to connect to each slave through the libvirt API (APPLICATION PROGRAMMING INTERFACE) protocol interface, including:

[0118] Use the virConnectOpen function to connect the master node and each slave node;

[0119] When all connections are successfully established, the master node will hold the connection handles of all slave nodes, which are used for virtual machine management operations.

[0120] Specifically, initialize the connection to libvirt on the master node. On the master node, use the libvirt API (APPLICATION PROGRAMMING INTERFACE) protocol to connect to each slave node. The steps are as follows:

[0121] Use the virConnectOpen function to connect to the master node and each slave node to ensure that all connections are successfully established.

[0122] After the connection is established, the master node will hold the connection handles of all slave nodes, which are used for subsequent virtual machine management operations.

[0123] This approach ensures that the master node can uniformly manage and schedule virtual machine resources on all slave nodes.

[0124] Further, based on the host, the virtual machine XML file is parsed and processed to obtain a processed virtual machine XML file, including:

[0125] Determine whether the current computing node is a host node;

[0126] If it is the master node, the slave node is remotely called through the virtual machine monitor; the virDomainDefineXML function is called to define the virtual machine on each node so that the definition process of all slave nodes is consistent;

[0127] virDomainDefineXML is a function in the libvirt library that is used to define a virtual machine's configuration file. The main purpose of this function is to pass an XML format virtual machine definition file to libvirt in order to create or update a virtual machine's configuration.

[0128] If it is not the master node, the virtual machine XML file parsed by the virtual machine monitor function is saved.

[0129] In this application, on the master node, the XML file of the virtual machine is parsed and processed, and the following steps are performed:

[0130] Determine whether the current computing node is the master node;

[0131] If it is the master node, a call is made to the remote slave node. After the call is successful, the call is made using the slave node's Hypervisor.

[0132] Call the virDomainDefineXML function to define the virtual machine on each node to ensure that the definition process is consistent for all nodes.

[0133] If it is not the master node, the function will be parsed into XML and saved directly. This approach will not destroy the original definition method.

[0134] In some further embodiments of the present application, the disk information of the virtual machine is processed according to the host to obtain the processed disk information, which specifically includes:

[0135] If the host's identification tag exists and the current node is a host node, the disk information is retained and parsed, and the disk information is saved on the host;

[0136] If the current node is not a host node, the parsing and processing of disk information is skipped, and only the computing resources of the node are processed.

[0137] To achieve the above object, the embodiment of the present application provides a method for managing a super-aggregated host based on libvirt, which specifically includes the following steps:

[0138] The overall framework design of libvirt to manage super-aggregated hosts.

[0139] Figure 3 and Figure 4 The design structure selected in the present invention is Figure 3That is, among multiple aggregation hosts, one is designated as the master node and the others are slave nodes. The master node manages all aggregation machines, and the Client scheduling platform can only operate the master node machine.

[0140] libvirt manages the hardware resources of the aggregated hosts:

[0141] Adapting CPU (CENTRAL PROCESSING UNIT) central processor resources: libvirt has two parameters in XML to manage CPU (CENTRAL PROCESSING UNIT), namely CPU (CENTRAL PROCESSING UNIT) central processor and VCPU (CPU virtualization technology). CPU (CENTRAL PROCESSING UNIT) central processor is mainly to avoid multiple virtual machines on a host competing for resources; but when actually starting the virtual machine, libvirt will call the underlying virtual operating system command according to the configuration information of VCPU (CPU virtualization technology) to implement it. On the QEMU emulated processor software side of the aggregate host, the local-CPU is responsible for allocating VCPU (CPU virtualization technology) (virtual central processing unit) resources. Therefore, on the libvirt side, VCPU (CPU virtualization technology) needs to be bound to local-CPU to ensure effective and reasonable use of resources.

[0142] Adapt CXL memory backend: CXL shared memory is used at the bottom layer of aggregate computing, so device adaptation is required in libvirt, and the memory size of the super-aggregated host can be specified as needed. In order to be compatible with the operation mode of libvirt managing a single host, the memory needs to come from multiple memory backends, so it is necessary to set the flag and use the memory-backend parameter on the QEMU simulated processor software side and the original memory storage in XML to jointly manage memory resources. CXL (ComputeExpress Link) technology is a new type of high-speed interconnect technology designed to provide higher data throughput and lower latency to meet the needs of modern computing and storage systems. The specific steps are:

[0143] The current test development environment is the CXL device simulated by the QEMU simulated processor software.

[0144] Create the required region and namespace in the simulated CXL device, which manages the memory size and memory block name.

[0145] Indicate the name of the memory block to be used in the XML as the memory backend of the super-aggregated host. If the memory parameter is larger than the CXL memory, the local memory can still be used.

[0146] Allows the memory backend to be passed as a parameter to the QEMU emulated processor software for further use in the QEMU emulated processor software.

[0147] libvirt manages the lifecycle of aggregated hosts

[0148] XML file modification: libvirt manages resources through XML, so when adapting the hardware resources of the aggregated host, the XML needs to be modified. First, the XML of the master node host needs to contain the IP address information of multiple hosts, as well as the CPU (CENTRAL PROCESSING UNIT) actually used by each host. The specific modified XML design is as follows:

[0149] Figure 5 Shows the details of libvirt's management of super-aggregated hosts and handles new tags <aggregate>, disk information logic. This includes reading the IP address information of the host in multiple computing nodes, reading the local-CPU information, and reading the CXL memory block name and memory size.

[0150] Added a new tag for super-aggregate host in xml <aggregate>, used to describe the relevant information of the aggregation host.

[0151] <ip>: Labels are used to identify the IP addresses of each node.

[0152] CPUnums: <ip>Node attribute that identifies the number of VCPUs used by each IP address.

[0153] mark: <ip>Node attribute, indicating whether the current IP address is the master node.

[0154] <cxl>: Identifies the CXL memory block name, and the internal size attribute identifies the size.

[0155] (2) Initialize the connection to libvirt on the master node. On the master node, use the libvirtAPI (APPLICATION PROGRAMMING INTERFACE) protocol to connect to each slave node. The specific steps are as follows:

[0156] Use the virConnectOpen function to connect to the master node and each slave node to ensure that all connections are successfully established.

[0157] After the connection is established, the master node will hold the connection handles of all slave nodes, which are used for subsequent virtual machine management operations.

[0158] This method ensures that the master node can uniformly manage and schedule the virtual machine resources on all slave nodes.

[0159] (3) Define the virtual machine. On the master node, parse and process the XML file of the virtual machine and perform the following steps:

[0160] Determine whether the current computing node is the master node

[0161] If it is the master node, a call is made to the remote slave node. After the call is successful, the call is made using the slave node's virtual machine monitor.

[0162] Call the virDomainDefineXML function to define the virtual machine on each node to ensure that the definition process is consistent for all nodes.

[0163] If it is not the master node, the function will be parsed into XML and saved directly. This approach will not destroy the original definition method.

[0164] (4) Processing of disk information: When processing the disk information in the virtual machine definition, consider the design of the current aggregation host:

[0165] If the identification label of the aggregation host exists and the current node is the master node, the disk information is retained and parsed to ensure that the disk resources are managed on the master node.

[0166] If the current node is not the master node, the parsing and processing of the disk information is skipped, and only the computing resources of the node (such as VCPU (CPU virtualization technology)) are processed.

[0167] This method ensures that disk resources are centrally managed on the master node, while computing resources are distributed and managed on each node.

[0168] (5) Start the virtual machine. This function is closely connected to the parameter local-CPU required by the underlying QEMU emulated processor software. The specific steps are as follows:

[0169] Local-CPU refers to each independent CPU core in a multi-core processor. In a multi-core processor, each CPU core has its own processing power and can execute tasks independently without sharing resources with other cores. This design enables the multi-core processor to handle multiple tasks simultaneously and improve the overall processing efficiency.

[0170] If the number of local-CPUs on the current computing node is the same as that of VCPU (CPU virtualization technology).

[0171] If they are the same, the machine can be directly powered on at this node without enabling the aggregation function.

[0172] If they are different, a remote connection is made according to the <IP address>, and QEMU emulated processor software parameters are constructed on each node according to the nums attribute of the CPU (Central Processing Unit) and the virtual machine is started to ensure that the startup processes of all nodes are consistent and coordinated.

[0173] (6) Undefine, destroy, and shut down the virtual machine, such as Figure 6 This shows how libvirt manages the lifecycle of a super-aggregated host, mainly reflected in the part of constructing QEMU emulated processor software parameters according to xml and the information about error feedback in the RPC protocol mechanism.

[0174] The RPC protocol is a protocol that requests services from a remote computer program over a network without the need to understand the underlying network technology.

[0175] Determine whether the current computing node is the master node

[0176] If it is the master node, a remote call to the slave node is made. After the call is successful, the virtual machine monitor of the slave node is used for the call.

[0177] Call the native interfaces of libvirt, the virDomainUndefine function, virDomainDestroy function, and virDomainShutdown function to parse the XML file on each node and perform virtual machine-related operations to ensure that the definition processes of all nodes are consistent.

[0178] Other extended function interfaces

[0179] (1) Query the virtual machine status

[0180] Users can query the status of the current virtual machine through the virsh list interface and determine whether the current machine is an aggregate host or a general host. This method ensures that users can intuitively understand the running status of each virtual machine and its aggregation status.

[0181] The virsh list command is used to display a list of currently running virtual machines.

[0182] The specific situation is:

[0183] Add the isaggregate attribute to list.

[0184] If there is an identification label, it is further determined whether it is a master node or a slave node and displayed.

[0185] If no identification tag exists, it will be empty.

[0186] The RPC protocol mechanism is used to transmit the operation results and error information back and display them on the master node. The specific implementation steps are as follows:

[0187] Define RPC protocol communication protocol: Define a communication protocol between the master node and the slave to transmit operation results and error information. The communication protocol can be in JSON format, including operation type, operation status and detailed error information.

[0188] Implement the RPC protocol client and server: Implement the RPC protocol server on the master node to receive messages from the slave nodes; implement the RPC protocol client on each slave node to send operation results and error information to the master node.

[0189] Use the RPC protocol in virtual machine management operations: In each virtual machine management operation, the RPC protocol interface is called to pass the operation results and error information to the master node. On the master node, after receiving the message, the operation results and error information are parsed and displayed.

[0190] Extended functions. This work includes but is not limited to the above interfaces, but the idea is the same. For the aggregated cloud host, users can only operate the master node, and users cannot directly operate the slave node.

[0191] The present invention implements a super-aggregated host management method by implementing relevant working principles at the code level, and verifies the feasibility and benefits of the method in actual operation through actual programming and system configuration.

[0192] Break the existing operation mode of libvirt managing a single host on an existing computing node, and realize unified and centralized management of multiple virtualized hosts across computing nodes.

[0193] Provided is a super-aggregated host management method based on libvirt, including but not limited to the above-mentioned CPU (CENTRAL PROCESSING UNIT) central processing unit resource pool management, CXL memory pool resource management and virtual machine life cycle management. By improving the cross-node resource management and scheduling method implemented by the original libvirt interface, the consistency and efficient use of resources are ensured.

[0194] The embodiments of the present application have the following technical effects:

[0195] Unified management: No need to manually operate multiple virtualization hosts. The integrated system provided by libvirt fully manages the virtualization environment.

[0196] Simplified operation: The operation process is simplified. Users do not need to understand the underlying command line parameters. Advanced management functions are implemented through the libvirt interface, reducing operation complexity.

[0197] Increase flexibility: Maintain the existing single host operation mode, support diverse virtualization management requirements, and enhance system adaptability and scalability.

[0198] Reduce system coupling: The client is decoupled from the libvirt instance and only needs to interact with the master node, reducing dependencies between components. When the system is expanded, only the master node needs to be adjusted, and the client does not need to be modified, reducing the complexity of expansion and upgrade.

[0199] Simplify the learning curve: Improvements are made to the original libvirt interface so that users can use the required advanced functions without having to learn the new API (APPLICATION PROGRAMMING INTERFACE) protocol.

[0200] It should be noted that each implementable method in this embodiment may be implemented separately, or may be implemented in combination in any combination without conflict, and this application is not limited thereto.

[0201] The present application provides a method for managing super-aggregated hosts based on LIBVIRT, including: receiving a resource request from a virtual machine, wherein the resource request is a hardware resource identifier; configuring the underlying virtual operating system command corresponding to the hardware resource identifier according to a pre-set virtual processor; determining the host corresponding to the virtual machine according to the underlying virtual operating system command; allocating resources to multiple virtual machines corresponding to the host according to the host, and realizing unified management and scheduling of distributed CPU (CENTRAL PROCESSING UNIT) central processing unit resources through libvirt, thereby improving the utilization rate and scheduling efficiency of computing resources. This management method changes the original single-node management mode to a one-to-many mode, so that multiple virtualized hosts can share a CPU (CENTRAL PROCESSING UNIT) central processing unit resource pool, thereby realizing efficient aggregation and allocation of resources.

[0202] Another embodiment of the present application provides a device for managing a super-aggregated host based on libvirt, which is used to execute the method for managing a super-aggregated host based on libvirt provided in the above embodiment.

[0203] like Figure 7 FIG. 1 is a schematic diagram of a structure of a libvirt-based super-aggregated host management device provided in an embodiment of the present application. The libvirt-based super-aggregated host management device includes:

[0204] The receiving module 701 is used to receive a resource request of a virtual machine, where the resource request is a hardware resource identifier;

[0205] The calling module 702 is used to configure the underlying virtual operating system command corresponding to the hardware resource identifier according to the preset virtual processor;

[0206] The determination module 703 is used to determine the host corresponding to the virtual machine according to the underlying virtual operating system command;

[0207] The allocation module 704 is used to allocate resources to multiple virtual machines corresponding to the host according to the host, and to achieve unified management and scheduling of distributed CPU (CENTRAL PROCESSING UNIT) central processing unit resources through libvirt.

[0208] Regarding the device in this embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0209] The present application provides a super-aggregated host management device based on LIBVIRT, including: receiving a resource request of a virtual machine, the resource request being a hardware resource identifier; configuring the underlying virtual operating system command corresponding to the hardware resource identifier according to a pre-set virtual processor; determining the host corresponding to the virtual machine according to the underlying virtual operating system command; allocating resources to multiple virtual machines corresponding to the host according to the host, and realizing unified management and scheduling of distributed CPU (CENTRAL PROCESSING UNIT) central processing unit resources through libvirt, thereby improving the utilization rate and scheduling efficiency of computing resources. This management method changes the original single-node management mode to a one-to-many mode, so that multiple virtualized hosts can share a CPU (CENTRAL PROCESSING UNIT) central processing unit resource pool, thereby realizing efficient aggregation and allocation of resources. Another embodiment of the present application further supplements the super-aggregated host management device based on libvirt provided in the above embodiment.

[0210] In some embodiments of the present application, the allocation module is used to:

[0211] The host's memory is allocated according to the pre-set memory block name, wherein multiple virtual machines use the same CXL memory.

[0212] In some embodiments of the present application, the allocation module is used to:

[0213] Manage the lifecycle of aggregated hosts through libvirt;

[0214] Specifically include:

[0215] Modify the virtual machine XML file through libvirt, where the XML file at least includes the IP address information of multiple hosts and the CPU (CENTRAL PROCESSING UNIT) actually used by each host;

[0216] Initialize the connection to the host's libvirt, and connect to each slave through the libvirt API (APPLICATIONPROGRAMMINGINTERFACE) protocol interface;

[0217] Based on the host, parse and process the virtual machine XML file to obtain a processed virtual machine XML file;

[0218] Start the virtual machine according to the processed virtual machine XML file and processed disk information.

[0219] In some embodiments of the present application, the allocation module is used to:

[0220] Based on the virtual machine XML file, a host identification tag is added, and the identification is used to describe the configuration information of the host; the configuration information at least includes the IP address of each node, the number of virtual machines corresponding to each IP address, whether the current IP address is the master node, the CXL memory block name and memory size.

[0221] In some embodiments of the present application, the allocation module is used to:

[0222] Use the virConnectOpen function to connect the master node and each slave node;

[0223] When all connections are successfully established, the master node will hold the connection handles of all slave nodes, which are used for virtual machine management operations.

[0224] In some embodiments of the present application, the allocation module is used to:

[0225] Determine whether the current computing node is a host node;

[0226] If it is the master node, the slave node is remotely called through the virtual machine monitor; the virDomainDefineXML function is called to define the virtual machine on each node so that the definition process of all slave nodes is consistent;

[0227] If it is not the master node, the virtual machine XML file parsed by the virtual machine monitor function is saved.

[0228] In some embodiments of the present application, the allocation module is used to:

[0229] If the host's identification tag exists and the current node is a host node, the disk information is retained and parsed, and the disk information is saved on the host;

[0230] If the current node is not a host node, the parsing and processing of disk information is skipped, and only the computing resources of the node are processed.

[0231] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0232] The present application provides a super-aggregated host management device based on LIBVIRT, including: receiving a resource request from a virtual machine, wherein the resource request is a hardware resource identifier; configuring the underlying virtual operating system command corresponding to the hardware resource identifier according to a pre-set virtual processor; determining the host corresponding to the virtual machine according to the underlying virtual operating system command; allocating resources to multiple virtual machines corresponding to the host according to the host, and realizing unified management and scheduling of distributed CPU (CENTRAL PROCESSING UNIT) central processing unit resources through libvirt, thereby improving the utilization rate and scheduling efficiency of computing resources. This management method changes the original single-node management mode to a one-to-many mode, so that multiple virtualized hosts can share a CPU (CENTRAL PROCESSING UNIT) central processing unit resource pool, thereby realizing efficient aggregation and allocation of resources.

[0233] Optionally, an embodiment of the present application further provides an electronic device, comprising: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the various processes of the above-mentioned method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.

[0234] The embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, each process of the above method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. The computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0235] Figure 8 800 is a block diagram of an electronic device 800 shown in the present application. For example, the electronic device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0236] Reference Figure 8 , the electronic device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .

[0237] The processing component 802 generally controls the overall operation of the electronic device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.

[0238] The memory 804 is configured to store various types of data to support operations on the device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phone book data, messages, images, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0239] The power supply component 806 provides power to the various components of the electronic device 800. The power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 800.

[0240] The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and the rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0241] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the electronic device 800 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.

[0242] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.

[0243] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the electronic device 800. For example, the sensor assembly 814 can detect the open / closed state of the device 800, the relative positioning of components, such as the display and keypad of the electronic device 800, and the sensor assembly 814 can also detect the position change of the electronic device 800 or a component of the electronic device 800, the presence or absence of contact between the user and the electronic device 800, the orientation or acceleration / deceleration of the electronic device 800, and the temperature change of the electronic device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0244] The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 can access a wireless network based on a communication standard, such as WiFi, a carrier network (such as 2G, 3G, 4G or 5G), or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast operation information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0245] In an exemplary embodiment, the electronic device 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.

[0246] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by a processor 820 of an electronic device 800 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0247] Fig. 9 19 is a block diagram of a computer-readable storage medium 1900 shown in the present application. For example, the computer-readable storage medium 1900 may be provided as a server.

[0248] Reference Fig. 9 , the computer-readable storage medium 1900 includes a processing component 1922, which further includes one or more processors, and a memory resource represented by a memory 1932 for storing instructions, such as an application, that can be executed by the processing component 1922. The application stored in the memory 1932 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 1922 is configured to execute instructions to perform the above method.

[0249] The computer readable storage medium 1900 may also include a power supply component 1926 configured to perform power management of the computer readable storage medium 1900, a wired or wireless network interface 1950 configured to connect the computer readable storage medium 1900 to a network, and an input / output (I / O) interface 1958. The computer readable storage medium 1900 may operate based on an operating system stored in the memory 1932, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™ or the like.

[0250] It should be noted that, in this article, the term "includes", "comprising" or any other variation thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0251] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0252] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

[0253] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in the present application can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0254] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0255] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0256] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0257] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0258] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard drives, ROM, RAM, magnetic disks, or optical disks.

[0259] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.< / cxl> < / ip> < / ip> < / ip> < / aggregate> < / aggregate>

Claims

1. A method for managing a super-aggregated host based on libvirt, characterized in that: The method comprises: receiving a resource request of a virtual machine, wherein the resource request is a hardware resource identifier; According to the preset virtual processor, configure the underlying virtual operating system command corresponding to the hardware resource identifier; Determining a host corresponding to the virtual machine according to the underlying virtual operating system command; According to the host, resources are allocated to multiple virtual machines corresponding to the host, and unified management and scheduling of distributed CPUs are achieved through libvirt.

2. The method for managing a super-aggregated host based on libvirt according to claim 1, characterized in that: The method further comprises: The host's memory is allocated according to the pre-set memory block name, wherein multiple virtual machines use the same CXL memory.

3. The method for managing a super-aggregated host based on libvirt according to claim 1, characterized in that: The method further comprises: Manage the lifecycle of aggregated hosts through libvirt; Specifically include: Modify the virtual machine XML file through libvirt, wherein the XML file at least includes the IP address information of multiple hosts and the actual CPU usage of each host; Initialize the connection to the host's libvirt and connect to each slave through the libvirt API protocol interface; Based on the host, parsing and processing the virtual machine XML file to obtain a processed virtual machine XML file; The virtual machine is started according to the processed virtual machine XML file and the processed disk information.

4. The method for managing a super-aggregated host based on libvirt according to claim 3, characterized in that: The virtual machine XML file is modified by libvirt, wherein the XML file at least includes the IP address information of multiple hosts and the actual CPU usage of each host, including: Based on the virtual machine XML file, a host identification tag is added, and the identification is used to describe the configuration information of the host; the configuration information at least includes the IP address of each node, the number of virtual machines corresponding to each IP address, whether the current IP address is a host node, the CXL memory block name and memory size.

5. The method for managing a super-aggregated host based on libvirt according to claim 3, characterized in that: Initializing the connection to the host's libvirt and connecting to each slave through the libvirt API protocol interface includes: Use the virConnectOpen function to connect the master node and each slave node; When all connections are successfully established, the master node will hold the connection handles of all slave nodes, which are used for virtual machine management operations.

6. The method for managing a super-aggregated host based on libvirt according to claim 3, characterized in that: The step of parsing and processing the virtual machine XML file based on the host to obtain the processed virtual machine XML file includes: Determine whether the current computing node is a host node; If it is a master node, the slave node is remotely called through the virtual machine monitor; the virDomainDefineXML function is called to define the virtual machine on each node so that the definition process of all slave nodes is consistent; If it is not a host node, the virtual machine XML file parsed by the virtual machine monitor function is saved.

7. The method for managing a super-aggregated host based on libvirt according to claim 1, characterized in that: The allocating resources to the virtual machine corresponding to the host according to the host includes: If the host identification tag exists and the current node is a host node, retain and parse the disk information, and save the disk information on the host; If the current node is not a host node, the parsing and processing of the disk information is skipped, and only the computing resources of the current node are processed.

8. A super-aggregated host device managed based on libvirt, characterized in that: The device comprises: A receiving module, used to receive a resource request of a virtual machine, wherein the resource request is a hardware resource identifier; A calling module, used for configuring the underlying virtual operating system command corresponding to the hardware resource identifier according to the preset virtual processor; A determination module, used to determine a host corresponding to the virtual machine according to the underlying virtual operating system command; The allocation module is used to allocate resources to multiple virtual machines corresponding to the host according to the host, and realize unified management and scheduling of distributed CPU resources through libvirt.

9. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the method according to any one of claims 1 to 7 when executed by the processor.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • Libvirt-based hyper-aggregated host management method and apparatus

    WO2026118953A1