CN114461352A - Implementation method for managing virtual machine cluster, computer equipment and storage medium - Google Patents

Implementation method for managing virtual machine cluster, computer equipment and storage medium Download PDF

Info

Publication number
CN114461352A
CN114461352A CN202210386724.9A CN202210386724A CN114461352A CN 114461352 A CN114461352 A CN 114461352A CN 202210386724 A CN202210386724 A CN 202210386724A CN 114461352 A CN114461352 A CN 114461352A
Authority
CN
China
Prior art keywords
virtual machine
mosquitto
theme
management center
qemu
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210386724.9A
Other languages
Chinese (zh)
Other versions
CN114461352B (en
Inventor
杨伟鹏
韩帆
史伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Eflycloud Computing Co Ltd
Original Assignee
Guangdong Eflycloud Computing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Eflycloud Computing Co Ltd filed Critical Guangdong Eflycloud Computing Co Ltd
Priority to CN202210386724.9A priority Critical patent/CN114461352B/en
Publication of CN114461352A publication Critical patent/CN114461352A/en
Application granted granted Critical
Publication of CN114461352B publication Critical patent/CN114461352B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3006Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is distributed, e.g. networked systems, clusters, multiprocessor systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/301Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is a virtual computing platform, e.g. logically partitioned systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3055Monitoring arrangements for monitoring the status of the computing system or of the computing system component, e.g. monitoring if the computing system is on, off, available, not available
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45591Monitoring or debugging support

Abstract

The present application relates to the field of computer technologies, and in particular, to an implementation method, a computer device, and a storage medium for managing a virtual machine cluster. The method is applied to a management center to manage the virtual machine, and comprises the following steps: based on the mosquitto service, setting an agent module on a qemu-agent program of a management tool inside the virtual machine, so that the virtual machine remotely receives a management instruction; and arranging a processing module in the management center, and issuing a command to the virtual machine through the mosquitto. The application improves the stability of the management process by combining the mosquitto, realizes the function of remotely receiving the management instruction by the virtual machine, and realizes the purpose of issuing the command to the virtual machine through the mosquitto. The mqtt protocol replaces the original SSH protocol, so that the failure rate is greatly reduced, the potential safety hazard of data is avoided, the operation and maintenance efficiency is improved, and once abnormity occurs, the operation and maintenance personnel are immediately informed.

Description

Implementation method for managing virtual machine cluster, computer equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to an implementation method, a computer device, and a storage medium for managing a virtual machine cluster.
Background
At present, in the industry, a method for managing or controlling a virtual machine cluster generally uses SSH (Secure Shell, Secure Shell protocol) to log in a host to execute a corresponding qemu-agent command, and when the host and a management center are not in the same network segment, the industry generally adopts three approaches to solve the problem:
1) and constructing a virtual network to enable the host machine and the management center to be in the same network segment.
2) The host machine is exposed to the external network by using an independent IP (Internet protocol), and the management center can directly access the host machine.
3) An SSH transfer server is deployed in a network where a host computer is located and is exposed to an external network by using an independent IP, and after a management center logs in the SSH transfer server by using the SSH, the management center further logs in the host computer by using the SSH.
Referring to fig. 1, there are two ways for a conventional industry management center to manage a Virtual Machine (VM):
logging in a host machine through an independent IP or VPN network SSH, executing a qemu-agent-command control program on the host machine, sending commands (restarting, shutting down, returning to the state and the like) to be executed to a qemu-agent process in a Virtual Machine (VM), and executing corresponding operation after the qemu-agent process receives the commands.
And secondly, deploying an SSH relay server. The management center SSH logs in an SSH relay server, further logs in a host computer through the SSH, executes a qemu-agent-command control program on the host computer, sends commands (such as restarting, shutdown and returning states) to be executed to a qemu-agent process in a Virtual Machine (VM), and executes corresponding operations after the qemu-agent process receives the commands.
The first method described above has the following problems:
(1) the virtual network VPN construction cost is high, the operation and maintenance cost is high, the bandwidth occupied by the qemu-agent command is extremely low, and the cost investment is asymmetric.
(2) When the number of hosts is excessive, the consumption of independent IP resources is large.
(3) The SSH protocol bottom layer is a TCP protocol, and a management center needs to maintain a large number of TCP protocols for managing the communication of a plurality of host machines.
The second method described above has the following problems:
the SSH protocol is unstable under bad network conditions, and multiple SSH hops increase process uncertainty.
Therefore, in both of the above two modes, the host executes qemu-agent-command to control the Virtual Machine (VM), and the host can observe the instruction sent by the management center to the Virtual Machine (VM), as shown in fig. 2, there is a data security risk.
Disclosure of Invention
In order to solve the problems that a host machine executes qemu-agent-command to control a Virtual Machine (VM) and a host machine can observe an instruction sent by a management center to the Virtual Machine (VM) and has potential data safety hazards, the application constructs an implementation method, computer equipment and a storage medium for managing a qemu virtual machine cluster based on mosquitto, utilizes a subscription-release mode of an mqtt protocol and a QoS (quality of service) service quality function, directly communicates with the management center through a mosquitto service, and meets the requirements of low cost, stable service and network safety.
The method is realized by adopting the following technical scheme:
an implementation method for managing a virtual machine cluster is applied to a management center to manage virtual machines, and comprises the following steps:
setting an agent module on a qemu-agent program of a management tool inside the virtual machine based on the mosquitto service, so that the virtual machine remotely receives a management instruction;
and arranging a processing module in the management center, and issuing a command to the virtual machine through the mosquitto.
Optionally, in the implementation method for managing a virtual machine cluster, a processing module is set on a qemu-agent-command control program of the management center.
Optionally, the setting of the agent module on the qemu-agent program of the internal management tool of the virtual machine includes:
after the internal system of the virtual machine is started and the qemu-agent is successfully operated, checking whether a certificate file exists or not, and if not, downloading the certificate file from a specified http service;
the method comprises the steps of obtaining a user name of an internal system of the virtual machine, and subscribing a private subject consistent with the user name in the mosquitto;
subscribing a public theme in the mosquitto, and monitoring and receiving messages of the private theme and the public theme by using a single thread;
and analyzing the message content, converting the format, executing the command, repackaging the result and sending the repackaged result to the corresponding theme.
Optionally, the certificate file is used for encrypting mqtt communication network connection and identity authentication.
Optionally, the private theme is used to receive an operation command issued by the management center to the virtual machine separately.
Optionally, the common theme is used for receiving a mass-sending command of the management center.
Optionally, the conversion format is a format that can be recognized by the original qemu-agent program.
Optionally, the setting a processing module in the management center includes:
creating a common theme at a management center;
creating a private theme according to the virtual machine name;
issuing the operation command to the corresponding public theme and the private theme;
analyzing the returned result, and displaying the result to operation and maintenance personnel on an interface;
and checking the running state of the mosquitto service, and immediately notifying operation and maintenance personnel when the running state is abnormal.
Optionally, the operation and maintenance personnel manage the virtual machine from an interface of the management center.
The present application also includes a computer device comprising: at least one processor, and a memory communicatively coupled to the at least one processor, wherein the memory stores instructions executable by the at least one processor, the instructions being executable by the at least one processor to cause the at least one processor to perform the method for implementing a cluster of management virtual machines.
The present application also includes a computer-readable storage medium having stored thereon computer instructions for causing the computer to perform the method of implementing the management of a cluster of virtual machines.
The technical scheme provided by the application has the following beneficial effects:
the implementation method, the computer device and the storage medium for managing the virtual machine cluster are combined with mosquitto improve the stability of a management process, the management instruction function of remote receiving of a Virtual Machine (VM) is achieved through an agent module arranged for a qemu-agent program of a management tool inside the virtual machine, a processing module is arranged on a qemu-agent-command control program of a management center, the purpose that a command is issued to the Virtual Machine (VM) through the mosquitto is achieved, the original SSH protocol is replaced through the mqtt protocol for use, the fault rate is greatly reduced, the potential safety hazard of data is avoided, meanwhile, the operation and maintenance efficiency is improved, and once abnormality occurs, operation and maintenance personnel are immediately notified.
These and other aspects of the present application will be more readily apparent from the following description of the embodiments. It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related art, the drawings needed to be used in the description of the exemplary embodiments or the related art will be briefly introduced below, which are used to provide further understanding of the present application and constitute a part of the specification, and together with the embodiments of the present application, serve to explain the present application and not to limit the present application. In the drawings:
fig. 1 is a schematic diagram illustrating logic principles of two manners of managing virtual machines by an industry management center.
Fig. 2 is a schematic diagram illustrating a logic principle of a manner in which a conventional industry management center manages a virtual machine to receive commands.
Fig. 3 is a flowchart of an implementation method for managing a virtual machine cluster according to the present application.
Fig. 4 is a flowchart of setting an agent module in an implementation method for managing a virtual machine cluster according to the present application.
Fig. 5 is a schematic logic diagram illustrating mosquitto as an mqtt communication intermediary in an implementation method for managing a virtual machine cluster according to the present application.
Fig. 6 is a flowchart of a setting processing module in an implementation method for managing a virtual machine cluster according to the present application.
Fig. 7 is a schematic logic diagram illustrating a manner in which a virtual machine receives a command in an implementation method for managing a virtual machine cluster according to the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
In some of the flows described in the specification and claims of this application and in the above-described figures, a number of operations are included that occur in a particular order, but it should be clearly understood that these operations may be performed out of order or in parallel as they occur herein, the number of operations, e.g., 101, 102, etc., merely being used to distinguish between various operations, and the number itself does not represent any order of performance. Additionally, the flows may include more or fewer operations, and the operations may be performed sequentially or in parallel. It should be noted that, the descriptions of "first", "second", etc. in this document are used for distinguishing different messages, devices, modules, etc., and do not represent a sequential order, nor limit the types of "first" and "second" to be different.
The technical solutions in the exemplary embodiments of the present application will be clearly and completely described below with reference to the drawings in the exemplary embodiments of the present application, and it is obvious that the described exemplary embodiments are only a part of the embodiments of the present application, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Due to the current way of managing or controlling the virtual machine cluster in the industry, it is common to log in the host to execute the corresponding qemu-agent command by using SSH (Secure Shell protocol). The existing industry management center manages Virtual Machines (VMs) in two ways. The first mode is that the user logs in a host machine through an independent IP or VPN network SSH, a qemu-agent-command control program is executed on the host machine, and commands (restarting, shutting down, returning to the state and the like) to be executed are sent to a qemu-agent process in a Virtual Machine (VM), when the qemu-agent process executes corresponding operation after receiving the commands, the construction cost of the virtual network VPN is high, the operation and maintenance cost is high, the bandwidth occupied by the qemu-agent commands is extremely low, and the cost investment is asymmetric; when the number of host machines is excessive, the consumption of independent IP resources is large; and the SSH protocol bottom layer is a TCP protocol, and the management center manages the communication of a plurality of host machines and needs to maintain a large amount of TCP protocols.
The second way is to deploy the SSH relay server. The management center SSH logs in an SSH relay server, further SSH logs in a host machine, a qemu-agent-command control program is executed on the host machine, commands (restarting, shutting down, returning to the state and the like) to be executed are sent to a qemu-agent process in a Virtual Machine (VM), when the qemu-agent process executes corresponding operations after receiving the commands, an SSH protocol is unstable under the condition of poor network, and multi-stage SSH jumps increase process uncertainty.
Aiming at the problem that the host machine executes qemu-agent-command to control the Virtual Machine (VM) finally, and the host machine can observe the potential data safety hazard caused by the instruction sent by the management center to the Virtual Machine (VM).
According to the implementation method, the computer device and the storage medium for managing the virtual machine cluster, the subscription-release mode of the mqtt protocol and the QoS (quality of service) service quality function are utilized, direct communication with the management center is achieved through the mosquitto service, and the requirements for low cost, stable service and network safety are met.
It should be specifically noted that, in the present application:
mosquitto, as an open source message server software for implementing a message push protocol MQTT v3.1, provides a lightweight message push mode supporting publishable/subscribeable messages, and simplifies short message communication between devices, such as low-power-consumption sensors, mobile phones, embedded computers, microcontrollers and other mobile devices which are widely used at present.
qemu acts as an open source simulator and Virtual Machine Monitor (VMM). The Qemu Guest Agent is QGA for short, is a daemon process running in a virtual machine, and can manage an application program and execute a command sent by a host machine.
qemu-agent is used as a daemon program (qemu-Guest-agent service) running inside the virtual machine, and is used for assisting qemu to realize the management of Guest. Qemu provides a data channel (channel) for the host and the virtual machine, and the two ends of the channel are a serial port seen in the virtual machine and an unix socket file seen on the host respectively. The host machine and the QGA in the virtual machine are communicated, so that the control capability of the virtual machine is expanded, for example, the ip address of the virtual machine is obtained on the host machine.
The management center is a service system composed of a plurality of service programs and components, and operation and maintenance personnel manage Virtual Machines (VMs) from an interface of the management center.
The technical scheme of the application is further explained by combining the specific embodiment as follows:
referring to fig. 3, fig. 3 is a flowchart illustrating an implementation method of managing a virtual machine cluster according to the present application. An embodiment of the present application provides an implementation method for managing a virtual machine cluster, which is applied to a management center for managing virtual machines, and includes the following steps S10-S20.
S10, setting an agent module on a qemu-agent program of a management tool inside the virtual machine based on the mosquitto service, and enabling the virtual machine to receive a management instruction remotely.
Referring to fig. 4, fig. 4 is a flowchart illustrating setting of an agent module in an implementation method for managing a virtual machine cluster according to the present application. The method for setting the agent module on the qemu-agent program of the internal management tool of the virtual machine comprises the following steps:
s101, after the internal system of the virtual machine is started and the qemu-agent is successfully operated, checking whether a certificate file exists or not, and if not, downloading the certificate file from a specified http service;
s102, obtaining a user name of an internal system of the virtual machine, and subscribing a private theme consistent with the user name in the mosquitto;
s103, subscribing a public theme in the mosquitto, and monitoring and receiving messages of the private theme and the public theme by using a single thread;
and S104, analyzing the message content, converting the format, executing the command, repackaging the result and sending the repackaged result to the corresponding theme.
The embodiment of the application realizes the function of remotely receiving the management instruction by the Virtual Machine (VM) by adding the qemu agent program network function. Referring to fig. 5, fig. 5 is a schematic diagram illustrating a logical principle of using mosquitto as an mqtt communication intermediary in an implementation method for managing a virtual machine cluster according to the present application. The functional process for realizing the remote receiving and management instruction of the Virtual Machine (VM) is as follows:
1) after a system in a Virtual Machine (VM) is started and a qemu agent is successfully operated, whether a certificate file exists is checked, if not, the certificate files ca.crt, client.csr and client.key are downloaded from a specified http service and are used for encrypting mqtt communication network connection and identity authentication.
2) The method comprises the steps of acquiring a user name of an internal system of a Virtual Machine (VM), and subscribing the 'private subject' in mosquitto, which is the same as the user name. The "private topic" is used to receive an operation command issued by the management center to the Virtual Machine (VM) alone.
3) Subscribe to "public topics" in mosquitto. For receiving mass-sending commands from the management center.
4) A separate thread is used to listen for messages that receive the subject.
5) And analyzing the message content and converting the message content into a format which can be identified by the original qemu agent program.
6) The command is executed and the result is repackaged and sent to the corresponding topic.
In an embodiment of the application, the certificate file is used for encrypting mqtt communication network connection and identity authentication.
In an embodiment of the present application, the private topic is used to receive an operation command issued by a management center to the virtual machine individually.
In an embodiment of the application, the common theme is used for receiving a mass-sending command of a management center.
In the embodiment of the application, the conversion format is a format which can be identified by the original qemu-agent program.
And S20, setting a processing module in the management center, and issuing a command to the virtual machine through the mosquitto.
In an embodiment of the present application, in the implementation method for managing a virtual machine cluster, a processing module is set on a qemu-agent-command control program of the management center.
Referring to fig. 6, fig. 6 is a flowchart illustrating a processing module in an implementation method for managing a virtual machine cluster according to the present application. The setting of the processing module in the management center comprises:
s201, creating a public theme in a management center;
s202, creating a private theme according to the name of the virtual machine;
s203, issuing the operation command to the corresponding public theme and the private theme;
s204, analyzing the returned result, and displaying the result to operation and maintenance personnel on an interface;
s205, checking the running state of the mosquitto service, and immediately notifying operation and maintenance personnel when the running state is abnormal.
In the embodiment of the application, the operation and maintenance personnel manage the virtual machine from an interface of a management center.
The management center is a service system composed of a plurality of service programs and components, and operation and maintenance personnel manage Virtual Machines (VMs) from an interface of the management center. A processing module is arranged in a management center, and the purpose that commands are issued to a Virtual Machine (VM) through mosquitto replaces the original method of using SSH is achieved.
Referring to fig. 7, fig. 7 is a schematic diagram illustrating a logic principle of a manner in which a virtual machine receives a command in an implementation method for managing a virtual machine cluster according to the present application. The process of issuing commands to Virtual Machines (VMs) through mosquitto is implemented as follows:
(1) a "common theme" is created.
(2) A "private theme" is created from the virtual machine name.
(3) And issuing the operation command to the corresponding theme.
(4) And analyzing the returned result, and displaying the result to operation and maintenance personnel on an interface.
(5) And checking the running state of the mosquitto service, and immediately notifying operation and maintenance personnel once an abnormality occurs.
It should be understood that although the steps are described above in a certain order, the steps are not necessarily performed in the order described. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, some steps of the present embodiment may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of performing the steps or stages is not necessarily sequential, but may be performed alternately or in turns with other steps or at least a part of the steps or stages in other steps.
In an embodiment, there is further provided a computer device including at least one processor, and a memory communicatively connected to the at least one processor, where the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to cause the at least one processor to execute the implementation method for managing virtual machine clusters, and the processor executes the instructions to implement the steps in the method embodiments:
setting an agent module on a qemu-agent program of a management tool inside the virtual machine based on the mosquitto service, so that the virtual machine remotely receives a management instruction;
and arranging a processing module in the management center, and issuing a command to the virtual machine through the mosquitto.
The method for setting the agent module on the qemu-agent program of the internal management tool of the virtual machine comprises the following steps:
after the internal system of the virtual machine is started and the qemu-agent is successfully operated, checking whether a certificate file exists or not, and if not, downloading the certificate file from a specified http service;
the method comprises the steps of obtaining a user name of an internal system of the virtual machine, and subscribing a private subject consistent with the user name in the mosquitto;
subscribing a public theme in the mosquitto, and monitoring and receiving messages of the private theme and the public theme by using a single thread;
and analyzing the message content, converting the format, executing the command, repackaging the result and sending the repackaged result to the corresponding theme.
Wherein, set up processing module in management center, include:
creating a common theme at a management center;
creating a private theme according to the virtual machine name;
issuing the operation command to the corresponding public theme and the private theme;
analyzing the returned result, and displaying the result to operation and maintenance personnel on an interface;
and checking the running state of the mosquitto service, and immediately notifying operation and maintenance personnel when the running state is abnormal.
In one embodiment, a computer-readable storage medium is provided, which stores computer instructions for causing the computer to execute the implementation method for managing virtual machine clusters, the steps are:
setting an agent module on a qemu-agent program of a management tool inside the virtual machine based on the mosquitto service, so that the virtual machine remotely receives a management instruction;
and arranging a processing module in the management center, and issuing a command to the virtual machine through the mosquitto.
The method for setting the agent module on the qemu-agent program of the internal management tool of the virtual machine comprises the following steps:
after the internal system of the virtual machine is started and the qemu-agent is successfully operated, checking whether a certificate file exists or not, and if not, downloading the certificate file from a specified http service;
the method comprises the steps of obtaining a user name of an internal system of the virtual machine, and subscribing a private subject consistent with the user name in the mosquitto;
subscribing a public theme in the mosquitto, and monitoring and receiving messages of the private theme and the public theme by using a single thread;
and analyzing the message content, converting the format, executing the command, repackaging the result and sending the repackaged result to the corresponding theme.
Wherein, set up processing module in management center, include:
creating a common theme at a management center;
creating a private theme according to the virtual machine name;
issuing the operation command to the corresponding public theme and the private theme;
analyzing the returned result, and displaying the result to operation and maintenance personnel on an interface;
and checking the running state of the mosquitto service, and immediately notifying operation and maintenance personnel when the running state is abnormal.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program represented by computer instructions and stored in a non-volatile computer-readable storage medium, and the computer program can include the processes of the embodiments of the methods described above when executed. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include at least one of non-volatile and volatile memory.
Non-volatile memory may include read-only memory, magnetic tape, floppy disk, flash memory, optical storage, or the like. Volatile memory may include random access memory or external cache memory. By way of illustration, and not limitation, RAM can take many forms, such as static random access memory, dynamic random access memory, and the like.
To sum up, the technical scheme provided by the application has the following advantages:
the implementation method, the computer device and the storage medium for managing the virtual machine cluster are combined with mosquitto improve the stability of a management process, the management instruction function of remote receiving of a Virtual Machine (VM) is achieved through an agent module arranged for a qemu-agent program of a management tool inside the virtual machine, a processing module is arranged on a qemu-agent-command control program of a management center, the purpose that a command is issued to the Virtual Machine (VM) through the mosquitto is achieved, the original SSH protocol is replaced through the mqtt protocol for use, the fault rate is greatly reduced, the potential safety hazard of data is avoided, meanwhile, the operation and maintenance efficiency is improved, and once abnormality occurs, operation and maintenance personnel are immediately notified.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (10)

