CN113568710A - Method, device and equipment for realizing high availability of virtual machine - Google Patents

Method, device and equipment for realizing high availability of virtual machine Download PDF

Info

Publication number
CN113568710A
CN113568710A CN202110886980.XA CN202110886980A CN113568710A CN 113568710 A CN113568710 A CN 113568710A CN 202110886980 A CN202110886980 A CN 202110886980A CN 113568710 A CN113568710 A CN 113568710A
Authority
CN
China
Prior art keywords
virtual machine
fingerprint information
state fingerprint
node
machine node
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
CN202110886980.XA
Other languages
Chinese (zh)
Other versions
CN113568710B (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.)
Individual
Original Assignee
Individual
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 Individual filed Critical Individual
Priority to CN202110886980.XA priority Critical patent/CN113568710B/en
Publication of CN113568710A publication Critical patent/CN113568710A/en
Application granted granted Critical
Publication of CN113568710B publication Critical patent/CN113568710B/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
    • 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
    • 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/45595Network integration; Enabling network access in virtual machine instances
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Hardware Redundancy (AREA)

Abstract

The invention discloses a method and a device for realizing high availability of a virtual machine, wherein the method comprises the following steps: establishing a special synchronous network of a virtual machine cluster, and establishing connection between each virtual machine node in the virtual machine cluster and the special synchronous network; acquiring current attribute information of each virtual machine node, and calculating state fingerprint information of the current attribute information; voting the state fingerprint information of all the virtual machine nodes based on a majority average voting algorithm model, and taking the virtual machine node with the most votes as a synchronous sample; and synchronizing the sample state fingerprint information of the virtual machine node with the most votes to other virtual machine nodes in the virtual machine cluster. If the virtual machine node connected currently by the user is interrupted due to a fault, the user can directly reconnect to any virtual machine node in the cluster based on the information synchronization mechanism of the special synchronization network, and no data is lost, so that the reliability of the user in switching the virtual machine nodes is greatly improved.

Description

