Virtual machine configuration method, server cluster and server

By writing configuration files in virtual machines, the problem of complex and time-consuming virtual machine configuration is solved, automatic configuration and communication between management nodes and virtual machines are realized, and the response speed and user experience of business functions are improved.

CN118550650APending Publication Date: 2024-08-27XFUSION DIGITAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410703921.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-31
Publication Date
2024-08-27

AI Technical Summary

Technical Problem

When a virtual machine provides business functions, there is a lack of communication mechanism between the management server and the virtual machine, which makes manual intervention necessary, making the configuration complex and time-consuming.

Method used

The first node receives the configuration file sent by the second node and writes it to the virtual disk. The virtual disk is mounted on the virtual machine. The virtual machine reads the configuration file from the virtual disk for configuration, realizing automated configuration and reducing user operations.

Benefits of technology

It eliminates the need for users to manually configure virtual machines, improves configuration efficiency, simplifies operating procedures, reduces time and labor costs, realizes communication connections between virtual machines and management nodes, and improves the response speed of business functions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118550650A
    Figure CN118550650A
Patent Text Reader

Abstract

The invention provides a virtual machine configuration method, a server cluster and a server. The method comprises the steps that a first node receives a configuration file sent by a second node; the first node writes the configuration file into a virtual disk, a virtual machine is deployed in the first node, and the virtual disk is mounted on the virtual machine; and the virtual machine reads the configuration file from the virtual disk, and performs virtual machine configuration based on the configuration file. And the first node writes the configuration file into the virtual machine by using the virtual disk, so that the virtual machine is configured according to the configuration file, and a user does not need to log in the virtual machine to manually configure the virtual machine. Moreover, the virtual disk is used for forwarding the configuration file, so that the problem that the configuration file cannot be directly written into the virtual machine is solved, automatic configuration of the virtual machine is realized, and user operation is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of server technology, and in particular to a virtual machine configuration method, a server cluster and a server. Background Art

[0002] With the rapid development of computing technology, storage technology and network technology, hyperconvergence technology has emerged. Hyperconvergence is an infrastructure technology that integrates computing, storage and network functions. Hyperconvergence technology integrates computing and storage resources in a software-defined manner, organizes computing resources and storage resources in a server cluster through virtualization technology and management software, and realizes resource sharing and management.

[0003] When a user chooses to use a business function, the management server in the server cluster needs to schedule the virtual machine deployed in the computing server to implement the corresponding business function. However, when the virtual machine provides business functions, there is a lack of communication mechanism between the management server and the virtual machine, and manual intervention is required to complete the configuration of the virtual machine in order to provide the corresponding business function normally. The operation is relatively complex, time-consuming and labor-intensive. Summary of the invention

[0004] In view of this, the embodiments of the present application provide a virtual machine configuration method, a server cluster and a server, aiming to solve the problem that manual configuration of virtual machines is complicated, time-consuming and labor-intensive.

[0005] In a first aspect, an embodiment of the present application provides a virtual machine configuration method, the method comprising:

[0006] The first node receives a configuration file sent by the second node;

[0007] The first node writes the configuration file into a virtual disk, a virtual machine is deployed in the first node, and the virtual disk is mounted on the virtual machine;

[0008] The virtual machine reads the configuration file from the virtual disk and performs virtual machine configuration based on the configuration file.

[0009] In the embodiment of the present application, the first node uses a virtual disk to write the configuration file into the virtual machine, so that the virtual machine is configured according to the configuration file, without the need for the user to log in to the virtual machine to manually configure the virtual machine. In addition, the use of a virtual disk to forward the configuration file solves the problem of being unable to directly write the configuration file into the virtual machine, thereby realizing the automatic configuration of the virtual machine and reducing user operations.

[0010] In a possible implementation manner, after the virtual machine performs virtual machine configuration based on the configuration file, the method further includes:

[0011] After the virtual machine configuration is completed, the virtual machine writes the configuration result to the virtual disk;

[0012] The first node reads the configuration result from the virtual disk, and sends the configuration result to the second node.

[0013] In an embodiment of the present application, after completing the configuration, the virtual machine will write the configuration results to the virtual disk, and the first node will promptly feedback the configuration results to the second node, so that the second node can know the specific configuration of the virtual machine and further monitor, manage or make corresponding adjustments.

[0014] In a possible implementation, the configuration file includes parameters corresponding to the target business function, and a system file is mounted in the virtual machine, where the system file is an operating system file encapsulating a program that implements the target business function.

[0015] In an embodiment of the present application, by mounting a file system that supports the target business function in a virtual machine, the virtual machine can parse the configuration file and then configure the program that implements the target business function according to the parameters corresponding to the target business function, thereby simplifying the configuration process and improving the flexibility and maintainability of the configuration.

[0016] In a possible implementation, the method further includes:

[0017] The first node receives a virtual machine deployment instruction and a system file sent by the second node; wherein the system file is an operating system file encapsulating a program that implements a target business function, and the virtual machine deployment instruction is sent by the second node after receiving a business function call request, and the business function call request is used to request to call the target business function;

[0018] The first node deploys the virtual machine and mounts the system file to the virtual machine.

[0019] In an embodiment of the present application, the first node can deploy a corresponding virtual machine according to the specific business functions that need to be implemented, and after the virtual machine is deployed, it is only necessary to mount the system file encapsulated with the program that implements the target business function to the virtual machine without the need for installation. The virtual machine can directly run the program that implements the target business function to provide the target business function to the user.

[0020] In a possible implementation, after the virtual machine performs virtual machine configuration based on the configuration file, the method further includes:

[0021] The configured virtual machine receives the service function call request and provides the target service function for the user according to the service function call request.

[0022] In the embodiment of the present application, the configured virtual machine can receive business function call requests and provide target business functions to users according to these requests. This method enables the virtual machine to have the ability to respond to business function call requests in real time, thereby providing users with the required business function services.

[0023] In a possible implementation manner, the configured virtual machine receiving the service function call request includes:

[0024] The first node receives the service function calling request sent by the second node, and writes the service function calling request into the configured virtual machine.

