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

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

Info

Publication number
CN110990118A
CN110990118A CN201911161205.7A CN201911161205A CN110990118A CN 110990118 A CN110990118 A CN 110990118A CN 201911161205 A CN201911161205 A CN 201911161205A CN 110990118 A CN110990118 A CN 110990118A
Authority
CN
China
Prior art keywords
virtual machine
resource
request
evacuation request
cluster
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.)
Withdrawn
Application number
CN201911161205.7A
Other languages
Chinese (zh)
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.)
Beijing Inspur Data Technology Co Ltd
Original Assignee
Beijing Inspur Data 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 Beijing Inspur Data Technology Co Ltd filed Critical Beijing Inspur Data Technology Co Ltd
Priority to CN201911161205.7A priority Critical patent/CN110990118A/en
Publication of CN110990118A publication Critical patent/CN110990118A/en
Withdrawn legal-status Critical Current

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/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/485Task life-cycle, e.g. stopping, restarting, resuming execution
    • G06F9/4856Task life-cycle, e.g. stopping, restarting, resuming execution resumption being on a different machine, e.g. task migration, virtual machine migration
    • 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • 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/4557Distribution of virtual machine instances; Migration and load balancing
    • 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/45587Isolation or security of virtual machine instances
    • 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 application discloses a method, a device and equipment for high availability of a virtual machine, which comprise the following steps: when the nodes in the cluster are monitored to have faults, generating a virtual machine evacuation request aiming at each fault node; determining resource requirements corresponding to the virtual machine evacuation requests one by one; judging whether available resources in the cluster meet resource requirements corresponding to the current virtual machine evacuation request; if so, determining a target migration node corresponding to the current virtual machine evacuation request and corresponding standby resources according to the resource requirements, migrating the virtual machine on the corresponding fault node to the target migration node, and then performing corresponding virtual machine recovery operation on the target migration node; and if not, fusing the virtual machine evacuation request. Therefore, the condition of resource contention generated when the virtual machine on the evacuation fault node is evacuated can be avoided, and the evacuation request is fused in time when the available resources in the cluster are insufficient, so that the stability of the system is ensured.

Description