Method, device and equipment for realizing high availability of virtual machine
Technical Field
The invention belongs to the technical field of computers, and particularly relates to a method, a device and equipment for realizing high availability of a virtual machine.
Background
The virtual machine HA (High Availability) function refers to a function of providing High Availability to an application program running on a virtual machine. If a server fails, the affected virtual machines will restart on other production servers with excess capacity, effectively reducing down time and service interruption time.
The HA function allows a virtual machine on a virtualized host (a physical server with virtualized software installed, the same applies below) that HAs a failure to be started on another virtualized host under resource permission in a cluster, and service time intervals therebetween are: VM system boot time + application boot time + heartbeat detection time, which typically does not exceed 15 seconds, typically this total interrupt time can be kept within 3 minutes.
In the prior art, a common HA operating mechanism is that an agent program placed on each virtualized host continuously sends a "heartbeat signal" to other hosts in a cluster, and once the "heartbeat signal" is terminated, all affected virtual machines are restarted on the other hosts. For example, in the most common VMware virtualization software at present, the running state of the virtual machine may be monitored by installing VMtools, and a monitoring signal is sent by the VMtools, and if no signal is received within a specified time, it indicates that the virtualization host is abnormal, and the above virtual machine will be automatically restarted.
However, the above virtual machine synchronization method cannot guarantee strict synchronization between user operations and data, and when a virtual machine fails to perform switching, data is always lost, which results in a poor synchronization effect.
Disclosure of Invention
The invention aims to provide a method, a device and equipment for realizing high availability of a virtual machine, which are used for solving at least one technical problem in the prior art.
In order to achieve the purpose, the invention adopts the following technical scheme:
in a first aspect, the present invention provides a method for implementing high availability of a virtual machine, including:
establishing a special synchronous network of a virtual machine cluster, and establishing connection between each virtual machine node in the virtual machine cluster and the special synchronous network;
acquiring current attribute information of each virtual machine node, and calculating state fingerprint information of the current attribute information;
voting the state fingerprint information of all the virtual machine nodes based on a majority average voting algorithm model, and taking the virtual machine node with the most votes as a synchronous sample;
and synchronizing the sample state fingerprint information of the virtual machine node with the most votes to other virtual machine nodes in the virtual machine cluster.
In one possible design, the method further includes:
checking the synchronous result of the sample state fingerprint information;
and when the state fingerprint information after synchronization of a certain virtual machine node is different from the sample state fingerprint information, the state fingerprint information of the virtual machine node is synchronized again.
In one possible design, establishing a connection between each virtual machine node in a cluster of virtual machines and the private synchronous network includes:
adding respective synchronous network cards for each virtual machine node in the virtual machine cluster;
and each virtual machine node establishes connection with the special synchronous network through a respective synchronous network card.
In one possible design, calculating the state fingerprint information for the current attribute information includes:
updating the state fingerprint information based on the current attribute information;
calculating each one-way characteristic fingerprint information of the state fingerprint information by utilizing a Hash algorithm;
and splicing and synthesizing each piece of the one-way characteristic fingerprint information to obtain a state fingerprint matrix corresponding to the virtual machine node.
In one possible design, voting the state fingerprint information of all the virtual machine nodes based on a majority average voting algorithm model, and taking the virtual machine node with the most votes as a synchronous sample, includes:
acquiring a state fingerprint matrix of each virtual machine node by using a resolver in a resolver server;
comparing the characteristic values of the state fingerprint matrixes, and counting the virtual machine nodes with the same characteristic values;
setting the weight of each virtual machine node; the weight of the virtual machine node which is connected with the user is larger than that of the virtual machine node which is not connected with the user;
and performing weighting calculation on all the virtual machine nodes, acquiring the virtual machine nodes with the most votes obtained through normalization after weighting, and taking the virtual machine nodes as synchronous samples.
In one possible design, counting virtual machine nodes having the same characteristic value includes:
setting a counter and a variable maj ority for storing the most characteristic values;
if the count is equal to 0, setting the current value as the current characteristic value of the array, and assigning the maj authority as 1;
if the maj authority is the same as the current characteristic value of the array, adding one to the number of the counts, otherwise, subtracting one from the number of the counts;
repeating the steps until the array is scanned;
if the value of the count is 0, scanning the array from the head again, and if the characteristic value of the array is the same as the value of the maj ority, adding one to the number of the count until the array is scanned;
if the value of the count is more than or equal to n/2, returning the value of the maj ority, otherwise, returning to-1, wherein n is the total ticket number.
In one possible design, the current attribute information includes user input information and current state information.
In a second aspect, the present invention provides an apparatus for implementing high availability of a virtual machine, including:
the network connection module is used for constructing a special synchronous network of the virtual machine cluster and establishing connection between each virtual machine node in the virtual machine cluster and the special synchronous network;
the state fingerprint calculation module is used for acquiring the current attribute information of each virtual machine node and calculating the state fingerprint information of the current attribute information;
the voting module is used for voting the state fingerprint information of all the virtual machine nodes based on a majority average voting algorithm model, and taking the virtual machine node with the most votes as a synchronous sample;
and the information synchronization module is used for synchronizing the sample state fingerprint information of the virtual machine node with the most votes to other virtual machine nodes in the virtual machine cluster.
In one possible design, the apparatus further includes:
the verification module is used for verifying the synchronous result of the sample state fingerprint information;
and the secondary synchronization module is used for synchronizing the state fingerprint information of the virtual machine node again when the synchronized state fingerprint information of the virtual machine node is different from the sample state fingerprint information.
In one possible design, when each virtual machine node in the virtual machine cluster is connected to the private synchronous network, the network connection module is specifically configured to:
adding respective synchronous network cards for each virtual machine node in the virtual machine cluster;
and each virtual machine node establishes connection with the special synchronous network through a respective synchronous network card.
In one possible design, when calculating the state fingerprint information of the current attribute information, the state fingerprint calculation module is specifically configured to:
updating the state fingerprint information based on the current attribute information;
calculating each one-way characteristic fingerprint information of the state fingerprint information by utilizing a Hash algorithm;
and splicing and synthesizing each piece of the one-way characteristic fingerprint information to obtain a state fingerprint matrix corresponding to the virtual machine node.
In one possible design, when voting is performed on state fingerprint information of all virtual machine nodes based on a majority average voting algorithm model, and the virtual machine node having the most votes is used as a synchronization sample, the voting module is specifically configured to:
acquiring a state fingerprint matrix of each virtual machine node by using a resolver in a resolver server;
comparing the characteristic values of the state fingerprint matrixes, and counting the virtual machine nodes with the same characteristic values;
setting the weight of each virtual machine node; the weight of the virtual machine node which is connected with the user is larger than that of the virtual machine node which is not connected with the user;
and performing weighting calculation on all the virtual machine nodes to obtain the virtual machine nodes with the most normalized votes after weighting.
In one possible design, counting virtual machine nodes having the same characteristic value includes:
setting a counter and a variable maj ority for storing the most characteristic values;
if the count is equal to 0, setting the current value as the current characteristic value of the array, and assigning the maj authority as 1;
if the maj authority is the same as the current characteristic value of the array, adding one to the number of the counts, otherwise, subtracting one from the number of the counts;
repeating the steps until the array is scanned;
if the value of the count is 0, scanning the array from the head again, and if the characteristic value of the array is the same as the value of the maj ority, adding one to the number of the count until the array is scanned;
if the value of the count is more than or equal to n/2, returning the value of the maj ority, otherwise, returning to-1, wherein n is the total ticket number.
In one possible design, the current attribute information includes user input information and current state information.
In a third aspect, the present invention provides a computer apparatus comprising: a memory, a processor and a transceiver, which are connected in sequence in communication, wherein the memory is used for storing a computer program, the transceiver is used for transceiving a message, and the processor is used for reading the computer program and executing the virtual machine high availability implementation method as described in any one of the possible designs of the first aspect.
In a fourth aspect, the present invention provides a computer-readable storage medium having stored thereon instructions which, when executed on a computer, perform the method for high availability implementation of a virtual machine as described in any one of the possible designs of the first aspect.
In a fifth aspect, the present invention provides a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of virtual machine high availability implementation as described in any one of the possible designs of the first aspect.
Has the advantages that:
according to the method, a special synchronous network of the virtual machine cluster is established, and each virtual machine node in the virtual machine cluster is connected with the special synchronous network, so that all virtual machine nodes in the virtual machine cluster can realize subsequent background synchronization of state fingerprint information through the special synchronous network; acquiring current attribute information of each virtual machine node, and calculating state fingerprint information of the current attribute information; voting the state fingerprint information of all the virtual machine nodes based on a majority average voting algorithm model, and taking the virtual machine node with the most votes as a synchronous sample; and synchronizing the sample state fingerprint information of the virtual machine node with the most votes to other virtual machine nodes in the virtual machine cluster. When a user uses the virtual machine cluster, if the virtual machine node connected with the user currently is interrupted due to a fault, the user can directly reconnect to any virtual machine node in the cluster based on the information synchronization mechanism of the special synchronization network, and the current working state information of the user is stored in each virtual machine node, so that no data loss exists, the reliability of the user in switching the virtual machine nodes is greatly improved, and the user experience is improved.
Drawings
FIG. 1 is a flowchart of a method for implementing high availability of a virtual machine according to an embodiment of the present invention;
fig. 2 is a block diagram of a virtual machine high availability implementation apparatus in an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present disclosure more clear, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are some, but not all embodiments of the present disclosure. All other embodiments, which can be obtained by a person skilled in the art without inventive step based on the embodiments in the present description, belong to the protection scope of the present invention.
Examples
As shown in fig. 1, in a first aspect, the present invention provides a method for implementing a high availability of a virtual machine, including but not limited to the following steps S101 to S104:
s101, constructing a special synchronous network of a virtual machine cluster, and establishing connection between each virtual machine node in the virtual machine cluster and the special synchronous network;
the dedicated synchronous network is a network dedicated to virtual machine clusters, and each virtual machine cluster is correspondingly provided with a dedicated synchronous network which is isolated from other service networks, management networks, storage networks and the like; based on the special synchronous network, the subsequent synchronous transmission of the state fingerprint information can be realized.
In one possible design of step S101, establishing a connection between each virtual machine node in the virtual machine cluster and the private synchronous network includes:
adding respective synchronous network cards for each virtual machine node in the virtual machine cluster;
and each virtual machine node establishes connection with the special synchronous network through a respective synchronous network card.
S102, acquiring current attribute information of each virtual machine node, and calculating state fingerprint information of the current attribute information;
it should be noted that the current attribute information includes user input information and current state information; wherein the user input information includes, but is not limited to, keyboard input information, mouse input information, and screen input information, and the current state information includes, but is not limited to, keyboard buffer information, mouse position information, and screen capture image information.
It should be noted that the state fingerprint information includes, but is not limited to, memory fingerprint information of the virtual machine host, process fingerprint information of the host, keyboard buffer fingerprint information of the host, mouse coordinate fingerprint information of the host, and screen image fingerprint information of the host.
In one possible design of step S102, calculating the state fingerprint information of the current attribute information includes:
step S1021, updating the state fingerprint information based on the current attribute information;
it should be noted that, when a user performs an operation, for example, performs an operation through a keyboard, a mouse, or a screen, the virtual machine node connected to the user can sense the user operation, that is, the attribute information, and after the virtual machine node receives the user operation, the state fingerprint information may be further updated, including but not limited to the above memory fingerprint information of the virtual machine host, process fingerprint information of the host, keyboard buffer fingerprint information of the host, mouse coordinate fingerprint information of the host, and screen image fingerprint information of the host.
S1022, calculating each piece of one-way characteristic fingerprint information of the state fingerprint information by using a Hash algorithm;
and S1023, splicing and synthesizing the one-way characteristic fingerprint information to obtain a state fingerprint matrix corresponding to the virtual machine node.
S103, voting is carried out on the state fingerprint information of all the virtual machine nodes based on a majority average voting algorithm model, and the virtual machine nodes with the most votes are used as synchronous samples;
it should be noted that, because the number of the plurality of virtual machine nodes in the virtual machine cluster is generally an odd number, the virtual machine node with the largest number of votes can be always obtained based on the majority average voting algorithm model, and the virtual machine node interacting with the user most can be obtained by recording the state fingerprint information of operations such as the desktop, the keyboard, the mouse and the like of each virtual machine node, so that the content of the virtual machine node is synchronized to each virtual machine node, and strict synchronization of data can be ensured.
In one possible design of step S103, voting the state fingerprint information of all the virtual machine nodes based on a majority average voting algorithm model, and acquiring the virtual machine node with the most votes, includes:
step S1031, acquiring a state fingerprint matrix of each virtual machine node by using a resolver in a resolver server;
s1032, comparing characteristic values of the state fingerprint matrixes, and counting the virtual machine nodes with the same characteristic values;
it should be noted that the key of most of the average algorithm models is: under the condition of not influencing the operation experience of a user, as many virtual machine nodes which are connected as possible are used as synchronous main nodes, and the virtual machine nodes are required to be switched only when the virtual machine nodes which are connected fail.
In one possible design of step S1032, counting the virtual machine nodes having the same characteristic value includes:
setting a counter and a variable maj ority for storing the most characteristic values;
if the count is equal to 0, setting the current value as the current characteristic value of the array, and assigning the maj authority as 1;
if the maj authority is the same as the current characteristic value of the array, adding one to the number of the counts, otherwise, subtracting one from the number of the counts;
repeating the steps until the array is scanned;
if the value of the count is 0, scanning the array from the head again, and if the characteristic value of the array is the same as the value of the maj ority, adding one to the number of the count until the array is scanned;
if the value of the count is more than or equal to n/2, returning the value of the maj ority, otherwise, returning to-1, wherein n is the total ticket number.
S1033, setting the weight of each virtual machine node; the weight of the virtual machine node which is connected with the user is larger than that of the virtual machine node which is not connected with the user;
and S1034, performing weighted calculation on all the virtual machine nodes to obtain the virtual machine nodes with the most normalized tickets after weighting.
And S104, synchronizing the sample state fingerprint information of the virtual machine node with the most votes to other virtual machine nodes in the virtual machine cluster.
In an optional embodiment, the method further comprises:
s105, checking the synchronous result of the sample state fingerprint information;
it should be noted that, after all the virtual machine nodes in the virtual machine cluster enter the synchronization mode and complete the synchronization of the state fingerprint information, the terminal state fingerprint information of each other virtual machine node, including the computer memory state fingerprint information, the buffer state fingerprint information, and the like, is calculated, and whether the state fingerprint information is the same as the sample state fingerprint information or not is determined, if so, the synchronization is successful, and if not, the synchronization is failed.
When the state fingerprint information of a certain virtual machine node is different from the sample state fingerprint information, the state fingerprint information of the virtual machine node is resynchronized, including but not limited to performing sleeping, waking and resynchronization operations on the virtual machine node.
Based on the above disclosure, in this embodiment, by constructing a dedicated synchronization network of a virtual machine cluster and establishing a connection between each virtual machine node in the virtual machine cluster and the dedicated synchronization network, all virtual machine nodes in the virtual machine cluster can implement subsequent background synchronization of state fingerprint information through the dedicated synchronization network; acquiring current attribute information of each virtual machine node, and calculating state fingerprint information of the current attribute information; voting the state fingerprint information of all the virtual machine nodes based on a majority average voting algorithm model, and acquiring the virtual machine nodes with the most votes; and synchronizing the state fingerprint information of the virtual machine node with the most votes to other virtual machine nodes in the virtual machine cluster. When a user uses the virtual machine cluster, if the virtual machine node connected with the user currently is interrupted due to a fault, the user can directly reconnect to any virtual machine node in the cluster based on the information synchronization mechanism of the special synchronization network, and the current working state information of the user is stored in each virtual machine node, so that no data loss exists, the reliability of the user in switching the virtual machine nodes is greatly improved, and the user experience is improved.
As shown in fig. 2, in a second aspect, the present invention provides a virtual machine high availability implementation apparatus, including:
the network connection module is used for constructing a special synchronous network of the virtual machine cluster and establishing connection between each virtual machine node in the virtual machine cluster and the special synchronous network;
the state fingerprint calculation module is used for acquiring the current attribute information of each virtual machine node and calculating the state fingerprint information of the current attribute information;
the voting module is used for voting the state fingerprint information of all the virtual machine nodes based on a majority average voting algorithm model, and taking the virtual machine node with the most votes as a synchronous sample;
and the information synchronization module is used for synchronizing the sample state fingerprint information of the virtual machine node with the most votes to other virtual machine nodes in the virtual machine cluster.
In one possible design, the apparatus further includes:
the verification module is used for verifying the synchronous result of the sample state fingerprint information;
and the secondary synchronization module is used for synchronizing the state fingerprint information of the virtual machine node again when the state fingerprint information of the virtual machine node is different from the state fingerprint information.
In one possible design, when each virtual machine node in the virtual machine cluster is connected to the private synchronous network, the network connection module is specifically configured to:
adding respective synchronous network cards for each virtual machine node in the virtual machine cluster;
and each virtual machine node establishes connection with the special synchronous network through a respective synchronous network card.
In one possible design, when calculating the state fingerprint information of the current attribute information, the state fingerprint calculation module is specifically configured to:
updating the state fingerprint information based on the current attribute information;
calculating each one-way characteristic fingerprint information of the state fingerprint information by utilizing a Hash algorithm;
and splicing and synthesizing each piece of the one-way characteristic fingerprint information to obtain a state fingerprint matrix corresponding to the virtual machine node.
In a possible design, when voting is performed on state fingerprint information of all virtual machine nodes based on a majority average voting algorithm model, and a virtual machine node with the largest number of votes is obtained, the voting module is specifically configured to:
acquiring a state fingerprint matrix of each virtual machine node by using a resolver in a resolver server;
comparing the characteristic values of the state fingerprint matrixes, and counting the virtual machine nodes with the same characteristic values;
setting the weight of each virtual machine node; the weight of the virtual machine node which is connected with the user is larger than that of the virtual machine node which is not connected with the user;
and performing weighting calculation on all the virtual machine nodes to obtain the virtual machine nodes with the most normalized votes after weighting.
In one possible design, counting virtual machine nodes having the same characteristic value includes:
setting a counter and a variable maj ority for storing the most characteristic values;
if the count is 0, setting the value of the now as the current characteristic value of the array, and assigning the maj authority as 1;
if the maj authority is the same as the current characteristic value of the array, count + +, otherwise count- -;
repeating the steps until the array is scanned;
if the value of the count is 0, scanning the array from the head again, and if the characteristic value of the array is the same as the value of the maj ority, counting + +, until the array is scanned completely;
if the value of the count is more than or equal to n/2, returning the value of the maj ority, otherwise, returning to-1, wherein n is the total ticket number.
In one possible design, the current attribute information includes user input information and current state information.
In a third aspect, the present invention provides a computer apparatus comprising: a memory, a processor and a transceiver, which are connected in sequence in communication, wherein the memory is used for storing a computer program, the transceiver is used for transceiving a message, and the processor is used for reading the computer program and executing the virtual machine high availability implementation method as described in any one of the possible designs of the first aspect.
In a fourth aspect, the present invention provides a computer-readable storage medium having stored thereon instructions which, when executed on a computer, perform the method for high availability implementation of a virtual machine as described in any one of the possible designs of the first aspect.
In a fifth aspect, the present invention provides a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of virtual machine high availability implementation as described in any one of the possible designs of the first aspect.
Finally, it should be noted that: the above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A high-availability implementation method for a virtual machine is characterized by comprising the following steps:
establishing a special synchronous network of a virtual machine cluster, and establishing connection between each virtual machine node in the virtual machine cluster and the special synchronous network;
acquiring current attribute information of each virtual machine node, and calculating state fingerprint information of the current attribute information;
voting the state fingerprint information of all the virtual machine nodes based on a majority average voting algorithm model, and taking the virtual machine node with the most votes as a synchronous sample;
and synchronizing the sample state fingerprint information of the virtual machine node with the most votes to other virtual machine nodes in the virtual machine cluster.
2. The method for realizing high availability of the virtual machine according to claim 1, the method further comprising:
checking the synchronous result of the sample state fingerprint information;
and when the state fingerprint information after synchronization of a certain virtual machine node is different from the sample state fingerprint information, the state fingerprint information of the virtual machine node is synchronized again.
3. The method for implementing high availability of virtual machines according to claim 1, wherein establishing a connection between each virtual machine node in a virtual machine cluster and the private synchronous network comprises:
adding respective synchronous network cards for each virtual machine node in the virtual machine cluster;
and each virtual machine node establishes connection with the special synchronous network through a respective synchronous network card.
4. The method for implementing high availability of the virtual machine according to claim 1, wherein calculating the state fingerprint information of the current attribute information includes:
updating the state fingerprint information based on the current attribute information;
calculating each one-way characteristic fingerprint information of the state fingerprint information by utilizing a Hash algorithm;
and splicing and synthesizing each piece of the one-way characteristic fingerprint information to obtain a state fingerprint matrix corresponding to the virtual machine node.
5. The method for realizing high availability of the virtual machine according to claim 4, wherein voting is performed on the state fingerprint information of all the virtual machine nodes based on a majority average voting algorithm model, and the virtual machine node with the most votes is taken as a synchronization sample, and the method comprises:
acquiring a state fingerprint matrix of each virtual machine node by using a resolver in a resolver server;
comparing the characteristic values of the state fingerprint matrixes, and counting the virtual machine nodes with the same characteristic values;
setting the weight of each virtual machine node; the weight of the virtual machine node which is connected with the user is larger than that of the virtual machine node which is not connected with the user;
and performing weighting calculation on all the virtual machine nodes to obtain the virtual machine nodes with the most votes obtained through normalization after weighting, and taking the virtual machine nodes as synchronous samples.
6. The method for realizing high availability of the virtual machine according to claim 5, wherein counting the virtual machine nodes having the same characteristic value comprises:
setting a counter and a variable maj ority for storing the most characteristic values;
if the count is equal to 0, setting the current value as the current characteristic value of the array, and assigning the maj authority as 1;
if the maj authority is the same as the current characteristic value of the array, adding one to the number of the counts, otherwise, subtracting one from the number of the counts;
repeating the steps until the array is scanned;
if the value of the count is 0, scanning the array from the head again, and if the characteristic value of the array is the same as the value of the maj ority, adding one to the number of the count until the array is scanned;
if the value of the count is more than or equal to n/2, returning the value of the maj ority, otherwise, returning to-1, wherein n is the total ticket number.
7. The method for implementing high availability of the virtual machine according to claim 1, wherein the current attribute information includes user input information and current state information.
8. A high-availability implementation device of a virtual machine is characterized by comprising:
the network connection module is used for constructing a special synchronous network of the virtual machine cluster and establishing connection between each virtual machine node in the virtual machine cluster and the special synchronous network;
the state fingerprint calculation module is used for acquiring the current attribute information of each virtual machine node and calculating the state fingerprint information of the current attribute information;
the voting module is used for voting the state fingerprint information of all the virtual machine nodes based on a majority average voting algorithm model, and taking the virtual machine node with the most votes as a synchronous sample;
and the information synchronization module is used for synchronizing the sample state fingerprint information of the virtual machine node with the most votes to other virtual machine nodes in the virtual machine cluster.
9. The apparatus for implementing high availability of virtual machines according to claim 8, wherein the apparatus further comprises:
the verification module is used for verifying the synchronous result of the sample state fingerprint information;
and the secondary synchronization module is used for synchronizing the state fingerprint information of the virtual machine node again when the synchronized state fingerprint information of the virtual machine node is different from the sample state fingerprint information.
10. A computer device, comprising: a memory, a processor and a transceiver, which are connected in sequence in communication, wherein the memory is used for storing a computer program, the transceiver is used for transceiving a message, and the processor is used for reading the computer program and executing the virtual machine high availability implementation method according to any one of claims 1 to 7.
CN202110886980.XA 2021-08-03 2021-08-03 High availability realization method, device and equipment for virtual machine Active CN113568710B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110886980.XA CN113568710B (en) 2021-08-03 2021-08-03 High availability realization method, device and equipment for virtual machine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110886980.XA CN113568710B (en) 2021-08-03 2021-08-03 High availability realization method, device and equipment for virtual machine

