CN111966461A - Virtual machine cluster node guarding method, device, equipment and storage medium - Google Patents

Virtual machine cluster node guarding method, device, equipment and storage medium Download PDF

Info

Publication number
CN111966461A
CN111966461A CN202010819402.XA CN202010819402A CN111966461A CN 111966461 A CN111966461 A CN 111966461A CN 202010819402 A CN202010819402 A CN 202010819402A CN 111966461 A CN111966461 A CN 111966461A
Authority
CN
China
Prior art keywords
virtual machine
link
detection result
cluster
target virtual
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
CN202010819402.XA
Other languages
Chinese (zh)
Other versions
CN111966461B (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.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202010819402.XA priority Critical patent/CN111966461B/en
Publication of CN111966461A publication Critical patent/CN111966461A/en
Application granted granted Critical
Publication of CN111966461B publication Critical patent/CN111966461B/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

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 relates to a virtual machine cluster node guarding method, a virtual machine cluster node guarding device, virtual machine cluster node guarding equipment and a storage medium. The method comprises the following steps: acquiring a service state mark of a target virtual machine in a cluster management system, and setting the service state mark which is started as a stop; stopping the cluster service provided by the target virtual machine; detecting a target virtual machine to obtain a detection result, wherein the detection comprises the detection of storage equipment mapping, virtual storage equipment and a virtual network card; returning to execute the initial step according to the detection result, or setting the stopped service state as the starting state according to the detection result so as to enable the cluster management system to take over the target virtual machine; and if the cluster management system takes over the target virtual machine, returning to execute the step of detecting the target virtual machine according to the preset interval time to obtain a detection result. The scheme of the invention avoids the virtual machine carrying fault service and enhances the stability of the cluster service.

Description

Virtual machine cluster node guarding method, device, equipment and storage medium
Technical Field
The invention relates to the technical field of computers, in particular to a virtual machine cluster node guarding method, a virtual machine cluster node guarding device, virtual machine cluster node guarding equipment and a storage medium.
Background
The virtual machine technology provides calculation or service by simulating and operating a plurality of computers on a host machine, can fully utilize hardware resources of the host machine, and a plurality of simulated computers form a cluster, so that the service pressure is dispersed, the system has better stability, and the virtual machine technology is widely applied to the field of servers and cloud calculation. In the actual application process, a host machine cluster is usually established by adopting a plurality of servers, and a plurality of virtual machines are operated on each host machine to form the cluster; if a virtual machine node in the cluster is unable to provide services, the virtual machine may transfer the services to other virtual machines.
At present, the state monitoring technology of virtual machine nodes in a cluster is mature, the monitoring technology is mainly focused on the monitoring of the nodes and service providing, and the management and maintenance are performed by a cluster management system, however, the cluster management system does not care about the characteristic that the virtual machine depends on the hardware environment of a host machine, and the situation that the virtual nodes carry faults to provide service exists, so that great potential safety hazards are brought to cluster services.
Disclosure of Invention
In view of the above, it is necessary to provide a method, an apparatus, a device and a storage medium for guarding a virtual machine cluster node.
According to an aspect of the present invention, a method for guarding a virtual machine cluster node is provided, the method including:
acquiring a service state mark of a target virtual machine in a cluster management system and setting the service state mark in starting to be stopped;
stopping the cluster service provided by the target virtual machine;
detecting the target virtual machine to obtain a detection result, wherein the detection comprises the detection of storage device mapping, virtual storage devices and virtual network cards;
returning to execute the steps of acquiring the service state mark of the target virtual machine in the cluster management system and setting the started service state as the stop according to the detection result, or setting the stopped service state as the start according to the detection result so that the cluster management system takes over the target virtual machine;
and if the cluster management system takes over the target virtual machine, returning to execute the step of detecting the target virtual machine to obtain a detection result according to preset interval time.
In one embodiment, the step of stopping the cluster service provided by the target virtual machine includes:
reading cluster information;
traversing the cluster information to determine a plurality of cluster services provided by a target virtual machine; acquiring the starting state of each cluster service;
and if the certain cluster service is in the starting state, stopping the certain cluster service.
In one embodiment, the step of detecting the target virtual machine to obtain a detection result includes:
detecting the mapping of the storage equipment in the target virtual machine to obtain a first detection result;
detecting the virtual storage equipment according to the first detection result to obtain a second detection result;
and detecting the virtual network card according to the second detection result to obtain a third detection result.
In one embodiment, the step of detecting the mapping of the storage device in the target virtual machine to obtain the first detection result includes:
defining a normal link set;
traversing a first link set of a target virtual machine connected to a memory, and carrying out state check on the first link set;
if the state of a certain link in the first link set is normal, adding the certain link in the first link set into the normal link set, and if the state of the certain link in the first link set is abnormal, closing the certain link;
scanning a host system environment corresponding to the target virtual machine to obtain a second link set available for the memory;
if a certain link in the second link set does not belong to the first link set and the link can be successfully connected, adding the certain link in the second link set into the normal link set;
detecting whether the normal link set is an empty set.
In one embodiment, the step of detecting the virtual storage device according to the first detection result to obtain a second detection result includes:
if the normal link set is a non-empty set, traversing a virtual storage device set corresponding to a file system used by the target virtual machine;
detecting whether each virtual storage device in the virtual storage device set belongs to a link in the second link set;
and if each virtual storage device in the virtual storage device set belongs to a certain link in the second link set, detecting whether the capacity of the virtual storage device is correct and whether the virtual storage device can be accessed.
In one embodiment, the step of detecting the virtual network card according to the second detection result to obtain a third detection result includes:
traversing the mapped virtual network card set of the target virtual machine if the capacity of the virtual storage equipment is correct and can be accessed;
and detecting whether the connection state of each virtual network card in the virtual network card set is normal or not and whether the link is effective or not.
In one embodiment, the step of returning to execute the step of acquiring the service state flag of the target virtual machine in the cluster management system and setting the started service state as stopped according to the detection result, or the step of setting the stopped service state as started according to the detection result so that the cluster management system takes over the target virtual machine includes:
if the connection state of each virtual network card in the virtual network card set is normal and the link is effective, setting the service state in the stop state as the starting state to enable the cluster management system to take over the target virtual machine;
if the normal link set is an empty set, a certain virtual storage device in the virtual storage device set does not belong to a certain link in the second link set, the capacity of the virtual storage device is incorrect, the virtual storage device cannot access, a certain virtual network card in the virtual network card set is not connected, and the link of the certain virtual network card in the virtual network card set is invalid, the step of obtaining the service state mark of the target virtual machine in the cluster management system is executed in a return mode, and the service state mark which is started is set to be stopped.
According to another aspect of the present invention, there is provided a virtual machine cluster node daemon device, including:
the acquisition module is used for acquiring a service state mark of a target virtual machine in the cluster management system and setting the service state mark which is started as stop;
the service stopping module is used for stopping the cluster service provided by the target virtual machine;
the detection module is used for detecting the target virtual machine to obtain a detection result, and the detection comprises the detection of storage equipment mapping, virtual storage equipment and a virtual network card;
the first execution module is used for returning and executing the steps of acquiring the service state mark of the target virtual machine in the cluster management system and setting the started service state as the stopped service state according to the detection result, or setting the stopped service state as the started service state according to the detection result so as to enable the cluster management system to take over the target virtual machine;
and the second execution module is used for returning and executing the step of detecting the target virtual machine to obtain a detection result according to preset interval time when the cluster management system takes over the target virtual machine.
According to still another aspect of the present invention, there is also provided a computer apparatus including: at least one processor; and
a memory, in which a computer program executable on the processor is stored, and the processor performs the virtual machine cluster node daemon method when executing the program.
According to still another aspect of the present invention, there is also provided a computer-readable storage medium, in which a computer program is stored, and the computer program performs the foregoing virtual machine cluster node daemon method when being executed by a processor.
According to the virtual machine cluster node guarding method, device, equipment and storage medium, the service state mark is set and detected in the cluster management system, and the service state mark is modified by using the detection result of the target virtual machine, so that the virtual machine is seized and taken over when the virtual machine is abnormal, the virtual machine state and scheduling service are not detected by the cluster management system, the virtual machine in the cluster is prevented from carrying a fault to provide service, and the stability of cluster service is enhanced.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other embodiments can be obtained by using the drawings without creative efforts.
Fig. 1 is a schematic flowchart of a method for guarding a virtual machine cluster node according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a method for maintaining a node of a virtual machine cluster according to another embodiment of the present invention;
fig. 3 is a schematic diagram of a virtual machine cluster node daemon device according to another embodiment of the present invention;
fig. 4 is an internal structural view of a computer device according to another embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the following embodiments of the present invention are described in further detail with reference to the accompanying drawings.
It should be noted that all expressions using "first" and "second" in the embodiments of the present invention are used for distinguishing two entities with the same name but different names or different parameters, and it should be noted that "first" and "second" are merely for convenience of description and should not be construed as limitations of the embodiments of the present invention, and they are not described in any more detail in the following embodiments.
In an embodiment, please refer to fig. 1, which provides a method for guarding a virtual machine cluster node, specifically the method includes the following steps:
s100, acquiring a service state mark of a target virtual machine in the cluster management system and setting the service state mark in starting to be stopped.
S200, stopping the cluster service provided by the target virtual machine.
S300, detecting the target virtual machine to obtain a detection result, wherein the detection comprises the detection of storage device mapping, virtual storage devices and virtual network cards.
S400, according to the detection result, returning and executing the steps of obtaining the service state mark of the target virtual machine in the cluster management system and setting the service state in starting as stopping, or according to the detection result, setting the service state in stopping as starting to enable the cluster management system to take over the target virtual machine;
s500, if the cluster management system takes over the target virtual machine, the step of detecting the target virtual machine to obtain a detection result is returned and executed according to the preset interval time.
According to the virtual machine cluster node guarding method, the service state mark is set and detected in the cluster management system, and the service state mark is modified by using the detection result of the target virtual machine, so that the virtual machine is preempted and taken over when the virtual equipment is abnormal, the virtual machine state and scheduling service are not detected by the cluster management system, the virtual machine in the cluster is prevented from carrying a fault to provide service, and the stability of cluster service is enhanced.
In another embodiment, the step S200 specifically includes the following sub-steps: s210, reading cluster information;
s220, traversing the cluster information to determine a plurality of cluster services provided by the target virtual machine; acquiring the starting state of each cluster service;
and S230, if a certain cluster service is in a starting state, stopping the certain cluster service.
In another embodiment, the step S300 specifically includes the following sub-steps: :
s310, the mapping of the storage device on the target virtual machine is detected to obtain a first detection result.
S320, detecting the virtual storage device according to the first detection result to obtain a second detection result.
And S330, detecting the virtual network card according to the second detection result to obtain a third detection result.
Preferably, the specific implementation of step S310 is as follows:
s311, defining a normal link set;
s312, traversing a first link set of the target virtual machine connected to the memory, and performing state check on the first link set;
s313, if the state of a certain link in the first link set is normal, adding the certain link in the first link set into the normal link set, and if the state of the certain link in the first link set is abnormal, closing the certain link;
s314, scanning a host system environment corresponding to the target virtual machine to obtain a second link set available for the memory;
s315, if a certain link in the second link set does not belong to the first link set and the link can be successfully connected, adding the certain link in the second link set into the normal link set;
s316, detecting whether the normal link set is an empty set.
Preferably, the specific implementation of step S320 is as follows:
s321, if the normal link set is a non-empty set, traversing a virtual storage device set corresponding to a file system used by the target virtual machine;
s322, detecting whether each virtual storage device in the virtual storage device set belongs to a link in the second link set;
s323, if each virtual storage device in the virtual storage device set belongs to a link in the second link set, detecting whether the capacity of the virtual storage device is correct and whether the virtual storage device can be accessed.
Preferably, the specific implementation manner of step S330 is as follows:
s331, if the capacity of the virtual storage device is correct and the virtual storage device can be accessed, traversing the mapped virtual network card set of the target virtual machine;
s332, detecting whether the connection state of each virtual network card in the virtual network card set is normal and whether the link is effective.
According to the virtual machine cluster node guarding method, the virtual machine is managed by replacing the cluster management system when the service is stopped, the provided service is guaranteed to be in a stopped state before multiple detections on the virtual machine are failed, the virtual machine is controlled by the cluster management system only when all detections are normal, the virtual machine is detected circularly in the cluster operation process, the virtual machine can be found to be abnormal clear-headed in time, the cluster management system stops taking over the virtual machine node after the virtual machine node is abnormal, and the problem that the fault virtual machine node carries a fault to provide the cluster service is avoided.
In another embodiment, the foregoing step S400 specifically includes the following sub-steps:
s410, if the connection state of each virtual network card in the virtual network card set is normal and the link is effective, setting the service state in the stop state as the starting state to enable the cluster management system to take over the target virtual machine;
s420, if there is a situation that the normal link set is an empty set, a certain virtual storage device in the virtual storage device set does not belong to a certain link in the second link set, the capacity of the virtual storage device is incorrect, the virtual storage device cannot access, a certain virtual network card in the virtual network card set is not connected, and a link of a certain virtual network card in the virtual network card set is invalid, returning to execute the step of obtaining the service status flag of the target virtual machine in the cluster management system, and setting the service status flag that is in the start state as the stop state.
In another embodiment, referring to fig. 2, in order to facilitate understanding of the technical solution of the present invention, a specific example is described below, where the virtual machine cluster node daemon method of the present invention includes:
step 1, waiting for the target virtual machine and the cluster management system to finish starting.
And 2, if the target virtual machine is in a service starting state in the cluster management system, setting the target virtual machine to be in a service stopping state.
And step 3, reading the cluster information, traversing the cluster services provided by the target virtual machine, recording the cluster services as { c1, c2, … and cn }, and forcibly stopping the execution of the cluster services ci if the cluster services ci are in a starting state.
Step 4, detecting the mapping of the storage device in the virtual machine: defining a normal link g { }. Traversing the links of the current virtual machine connected to the memory, recording as s { s1, s2, …, sn }, and checking the link state of each link si; if the state of the link si is normal, adding the link si into the set g, and if the state of the link si is abnormal, closing the link si. And thirdly, scanning the system environment of the host corresponding to the target virtual machine so as to obtain the available links { t1, t2, … and tm } of the memory. For each link ti, skipping if the link ti is already included in the set s; otherwise, link ti is connected, and at this time, if the link ti is successful, the link ti is added into the set g. If the set g is empty, returning to execute the step 2; if the set g is not empty, proceed to step 5.
Step 5, verifying the virtual storage device: the virtual storage devices corresponding to the file systems used by the target virtual machines are traversed, and are denoted as d { d1, d2, … and dn }. Traversing the set g for the virtual storage device di corresponding to each file system, checking whether the device is included in a link of the set g in the step 4, if the virtual storage device d is not included in the set g, returning to the step 2, otherwise, continuing to execute the subsequent steps. Testing the capacity of the virtual storage device di corresponding to each file system to be correct and accessible; if the test fails (e.g., the capacity of the virtual storage device di is wrong, the virtual storage device di is inaccessible, the capacity of the virtual storage device di is wrong, and the virtual storage device di is inaccessible), then the step 2 is executed again.
Step 6, detecting the virtual network card: go through the virtual network card mapped by the virtual machine, and record as e { e1, e2, …, en }. And secondly, checking whether the internet access state is a connection state or not for each virtual network card ei, and if the virtual network card ei is not connected, returning to execute the step 2. And thirdly, detecting whether the link is real and effective or not for each virtual network card ei, and if the virtual network card ei is invalid, returning to execute the step 2.
And 7, if the target virtual machine is in the service stopping state in the cluster management system, setting the service state as the starting state.
And 8, monitoring the starting time after the service state is set to be started, and circularly returning to execute the step 4 after a certain time interval.
The virtual machine cluster node guarding method is characterized in that a set of control logic with priority higher than that of a cluster management system is set, after the virtual machine nodes are started, the virtual machine nodes are firstly set to be in a service stop state, the cluster management system is replaced when the virtual machine nodes are in the service stop state, the provided service is detected to be in the service stop state, the virtual storage device and the network card which are associated are circularly scanned and verified, the virtual storage device and the network card are handed over to the cluster management system control nodes only when no abnormality is detected, the effect of taking over the virtual machine when external hardware faults or service cannot be provided temporarily due to reasons can be achieved, the effect of providing service with faults is prevented, and developers can conveniently apply to research and development of related.
In another embodiment, referring to fig. 3, the present invention further provides a virtual machine cluster node daemon device 60, which specifically includes:
an obtaining module 61, configured to obtain a service state flag of a target virtual machine in a cluster management system and set the service state flag that is in a start state to a stop state;
a service stopping module 62, configured to stop the cluster service provided by the target virtual machine;
the detection module 63 is configured to detect the target virtual machine to obtain a detection result, where the detection includes storage device mapping, detection of a virtual storage device and detection of a virtual network card;
a first executing module 64, configured to return to execute the step of obtaining the service state flag of the target virtual machine in the cluster management system and setting the started service state as a stop according to the detection result, or set the stopped service state as a start according to the detection result so that the cluster management system takes over the target virtual machine;
a second executing module 65, configured to, when the cluster management system takes over the target virtual machine, return to execute the step of detecting the target virtual machine to obtain the detection result according to a preset interval time
It should be noted that, for specific limitations of a virtual machine cluster node daemon device, refer to the above limitations on a virtual machine cluster node daemon method, which are not described herein again. Each module in the above-mentioned virtual machine cluster node daemon device may be wholly or partially implemented by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 4. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for storing data. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to realize a virtual machine cluster node guarding method
According to yet another aspect of the present invention, there is provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the virtual machine cluster node daemon method described above.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A virtual machine cluster node daemon method, characterized in that the method comprises:
acquiring a service state mark of a target virtual machine in a cluster management system and setting the service state mark in starting to be stopped;
stopping the cluster service provided by the target virtual machine;
detecting the target virtual machine to obtain a detection result, wherein the detection comprises the detection of storage device mapping, virtual storage devices and virtual network cards;
returning and executing the steps of obtaining the service state mark of the target virtual machine in the cluster management system and setting the started service state as stopped according to the detection result, or setting the stopped service state as started according to the detection result so that the cluster management system takes over the target virtual machine;
and if the cluster management system takes over the target virtual machine, returning to execute the step of detecting the target virtual machine to obtain a detection result according to preset interval time.
2. The method of claim 1, wherein the step of stopping the cluster service provided by the target virtual machine comprises:
reading cluster information;
traversing the cluster information to determine a plurality of cluster services provided by a target virtual machine; acquiring the starting state of each cluster service;
and if the certain cluster service is in the starting state, stopping the certain cluster service.
3. The method of claim 1, wherein the step of detecting the target virtual machine to obtain the detection result comprises:
detecting the mapping of the storage equipment in the target virtual machine to obtain a first detection result;
detecting the virtual storage equipment according to the first detection result to obtain a second detection result;
and detecting the virtual network card according to the second detection result to obtain a third detection result.
4. The method of claim 3, wherein the step of detecting the mapping of the storage device in the target virtual machine to obtain the first detection result comprises:
defining a normal link set;
traversing a first link set of a target virtual machine connected to a memory, and carrying out state check on the first link set;
if the state of a certain link in the first link set is normal, adding the certain link in the first link set into the normal link set, and if the state of the certain link in the first link set is abnormal, closing the certain link;
scanning a host system environment corresponding to the target virtual machine to obtain a second link set available for the memory;
if a certain link in the second link set does not belong to the first link set and the link can be successfully connected, adding the certain link in the second link set into the normal link set;
detecting whether the normal link set is an empty set.
5. The method according to claim 4, wherein the step of detecting the virtual storage device according to the first detection result to obtain a second detection result comprises:
if the normal link set is a non-empty set, traversing a virtual storage device set corresponding to a file system used by the target virtual machine;
detecting whether each virtual storage device in the virtual storage device set belongs to a link in the second link set;
and if each virtual storage device in the virtual storage device set belongs to a certain link in the second link set, detecting whether the capacity of the virtual storage device is correct and whether the virtual storage device can be accessed.
6. The method according to claim 5, wherein the step of detecting the virtual network card according to the second detection result to obtain a third detection result comprises:
traversing the mapped virtual network card set of the target virtual machine if the capacity of the virtual storage equipment is correct and can be accessed;
and detecting whether the connection state of each virtual network card in the virtual network card set is normal or not and whether the link is effective or not.
7. The method according to claim 6, wherein the step of returning and executing the step of obtaining the service state flag of the target virtual machine in the cluster management system and setting the started service state as stopped according to the detection result, or the step of setting the stopped service state as started according to the detection result so that the cluster management system takes over the target virtual machine comprises:
if the connection state of each virtual network card in the virtual network card set is normal and the link is effective, setting the service state in the stop state as the starting state to enable the cluster management system to take over the target virtual machine;
if the normal link set is an empty set, a certain virtual storage device in the virtual storage device set does not belong to a certain link in the second link set, the capacity of the virtual storage device is incorrect, the virtual storage device cannot access, a certain virtual network card in the virtual network card set is not connected, and the link of the certain virtual network card in the virtual network card set is invalid, the step of obtaining the service state mark of the target virtual machine in the cluster management system is executed in a return mode, and the service state mark which is started is set to be stopped.
8. An apparatus for virtual machine cluster node daemon, the apparatus comprising:
the acquisition module is used for acquiring a service state mark of a target virtual machine in the cluster management system and setting the service state mark which is started as stop;
the service stopping module is used for stopping the cluster service provided by the target virtual machine;
the detection module is used for detecting the target virtual machine to obtain a detection result, and the detection comprises the detection of storage equipment mapping, virtual storage equipment and a virtual network card;
the first execution module is used for returning and executing the steps of acquiring the service state mark of the target virtual machine in the cluster management system and setting the started service state as the stopped service state according to the detection result, or setting the stopped service state as the started service state according to the detection result so as to enable the cluster management system to take over the target virtual machine;
and the second execution module is used for returning and executing the step of detecting the target virtual machine to obtain a detection result according to preset interval time when the cluster management system takes over the target virtual machine.
9. A computer device, comprising:
at least one processor; and
a memory storing a computer program operable on the processor, the processor when executing the program performing the method of any of claims 1-7.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, is adapted to carry out the method of any one of claims 1 to 7.
CN202010819402.XA 2020-08-14 2020-08-14 Virtual machine cluster node guarding method, device, equipment and storage medium Active CN111966461B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010819402.XA CN111966461B (en) 2020-08-14 2020-08-14 Virtual machine cluster node guarding method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010819402.XA CN111966461B (en) 2020-08-14 2020-08-14 Virtual machine cluster node guarding method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111966461A true CN111966461A (en) 2020-11-20
CN111966461B CN111966461B (en) 2023-01-06

Family

ID=73366106

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010819402.XA Active CN111966461B (en) 2020-08-14 2020-08-14 Virtual machine cluster node guarding method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111966461B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115190040A (en) * 2022-05-23 2022-10-14 浪潮通信技术有限公司 Method and device for realizing high availability of virtual machine
CN115250246A (en) * 2022-09-21 2022-10-28 之江实验室 Method and computer system for monitoring node state in virtual machine cluster

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103778031A (en) * 2014-01-15 2014-05-07 华中科技大学 Distributed system multilevel fault tolerance method under cloud environment
CN107943555A (en) * 2017-10-17 2018-04-20 华南理工大学 Big data storage and processing platform and processing method under a kind of cloud computing environment
CN108923992A (en) * 2018-08-23 2018-11-30 郑州云海信息技术有限公司 A kind of NAS cluster high availability method, system and electronic equipment and storage medium
CN109391691A (en) * 2018-10-18 2019-02-26 郑州云海信息技术有限公司 The restoration methods and relevant apparatus that NAS is serviced under a kind of single node failure

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103778031A (en) * 2014-01-15 2014-05-07 华中科技大学 Distributed system multilevel fault tolerance method under cloud environment
CN107943555A (en) * 2017-10-17 2018-04-20 华南理工大学 Big data storage and processing platform and processing method under a kind of cloud computing environment
CN108923992A (en) * 2018-08-23 2018-11-30 郑州云海信息技术有限公司 A kind of NAS cluster high availability method, system and electronic equipment and storage medium
CN109391691A (en) * 2018-10-18 2019-02-26 郑州云海信息技术有限公司 The restoration methods and relevant apparatus that NAS is serviced under a kind of single node failure

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115190040A (en) * 2022-05-23 2022-10-14 浪潮通信技术有限公司 Method and device for realizing high availability of virtual machine
CN115190040B (en) * 2022-05-23 2023-09-29 浪潮通信技术有限公司 High-availability realization method and device for virtual machine
CN115250246A (en) * 2022-09-21 2022-10-28 之江实验室 Method and computer system for monitoring node state in virtual machine cluster
CN115250246B (en) * 2022-09-21 2022-12-06 之江实验室 Method and computer system for monitoring node state in virtual machine cluster

Also Published As

Publication number Publication date
CN111966461B (en) 2023-01-06

Similar Documents

Publication Publication Date Title
CN110941528B (en) Log buried point setting method, device and system based on fault
CN111966461B (en) Virtual machine cluster node guarding method, device, equipment and storage medium
CN110162420B (en) Data auxiliary positioning method and device, computer equipment and storage medium
CN105988798B (en) Patch processing method and device
CN107516547A (en) The processing method and processing device of internal memory hard error
CN109324961B (en) System automatic test method, device, computer equipment and storage medium
CN109120616A (en) A kind of identity identifying method, device, agency service end and storage medium
CN112613993A (en) Transaction data processing method and device, computer equipment and storage medium
CN112685391A (en) Service data migration method and device, computer equipment and storage medium
CN110147354B (en) Batch data editing method, device, computer equipment and storage medium
CN111935104A (en) Internet of things equipment illegal access detection method and device and computer equipment
CN117391099B (en) Data downloading and checking method and system for smart card and storage medium
CN117195129A (en) Exception handling method based on sandbox system and related equipment
CN113407374A (en) Fault processing method and device, fault processing equipment and storage medium
CN110231921B (en) Log printing method, device, equipment and computer readable storage medium
CN112561506A (en) Live broadcast data processing method, system, device and medium based on virtual currency
CN111506388A (en) Container performance detection method, container management platform and computer storage medium
CN106570685B (en) Service processing method and device
CN111460256A (en) Webpage data crawling method and device, computer equipment and storage medium
CN114579473B (en) Application testing method, device, equipment and storage medium
CN112751782B (en) Flow switching method, device, equipment and medium based on multi-activity data center
CN111694724A (en) Testing method and device of distributed table system, electronic equipment and storage medium
CN114944942A (en) Data reporting method and device based on effective buried points, computer equipment and medium
CN112631821A (en) Memory fault detection positioning method and device, computer equipment and storage medium
CN110740062A (en) Breakpoint resume method and device

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