High-availability method, device and equipment for virtual machine
Technical Field
The application relates to the technical field of cloud computing, in particular to a high-availability method, device and equipment for a virtual machine.
Background
Virtualization is a physical model that can make full use of physical resources and realize sharing of computing resources through the internet. It can provide resource and service according to need, and can make dynamic allocation for resource. While virtualization is continuously developed, a virtual machine is used as a central point for realizing technology, so that how to ensure that the virtual machine running on the local system can be evacuated to other nodes in a healthy state to run under the condition that a certain node of the local system fails is to ensure that the virtual machine can continuously receive the management of the system, and the realization of high availability of the virtual machine is a huge challenge faced by the current virtualization technology. The existing high-availability scheme of the virtual machine is generally realized by 3 modules of monitoring, isolating and recovering. The monitoring module realizes the state monitoring of the node and reports the node health state information; the isolation module realizes the isolation of the fault node; and the recovery module realizes the recovery of the running virtual machine on the fault node. However, when a large number of nodes in the environment fail to trigger simultaneous evacuation of a large number of virtual machines, available resources of the whole system may be insufficient, and even if the virtual machines on the failed nodes are evacuated, the virtual machines are not evacuated successfully and resource contention may occur, so that high availability causes adverse effects and seriously affects the stability of the system.
Disclosure of Invention
In view of this, an object of the present application is to provide a method, an apparatus, and a device for virtual machine high availability, which can avoid resource contention when a virtual machine on a failed node is evacuated, and perform fusing of an evacuation request when available resources in a cluster are insufficient in time, thereby ensuring system stability. The specific scheme is as follows:
in a first aspect, the present application discloses a high availability method for a virtual machine, including:
when the nodes in the cluster are monitored to have faults, generating a virtual machine evacuation request aiming at each fault node;
determining resource requirements corresponding to the virtual machine evacuation requests one by one;
judging whether available resources in the cluster meet the resource requirement corresponding to the current virtual machine evacuation request;
if available resources in the cluster meet the resource requirement corresponding to the current virtual machine evacuation request, determining a target migration node corresponding to the current virtual machine evacuation request and corresponding standby resources according to the resource requirement, migrating the virtual machine on the corresponding fault node to the target migration node, and then performing corresponding virtual machine recovery operation on the target migration node;
and if the available resources in the cluster do not meet the resource requirement corresponding to the current virtual machine evacuation request, fusing the virtual machine evacuation request.
Optionally, the method further includes:
creating a request resource bucket, an available resource bucket and a pre-allocation resource bucket; the request resource bucket is used for placing the virtual machine evacuation request, the available resource bucket is used for placing available resources of all nodes in the cluster, and the pre-allocation resource bucket is used for placing the virtual machine evacuation request of the pre-allocation resources.
Optionally, after generating the virtual machine evacuation request for the current failed node, the method further includes:
acquiring the virtual machine evacuation request through a request resource bucket;
correspondingly, the determining the resource requirements corresponding to the virtual machine evacuation requests one by one includes:
and taking the virtual machine evacuation requests out of the request resource bucket one by one, and determining the resource requirements corresponding to the virtual machine evacuation requests taken out each time.
Optionally, the determining whether the available resources in the cluster meet the resource demand corresponding to the current virtual machine evacuation request includes:
judging whether the resources in the available resource bucket meet the resource requirement of the current virtual machine evacuation request, if the resources in the available resource bucket meet the resource requirement of the current virtual machine evacuation request, judging that the available resources in the cluster meet the resource requirement corresponding to the current virtual machine evacuation request, and if the resources in the available resource bucket do not meet the resource requirement of the current virtual machine evacuation request, judging that the available resources in the cluster do not meet the resource requirement corresponding to the current virtual machine evacuation request.
Optionally, after determining, according to the resource demand, a target migration node and a corresponding standby resource corresponding to the current virtual machine evacuation request if the available resources in the cluster meet the resource demand corresponding to the current virtual machine evacuation request, the method further includes:
updating resources in the available resource bucket;
and placing the current virtual machine evacuation request into the pre-allocation resource bucket, and waiting for an evacuation request processing operation of migrating the virtual machine on the corresponding fault node to the target migration node.
Optionally, if the available resources in the cluster do not meet the resource demand corresponding to the current virtual machine evacuation request, fusing the virtual machine evacuation request, including:
and if the available resources in the cluster do not meet the resource requirement corresponding to the current virtual machine evacuation request, starting a fuse switch, and emptying the virtual machine evacuation request in the request resource bucket.
Optionally, the obtaining the virtual machine evacuation request by requesting the resource bucket includes:
and if the current fuse switch is off, the request resource bucket receives the virtual machine evacuation request, and if the current fuse switch is on, the request resource bucket refuses the virtual machine evacuation request and empties the resource request bucket.
Optionally, after monitoring that a node in the cluster fails, the method further includes:
and closing the current fault node in an isolation way.
In a second aspect, the present application discloses a virtual machine high availability apparatus, including:
the evacuation request generation module is used for generating a virtual machine evacuation request aiming at each failed node when the nodes in the cluster are monitored to have faults;
the resource demand determining module is used for determining resource demands corresponding to the virtual machine evacuation requests one by one;
the available resource judging module is used for judging whether the available resources in the cluster meet the resource requirement corresponding to the current virtual machine evacuation request;
the evacuation request processing module is used for determining a target migration node and corresponding standby resources corresponding to the current virtual machine evacuation request according to the resource requirements if the available resources in the cluster meet the resource requirements corresponding to the current virtual machine evacuation request, migrating the virtual machine on the corresponding fault node to the target migration node, and then performing corresponding virtual machine recovery operation on the target migration node;
and the evacuation request fusing module is used for fusing the virtual machine evacuation request if the available resources in the cluster do not meet the resource requirement corresponding to the current virtual machine evacuation request.
In a third aspect, the application discloses a virtual machine high availability device, comprising a processor and a memory; wherein the content of the first and second substances,
the memory is used for storing a computer program;
the processor is used for executing the computer program to realize the virtual machine high availability method.
Therefore, when the nodes in the cluster are monitored to have faults, a virtual machine evacuation request aiming at each fault node is generated; determining resource requirements corresponding to the virtual machine evacuation requests one by one; judging whether available resources in the cluster meet the resource requirement corresponding to the current virtual machine evacuation request; if available resources in the cluster meet the resource requirement corresponding to the current virtual machine evacuation request, determining a target migration node corresponding to the current virtual machine evacuation request and corresponding standby resources according to the resource requirement, migrating the virtual machine on the corresponding fault node to the target migration node, and then performing corresponding virtual machine recovery operation on the target migration node; and if the available resources in the cluster do not meet the resource requirement corresponding to the current virtual machine evacuation request, fusing the virtual machine evacuation request. Therefore, the resource requirements corresponding to the virtual machine evacuation requests are determined one by one, the virtual machine evacuation requests are correspondingly processed according to the conditions of available resources in the current cluster, the condition of resource contention generated when the virtual machines on the evacuation fault nodes are evacuated can be avoided, and the evacuation requests are fused when the available resources in the cluster are insufficient, so that the stability of the system is guaranteed.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a flow chart of a method for high availability of virtual machines according to the present disclosure;
FIG. 2 is a flow chart of a specific method for high availability of virtual machines disclosed herein;
FIG. 3 is a schematic diagram of a virtual machine high availability apparatus according to the present disclosure;
fig. 4 is a diagram of a structure of a virtual machine high availability device disclosed in the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 1, an embodiment of the present application discloses a method for high availability of a virtual machine, including:
step S11: and when the nodes in the cluster are monitored to have faults, generating a virtual machine evacuation request aiming at each fault node.
In a specific embodiment, when a node in the cluster is monitored to have a fault, a virtual machine evacuation request for each fault node is generated, and the current fault node can be isolated and shut down, so that the virtual machine is prevented from being created or migrated to the node. Moreover, the method and the system support the customer to manually restore the fault node.
Step S12: and determining the resource demands corresponding to the virtual machine evacuation requests one by one.
Step S13: and judging whether the available resources in the cluster meet the resource requirement corresponding to the current virtual machine evacuation request.
In a specific implementation manner, the virtual machine evacuation requests may be cached, then the virtual machine evacuation requests are taken out one by one from the cache, and after one virtual machine evacuation request is taken out, whether available resources in the cluster meet a resource requirement corresponding to the current virtual machine evacuation request is determined, and then corresponding processing is performed according to a determination result.
Step S14: if available resources in the cluster meet the resource requirement corresponding to the current virtual machine evacuation request, determining a target migration node corresponding to the current virtual machine evacuation request and corresponding standby resources according to the resource requirement, migrating the virtual machine on the corresponding fault node to the target migration node, and then performing corresponding virtual machine recovery operation on the target migration node.
In a specific implementation manner, if available resources in a cluster meet a resource requirement corresponding to a current virtual machine evacuation request, a target migration node corresponding to the current virtual machine evacuation request and corresponding standby resources are determined according to the resource requirement, and then the available resource state in the cluster is updated, that is, the standby resources corresponding to the current virtual machine evacuation request are subtracted from the available resources, so that the standby resources are prevented from being reallocated by the subsequent virtual machine evacuation request, and resource contention is avoided.
Step S15: and if the available resources in the cluster do not meet the resource requirement corresponding to the current virtual machine evacuation request, fusing the virtual machine evacuation request.
That is, when there is insufficient available resources in the cluster, processing of the virtual machine evacuation request is stopped.
As can be seen, in the embodiment of the present application, when it is monitored that a node in a cluster fails, a virtual machine evacuation request for each failed node is generated; determining resource requirements corresponding to the virtual machine evacuation requests one by one; judging whether available resources in the cluster meet the resource requirement corresponding to the current virtual machine evacuation request; if available resources in the cluster meet the resource requirement corresponding to the current virtual machine evacuation request, determining a target migration node corresponding to the current virtual machine evacuation request and corresponding standby resources according to the resource requirement, migrating the virtual machine on the corresponding fault node to the target migration node, and then performing corresponding virtual machine recovery operation on the target migration node; and if the available resources in the cluster do not meet the resource requirement corresponding to the current virtual machine evacuation request, fusing the virtual machine evacuation request. Therefore, the resource requirements corresponding to the virtual machine evacuation requests are determined one by one, the virtual machine evacuation requests are correspondingly processed according to the conditions of available resources in the current cluster, the condition of resource contention generated when the virtual machines on the evacuation fault nodes are evacuated can be avoided, and the evacuation requests are fused when the available resources in the cluster are insufficient, so that the stability of the system is guaranteed.
Referring to fig. 2, the present application discloses a specific method for high availability of a virtual machine, including:
step S201: creating a request resource bucket, an available resource bucket and a pre-allocation resource bucket; the request resource bucket is used for placing the virtual machine evacuation request, the available resource bucket is used for placing available resources of all nodes in the cluster, and the pre-allocation resource bucket is used for placing the virtual machine evacuation request of the pre-allocation resources. And in the system initialization stage, the resource bucket is requested to be empty and the pre-allocated resource bucket is empty, and available resources in the cluster are counted and placed in the available resource bucket.
Step S202: and when the nodes in the cluster are monitored to have faults, generating a virtual machine evacuation request aiming at each fault node.
Step S203: and acquiring the virtual machine evacuation request through a request resource bucket.
In a specific implementation manner, if the current fuse switch is off, the request resource bucket accepts the virtual machine evacuation request, and if the current fuse switch is on, the request resource bucket rejects the virtual machine evacuation request and empties the resource request bucket, where the switch state of the fuse switch is determined according to the available resource condition in the cluster, and is turned on when the available resource is insufficient, otherwise, the fuse switch is turned off, and the fuse switch is turned off in a system initialization stage.
Step S204: and determining the resource demands corresponding to the virtual machine evacuation requests one by one.
In a specific embodiment, the virtual machine evacuation requests are taken out from the request resource bucket one by one, and a resource requirement corresponding to the virtual machine evacuation request taken out each time is determined. The subsequent processing steps are performed one by one.
Step S205: and judging whether the available resources in the cluster meet the resource requirement corresponding to the current virtual machine evacuation request.
In a specific embodiment, it is determined whether the resources in the available resource bucket meet the resource requirement of the current virtual machine evacuation request, if the resources in the available resource bucket meet the resource requirement of the current virtual machine evacuation request, it is determined that the available resources in the cluster meet the resource requirement corresponding to the current virtual machine evacuation request, and if the resources in the available resource bucket do not meet the resource requirement of the current virtual machine evacuation request, it is determined that the available resources in the cluster do not meet the resource requirement corresponding to the current virtual machine evacuation request.
Step S206: and if the available resources in the cluster meet the resource requirement corresponding to the current virtual machine evacuation request, determining a target migration node corresponding to the current virtual machine evacuation request and corresponding standby resources according to the resource requirement.
Step S207: updating resources in the available resource bucket.
In particular embodiments, the currently determined inactive resources are subtracted from the available resource bucket, and the available resource value is updated.
Step S208: and placing the current virtual machine evacuation request into the pre-allocation resource bucket, and waiting for an evacuation request processing operation of migrating the virtual machine on the corresponding fault node to the target migration node.
In a specific implementation manner, the current virtual machine evacuation request is placed in the pre-allocated resource bucket, and the evacuation request processing operation of migrating the virtual machine on the corresponding fault node to the target migration node is queued to wait.
Step S209: and migrating the virtual machine on the corresponding fault node to the target migration node, and then performing corresponding virtual machine recovery operation on the target migration node.
Step S210: and if the available resources in the cluster do not meet the resource requirement corresponding to the current virtual machine evacuation request, fusing the virtual machine evacuation request.
In a specific embodiment, if the available resources in the cluster do not meet the resource requirement corresponding to the current virtual machine evacuation request, the fuse switch is turned on, the virtual machine evacuation request in the request resource bucket is cleared, and the virtual machine evacuation request is no longer received.
In addition, the present embodiment may monitor the state of the available resources in the cluster in real time, turn on the fuse switch, and turn off the fuse switch when the available resources meet the evacuation requirement of the virtual machine, and of course, the user may also turn off the fuse switch manually after the available resources are artificially met.
Referring to fig. 3, the present application discloses a virtual machine high availability apparatus, including:
an evacuation request generating module 11, configured to generate a virtual machine evacuation request for each failed node when it is monitored that a node in the cluster fails;
a resource demand determining module 12, configured to determine resource demands corresponding to the virtual machine evacuation requests one by one;
an available resource judging module 13, configured to judge whether available resources in the cluster meet a resource requirement corresponding to the current virtual machine evacuation request;
an evacuation request processing module 14, configured to determine, according to a resource demand, a target migration node and a corresponding standby resource corresponding to the current virtual machine evacuation request, and migrate a virtual machine on a corresponding failed node to the target migration node, and then perform a corresponding virtual machine recovery operation on the target migration node, if the available resources in the cluster meet the resource demand corresponding to the current virtual machine evacuation request;
and the evacuation request fusing module 15 is configured to fuse the virtual machine evacuation request if the available resources in the cluster do not meet the resource requirement corresponding to the current virtual machine evacuation request.
As can be seen, in the embodiment of the present application, when it is monitored that a node in a cluster fails, a virtual machine evacuation request for each failed node is generated; determining resource requirements corresponding to the virtual machine evacuation requests one by one; judging whether available resources in the cluster meet the resource requirement corresponding to the current virtual machine evacuation request; if available resources in the cluster meet the resource requirement corresponding to the current virtual machine evacuation request, determining a target migration node corresponding to the current virtual machine evacuation request and corresponding standby resources according to the resource requirement, migrating the virtual machine on the corresponding fault node to the target migration node, and then performing corresponding virtual machine recovery operation on the target migration node; and if the available resources in the cluster do not meet the resource requirement corresponding to the current virtual machine evacuation request, fusing the virtual machine evacuation request. Therefore, the resource requirements corresponding to the virtual machine evacuation requests are determined one by one, the virtual machine evacuation requests are correspondingly processed according to the conditions of available resources in the current cluster, the condition of resource contention generated when the virtual machines on the evacuation fault nodes are evacuated can be avoided, and the evacuation requests are fused when the available resources in the cluster are insufficient, so that the stability of the system is guaranteed.
The system also comprises a resource bucket establishing module which is used for establishing a request resource bucket, an available resource bucket and a pre-allocation resource bucket; the request resource bucket is used for placing the virtual machine evacuation request, the available resource bucket is used for placing available resources of all nodes in the cluster, and the pre-allocation resource bucket is used for placing the virtual machine evacuation request of the pre-allocation resources.
The system also comprises an evacuation request acquisition module which is used for acquiring the evacuation request of the virtual machine through a request resource bucket; correspondingly, the resource requirement determining module 12 is specifically configured to take out the virtual machine evacuation requests from the request resource bucket one by one, and determine a resource requirement corresponding to the virtual machine evacuation request taken out each time. And the evacuation request obtaining module is specifically configured to accept the virtual machine evacuation request by the request resource bucket if the current fuse switch is off, and reject the virtual machine evacuation request and empty the resource request bucket if the current fuse switch is on.
The available resource determining module 13 is specifically configured to determine whether the resources in the available resource bucket meet the resource requirement of the current virtual machine evacuation request, determine that the available resources in the cluster meet the resource requirement corresponding to the current virtual machine evacuation request if the resources in the available resource bucket meet the resource requirement of the current virtual machine evacuation request, and determine that the available resources in the cluster do not meet the resource requirement corresponding to the current virtual machine evacuation request if the resources in the available resource bucket do not meet the resource requirement of the current virtual machine evacuation request.
The evacuation request processing module 14 includes a resource updating submodule and an evacuation waiting submodule, where the resource updating submodule is used to update the resources in the available resource bucket; and the evacuation waiting submodule is used for placing the current virtual machine evacuation request into the pre-allocated resource bucket and waiting for the evacuation request processing operation of migrating the virtual machine on the corresponding fault node to the target migration node.
The evacuation request fusing module 15 is specifically configured to, if available resources in the cluster do not meet the resource requirement corresponding to the current virtual machine evacuation request, turn on a fuse switch, and empty the virtual machine evacuation request in the request resource bucket.
The system also comprises a fault node isolation module which is used for isolating and closing the current fault node.
Referring to fig. 4, an embodiment of the present application discloses a virtual machine high availability device, which includes a processor 21 and a memory 22; wherein, the memory 22 is used for saving computer programs; the processor 21 is configured to execute the computer program to implement the following steps:
when the nodes in the cluster are monitored to have faults, generating a virtual machine evacuation request aiming at each fault node; determining resource requirements corresponding to the virtual machine evacuation requests one by one; judging whether available resources in the cluster meet the resource requirement corresponding to the current virtual machine evacuation request; if available resources in the cluster meet the resource requirement corresponding to the current virtual machine evacuation request, determining a target migration node corresponding to the current virtual machine evacuation request and corresponding standby resources according to the resource requirement, migrating the virtual machine on the corresponding fault node to the target migration node, and then performing corresponding virtual machine recovery operation on the target migration node; and if the available resources in the cluster do not meet the resource requirement corresponding to the current virtual machine evacuation request, fusing the virtual machine evacuation request.
As can be seen, in the embodiment of the present application, when it is monitored that a node in a cluster fails, a virtual machine evacuation request for each failed node is generated; determining resource requirements corresponding to the virtual machine evacuation requests one by one; judging whether available resources in the cluster meet the resource requirement corresponding to the current virtual machine evacuation request; if available resources in the cluster meet the resource requirement corresponding to the current virtual machine evacuation request, determining a target migration node corresponding to the current virtual machine evacuation request and corresponding standby resources according to the resource requirement, migrating the virtual machine on the corresponding fault node to the target migration node, and then performing corresponding virtual machine recovery operation on the target migration node; and if the available resources in the cluster do not meet the resource requirement corresponding to the current virtual machine evacuation request, fusing the virtual machine evacuation request. Therefore, the resource requirements corresponding to the virtual machine evacuation requests are determined one by one, the virtual machine evacuation requests are correspondingly processed according to the conditions of available resources in the current cluster, the condition of resource contention generated when the virtual machines on the evacuation fault nodes are evacuated can be avoided, and the evacuation requests are fused when the available resources in the cluster are insufficient, so that the stability of the system is guaranteed.
In this embodiment, when the processor 21 executes the computer subprogram stored in the memory 22, the following steps may be specifically implemented: creating a request resource bucket, an available resource bucket and a pre-allocation resource bucket; the request resource bucket is used for placing the virtual machine evacuation request, the available resource bucket is used for placing available resources of all nodes in the cluster, and the pre-allocation resource bucket is used for placing the virtual machine evacuation request of the pre-allocation resources.
In this embodiment, when the processor 21 executes the computer subprogram stored in the memory 22, the following steps may be specifically implemented: acquiring the virtual machine evacuation request through a request resource bucket; and taking the virtual machine evacuation requests out of the request resource bucket one by one, and determining the resource requirements corresponding to the virtual machine evacuation requests taken out each time.
In this embodiment, when the processor 21 executes the computer subprogram stored in the memory 22, the following steps may be specifically implemented: judging whether the resources in the available resource bucket meet the resource requirement of the current virtual machine evacuation request, if the resources in the available resource bucket meet the resource requirement of the current virtual machine evacuation request, judging that the available resources in the cluster meet the resource requirement corresponding to the current virtual machine evacuation request, and if the resources in the available resource bucket do not meet the resource requirement of the current virtual machine evacuation request, judging that the available resources in the cluster do not meet the resource requirement corresponding to the current virtual machine evacuation request.
In this embodiment, when the processor 21 executes the computer subprogram stored in the memory 22, the following steps may be specifically implemented: updating resources in the available resource bucket; and placing the current virtual machine evacuation request into the pre-allocation resource bucket, and waiting for an evacuation request processing operation of migrating the virtual machine on the corresponding fault node to the target migration node.
In this embodiment, when the processor 21 executes the computer subprogram stored in the memory 22, the following steps may be specifically implemented: and if the available resources in the cluster do not meet the resource requirement corresponding to the current virtual machine evacuation request, starting a fuse switch, and emptying the virtual machine evacuation request in the request resource bucket.
In this embodiment, when the processor 21 executes the computer subprogram stored in the memory 22, the following steps may be specifically implemented: and if the current fuse switch is off, the request resource bucket receives the virtual machine evacuation request, and if the current fuse switch is on, the request resource bucket refuses the virtual machine evacuation request and empties the resource request bucket.
In this embodiment, when the processor 21 executes the computer subprogram stored in the memory 22, the following steps may be specifically implemented: and closing the current fault node in an isolation way.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The above detailed description is given to a method, an apparatus, and a device for virtual machine high availability provided by the present application, and a specific example is applied in the present application to explain the principle and the implementation of the present application, and the description of the above embodiment is only used to help understand the method and the core idea of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. A method for high availability of a virtual machine, comprising:
when the nodes in the cluster are monitored to have faults, generating a virtual machine evacuation request aiming at each fault node;
determining resource requirements corresponding to the virtual machine evacuation requests one by one;
judging whether available resources in the cluster meet the resource requirement corresponding to the current virtual machine evacuation request;
if available resources in the cluster meet the resource requirement corresponding to the current virtual machine evacuation request, determining a target migration node corresponding to the current virtual machine evacuation request and corresponding standby resources according to the resource requirement, migrating the virtual machine on the corresponding fault node to the target migration node, and then performing corresponding virtual machine recovery operation on the target migration node;
and if the available resources in the cluster do not meet the resource requirement corresponding to the current virtual machine evacuation request, fusing the virtual machine evacuation request.
2. The method for high availability of a virtual machine according to claim 1, further comprising:
creating a request resource bucket, an available resource bucket and a pre-allocation resource bucket; the request resource bucket is used for placing the virtual machine evacuation request, the available resource bucket is used for placing available resources of all nodes in the cluster, and the pre-allocation resource bucket is used for placing the virtual machine evacuation request of the pre-allocation resources.
3. The method of claim 2, wherein after generating the virtual machine evacuation request for the currently failed node, the method further comprises:
acquiring the virtual machine evacuation request through a request resource bucket;
correspondingly, the determining the resource requirements corresponding to the virtual machine evacuation requests one by one includes:
and taking the virtual machine evacuation requests out of the request resource bucket one by one, and determining the resource requirements corresponding to the virtual machine evacuation requests taken out each time.
4. The method according to claim 3, wherein the determining whether the available resources in the cluster meet the resource requirement corresponding to the current virtual machine evacuation request includes:
judging whether the resources in the available resource bucket meet the resource requirement of the current virtual machine evacuation request, if the resources in the available resource bucket meet the resource requirement of the current virtual machine evacuation request, judging that the available resources in the cluster meet the resource requirement corresponding to the current virtual machine evacuation request, and if the resources in the available resource bucket do not meet the resource requirement of the current virtual machine evacuation request, judging that the available resources in the cluster do not meet the resource requirement corresponding to the current virtual machine evacuation request.
5. The method according to claim 4, wherein after determining a target migration node and a corresponding standby resource corresponding to the current virtual machine evacuation request according to the resource demand if the available resources in the cluster meet the resource demand corresponding to the current virtual machine evacuation request, the method further comprises:
updating resources in the available resource bucket;
and placing the current virtual machine evacuation request into the pre-allocation resource bucket, and waiting for an evacuation request processing operation of migrating the virtual machine on the corresponding fault node to the target migration node.
6. The method according to claim 4, wherein the fusing the virtual machine evacuation request if the available resources in the cluster do not meet the resource requirement corresponding to the current virtual machine evacuation request comprises:
and if the available resources in the cluster do not meet the resource requirement corresponding to the current virtual machine evacuation request, starting a fuse switch, and emptying the virtual machine evacuation request in the request resource bucket.
7. The method according to claim 6, wherein the obtaining the virtual machine evacuation request through the request resource bucket comprises:
and if the current fuse switch is off, the request resource bucket receives the virtual machine evacuation request, and if the current fuse switch is on, the request resource bucket refuses the virtual machine evacuation request and empties the resource request bucket.
8. The virtual machine high availability method according to any one of claims 1 to 7, wherein after monitoring that a node in the cluster fails, the method further comprises:
and closing the current fault node in an isolation way.
9. A virtual machine high availability apparatus, comprising:
the evacuation request generation module is used for generating a virtual machine evacuation request aiming at each failed node when the nodes in the cluster are monitored to have faults;
the resource demand determining module is used for determining resource demands corresponding to the virtual machine evacuation requests one by one;
the available resource judging module is used for judging whether the available resources in the cluster meet the resource requirement corresponding to the current virtual machine evacuation request;
the evacuation request processing module is used for determining a target migration node and corresponding standby resources corresponding to the current virtual machine evacuation request according to the resource requirements if the available resources in the cluster meet the resource requirements corresponding to the current virtual machine evacuation request, migrating the virtual machine on the corresponding fault node to the target migration node, and then performing corresponding virtual machine recovery operation on the target migration node;
and the evacuation request fusing module is used for fusing the virtual machine evacuation request if the available resources in the cluster do not meet the resource requirement corresponding to the current virtual machine evacuation request.
10. A virtual machine high availability device, comprising a processor and a memory; wherein the content of the first and second substances,
the memory is used for storing a computer program;
the processor, configured to execute the computer program to implement the virtual machine high availability method according to any one of claims 1 to 8.
CN201911161205.7A 2019-11-24 2019-11-24 High-availability method, device and equipment for virtual machine Withdrawn CN110990118A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911161205.7A CN110990118A (en) 2019-11-24 2019-11-24 High-availability method, device and equipment for virtual machine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911161205.7A CN110990118A (en) 2019-11-24 2019-11-24 High-availability method, device and equipment for virtual machine