1. An implementation method for managing a virtual machine cluster is applied to a management center to manage virtual machines, and comprises the following steps:
setting an agent module on a qemu-agent program of a management tool inside the virtual machine based on the mosquitto service, so that the virtual machine remotely receives a management instruction;
and arranging a processing module in the management center, and issuing a command to the virtual machine through the mosquitto.
2. An implementation method for managing a virtual machine cluster according to claim 1, further comprising: and setting a processing module on a qemu-agent-command control program of the management center.
3. The method of claim 1, wherein the setting up the agent module on the qemu-agent program comprises:
after the internal system of the virtual machine is started and the qemu-agent is successfully operated, checking whether a certificate file exists or not, and if not, downloading the certificate file from a specified http service;
the method comprises the steps of obtaining a user name of an internal system of the virtual machine, and subscribing a private subject consistent with the user name in the mosquitto;
subscribing a public theme in the mosquitto, and monitoring and receiving messages of the private theme and the public theme by using a single thread;
and analyzing the message content, converting the format, executing the command, repackaging the result and sending the repackaged result to the corresponding theme.
4. An implementation method of managing a virtual machine cluster as claimed in claim 3, wherein the certificate file is used for encryption mqtt communication network connection and authentication.
5. An implementation method for managing a cluster of virtual machines according to claim 3, characterized in that said private theme is used to receive operation commands issued by a management center to said virtual machines individually.
6. An implementation method of managing a virtual machine cluster according to claim 3, characterized in that said common theme is used to receive mass-sent commands of a management center.
7. The method of claim 3, wherein the converted format is a format that is recognizable by an existing qemu-agent program.
8. An implementation method for managing a virtual machine cluster according to claim 1 or 2, wherein the setting of a processing module in a management center comprises:
creating a common theme at a management center;
creating a private theme according to the virtual machine name;
issuing the operation command to the corresponding public theme and the private theme;
analyzing the returned result, and displaying the result to operation and maintenance personnel on an interface;
and checking the running state of the mosquitto service, and immediately notifying operation and maintenance personnel when the running state is abnormal.
9. A computer device, comprising: at least one processor, and a memory communicatively coupled to the at least one processor, wherein the memory stores instructions executable by the at least one processor to cause the at least one processor to perform the method of any of claims 1 to 8.
10. A computer-readable storage medium having stored thereon computer instructions for causing a computer to perform the method of any of claims 1 to 8 for implementing a management virtual machine cluster.
CN202210386724.9A 2022-04-14 2022-04-14 Implementation method for managing virtual machine cluster, computer equipment and storage medium Active CN114461352B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210386724.9A CN114461352B (en) 2022-04-14 2022-04-14 Implementation method for managing virtual machine cluster, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210386724.9A CN114461352B (en) 2022-04-14 2022-04-14 Implementation method for managing virtual machine cluster, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114461352A true CN114461352A (en) 2022-05-10
CN114461352B CN114461352B (en) 2022-07-29