[0025] In an embodiment of the present application, the first node and the virtual disk can be used to send a business function call request to the virtual machine, so that the virtual machine can respond in a timely manner and provide the corresponding business function service.

[0026] In a possible implementation manner, the configured virtual machine receiving the service function call request includes:

[0027] The configured virtual machine receives the service function calling request sent by the second node.

[0028] In an embodiment of the present application, the configured virtual machine can communicate directly with the second node without going through the first node and the virtual disk, thereby improving the speed at which the virtual machine responds to business function call requests.

[0029] In a possible implementation manner, the virtual disk is created when the first node deploys the virtual machine, or the virtual disk is created according to the size of the configuration file after the first node receives the configuration file.

[0030] In an embodiment of the present application, the first node may create a virtual disk and mount the virtual disk to the virtual machine when deploying the virtual machine; or, after receiving the configuration file, create a virtual disk according to the size of the configuration file and mount the virtual disk to the virtual machine to avoid the virtual disk being unable to completely store the configuration file.

[0031] In a second aspect, an embodiment of the present application provides a server cluster, characterized in that the server cluster includes at least a first node and a second node, the first node is communicatively connected with the second node, the first node includes a virtual disk, a virtual machine is deployed in the first node, and the virtual disk of the first node is mounted on the virtual machine.

[0032] In a possible implementation, the virtual machine is used to write the configuration result to the virtual disk after the virtual machine configuration is completed;

[0033] The first node is used to read the configuration result from the virtual disk and send the configuration result to the second node.

[0034] In a possible implementation, the configuration file includes parameters corresponding to the target business function, and a system file is mounted in the virtual machine, where the system file is an operating system file encapsulating a program that implements the target business function.

[0035] In one possible implementation, the first node is used to receive virtual machine deployment instructions and system files sent by the second node; wherein the system file is an operating system file that encapsulates a program that implements a target business function, and the virtual machine deployment instruction is sent by the second node after receiving a business function call request, and the business function call request is used to request to call the target business function; the first node is also used to deploy the virtual machine and mount the system file to the virtual machine.

[0036] In a possible implementation, the virtual machine is used to receive a service function call request after completing the virtual machine configuration, and provide the target service function for the user according to the service function call request.

[0037] In a possible implementation, the first node is used to receive the service function call request sent by the second node, and write the service function call request into the configured virtual machine.

[0038] In a possible implementation manner, the virtual machine is used to receive the service function calling request sent by the second node after being configured.

[0039] In a possible implementation manner, the virtual disk is created when the first node deploys the virtual machine, or the virtual disk is created according to the size of the configuration file after the first node receives the configuration file.

[0040] In a third aspect, an embodiment of the present application provides a virtual machine deployment device, which is arranged at a first node, and includes:

[0041] A receiving module, used for receiving a configuration file sent by the second node;

[0042] A read-write module, used for writing the configuration file into a virtual disk, a virtual machine is deployed in the first node, and the virtual disk is mounted on the virtual machine;

[0043] The configuration module is used to read the configuration file from the virtual disk and perform virtual machine configuration based on the configuration file.

[0044] In a fourth aspect, an embodiment of the present application provides a server, comprising a processor, and a memory communicatively connected to the processor;

[0045] The memory is used to store computer-executable instructions;

[0046] The processor is used to execute the computer-executable instructions stored in the memory to implement the virtual machine configuration method described in any embodiment of the first aspect or the second aspect.

[0047] In a sixth aspect, an embodiment of the present application provides a computer storage medium, in which a code is stored. When the code is executed, a device executing the code implements the virtual machine configuration method described in any one of the first aspects above. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to more clearly illustrate the technical solutions in this embodiment or 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 only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0049] Figure 1 A schematic diagram of a server cluster architecture provided in an embodiment of the present application;

[0050] Figure 2 A schematic diagram of another server cluster architecture provided in an embodiment of the present application;

[0051] Figure 3 A software architecture diagram of a server cluster provided in an embodiment of the present application;

[0052] Figure 4 A flowchart of a virtual machine configuration method provided in an embodiment of the present application;

[0053] Figure 5 A schematic diagram of a business function management page provided in an embodiment of the present application;

[0054] Figure 6 A flowchart of another virtual machine configuration method provided in an embodiment of the present application;

[0055] Figure 7 A flowchart of another virtual machine configuration method provided in an embodiment of the present application;

[0056] Figure 8 A software architecture diagram of another server cluster provided in an embodiment of the present application;

[0057] Fig. 9A flowchart of another virtual machine configuration method provided in an embodiment of the present application;

[0058] Fig.10 A structural diagram of a server provided in an embodiment of the present application. DETAILED DESCRIPTION

[0059] It should be noted that the embodiments described in this application are only part of the embodiments of this application, rather than all the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0060] In order to make the following embodiments clear, the technical terms involved in this application are first introduced.

[0061] A server cluster is a cluster of multiple servers interconnected by an input / output system, such as a hyper-converged cluster. These servers can work together to provide users with application and data resource services. Servers include rack servers, cabinet servers, blade servers, tower servers or general servers, GPU servers, high-performance servers, etc. Servers can be connected through a high-speed network and managed through distributed resource management software (Digital Rights Management, DRM). The multiple servers in a server cluster can be divided into management servers (also called management nodes), computing servers (also called computing nodes) and storage servers (also called storage nodes) according to their functions.

[0062] The computing node is the core component responsible for executing computing tasks in the server cluster. The computing node is the workload processor in the cluster, responsible for processing large amounts of data and computing tasks. The computing node usually has a high-performance processor, a large amount of memory and a high-speed network interface to meet the needs of high load and high performance. The main tasks of the computing node are to execute applications, process data and analyze results. They can process multiple tasks in parallel and improve the overall computing performance through distributed computing. Data transmission and communication are carried out between computing nodes through high-speed network connections to ensure that tasks can be efficiently assigned to each node and load balancing is achieved. In an embodiment of the present application, virtual machines for implementing different business functions of the server cluster can be deployed in the computing node, and the virtual machine can be used to perform tasks corresponding to one or more business functions to provide business functions for users.