Publications (1)

Publication Number Publication Date
CN110990118A true CN110990118A (en) 2020-04-10

Family

ID=70086229

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911161205.7A Withdrawn CN110990118A (en) 2019-11-24 2019-11-24 High-availability method, device and equipment for virtual machine

Country Status (1)

Country Link
CN (1) CN110990118A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105183588A (en) * 2015-09-30 2015-12-23 华为技术有限公司 Rebuilding method and device of virtual machines
CN105843670A (en) * 2016-03-22 2016-08-10 浙江大学 Cloud platform based virtual cluster deployment and integration method
CN107239383A (en) * 2017-06-28 2017-10-10 郑州云海信息技术有限公司 A kind of failure monitoring method and device of OpenStack virtual machines
US20170344298A1 (en) * 2016-05-26 2017-11-30 Vmware, Inc. Application aware memory resource management

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105183588A (en) * 2015-09-30 2015-12-23 华为技术有限公司 Rebuilding method and device of virtual machines
CN105843670A (en) * 2016-03-22 2016-08-10 浙江大学 Cloud platform based virtual cluster deployment and integration method
US20170344298A1 (en) * 2016-05-26 2017-11-30 Vmware, Inc. Application aware memory resource management
CN107239383A (en) * 2017-06-28 2017-10-10 郑州云海信息技术有限公司 A kind of failure monitoring method and device of OpenStack virtual machines

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
刘文洁等: "一种面向云资源调度的热点迁移策略", 《西北工业大学学报》 *