Family

ID=81418620

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210386724.9A Active CN114461352B (en) 2022-04-14 2022-04-14 Implementation method for managing virtual machine cluster, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114461352B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106059777A (en) * 2016-08-23 2016-10-26 浪潮电子信息产业股份有限公司 Design method for trusted middleware of cloud platform
CN106528264A (en) * 2016-10-24 2017-03-22 许小刚 Intelligent terminal operation system applied to IoT (Internet of Things)
CN107704312A (en) * 2017-10-18 2018-02-16 顺丰科技有限公司 A kind of qemu kvm virtual machines is performed any order method and storage medium
CN113162970A (en) * 2021-01-27 2021-07-23 中央财经大学 Message routing method, device, equipment and medium based on publish/subscribe model
CN114201263A (en) * 2021-12-06 2022-03-18 上海中通吉网络技术有限公司 Edge application management method based on cloud computing
US20220107845A1 (en) * 2020-10-05 2022-04-07 Cachengo, Inc. Integrated edge cloud architecture

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106059777A (en) * 2016-08-23 2016-10-26 浪潮电子信息产业股份有限公司 Design method for trusted middleware of cloud platform
CN106528264A (en) * 2016-10-24 2017-03-22 许小刚 Intelligent terminal operation system applied to IoT (Internet of Things)
CN107704312A (en) * 2017-10-18 2018-02-16 顺丰科技有限公司 A kind of qemu kvm virtual machines is performed any order method and storage medium
US20220107845A1 (en) * 2020-10-05 2022-04-07 Cachengo, Inc. Integrated edge cloud architecture
CN113162970A (en) * 2021-01-27 2021-07-23 中央财经大学 Message routing method, device, equipment and medium based on publish/subscribe model
CN114201263A (en) * 2021-12-06 2022-03-18 上海中通吉网络技术有限公司 Edge application management method based on cloud computing