[0063] A management node is a node in a server cluster that is responsible for monitoring, managing, and configuring cluster storage resources or computing resources. The management node is the management center of the server cluster and is responsible for monitoring, scheduling, and managing other nodes in the server cluster. The management node is responsible for collecting cluster operation status information, processing logs and alarm information, and providing cluster deployment, configuration, and maintenance functions. Management nodes usually have powerful computing and storage capabilities to support complex monitoring and management tasks. Management nodes can also communicate with other nodes to send management instructions and configuration parameters to ensure the stable operation and efficient performance of the server cluster. Management nodes also provide management tools for server clusters, such as hyper-converged platforms.

[0064] Storage nodes are nodes in a server cluster that are responsible for data storage and management. Storage nodes provide the data storage and backup functions required by the server cluster to ensure data reliability and persistence. Storage nodes are usually equipped with high-performance storage devices, such as disk arrays or distributed file systems, to provide large amounts of storage space and high-speed data access performance. Storage nodes exchange and synchronize data with other nodes through network sharing protocols or other storage technologies.

[0065] A virtual machine is a computer environment implemented by software. It refers to a virtual machine established on a physical machine through virtualization technology. A virtual machine can simulate a complete computer with a complete operating system, computer hardware and application software. Virtual machine technology can run multiple virtual machines on a computing server in a server cluster, and each virtual machine can run independently, completely isolated from each other and not affecting each other.

[0066] Live CD ISO (Live Compact Disc ISO) is an operating system that can be run directly on a computer without installing it on the hard disk. Live CD ISO can be used on different computers without affecting the original operating system and data on the computer. Live CD ISO can also be used in a virtual machine. By mounting Live CD ISO in a virtual machine, the virtual machine can directly run the operating system without installation.

[0067] In the related art, before using a virtual machine to provide business functions, the user needs to log in to the virtual machine system and manually configure the virtual machine so that the virtual machine can accept the scheduling of the management node. However, this configuration method is inefficient and the user experience is poor.

[0068] The embodiment of the present application provides a virtual machine configuration method, a server cluster and a server. After receiving the configuration file sent by the management node (also referred to as the second node in the embodiment of the present application), the computing node (also referred to as the first node in the embodiment of the present application) writes the configuration file into the virtual disk of the computing node. The virtual disk is mounted in the virtual machine deployed on the computing node. The virtual machine reads the configuration file in the virtual disk, thereby realizing automatic configuration, exposing the virtual machine to the callable range of the management node, establishing a communication connection between the management node and the virtual machine, and then using the configured virtual machine to provide the user with corresponding business functions. The above process realizes automatic configuration of the virtual machine, without the need for the user to manually configure the virtual machine, saving the user's time and labor costs, and improving the user experience.

[0069] The following is an illustrative description of the application scenarios of the embodiments of the present application.

[0070] Take the hyper-convergence scenario as an example. In the hyper-convergence scenario, each node in the server cluster can communicate directly with each other. When a user calls the A business function of the server cluster through the user terminal, after the management node in the server cluster receives the business function call request of the A business function, the management node sends the configuration parameters corresponding to the A business function in the form of a configuration file to the computing node A where the virtual machine A is deployed. Virtual machine A is a virtual machine deployed based on the Live CD ISO corresponding to the A business function. Computing node A writes the configuration file to virtual machine A, configures virtual machine A using the configuration parameters corresponding to the A business function, and completes the automatic configuration of the virtual machine. The configured virtual machine A can communicate with the management node. The management node can directly send the business function request to the configured virtual machine A, and call the configured virtual machine A to provide the user with the A business function.

[0071] In the above process, the configuration parameters can be written into the virtual machine through the computing node where the virtual machine is deployed, so as to realize the automatic configuration of the virtual machine, establish the communication connection between the virtual machine and the management node, and provide the corresponding business functions for the user. It is unnecessary for the user to manually configure the virtual machine, which reduces the complexity of user operation and improves the user experience.

[0072] The server cluster architecture involved in the embodiments of the present application is introduced below with reference to the accompanying drawings.

[0073] In one possible implementation, Figure 1 As shown, Figure 1 A schematic diagram of a server cluster architecture provided in an embodiment of the present application. In an embodiment of the present application, the server cluster includes a management node and multiple computing nodes.

[0074] The management node is used to provide users with business function selection and business parameter configuration functions. When a user selects a business function and configures related business parameters through the front-end management page displayed on the user end (the electronic device used by the user), the management node can generate a configuration file based on the business parameters configured by the user and send the configuration file to the virtual machine that can implement the business function.

[0075] The computing node is used to receive the configuration file sent by the management node, and write the configuration file into the corresponding virtual machine through virtualization technology. Virtual machines are deployed in the computing node. Multiple virtual machines can be deployed in one computing node at the same time. Different virtual machines can be used to implement different business functions. For example: virtual machine 1 is used to implement business function A, and virtual machine 2 is used to implement business function B. Virtual machines are used to implement one or more business functions. In an embodiment of the present application, the virtual machine is pre-installed with a program corresponding to the business function. By reading the configuration file written by the computing node, the virtual machine can configure the relevant parameters of the business function in combination with the configuration file, realize the automatic configuration of the internal environment of the virtual machine, and then can receive the call of the management node to provide personalized business functions for users.

[0076] In another possible implementation, Figure 2 As shown, Figure 2 Another server cluster architecture diagram provided in the embodiment of the present application. Figure 1 Based on the server cluster shown, Figure 2 The server cluster shown includes a storage node, a management node, and multiple computing nodes.

[0077] The storage node is used to store Live CD ISOs (also referred to as system files in the embodiment of the present application) corresponding to different business functions. In the embodiment of the present application, the programs that implement the business functions are encapsulated in the Live CD ISO. By mounting the Live CD ISO in a virtual machine, the virtual machine can directly run the operating system and execute the programs used to implement the business functions, thereby providing the user with corresponding business functions. As an example, the first Live CD ISO encapsulated with the program that implements business function A is mounted in virtual machine 1, and virtual machine 1 can implement business function A; the second Live CD ISO encapsulated with the program that implements business function B is mounted in virtual machine 2, and virtual machine 2 can implement business function B.

[0078] The management node is also used to send the Live CD ISO in the storage node to the computing node to deploy a virtual machine for implementing a certain business function.

[0079] Next, combined with the above Figure 1 The hardware architecture of the server cluster is provided, and the software architecture of the server cluster is introduced as an example.

[0080] like Figure 3 As shown, the management node runs the business function management system, the computing node runs the business function management node agent (also called node agent), and the virtual machine runs the business function management virtual machine agent (also called virtual machine agent).

[0081] The business function management system is used to receive business parameters and business function call requests sent by the user end, generate a configuration file based on the business parameters and the default parameters of the business function, and send the configuration file to the node agent in the computing node where the virtual machine that implements the business function is located.

[0082] The business function management system is also used to deploy virtual machines. The business function management system can determine the Live CD ISO that encapsulates the program that implements the business function according to the business function call request, and send the Live CD ISO and the virtual machine deployment instruction to the node agent in the computing node, and then deploy the virtual machine that can implement the business function in the computing node. In the embodiment of the present application, the relevant program of the virtual machine agent can be encapsulated in the Live CD ISO, and the virtual machine agent can be loaded synchronously when the virtual machine starts to load the operating system.

[0083] The node agent is used to write the configuration file to the virtual machine through virtualization technology. As a possible implementation method, the node agent creates a virtual disk through virtualization technology and mounts the virtual disk to the virtual machine so that both the node agent and the virtual machine agent can read and write the virtual disk. The node agent writes the configuration file to the virtual disk to write the configuration file to the virtual machine. The node agent is also used to monitor the virtual disk. When the node agent monitors the virtual machine agent writing the configuration result to the virtual disk, the node agent feeds back the configuration result to the business function management system.

[0084] The virtual machine agent is used to monitor virtual disks. After the virtual machine agent is loaded, it continues to monitor disk changes inside the virtual machine. When a new virtual disk is added inside the virtual machine, the virtual machine agent locks the virtual disk and continues to monitor the virtual disk. When the virtual machine agent monitors that the node agent writes a configuration file to the virtual disk, the virtual machine agent reads the configuration file from the virtual disk, parses the configuration file, and adjusts the default parameters of the business functions in the virtual machine according to the configuration file. The virtual machine agent is also used to write configuration results to the virtual disk after the configuration is completed.

[0085] Through the virtual machine configuration method provided in the embodiment of the present application, a communication relationship between a virtual machine and a management node is established by using a computing node. The configuration file is written into the virtual machine through the computing node, thereby realizing the configuration of the virtual machine, without the user having to manually configure the virtual machine, thereby improving the user experience.

[0086] The following is an introduction to the virtual machine configuration method in conjunction with the accompanying drawings.

[0087] like Figure 4 As shown, Figure 4 A flow chart of a virtual machine configuration method provided in an embodiment of the present application, the method comprising:

[0088] S401: The user terminal sends a service function call request and service parameters to the management node.

[0089] The user terminal is the electronic device used by the user. The user can select the service function to be called through the service function management page displayed on the user terminal, and after selecting the service function, configure some service parameters of the service function. Figure 5 As shown, Figure 5 A schematic diagram of a business function management page provided in an embodiment of the present application. The business function management page includes various business functions that the server cluster can currently implement. When a user clicks on a business function, the business management page can display the relevant business parameters of the business function selected by the user, such as bandwidth, throughput, number of concurrent connections, and response speed. Users can modify and adjust the relevant business parameters according to their own needs to make the business functions implemented by the server cluster more in line with the actual situation.

[0090] The service function call request is generated by the user end according to the user's selection of the service function, and is used to request the server cluster to call the service function selected by the user. As an implementation method, each service function corresponds to a different service identifier, and the service identifier can be used to determine the unique service function. When the user selects a service function, the user end generates a service call request according to the service identifier corresponding to the service function. The server cluster obtains the service identifier by parsing the service function call request, and then determines the service function called by the user according to the service identifier.

[0091] Business parameters are parameters related to business functions configured by users. Business parameters can include general business parameters and specific business parameters. General business parameters are business parameters included in each business function, and specific business parameters are business parameters unique to the business function. As an example, business function A can configure response time (general business parameters) and throughput (specific business parameters), and business function B can configure response time (general business parameters) and number of concurrent connections (specific business parameters).

[0092] When the user selects a service function and completes the configuration of related parameters, the user terminal generates a service function call request and service parameters, and sends the service function call request and service parameters to the management node in the server cluster, so that the server cluster provides the user with the corresponding service function according to the service parameters configured by the user.

[0093] S402: The management node generates a configuration file according to the service parameters and default parameters of the service functions.

[0094] The default parameters of the business functions are the parameter configurations preset by the server cluster when it leaves the factory. The default parameters can be determined based on common business requirements, best practices, and recommended settings provided by the manufacturer. The default parameters are not necessarily completely applicable to all situations. Therefore, in the embodiments of the present application, the management node can make some adjustments and modifications to the default parameters in combination with the business parameters provided by the user end to meet the user's business requirements and actual application environment conditions. The default parameters can be stored in the management node or in the storage node of the server cluster.

[0095] After receiving the business function call request, the management node determines the default parameters corresponding to the business function indicated by the business function call request. The management node compares the business parameters with the default parameters to determine the parameters that differ between the business parameters and the default parameters, and then replaces the modified parameters in the default parameters according to the business parameters. The management node generates a configuration file using the parameters in the business parameters or replacing the parameters of the corresponding fields in the default parameters. After the configuration file is generated, the virtual machine can be configured according to the configuration file to provide users with business functions that meet their personalized needs.

[0096] Different business functions have different corresponding default parameters, and the default parameters also include general default parameters and specific default parameters. General default parameters are default parameters included in all business functions, and specific default parameters are default parameters unique to the business function.

[0097] As an example, the business parameters are shown in Table 1, the default parameters are shown in Table 2, and the configuration file is shown in Table 3.

[0098] Table 1: Service parameters

[0099]

[0100] Table 2: Default parameters

[0101]

[0102] Table 3: Configuration files

[0103]