Similar Documents

Publication Publication Date Title
CN112465146B (en) Quantum and classical hybrid cloud platform and task execution method
US20230376359A1 (en) Cross-cluster load balancer
US11593177B2 (en) Cost-savings using ephemeral hosts in infrastructure as a service environments based on health score
US10817323B2 (en) Systems and methods for organizing on-demand migration from private cluster to public cloud
CN111897558A (en) Kubernets upgrading method and device for container cluster management system
US7181574B1 (en) Server cluster using informed prefetching
US11886898B2 (en) GPU-remoting latency aware virtual machine migration
US20200110631A1 (en) Virtual machine deployment method and omm virtual machine
CN112395047A (en) Virtual machine fault evacuation method, system and computer readable medium
CN110874262A (en) Cloud migration
CN106130763A (en) Server cluster and be applicable to the database resource group method for handover control of this cluster
US10587680B2 (en) Efficient transaction level workload management across multi-tier heterogeneous middleware clusters
CN112231108A (en) Task processing method and device, computer readable storage medium and server
US10250455B1 (en) Deployment and management of tenant services
CN107168786B (en) Dynamic migration method and device for virtual machine
CN110674095B (en) CTDB cluster expansion method, device and equipment and readable storage medium
CN109426544A (en) Virtual machine deployment method and device
CN108228272B (en) WEB container generation processing method, equipment and server
CN111866210A (en) Virtual IP balance distribution method, system, terminal and storage medium
CN112631994A (en) Data migration method and system
CN111522664A (en) Service resource management and control method and device based on distributed service
CN110990118A (en) High-availability method, device and equipment for virtual machine
US20220229689A1 (en) Virtualization platform control device, virtualization platform control method, and virtualization platform control program
CN115794306A (en) Resource allocation method and device based on preemption instance, electronic equipment and medium
US10855521B2 (en) Efficient replacement of clients running large scale applications

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
WW01 Invention patent application withdrawn after publication

Application publication date: 20200410

WW01 Invention patent application withdrawn after publication