Publications (2)

Publication Number Publication Date
CN113568710A true CN113568710A (en) 2021-10-29
CN113568710B CN113568710B (en) 2023-07-21

Family

ID=78170133

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110886980.XA Active CN113568710B (en) 2021-08-03 2021-08-03 High availability realization method, device and equipment for virtual machine

Country Status (1)

Country Link
CN (1) CN113568710B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103152434A (en) * 2013-03-27 2013-06-12 江苏辰云信息科技有限公司 Leader node replacing method of distributed cloud system
CN104506636A (en) * 2014-12-29 2015-04-08 成都致云科技有限公司 Method and device for synchronizing data
EP2884392A1 (en) * 2013-12-13 2015-06-17 Thales Triple software redundancy fault tolerant framework architecture
CN105095001A (en) * 2014-05-08 2015-11-25 ***股份有限公司 Virtual machine exception recovery method under distributed environment
CN106959889A (en) * 2016-01-11 2017-07-18 阿里巴巴集团控股有限公司 A kind of method and apparatus of server resource adjustment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103152434A (en) * 2013-03-27 2013-06-12 江苏辰云信息科技有限公司 Leader node replacing method of distributed cloud system
EP2884392A1 (en) * 2013-12-13 2015-06-17 Thales Triple software redundancy fault tolerant framework architecture
CN105095001A (en) * 2014-05-08 2015-11-25 ***股份有限公司 Virtual machine exception recovery method under distributed environment
CN104506636A (en) * 2014-12-29 2015-04-08 成都致云科技有限公司 Method and device for synchronizing data
CN106959889A (en) * 2016-01-11 2017-07-18 阿里巴巴集团控股有限公司 A kind of method and apparatus of server resource adjustment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
武义涵;黄罡;张颖;熊英飞;: "一种基于模型的云计算容错机制开发方法", 计算机研究与发展, no. 01 *