Non-Patent Citations (6)

* Cited by examiner, † Cited by third party
Title
DA-HYE KIM 等: "Enhanced industrial message protocol for real-time IoT platform", 《2018 INTERNATIONAL CONFERENCE ON ELECTRONICS, INFORMATION, AND COMMUNICATION (ICEIC)》 *
GABRIEL LOEWEN 等: "Designing a Middleware API for Building Private IaaS Cloud Architectures", 《2013 IEEE 33RD INTERNATIONAL CONFERENCE ON DISTRIBUTED COMPUTING SYSTEMS WORKSHOPS》 *
于颖超 等: "嵌入式设备固件安全分析技术研究", 《计算机学报》 *
孙健波: "PaaS云平台自动化部署和监控的设计与实现", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *
李娜 等: "MQTT数据交换协议的分析与优化", 《网络空间安全》 *
贾凡 等: "基于MQTT的工业物联网通信***研究与实现", 《智能科学与技术学报》 *

Also Published As

Publication number Publication date
CN114461352B (en) 2022-07-29

Similar Documents

Publication Publication Date Title
CN106331098B (en) Server cluster system
CN106844137B (en) Server monitoring method and device
US8910129B1 (en) Scalable control system for test execution and monitoring utilizing multiple processors
CN100426751C (en) Method for ensuring accordant configuration information in cluster system
CN106911648B (en) Environment isolation method and equipment
CN105022659B (en) virtual machine state control method and system
CN111698283B (en) Management and control method, device, equipment and storage medium of distributed cluster host
CN103677858A (en) Method, system and device for managing virtual machine software in cloud environment
CN103067501B (en) The large data processing method of PaaS platform
WO2017049997A1 (en) Virtual machine monitoring method, apparatus and system based on cloud computing service
US8925066B2 (en) Provisioning proxy for provisioning data on hardware resources
CN109684038B (en) Docker service container log processing method and device and electronic equipment
US20120233628A1 (en) Out-of-band host management via a management controller
CN103595801A (en) Cloud computing system and real-time monitoring method for virtual machine in cloud computing system
CN111966465B (en) Method, system, equipment and medium for modifying host configuration parameters in real time
CN112491980A (en) Cloud host service management method, system, terminal and storage medium
WO2020255072A1 (en) Control configuration for a plurality of endpoint devices
CN111818081B (en) Virtual encryption machine management method, device, computer equipment and storage medium
CN114461352B (en) Implementation method for managing virtual machine cluster, computer equipment and storage medium
CN103309722A (en) Cloud computation system and application access method thereof
JP2006113754A (en) Software update device and method
CN108804147A (en) Link closedown method, device and client
CN109379383B (en) Virtual private network VPN client and implementation method
CN110768855B (en) Method and device for testing linkmzation performance
CN114531443B (en) Container control method and system based on cluster

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant