CN113568710B - High availability realization method, device and equipment for virtual machine - Google Patents

High availability realization method, device and equipment for virtual machine Download PDF

Info

Publication number
CN113568710B
CN113568710B CN202110886980.XA CN202110886980A CN113568710B CN 113568710 B CN113568710 B CN 113568710B CN 202110886980 A CN202110886980 A CN 202110886980A CN 113568710 B CN113568710 B CN 113568710B
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.)
Active
Application number
CN202110886980.XA
Other languages
Chinese (zh)
Other versions
CN113568710A (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

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 high availability realization method and device for a virtual machine, comprising the following steps: 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; 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 highest ticket to other virtual machine nodes in the virtual machine cluster. If the virtual machine node currently connected by the user is interrupted due to faults, the user can be directly reconnected 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

High availability realization method, device and equipment for virtual machine
Technical Field
The invention belongs to the technical field of computers, and particularly relates to a high-availability realization method, device and equipment for a virtual machine.
Background
The virtual machine HA (High Availability ) function refers to a function of providing high availability to an application running on a virtual machine. If the server fails, the affected virtual machine can be restarted on other production servers with redundant capacity, so that the downtime and the service interruption time are effectively reduced.
The HA function allows a virtual machine on a failed virtual host (a physical server on which the virtual software is installed, and the following is the same) to be started on other virtual hosts under the condition of resource permission in a cluster, and the service time interval between the virtual machines is: VM system start time + application start time + heartbeat detection time typically not exceeding 15 seconds, this total interrupt time can typically be kept within 3 minutes.
In the prior art, a common HA operating mechanism is that an agent program placed on each virtualized host continually sends out a "heartbeat signal" to other hosts in the cluster, and once the "heartbeat signal" is terminated, all affected virtual machines will restart on the other hosts. For example, in the most commonly used VMware virtualization software at present, the running state of the virtual machine can be monitored by installing VMtools, and a monitoring signal is sent out by the VMtools, if no signal is received within a specified time, the abnormal state of the virtualization host is indicated, and the virtual machine above will be restarted automatically.
However, the above-mentioned synchronization method of the virtual machine cannot ensure strict synchronization of user operation and data, and when a virtual machine failure occurs to switch, there is always a situation that data is lost, so that the synchronization effect is not ideal.
Disclosure of Invention
The invention aims to provide a high-availability realization method, device and equipment for a virtual machine, which are used for solving at least one technical problem existing in the prior art.
In order to achieve the above purpose, the present 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:
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;
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 highest ticket to other virtual machine nodes in the virtual machine cluster.
In one possible design, the method further comprises:
verifying the synchronization result of the sample state fingerprint information;
and when the state fingerprint information of a certain virtual machine node after synchronization is different from the sample state fingerprint information, re-synchronizing the state fingerprint information of the virtual machine node.
In one possible design, establishing a connection between each virtual machine node in a virtual machine cluster and the private synchronization network includes:
adding a respective synchronous network card for each virtual machine node in a virtual machine cluster;
each virtual machine node establishes connection with the special synchronous network through the respective synchronous network card.
In one possible design, calculating the state fingerprint information of the current attribute information includes:
updating the state fingerprint information based on the current attribute information;
calculating each unidirectional characteristic fingerprint information of the state fingerprint information by utilizing a hash algorithm;
and splicing and synthesizing each piece of unidirectional characteristic fingerprint information to obtain a state fingerprint matrix of the corresponding virtual machine node.
In one possible design, voting on 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 highest vote as a synchronization sample includes:
acquiring a state fingerprint matrix of each virtual machine node by utilizing an arbitrator in an arbitrator;
comparing the characteristic values of each state fingerprint matrix, and counting the virtual machine nodes with the same characteristic value;
setting the weight of each virtual machine node; the weight of the virtual machine node which is being connected with the user is larger than that of the virtual machine node which is not connected with the user;
and carrying out weighted calculation on all the virtual machine nodes, obtaining the virtual machine node with the most ticket after weighted normalization, and taking the virtual machine node as a synchronous sample.
In one possible design, counting virtual machine nodes having the same feature value includes:
setting a counter count and a variable majority for storing the maximum characteristic value;
if the count is equal to 0, setting the current value as the current characteristic value of the array, and assigning the majority as 1;
if the majority is the same as the current feature value of the array, adding one to the number of counts, otherwise subtracting one from the number of counts;
repeating the steps until the array is scanned;
if the count is assigned to 0, scanning the array from the beginning again, and if the array characteristic value is the same as the value of the majority, adding one to the count number until the array is scanned;
if the value of count is greater than or equal to n/2 at this time, returning the value of the majority, 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 a high availability implementation apparatus for 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 the 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 ticket to other virtual machine nodes in the virtual machine cluster.
In one possible design, the apparatus further comprises:
the verification module is used for verifying the synchronization result of the sample state fingerprint information;
and the secondary synchronization module is used for synchronizing the state fingerprint information of a certain virtual machine node again when the state fingerprint information after synchronization 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 dedicated synchronization network, the network connection module is specifically configured to:
adding a respective synchronous network card for each virtual machine node in a virtual machine cluster;
each virtual machine node establishes connection with the special synchronous network through the 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 unidirectional characteristic fingerprint information of the state fingerprint information by utilizing a hash algorithm;
and splicing and synthesizing each piece of unidirectional characteristic fingerprint information to obtain a state fingerprint matrix of the corresponding virtual machine node.
In one possible design, when voting is performed on the state fingerprint information of all the virtual machine nodes based on the majority average voting algorithm model, and the virtual machine node with the most votes is taken as a synchronization sample, the voting module is specifically configured to:
acquiring a state fingerprint matrix of each virtual machine node by utilizing an arbitrator in an arbitrator;
comparing the characteristic values of each state fingerprint matrix, and counting the virtual machine nodes with the same characteristic value;
setting the weight of each virtual machine node; the weight of the virtual machine node which is being connected with the user is larger than that of the virtual machine node which is not connected with the user;
and carrying out weighted calculation on all the virtual machine nodes, and obtaining the virtual machine node with the most ticket after weighted normalization.
In one possible design, counting virtual machine nodes having the same feature value includes:
setting a counter count and a variable majority for storing the maximum characteristic value;
if the count is equal to 0, setting the current value as the current characteristic value of the array, and assigning the majority as 1;
if the majority is the same as the current feature value of the array, adding one to the number of counts, otherwise subtracting one from the number of counts;
repeating the steps until the array is scanned;
if the count is assigned to 0, scanning the array from the beginning again, and if the array characteristic value is the same as the value of the majority, adding one to the count number until the array is scanned;
if the value of count is greater than or equal to n/2 at this time, returning the value of the majority, 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 device comprising: the system comprises 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 receiving and transmitting messages, and the processor is used for reading the computer program and executing the high-availability implementation method of the virtual machine 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 instructions stored thereon which, when executed on a computer, perform a virtual machine high availability implementation as described in any one of the possible designs of the first aspect.
In a fifth aspect, the invention provides a computer program product comprising instructions which, when run on a computer, cause the computer to perform the virtual machine high availability implementation of any of the possible designs of the first aspect.
The beneficial effects are that:
the invention establishes connection between each virtual machine node in the virtual machine cluster and the special synchronization network by constructing the special synchronization network of the virtual machine cluster, so that all virtual machine nodes in the virtual machine cluster can realize subsequent background synchronization of the state fingerprint information through the special 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 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 highest ticket to other virtual machine nodes in the virtual machine cluster. When the user uses the virtual machine cluster, if the virtual machine node currently connected by the user is interrupted due to faults, the user can be directly reconnected 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 is lost, 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 flow chart of a method for implementing virtual machine high availability in an embodiment of the invention;
fig. 2 is a block diagram of a virtual machine high availability implementation apparatus in an embodiment of the present invention.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present specification more clear, the technical solutions of the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, and it is apparent that the described embodiments are some embodiments of the present specification, but not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are intended to be within the scope of the present invention based on the embodiments herein.
Examples
As shown in fig. 1, in a first aspect, the present invention provides a method for implementing high availability of a virtual machine, including, but not limited to, implementation by 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 special synchronous network is a network special for the virtual machine clusters, each virtual machine cluster is correspondingly provided with a special synchronous network, and the network is isolated from other service networks, management networks, storage networks and the like; based on the special synchronous network, the subsequent state fingerprint information synchronous transmission can be realized.
Wherein in one possible design of step S101, establishing a connection between each virtual machine node in the virtual machine cluster and the dedicated synchronization network includes:
adding a respective synchronous network card for each virtual machine node in a virtual machine cluster;
each virtual machine node establishes connection with the special synchronous network through the respective synchronous network card.
S102, acquiring current attribute information of each virtual machine node, and calculating state fingerprint information of the current attribute information;
the current attribute information comprises 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 status fingerprint information includes, but is not limited to, memory fingerprint information of the host of the virtual machine, 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:
s1021, updating the state fingerprint information based on the current attribute information;
it should be noted that, when the user performs an operation, for example, the operation is performed through a keyboard, a mouse or a screen, the virtual machine node connected with 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, which includes, but is not limited to, the memory fingerprint information of the virtual machine host, the process fingerprint information of the host, the keyboard buffer fingerprint information of the host, the mouse coordinate fingerprint information of the host, and the screen image fingerprint information of the host.
S1022, calculating each unidirectional characteristic fingerprint information of the state fingerprint information by utilizing a hash algorithm;
and S1023, splicing and synthesizing the unidirectional characteristic fingerprint information to obtain a state fingerprint matrix of the corresponding 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 node with the largest vote is taken as a synchronous sample;
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 obtained all the time based on the majority average voting algorithm model, and the virtual machine node with the largest interaction with the user can be obtained by recording the status fingerprint information of the 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 is performed on the state fingerprint information of all the virtual machine nodes based on the majority voting algorithm model, and the virtual machine node with the most votes is obtained, including:
s1031, acquiring a state fingerprint matrix of each virtual machine node by utilizing an arbitrator in an arbitrator;
s1032, comparing the characteristic values of each state fingerprint matrix, and counting the virtual machine nodes with the same characteristic value;
it should be noted that, the key of most of the average algorithm models is: under the condition that the user operation experience is not affected, taking as many virtual machine nodes which are being connected as possible as synchronous master nodes, and switching the virtual machine nodes only when the virtual machine nodes which are being connected fail.
In one possible design in step S1032, counting virtual machine nodes having the same feature value includes:
setting a counter count and a variable majority for storing the maximum characteristic value;
if the count is equal to 0, setting the current value as the current characteristic value of the array, and assigning the majority as 1;
if the majority is the same as the current feature value of the array, adding one to the number of counts, otherwise subtracting one from the number of counts;
repeating the steps until the array is scanned;
if the count is assigned to 0, scanning the array from the beginning again, and if the array characteristic value is the same as the value of the majority, adding one to the count number until the array is scanned;
if the value of count is greater than or equal to n/2 at this time, returning the value of the majority, 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 being connected with the user is larger than that of the virtual machine node which is not connected with the user;
and S1034, carrying out weighted calculation on all the virtual machine nodes to obtain the virtual machine node with the most ticket after weighted normalization.
And S104, synchronizing sample state fingerprint information of the virtual machine node with the most ticket to other virtual machine nodes in the virtual machine cluster.
In an alternative embodiment, the method further comprises:
s105, checking the synchronization result of the sample state fingerprint information;
it should be noted that, after all virtual machine nodes in the virtual machine cluster enter a synchronization mode and complete synchronization of the state fingerprint information, the state fingerprint information of the terminal of each other virtual machine node is calculated, including the state fingerprint information of the computer memory and the state fingerprint information of the buffer area, etc., and whether the state fingerprint information is the same as the sample state fingerprint information is judged, if the state fingerprint information is the same, the synchronization is successful, and if the state fingerprint information is not the same, 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 re-synchronized, including but not limited to dormancy, awakening and re-synchronizing operations of the virtual machine node.
Based on the above disclosure, in the embodiment, by constructing a dedicated synchronization network of the 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 realize 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 obtaining the virtual machine node with the most votes; and synchronizing the state fingerprint information of the virtual machine node with the most ticket to other virtual machine nodes in the virtual machine cluster. When the user uses the virtual machine cluster, if the virtual machine node currently connected by the user is interrupted due to faults, the user can be directly reconnected 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 is lost, 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 the 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 ticket to other virtual machine nodes in the virtual machine cluster.
In one possible design, the apparatus further comprises:
the verification module is used for verifying the synchronization result of the sample state fingerprint information;
and the secondary synchronization module is used for synchronizing the state fingerprint information of a certain 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 dedicated synchronization network, the network connection module is specifically configured to:
adding a respective synchronous network card for each virtual machine node in a virtual machine cluster;
each virtual machine node establishes connection with the special synchronous network through the 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 unidirectional characteristic fingerprint information of the state fingerprint information by utilizing a hash algorithm;
and splicing and synthesizing each piece of unidirectional characteristic fingerprint information to obtain a state fingerprint matrix of the corresponding virtual machine node.
In one possible design, when voting is performed on the state fingerprint information of all the virtual machine nodes based on the majority average voting algorithm model, and the virtual machine node with the most votes is obtained, the voting module is specifically configured to:
acquiring a state fingerprint matrix of each virtual machine node by utilizing an arbitrator in an arbitrator;
comparing the characteristic values of each state fingerprint matrix, and counting the virtual machine nodes with the same characteristic value;
setting the weight of each virtual machine node; the weight of the virtual machine node which is being connected with the user is larger than that of the virtual machine node which is not connected with the user;
and carrying out weighted calculation on all the virtual machine nodes, and obtaining the virtual machine node with the most ticket after weighted normalization.
In one possible design, counting virtual machine nodes having the same feature value includes:
setting a counter count and a variable majority for storing the maximum characteristic value;
if count= =0, setting the value of now as the current characteristic value of the array, and assigning the value of majority as 1;
if the majority is the same as the current feature value of the array, count++, otherwise count-;
repeating the steps until the array is scanned;
if the count is assigned to 0, scanning the array from the beginning again, and if the array characteristic value is the same as the value of the majority, counting++, until the array is scanned;
if the value of count is greater than or equal to n/2 at this time, returning the value of the majority, 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 device comprising: the system comprises 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 receiving and transmitting messages, and the processor is used for reading the computer program and executing the high-availability implementation method of the virtual machine 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 instructions stored thereon which, when executed on a computer, perform a virtual machine high availability implementation as described in any one of the possible designs of the first aspect.
In a fifth aspect, the invention provides a computer program product comprising instructions which, when run on a computer, cause the computer to perform the virtual machine high availability implementation of any of the possible designs of the first aspect.
Finally, it should be noted that: the foregoing description is only of the preferred embodiments of the invention and is not intended to limit the scope of the invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. The high availability implementation method of the virtual machine is characterized by comprising the following steps:
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;
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 highest ticket to other virtual machine nodes in the virtual machine cluster.
2. The virtual machine high availability implementation method of claim 1, further comprising:
verifying the synchronization result of the sample state fingerprint information;
and when the state fingerprint information of a certain virtual machine node after synchronization is different from the sample state fingerprint information, re-synchronizing the state fingerprint information of the virtual machine node.
3. The method of claim 1, wherein establishing a connection between each virtual machine node in a virtual machine cluster and the private synchronization network comprises:
adding a respective synchronous network card for each virtual machine node in a virtual machine cluster;
each virtual machine node establishes connection with the special synchronous network through the respective synchronous network card.
4. The virtual machine high availability implementation method of claim 1, wherein calculating the state fingerprint information of the current attribute information comprises:
updating the state fingerprint information based on the current attribute information;
calculating each unidirectional characteristic fingerprint information of the state fingerprint information by utilizing a hash algorithm;
and splicing and synthesizing each piece of unidirectional characteristic fingerprint information to obtain a state fingerprint matrix of the corresponding virtual machine node.
5. The method according to claim 4, wherein voting the state fingerprint information of all the virtual machine nodes based on the majority voting algorithm model, and taking the virtual machine node with the highest vote as the synchronization sample, comprises:
acquiring a state fingerprint matrix of each virtual machine node by utilizing an arbitrator in an arbitrator;
comparing the characteristic values of each state fingerprint matrix, and counting the virtual machine nodes with the same characteristic value;
setting the weight of each virtual machine node; the weight of the virtual machine node which is being connected with the user is larger than that of the virtual machine node which is not connected with the user;
and carrying out weighted calculation on all the virtual machine nodes to obtain the virtual machine node with the most ticket after weighted normalization, and taking the virtual machine node as a synchronous sample.
6. The method of claim 5, wherein counting virtual machine nodes having the same feature value comprises:
setting a counter count and a variable majority for storing the maximum characteristic value;
if the count is equal to 0, setting the current value as the current characteristic value of the array, and assigning the majority as 1;
if the majority is the same as the current feature value of the array, adding one to the number of counts, otherwise subtracting one from the number of counts;
repeating the steps until the array is scanned;
if the count is assigned to 0, scanning the array from the beginning again, and if the array characteristic value is the same as the value of the majority, adding one to the count number until the array is scanned;
if the value of count is greater than or equal to n/2 at this time, returning the value of the majority, otherwise returning to-1, wherein n is the total ticket number.
7. The virtual machine high availability implementation of claim 1, wherein the current attribute information comprises user input information and current state information.
8. A virtual machine high availability implementation apparatus, 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 the 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 ticket to other virtual machine nodes in the virtual machine cluster.
9. The virtual machine high availability implementation apparatus of claim 8, wherein the apparatus further comprises:
the verification module is used for verifying the synchronization result of the sample state fingerprint information;
and the secondary synchronization module is used for synchronizing the state fingerprint information of a certain virtual machine node again when the state fingerprint information after synchronization of the virtual machine node is different from the sample state fingerprint information.
10. A computer device, comprising: the virtual machine high availability implementation method according to any one of claims 1-7, comprising a memory, a processor and a transceiver in communication with each other in sequence, wherein the memory is configured to store a computer program, the transceiver is configured to receive and send messages, and the processor is configured to read the computer program.
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 CN113568710A (en) 2021-10-29
CN113568710B true 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
一种基于模型的云计算容错机制开发方法;武义涵;黄罡;张颖;熊英飞;;计算机研究与发展(第01期);全文 *

Also Published As

Publication number Publication date
CN113568710A (en) 2021-10-29

Similar Documents

Publication Publication Date Title
CN109951331B (en) Method, device and computing cluster for sending information
CN101309167B (en) Disaster allowable system and method based on cluster backup
US6363495B1 (en) Method and apparatus for partition resolution in clustered computer systems
CN110807064B (en) Data recovery device in RAC distributed database cluster system
CN107015872A (en) The processing method and processing device of monitoring data
WO2018120174A1 (en) Failure recovery method and device, and system
CN110224871A (en) A kind of high availability method and device of Redis cluster
CN112506702B (en) Disaster recovery method, device, equipment and storage medium for data center
EP4075252A1 (en) Data storage method, apparatus, and system and data reading method, apparatus, and system in storage system
CN113568710B (en) High availability realization method, device and equipment for virtual machine
WO2023185335A1 (en) Crash clustering method and apparatus, electronic device and storage medium
CN105323271A (en) Cloud computing system, and processing method and apparatus thereof
CN113467953B (en) Service state switching method and device, server and storage medium
CN111309515A (en) Disaster recovery control method, device and system
CN115314289A (en) Attacked executor identifying method, output voter, equipment and storage medium
CN112054926B (en) Cluster management method and device, electronic equipment and storage medium
CN114679295A (en) Firewall security configuration method and device
CN115202803A (en) Fault processing method and device
JP2021120827A5 (en)
CN111752911A (en) Data transmission method, system, terminal and storage medium based on Flume
JP2021120827A (en) Control system and control method
CN112463669B (en) Storage arbitration management method, system, terminal and storage medium
KR102575524B1 (en) Distributed information processing device for virtualization based combat system and method for allocating resource thereof
CN116094938B (en) KAFKA-based network topology synchronization method, KAFKA-based network topology synchronization equipment, server and storage medium
JP2010061548A (en) Computer system, processing method and program

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