Also Published As

Publication number Publication date
CN113568710B (en) 2023-07-21

Similar Documents

Publication Publication Date Title
CN106331098B (en) Server cluster system
CN109951331B (en) Method, device and computing cluster for sending information
US6363495B1 (en) Method and apparatus for partition resolution in clustered computer systems
CN110807064B (en) Data recovery device in RAC distributed database cluster system
CN110431533B (en) Method, equipment and system for fault recovery
CN110545260A (en) Cloud management platform construction method based on mimicry structure
EP3623963A1 (en) Log entry duplication method and device, computer equipment, and storage medium
CN109918230B (en) Method and system for recovering abnormity of service board card
CN107666493B (en) Database configuration method and equipment thereof
CN108984349A (en) Host node electoral machinery and device, medium and calculating equipment
US10102088B2 (en) Cluster system, server device, cluster system management method, and computer-readable recording medium
EP4075252A1 (en) Data storage method, apparatus, and system and data reading method, apparatus, and system in storage system
WO2020233001A1 (en) Distributed storage system comprising dual-control architecture, data reading method and device, and storage medium
CN116743619B (en) Network service testing method, device, equipment and storage medium
CN113568710B (en) High availability realization method, device and equipment for virtual machine
WO2023185335A1 (en) Crash clustering method and apparatus, electronic device and storage medium
CN114500327B (en) Detection method and detection device for server cluster and computing equipment
JP3447347B2 (en) Failure detection method
CN115314289A (en) Attacked executor identifying method, output voter, equipment and storage medium
CN114679295A (en) Firewall security configuration method and device
CN111752911A (en) Data transmission method, system, terminal and storage medium based on Flume
CN115202803A (en) Fault processing method and device
CN115698955A (en) Fault tolerance of transaction images
CN117992501B (en) Database cluster brain crack prevention method and device, electronic equipment and storage medium
KR102575524B1 (en) Distributed information processing device for virtualization based combat system and method for allocating resource thereof

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