[0104] As shown in Table 1, when configuring service parameters, users can configure only part of the parameters. After receiving the service function call request for calling service function A, the management node determines the default parameters corresponding to service function A, as shown in Table 2. The default parameters are replaced with service parameters, such as replacing the parameter value X2 corresponding to the bandwidth in the default parameters with X1, and replacing the parameter value Z2 corresponding to the maximum number of concurrent connections in the default parameters with Z1. For parameters that are not configured in the service parameters, such as throughput, the parameter values ​​in the default parameters are retained. The configuration file generated by the management node based on the service parameters (Table 1) and the default parameters (Table 2) is shown in Table 3.

[0105] In another possible implementation, the configuration file includes parameters where the business parameters differ from the default parameters. The virtual machine used to implement a certain business function stores the default parameters corresponding to the business function. Therefore, by sending the parameters where the business parameters differ from the default parameters to the virtual machine, the internal environment of the virtual machine can also be configured according to the parameters configured by the user.

[0106] S403: The management node sends the configuration file and the service function call request to the computing node.

[0107] In a server cluster, there is a connection relationship between the management node and the computing node. For example, communication is carried out through a local area network or the Internet. The management node communicates with the computing node to monitor, manage and control the cluster. As an example, the management node has a dedicated management network or communication channel for communicating with the computing node to ensure the security and efficiency of management operations.

[0108] In a possible implementation, the computing node has deployed a virtual machine for implementing the business function. The management node determines the computing node where the virtual machine that can implement the required business function is located, and then sends the configuration file and the business function call request to the virtual machine. As an example, the management node stores the corresponding relationship between the business function, the virtual machine and the computing node, as shown in Table 4.

[0109] Table 4: Correspondence between business functions, virtual machines and computing nodes

[0110]

[0111] Different virtual machines are used to implement different business functions. The management node determines the corresponding virtual machine according to the business function indicated by the business function call request, and then determines the computing node where the virtual machine is deployed according to the virtual machine, and then sends the business function call request and configuration file to the corresponding computing node, and then the computing node writes the business function call request and configuration file into the corresponding virtual machine. The correspondence between business functions, virtual machines and computing nodes can also be stored in the storage node of the server cluster.

[0112] In another possible implementation, a virtual machine for implementing a business function is not deployed in the computing node. The management node may first send a virtual machine deployment instruction to the computing node, and after the computing node successfully deploys a virtual machine that can implement the corresponding business function, the management node may then send the business function call request and the configuration file to the computing node.

[0113] S404: The computing node writes the configuration file and the business function call request into the virtual machine.

[0114] After receiving the configuration file and business function call request sent by the management node, the computing node sends the configuration file and the business function call request to the corresponding virtual machine so that the virtual machine can be configured according to the configuration file and provide business functions to the user according to the business function call request.

[0115] In a possible implementation, the computing node can write the configuration file and the service function call request into the virtual machine through virtualization technology. As an example, the computing node and the virtual machine can communicate through a virtual network. The computing node communicates with the computing node through the virtual network. The virtual network can simulate the function of a physical network, and the virtual machine can communicate with the computing node through the virtual network. As another example, the computing node can mount a virtual disk in the virtual machine, and write the configuration file and the service function call request into the virtual disk, so as to write the configuration file and the service function call request into the virtual machine.

[0116] The virtual disk can be created and mounted to the virtual machine during the process of deploying the virtual machine on the computing node, or it can be created and mounted to the virtual machine by the computing node after the management node sends the configuration file and business function call request to the computing node.

[0117] S405: The virtual machine is configured according to the configuration file.

[0118] After receiving the configuration file and the service function call request, the virtual machine parses the configuration file to determine the various parameters and then configures the internal environment of the virtual machine. For example, the bandwidth of the virtual machine is configured according to the bandwidth in the configuration file. By configuring the internal environment according to the configuration file, the service functions that the virtual machine can provide are more in line with the needs of users.

[0119] In a possible implementation, a program for implementing the business function and default parameters of the business function are preinstalled in the virtual machine, and the virtual machine can modify the default parameters according to the configuration file. The default parameters are the same as the default parameters in step S402.

[0120] At this point, the automatic configuration of the virtual machine is completed through steps S401-S405. Based on the configured virtual machine, step S406 is optionally performed (step S406 is not performed in Figure 4 (shown in the).

[0121] S406: The virtual machine implements the business function.

[0122] After configuring the internal environment, the virtual machine responds to the business environment call request and provides the corresponding business function for the user. In a possible implementation, during the deployment of the virtual machine, the computing node writes the program used to implement the business function into the virtual machine. After configuring the internal environment, the virtual machine provides the business function for the user by executing the corresponding program.

[0123] Through the above virtual machine configuration method, the connection relationship between the virtual machine and the management node is established by using the computing node, and the service parameters provided by the user can be sent to the virtual machine to realize the automatic configuration of the virtual machine and provide the user with service functions that meet the user's personalized needs. There is no need for the user to enter the internal system of the virtual machine for manual configuration, which improves the convenience of virtual machine configuration and reduces the complexity of user operation.

[0124] In the above embodiment, the management node sends the service function call request and the configuration file to the computing node at the same time. The present application also provides another embodiment, in which the management node can send the configuration file to the computing node, and after the virtual machine is successfully configured and a direct communication connection is established between the management node and the virtual machine, the management node sends the service function call request to the virtual machine. Figure 6 As shown, Figure 6 A flowchart of another virtual machine configuration method provided in an embodiment of the present application includes:

[0125] S601: The user terminal sends a service function call request and service parameters to the management node.

[0126] S602: The management node generates a configuration file according to the service parameters and default parameters of the service functions.

[0127] S603: The management node sends the configuration file to the computing node.

[0128] S604: The computing node writes the configuration file to the virtual machine.

[0129] The implementation process of steps S601-S604 may refer to steps S401-S404, which will not be repeated here.

[0130] S605: The virtual machine is configured according to the configuration file.

[0131] The configuration file may also include the communication address of the management node. By parsing the configuration file, the virtual machine can not only configure the internal environment of the virtual machine according to the service parameters provided by the user, but also send a connection establishment request to the management node according to the communication address of the management node to establish a communication connection between the management node and the virtual machine.

[0132] S606: The virtual machine implements the service function according to the service function call request.

[0133] After the communication connection between the management node and the virtual machine is established in step S605, the management node can directly send a service function call request to the virtual machine without the need for intermediate forwarding by the computing node, thereby increasing the speed of calling the virtual machine, reducing the intermediate forwarding links, and improving security. After receiving the service function call request, the virtual machine executes the program that implements the service function to provide the user with the corresponding service function.

[0134] Through the above steps S601-S606, the computing node forwards the configuration file to establish a communication connection between the virtual machine and the computing node, so that the management node can directly send the business function call request to the virtual machine. While realizing the automatic configuration of the virtual machine, the intermediate process of the management node calling the virtual machine is simplified, and the speed of the virtual machine responding to the business function call request is improved.

[0135] In the above embodiment, the virtual machine can be a virtual machine pre-deployed for the computing node. To ensure that users can call various business functions, at least one corresponding virtual machine is deployed for each business function in the server cluster. In order to reduce the computing resources occupied by idle virtual machines, in another embodiment, after the user chooses to call a certain business function, a virtual machine capable of implementing the corresponding business function can be deployed. Figure 7 As shown, Figure 7 A flowchart of another virtual machine configuration method provided in an embodiment of the present application includes:

[0136] S701: The user terminal sends a service function call request and service parameters to the management node.

[0137] S702: The management node obtains the Live CD ISO corresponding to the service function.

[0138] Live CD ISO is an operating system file that encapsulates programs that implement business functions. By mounting Live CD ISO in a virtual machine, the virtual machine can directly execute the programs encapsulated in Live CD ISO to provide corresponding business functions. In an embodiment of the present application, the business function corresponds to Live CD ISO one by one, that is, the number of business functions that the server cluster can provide is the same as the number of Live CD ISOs. Multiple Live CD ISOs can be stored in a management node or in a storage node of a server cluster. The management node determines the corresponding Live CD ISO based on the business function indicated by the business function call request.

[0139] S703: The management node sends the Live CD ISO and the virtual machine deployment instruction to the computing node.

[0140] The virtual machine deployment instruction is used to instruct the computing node to deploy the virtual machine and mount the Live CD ISO to the virtual machine. The management node sends the Live CD ISO and the virtual machine deployment instruction to the computing node so that the computing node deploys the virtual machine that can realize the corresponding business function.

[0141] S704: The computing node creates a virtual machine and mounts the Live CD ISO to the virtual machine.

[0142] The computing node responds to the virtual machine deployment instruction, creates a virtual machine in the computing node, and mounts the Live CD ISO to the virtual machine.

[0143] In a possible implementation, the computing node can create a virtual machine through a virtualization platform (such as VMware Workstation, VirtualBox, or KVM) and load the Live CD ISO into the virtual CD drive of the virtual machine. After the creation is complete, the virtual machine is started, the virtual machine loads the Live CD ISO, and the operating system and the program that implements the business function in the Live CD ISO are loaded into the memory.

[0144] In a possible implementation, after deploying the virtual machine, the computing node can also create a virtual disk and mount the virtual disk to the virtual machine so that configuration files and business function call requests can be written to the virtual disk later. The virtual machine and the computing node both have read and write permissions to the virtual disk mounted in the virtual machine. The storage space of the virtual disk can be the storage space of the computing node or other accessible storage space in the server cluster.

[0145] S705: The computing node sends the virtual machine deployment result to the management node.

[0146] The virtual machine deployment result is used to indicate the result of the computing node deploying the virtual machine. If the computing node successfully deploys the virtual machine, the computing node sends the virtual machine deployment result indicating the successful deployment to the management node, and continues to step S706. If the virtual machine deployment result indicates that the virtual machine deployment failed, the management node sends an alarm to the technician and suspends the provision of business functions.

[0147] S706: The management node generates a configuration file according to the service parameters and default parameters of the service functions.

[0148] S707: The management node sends the configuration file and the service function call request to the computing node.

[0149] S708: The computing node writes the configuration file and the service function call request into the virtual machine.

[0150] S709: The virtual machine is configured according to the configuration file.

[0151] S710: The virtual machine implements business functions.

[0152] Steps S706-S710 may refer to steps S401-S405 and will not be described in detail here.

[0153] In the embodiment of the present application, after the user selects a business function, a virtual machine capable of implementing the corresponding business function is created according to the user's demand for the business function. Avoid creating a corresponding virtual machine for each business function in the server cluster, which occupies too many server cluster resources. By using the Live CD ISO encapsulated with the program that implements the business function, the Live CD ISO is directly mounted to the virtual machine without installing the operating system in the virtual machine; and the virtual machine can directly provide the user with the corresponding business function by loading the Live CD ISO.

[0154] In some application scenarios, users may need to expand the service functions of a server cluster. The embodiment of the present application provides a method for expanding service functions.

[0155] Users can upload a Live CDISO that encapsulates programs that implement extended business functions on the business function management page, and configure the corresponding business function name and business parameters. The management node sends the Live CD ISO and virtual machine deployment request uploaded by the user to the computing node, and then deploys a virtual machine that can implement extended business functions in the computing node. Then, the management node generates a corresponding configuration file based on the business parameters configured by the user, and sends the configuration file and business function call request to the computing node. The virtual machine in the computing node is configured according to the business parameters configured by the user, and provides the user with extended business functions. The management node can obtain the default parameters of the extended business function by parsing the Live CD ISO uploaded by the user.

[0156] Next, combine Figure 8 The software architecture diagram shown introduces the implementation process of virtual machine configuration from a software perspective.

[0157] The specific steps are as follows:

[0158] The business function management system in the management node sends the configuration file to the node agent in the computing node. If the virtual disk has been created and mounted during the virtual machine deployment process, the node agent can write the configuration file directly to the virtual disk; if the virtual disk has not been created during the virtual machine deployment process, the node agent creates a virtual disk (the space size of the virtual disk is larger than the configuration file size) and writes the configuration file to the virtual disk, and then mounts the virtual disk to the virtual machine. After the virtual machine agent monitors the changes in the storage content of the virtual disk, the virtual machine agent reads the configuration file from the virtual disk and parses the configuration file. The virtual machine agent configures the internal environment and services of the virtual machine based on the parsed results of the configuration file, and writes the configuration results to the virtual disk after the configuration is completed. The node agent continuously monitors the virtual disk, and when it monitors that the virtual machine agent writes the configuration results to the virtual disk, it reads the configuration results and feeds the configuration results back to the business function management system to complete the configuration of the virtual machine.

[0159] In the above process, a virtual disk is created and used as an intermediate medium to establish a communication connection between the virtual agent and the business function management system, thereby realizing automatic configuration of the virtual machine.

[0160] After the virtual machine configuration is completed, the business function management system can directly send the business function call request to the virtual machine agent, or it can send the business function call request to the node agent, and the node agent will write the business function call request to the virtual disk, so that the virtual machine agent receives the business function call request by reading the virtual disk.

[0161] Next, in combination with the above embodiments, the virtual machine configuration method provided by the embodiment of the present application is further introduced. Fig. 9 As shown, Fig. 9 A flowchart of another virtual machine configuration method provided in an embodiment of the present application.

[0162] S901: The user terminal sends a service function call request and service parameters to the management node.

[0163] After the user selects a business function and configures business parameters through the business function management page displayed by the user terminal, the user terminal generates a corresponding business function call request according to the business function selected by the user, and sends the business function call request and business parameters to the management node.

[0164] S902: The management node sends the Live CD ISO and the virtual machine deployment request to the computing node.

[0165] After receiving the service function call request, the management node determines the service function selected by the user, encapsulates the Live CD ISO of the program that implements the service function, and sends the Live CD ISO and the virtual machine deployment request to the computing node at the same time.

[0166] S903: The computing node deploys a virtual machine and mounts the Live CD ISO to the virtual machine.

[0167] The compute node responds to the virtual machine deployment request, creates a virtual machine in the compute node through virtualization technology, and mounts the Live CD ISO to the virtual machine. After the virtual machine is started, it can directly run the operating system without installation.

[0168] S904: The computing node feeds back to the management node a virtual machine deployment result indicating successful deployment of the virtual machine.

[0169] After the computing node successfully deploys the virtual machine, it can feedback the virtual machine deployment result to the management node. The virtual machine deployment result can include the virtual machine identifier and the business functions that the virtual machine can achieve, so that the management node can establish a corresponding relationship table as shown in Table 4 according to the virtual machine deployment result.

[0170] S905: The management node generates a configuration file according to the service parameters and default parameters.

[0171] After the management node determines that the virtual machine is deployed successfully, it generates a configuration file based on the default parameters corresponding to the business functions and the business parameters sent by the user. The configuration file can include complete parameters, that is, a configuration file obtained by replacing the default parameters with the business parameters; it can also include parameters where the business parameters differ from the default parameters.

[0172] S906: The management node sends the configuration file to the computing node.

[0173] S907: The computing node creates a virtual disk and mounts the virtual disk to the virtual machine.

[0174] Both the compute node and the virtual machine have the permission to read and write virtual disks. After the compute node mounts the virtual disk to the virtual machine, it can continuously monitor the virtual disk by cyclically reading the virtual disk data.

[0175] Step S907 may be executed after any one of steps S903 - S906 .

[0176] S908: The computing node writes the configuration file to the virtual disk.

[0177] The computing node can directly encode the configuration file into binary data and write it into the virtual disk; or the computing node can format the virtual disk first, create a file system in the virtual disk, and then write the configuration file into the file system.

[0178] S909: The virtual machine reads the configuration file from the virtual disk.

[0179] As an example, the virtual machine monitors disk changes within the virtual machine. When the newly added disk is a virtual disk sent by the computing node, the virtual machine locks the virtual disk and continuously monitors data changes of the virtual disk. When the virtual machine monitors that the computing node writes a configuration file to the virtual disk, it obtains the configuration file by reading the virtual disk.

[0180] As another example, the virtual machine monitors an internal virtual machine to add a virtual disk, and reads data in the virtual disk to obtain a configuration file.

[0181] S910: The virtual machine is configured according to the configuration file.

[0182] The virtual machine parses the configuration file, and configures the internal environment and default parameters of the virtual machine according to the parsed configuration file to achieve automatic configuration.

[0183] S911: The virtual machine writes the configuration result to the virtual disk.

[0184] After the virtual machine is configured, the configuration result is written to the virtual disk so that the computing nodes can know the configuration result.

[0185] S912: The computing node sends the configuration result to the management node.

[0186] After mounting the virtual disk to the virtual machine, the compute node continuously monitors the data changes of the virtual disk. When the compute node monitors the virtual machine writing configuration results to the virtual disk, the compute node reads the configuration results from the virtual disk and feeds the configuration results back to the management node.

[0187] After receiving the configuration result indicating that the virtual machine configuration is complete, the management node may execute steps S913-S915 or steps S916-S917. Steps S913-S915 are for the management node to indirectly send the service function call request to the virtual machine; S913-S915 are for the management node to directly send the service function call request to the virtual machine.

[0188] S913: The management node sends a service function call request to the computing node.

[0189] After receiving the configuration result indicating that the virtual machine configuration is complete, the management node sends a service function call request to the computing node, and the computing node forwards the service function call request to the virtual disk.

[0190] S914: The computing node writes the service function call request to the virtual disk.

[0191] S915: The virtual machine reads the service function call request and implements the service function.

[0192] When the virtual machine monitors the data change of the virtual disk, it reads the virtual disk to obtain the service function call request. In response to the service function call request, the virtual machine executes the program encapsulated in the Live CD ISO for implementing the service function to provide the user with the service function.

[0193] S916: The management node sends a service function call request to the virtual machine.

[0194] After the virtual machine is configured, it can communicate directly with the management node. The management node can send business function call requests to the virtual machine.

[0195] S917: The virtual machine receives the service function call request and implements the service function.

[0196] After receiving the service function call request, the virtual machine executes the program encapsulated in the Live CD ISO for implementing the service function, thereby providing the service function for the user.

[0197] In a possible implementation, after the service function is implemented, the computing node can shut down the virtual machine and release the resources occupied by the virtual machine and the virtual disk.

[0198] Through the above embodiment, the computing node mounts the Live CD ISO to the deployed virtual machine, and there is no need to install the operating system in the virtual machine. The Live CD ISO encapsulates the program for implementing the business function, and there is no need to install the program for implementing the business function in the virtual machine. In addition, the computing node mounts the virtual disk to the virtual machine to establish a communication connection between the virtual machine and the management node, so that the virtual machine can obtain the configuration file sent by the management node, and then configure the internal environment and services of the virtual machine according to the configuration file, so that the virtual machine can provide business functions that meet the personalized needs of users.

[0199] The above are some specific implementations of the virtual machine configuration method provided in the embodiments of the present application. Based on this, the present application is Figure 1 The server cluster shown is further described:

[0200] The server cluster includes at least a first node (computing node) and a second node (management node), the first node is communicatively connected to the second node, the first node includes a virtual disk, a virtual machine is deployed in the first node, and the virtual disk of the first node is mounted on the virtual machine.

[0201] In a possible implementation, the virtual machine is used to write the configuration result to the virtual disk after the configuration is completed;

[0202] The first node is used to read the configuration result from the virtual disk and send the configuration result to the second node.

[0203] In a possible implementation, the configuration file includes parameters corresponding to the target business function, and a system file is mounted in the virtual machine, where the system file is an operating system file encapsulating a program that implements the target business function.

[0204] In one possible implementation, the first node is used to receive virtual machine deployment instructions and system files sent by the second node; wherein the system file is an operating system file that encapsulates a program that implements a target business function, and the virtual machine deployment instruction is sent by the second node after receiving a business function call request, and the business function call request is used to request to call the target business function; the first node is also used to deploy the virtual machine and mount the system file to the virtual machine.

[0205] In a possible implementation, the virtual machine is used to receive a service function call request after being configured, and provide a target service function for a user according to the service function call request.

[0206] In a possible implementation, the first node is used to receive the service function call request sent by the second node, and write the service function call request into the configured virtual machine.

[0207] In a possible implementation manner, the virtual machine is used to receive the service function calling request sent by the second node after being configured.

[0208] In a possible implementation manner, the virtual disk is created when the first node deploys the virtual machine, or the virtual disk is created according to the size of the configuration file after the first node receives the configuration file.

[0209] The embodiment of the present application also provides a corresponding virtual machine deployment device, which is arranged at the first node, and includes:

[0210] A receiving module, used for receiving a configuration file sent by the second node;

[0211] A read-write module, used for writing the configuration file into a virtual disk, a virtual machine is deployed in the first node, and the virtual disk is mounted on the virtual machine;

[0212] A configuration module is used to read the configuration file from the virtual disk and perform virtual machine configuration based on the configuration file (the configuration module can be set in the virtual machine).

[0213] The present application also provides a corresponding server and computer storage medium, such as Fig.10 As shown, the server 1000 includes: a processor 1001 and a memory 1002;

[0214] The server 1000 includes a processor 1001 and a memory 1002, wherein the memory 1002 is used to store instructions or codes, and the processor 1001 is used to execute the instructions or codes so that the device executes the fault testing method described in any embodiment of the present application.

[0215] The computer storage medium stores instructions. When the instructions are executed, the device executing the instructions implements the fault testing method described in any embodiment of the present application.

[0216] The "first" and "second" in the names such as "first" and "second" (if any) mentioned in the embodiments of the present application are only used as name identifiers and do not represent the first or second in order.

[0217] Through the description of the above implementation methods, it can be known that those skilled in the art can clearly understand that all or part of the steps in the above-mentioned embodiment method can be implemented by means of software plus a general hardware platform. Based on such an understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a storage medium, such as a read-only memory (ROM) / RAM, a magnetic disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network communication device such as a router) to execute the methods described in each embodiment of the present application or some parts of the embodiments.

[0218] Each embodiment in this specification is described in a progressive manner, and the same and similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, 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. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative work.

[0219] The above description is merely an exemplary embodiment of the present application and is not intended to limit the protection scope of the present application.

Claims

1. A virtual machine configuration method, characterized in that: include: The first node receives a configuration file sent by the second node; The first node writes the configuration file into a virtual disk, a virtual machine is deployed in the first node, and the virtual disk is mounted on the virtual machine; The virtual machine reads the configuration file from the virtual disk and performs virtual machine configuration based on the configuration file.

2. The method according to claim 1, characterized in that: After the virtual machine performs virtual machine configuration based on the configuration file, the method further includes: After the virtual machine configuration is completed, the virtual machine writes the configuration result to the virtual disk; The first node reads the configuration result from the virtual disk, and sends the configuration result to the second node.

3. The method according to claim 1, characterized in that The configuration file includes parameters corresponding to the target business function. The virtual machine has a system file mounted therein. The system file is an operating system file encapsulating a program that implements the target business function.

4. The method according to claim 1, characterized in that: The method further comprises: The first node receives a virtual machine deployment instruction and a system file sent by the second node; wherein the system file is an operating system file encapsulating a program that implements a target business function, and the virtual machine deployment instruction is sent by the second node after receiving a business function call request, and the business function call request is used to request to call the target business function; The first node deploys the virtual machine and mounts the system file to the virtual machine.

5. The method according to claim 4, characterized in that After the virtual machine performs virtual machine configuration based on the configuration file, the method further includes: The configured virtual machine receives the service function call request and provides the target service function for the user according to the service function call request.

6. The method according to claim 5, characterized in that The configured virtual machine receiving the service function call request includes: The first node receives the service function calling request sent by the second node, and writes the service function calling request into the configured virtual machine.

7. The method according to claim 5, characterized in that The configured virtual machine receiving the service function call request includes: The configured virtual machine receives the service function calling request sent by the second node.

8. The method according to claim 1, characterized in that: The virtual disk is created when the first node deploys the virtual machine, or the virtual disk is created according to the size of the configuration file after the first node receives the configuration file.

9. A server cluster, characterized in that: The server cluster includes at least a first node and a second node, the first node is in communication connection with the second node, the first node includes a virtual disk, a virtual machine is deployed in the first node, and the virtual disk of the first node is mounted on the virtual machine.

10. A server, characterized in that: The server includes at least one processor and at least one memory, wherein the at least one memory stores computer program instructions; the at least one processor executes the computer program instructions so that the server executes the method according to any one of claims 1 to 8.