WO2017124829A1 - Method and device for restoring virtual machine - Google Patents

Method and device for restoring virtual machine Download PDF

Info

Publication number
WO2017124829A1
WO2017124829A1 PCT/CN2016/107036 CN2016107036W WO2017124829A1 WO 2017124829 A1 WO2017124829 A1 WO 2017124829A1 CN 2016107036 W CN2016107036 W CN 2016107036W WO 2017124829 A1 WO2017124829 A1 WO 2017124829A1
Authority
WO
WIPO (PCT)
Prior art keywords
virtual machine
computing node
state
satisfies
node
Prior art date
Application number
PCT/CN2016/107036
Other languages
French (fr)
Chinese (zh)
Inventor
尹德升
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2017124829A1 publication Critical patent/WO2017124829A1/en

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
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1479Generic software techniques for error detection or fault masking
    • G06F11/1482Generic software techniques for error detection or fault masking by means of middleware or OS functionality
    • G06F11/1484Generic software techniques for error detection or fault masking by means of middleware or OS functionality involving virtual machines
    • 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/45575Starting, stopping, suspending or resuming virtual machine instances

Definitions

  • the present disclosure relates to virtual technologies, such as to a method and apparatus for recovering a virtual machine.
  • OpenStack is a free software and open source cloud computing management platform project licensed and developed by NASA (National Aeronautics and Space) and Rackspace. OpenStack supports a variety of complementary services. Provided as an Infrastructure as a Service (IaaS) solution, an open source project designed to provide software for the construction and management of public and private clouds.
  • IaaS Infrastructure as a Service
  • the virtual machine on the compute node cannot run.
  • the service of the virtual machine may consider the switchover of the active and standby virtual machines, it is also necessary to virtualize the faulty compute node.
  • the machine restarts on the available computing nodes in time.
  • the virtual machine reborn in this scenario is the re-emergence of the virtual machine.
  • the virtual machine is reborn in another place, it is deployed on the destination computing node according to the original information stored in the database by the virtual machine.
  • One embodiment of the present disclosure provides a method for recovering a virtual machine, including:
  • the control node detects that the virtual machine needs to be regenerated in another place.
  • the first operation state corresponding to the virtual machine that satisfies the remote regeneration condition is found; and the first operation state is determined as An empty state, changing a computing node corresponding to the virtual machine that satisfies the regenerative condition in the corresponding relationship to the target computing node;
  • the control node searches for a second operation state corresponding to the virtual machine that satisfies the remote regeneration condition in the corresponding relationship, determines that the second operation state is an empty state, and changes the second operation state corresponding to the virtual machine that satisfies the remote regeneration condition in the corresponding relationship to The virtual machine is being rebuilt and a message to regenerate the alien is sent to the destination compute node.
  • the method further includes:
  • the control node determines that the condition for re-emergence is satisfied.
  • the method further includes:
  • the control node changes the computing node corresponding to the virtual machine that satisfies the off-site regeneration condition to the computing node before the change.
  • the corresponding relationship further includes a virtual machine state, where the control node detects that the virtual machine needs to be regenerated locally:
  • the control node detects that the computing node is powered off, finds the virtual machine and the virtual machine state corresponding to the powered-down computing node in the corresponding relationship, and determines that the found virtual machine state is in the running state, and determines that the discovered node needs to be found.
  • the virtual machine is reborn in another place.
  • Another embodiment of the present disclosure provides a method for recovering a virtual machine, including:
  • the computing node searches for the first computing node corresponding to the virtual machine and the first operating state in the corresponding relationship between the virtual machine, the computing node, and the operating state during the re-powering process after the fault occurs; determining the first found The computing node is itself, and the first operating state that is found is an empty state, and the first operating state corresponding to the virtual machine is changed to the power-on state;
  • the computing node searches for the second computing node and the second operating state corresponding to the virtual machine in the corresponding relationship, and determines that the found second computing node is the self, and the found second operating state is the power-on state. Start the virtual machine.
  • the method further includes:
  • the computing node changes a second operational state corresponding to the virtual machine to an empty state.
  • the corresponding relationship further includes a virtual machine state, where the first computing node and the first operating state corresponding to the locating virtual machine include:
  • the computing node searches for the first computing node and the first operating node corresponding to the virtual machine whose virtual machine state is in the running state in the corresponding relationship.
  • control node including at least:
  • the detecting module is configured to detect that the virtual machine needs to be reborn in another place
  • the first search module is configured to: in a correspondence between the virtual machine, the computing node, and the operation state, search for a first operation state corresponding to the virtual machine that satisfies the remote regeneration condition; receive the first notification message, and search in the corresponding relationship a second operational state corresponding to the virtual machine that satisfies the remote regeneration condition;
  • the first change module is configured to determine that the first operation state is an empty state, and change a computing node corresponding to the virtual machine that satisfies the remote regeneration condition in the corresponding relationship to the target computing node, and send a first notification message to the searching module;
  • the second operation state is an empty state, and the second operation state corresponding to the virtual machine that satisfies the remote regeneration condition in the corresponding relationship is changed to the virtual machine being reconstructed, and the message for re-origination is sent to the destination computing node.
  • the first search module is configured to:
  • the first operation state corresponding to the virtual machine that satisfies the remote regenerative condition is found in the correspondence between the virtual machine, the computing node, and the operating state, and the first notification message is received in the corresponding relationship. Find a second operational state corresponding to the virtual machine that satisfies the alienation condition.
  • the first change module is further configured to:
  • the corresponding relationship further includes a virtual machine state
  • the detecting module is configured to:
  • the computing node is powered off, and the virtual machine and the virtual machine state corresponding to the powered off computing node are searched in the corresponding relationship, and the found virtual machine state is determined to be in an operating state, and it is determined that the discovered virtual machine needs to be offsite. Rebirth.
  • Yet another embodiment of the present disclosure provides a computing node, including:
  • the second search module is configured to: in the corresponding relationship between the virtual machine, the computing node, and the operating state, search for the first computing node corresponding to the virtual machine and the first operating state; a second notification message, where the second computing node corresponding to the virtual machine and the second operating state are searched in the corresponding relationship;
  • the second change module is configured to determine that the first calculated node is the self, and the first operation state that is found is an empty state, and the first operation state corresponding to the virtual machine is changed to the power-on state, and the second search is performed.
  • the module sends a second notification message, determines that the found second computing node is itself, and finds that the second operating state is the power-on state, and starts the virtual machine.
  • the second change module is further configured to:
  • Yet another embodiment of the present disclosure provides a non-transitory storage medium storing computer executable instructions arranged to perform the method of restoring a virtual machine as described above.
  • Yet another embodiment of the present disclosure provides a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions when the program instructions are When the computer executes, causing the computer to perform the above-mentioned recovery virtual The method of the machine.
  • Yet another embodiment of the present disclosure provides an electronic device including at least one processor and a memory communicatively coupled to the at least one processor, the memory for storing instructions executable by the at least one processor, The instructions, when executed by the at least one processor, cause the at least one processor to perform the method of restoring a virtual machine as described above.
  • a virtual machine that satisfies the regenerative condition of the remote meeting satisfies the condition of the regenerative condition of the virtual machine that satisfies the condition of the regenerative condition of the virtual machine that satisfies the condition of the regenerative condition of the virtual machine that satisfies the condition of the regenerative condition of the virtual machine that satisfies the condition of the regenerative condition of the regenerative virtual machine.
  • the method and the device prevent the faulty computing node from modifying the operating state of the virtual machine satisfying the regenerative condition in the process of modifying the computing node corresponding to the virtual machine satisfying the regenerative condition, thereby reducing two different computing nodes A conflict caused by a recovery operation on the same virtual machine.
  • FIG. 1 is a flow chart of a method for restoring a virtual machine according to the present disclosure
  • FIG. 2 is a flowchart of another method for restoring a virtual machine according to the present disclosure
  • FIG. 3 is a schematic structural diagram of a control node of the present disclosure
  • FIG. 4 is a schematic structural diagram of a computing node of the present disclosure
  • FIG. 5 is a structural block diagram of an electronic device according to an embodiment of the present disclosure.
  • the control node receives the request for re-occurrence from the computing node where the user is located, and determines that the condition for re-occurrence is satisfied (for example, whether the user has the right to initiate the re-origination, and whether the virtual machine satisfies the condition of re-occurrence Etc., in the correspondence between the virtual machine, the computing node, and the operational state, look up the operation state corresponding to the virtual machine that needs to be regenerated in the request for re-occurrence, and when the found operation state is empty, The operation state in the correspondence between the regenerated virtual machine, the computing node, and the operation state is changed to the virtual machine being rebuilt, and the message for re-origination is sent to the destination computing node; wherein the message for re-occurrence includes the need to perform The information required for the rebirth of the reborn virtual machine; the destination computing node regenerates the virtual machine according to the information needed to regenerate the message in the regenerated message, and will regenerate between the
  • the environment may be restored or human intervention may occur after a period of time.
  • the computing node searches for the virtual machine in the corresponding state between the virtual machine, the computing node, the virtual machine state, and the operating state, and the virtual machine state is the virtual machine corresponding to the running state.
  • the operation state the operation state corresponding to the virtual machine whose operation state is found to be empty is changed to the power-on state, and the virtual machine whose found operation state is empty is started, and thus the failure occurs.
  • the compute node and the destination compute node are configured with the same VM at the same time, causing conflicts between a series of resources and processes such as the Internet Protocol (IP) address, and may even cause the VM service to fail.
  • IP Internet Protocol
  • the present disclosure proposes a method for restoring a virtual machine, including:
  • Step 100 The control node detects that the virtual machine needs to be regenerated in another place.
  • the first operating state corresponding to the virtual machine that satisfies the remote regenerative condition is searched;
  • the first operational state is an empty state, and the computing node corresponding to the virtual machine that satisfies the remote regenerative condition in the corresponding relationship is changed to the target computing node.
  • control node can periodically detect whether the virtual machine needs to be regenerated in another place.
  • the corresponding relationship also includes a virtual machine state, and the control node detects that the virtual machine needs to be regenerated locally:
  • the control node detects that the computing node is powered off, finds the virtual machine and virtual machine state corresponding to the powered-off computing node in the corresponding relationship, determines that the found virtual machine state is in the running state, and determines that the discovered virtual machine needs to be off-site. Rebirth.
  • control node detects that the virtual machine needs to be regenerated in another place, before the first operation state corresponding to the virtual machine that satisfies the remote regenerative condition, the control node further includes:
  • the control node determines that the condition for re-emergence is satisfied.
  • the correspondence relationship may be saved by the control node itself, or may be stored in a computing node of a dedicated user in the system to store data.
  • the control node can obtain a correspondence from the computing node.
  • the target computing node may be input by the user or may be allocated by the control node.
  • Step 101 The control node searches for a second operation state corresponding to the virtual machine that satisfies the remote regeneration condition in the corresponding relationship, and determines that the found second operation state is an empty state, and corresponds to the virtual machine that satisfies the remote regenerative condition in the corresponding relationship.
  • the second operational state is changed to re-establish the virtual machine and send a message to the destination computing node for re-emergence.
  • the control node when the control node determines that the second operation state is a non-empty state, the control node changes the computing node corresponding to the virtual machine that satisfies the off-site re-generation condition to the computing node before the change. That is, if the second operational state is a non-empty state (eg, a virtual machine is being created, etc.), the computing node corresponding to the virtual machine that satisfies the off-site re-generation condition is changed to the computing node before the change in step 100, that is, the difference is not satisfied.
  • the virtual machine with the reborn condition is reborn in another place.
  • step 100 and step 101 the first operating state and the second operating state are only for distinguishing the operating states of the virtual machines found at different times, and the first operating states and the second operating states may be the same or different.
  • the control node first determines whether the operation state of the virtual machine that satisfies the remote regenerative condition is empty before and after modifying the computing node corresponding to the virtual machine that satisfies the remote regenerative condition, and if it is all empty, the remote reborn
  • the computing node that avoids the failure is modified to modify the operation state of the virtual machine satisfying the regenerative condition in the process of modifying the computing node corresponding to the virtual machine that satisfies the remote regenerative condition, thereby reducing the difference between the two different computing nodes.
  • the present disclosure also provides a method for restoring a virtual machine, including:
  • Step 200 The computing node searches for the first computing node corresponding to the virtual machine and the first operating state in the corresponding relationship between the virtual machine, the computing node, and the operating state during the re-powering process after the fault occurs;
  • the first computing node is itself, and the first operating state that is found is an empty state, and the first operating state corresponding to the virtual machine is changed to the powered state.
  • the computing node may first search for the corresponding virtual machine in the corresponding relationship, and then determine whether to start the found virtual machine before determining whether to start the discovered virtual machine.
  • the step of searching for the first computing node corresponding to the found virtual machine and the first operating state is performed first.
  • the corresponding relationship further includes a virtual machine state
  • the first computing node corresponding to the virtual machine and the first operating state include: the computing node searches for the first computing node corresponding to the virtual machine whose virtual machine state is in the running state in the corresponding relationship. And the first operating node.
  • Step 201 The computing node searches for the second computing node corresponding to the virtual machine and the second operating state in the corresponding relationship, determines that the found second computing node is itself, and the found second operating state is the power-on state, and starts. virtual machine.
  • the computing node when the computing node determines that the second computing node is not itself, the computing node changes the second operating state corresponding to the virtual machine to an empty state.
  • step 200 and step 201 the first computing node and the second computing node are only used to distinguish the computing nodes corresponding to the virtual machines found at different times, and the first computing node and the second computing node may be the same or different;
  • the operational state and the second operational state are merely for distinguishing the operational states of the virtual machines found at different times, and the first operational states and the second operational states may be the same or different.
  • the computing node determines whether the computing node corresponding to the virtual machine is itself before and after modifying the operating state of the virtual machine. If both are themselves, the virtual machine is started, and the control node is prevented from modifying the virtual machine corresponding to the computing node. During the operation state, the computing node corresponding to the virtual machine is modified, thereby reducing the conflict caused by the recovery operations of the same virtual machine by two different computing nodes.
  • the control node detects that the virtual machine needs to be regenerated in another place, determines that the condition of re-occupation is satisfied, and searches for the correspondence between the virtual machine, the computing node, and the operating state.
  • the first operation state that is found to be interrupted is an empty state, and the computing node corresponding to the virtual machine that satisfies the remote regenerative condition in the corresponding relationship is changed to the target computing node.
  • the first computing node corresponding to the virtual machine that satisfies the re-emergence condition and the first operating state are searched in the corresponding relationship, and it is determined that the first computing node that is found is the target computing node instead of By itself, the process of starting a virtual machine that satisfies the conditions for re-generation of the alienation is started.
  • the control node searches for a second operation state corresponding to the virtual machine that satisfies the remote regeneration condition in the corresponding relationship, and determines that the found second operation state is an empty state, and the second operation corresponding to the virtual machine that satisfies the remote regeneration condition in the correspondence relationship
  • the status changes to the virtual machine being rebuilt and a message is sent to the destination compute node for re-emergence.
  • the control node detects that the virtual machine needs to be regenerated in another place, determines that the condition of re-occupation is satisfied, and searches for the correspondence between the virtual machine, the computing node, and the operating state.
  • the first computing node corresponding to the virtual machine that satisfies the remote regenerative condition and the first operating state are searched for in the corresponding relationship.
  • the control node determines that the first operational state that is found is an empty state, and changes the computing node corresponding to the virtual machine that satisfies the remote regenerative condition in the corresponding relationship to the target computing node.
  • the faulty computing node determines that the first computing node that is found is itself, and the first operating state that is found is empty, and changes the first operating state corresponding to the virtual machine to the power-on state.
  • the control node searches for a second operation state corresponding to the virtual machine that satisfies the remote regeneration condition in the correspondence, determines that the found second operation state is a non-empty state, and ends the process of re-occurrence.
  • the faulty computing node searches for the second computing node and the second operating state corresponding to the virtual machine in the corresponding relationship, determines that the found second computing node is not itself, and ends the process of starting the virtual machine that satisfies the remote regenerative condition.
  • the first computing node corresponding to the virtual machine and the first operation are searched.
  • the state determines that the first computing node that is found is itself, and the first operating state that is found is in an empty state, and changes the first operating state corresponding to the virtual machine to the power-on state.
  • the control node detects that the virtual machine needs to be regenerated in another place, determines that the condition of re-occupation is satisfied, searches for the first operation state corresponding to the virtual machine in the corresponding relationship, and determines that the first operation state that is found is non-empty, and ends. The process of rebirth in different places.
  • the computing node searches for the second computing node and the second operating state corresponding to the virtual machine in the corresponding relationship, determines that the found second computing node is itself, and finds that the second operating state is the power-on state, and starts the virtual machine.
  • control node including:
  • the detecting module is configured to detect that the virtual machine needs to be reborn in another place
  • the first searching module is configured to determine that the condition for re-occupation of the remote location is satisfied, and in the correspondence between the virtual machine, the computing node, and the operating state, searching for a first operating state corresponding to the virtual machine that satisfies the re-emergence condition; receiving the first a notification message, in the corresponding relationship, searching for a second operation state corresponding to the virtual machine that satisfies the remote regenerative condition;
  • a first change module configured to determine that the first operation state that is found is an empty state, and change a computing node corresponding to the virtual machine that satisfies the remote regenerative condition in the corresponding relationship to the target computing node, and send a first notification message to the searching module; It is determined that the found second operation state is an empty state, and the second operation state corresponding to the virtual machine that satisfies the remote regeneration condition in the corresponding relationship is changed to the virtual machine being reconstructed, and the message for re-origination is sent to the destination computing node.
  • the first lookup module is set to:
  • the first operation state corresponding to the virtual machine satisfying the regenerative condition is searched; the first notification message is received, and the second operation state corresponding to the virtual machine that satisfies the remote regenerative condition is searched for in the corresponding relationship.
  • the first change module is further configured to:
  • the second operation state is a non-empty state, and the computing node corresponding to the virtual machine that satisfies the remote regeneration condition is changed to the computing node before the change.
  • the corresponding relationship further includes a virtual machine state
  • the detection module is configured to:
  • the computing node is powered off, and the virtual machine and the virtual machine state corresponding to the powered-off computing node are searched for in the corresponding relationship, and the found virtual machine state is determined to be in an operating state, and it is determined that the discovered virtual machine needs to be regenerated in another place.
  • the present disclosure also proposes a computing node, including:
  • the second search module is configured to: in the corresponding relationship between the virtual machine, the computing node, and the operating state, search for the first computing node corresponding to the virtual machine and the first operating state; a second notification message, where the second computing node corresponding to the virtual machine and the second operating state are searched in the corresponding relationship;
  • the second change module is configured to determine that the first calculated node is the self, and the first operation state that is found is an empty state, and the first operation state corresponding to the virtual machine is changed to the power-on state, and the second search is performed.
  • the module sends a second notification message, determines that the found second computing node is itself, and finds that the second operating state is the power-on state, and starts the virtual machine.
  • the second change module is further configured to:
  • the present disclosure also provides a non-transitory storage medium storing computer executable instructions arranged to perform the method of restoring a virtual machine of the above-described embodiments.
  • the present disclosure also provides a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions, when the program instructions are executed by a computer, The computer is caused to execute the method of restoring a virtual machine of the above embodiment.
  • FIG. 5 is a structural block diagram of an electronic device according to an embodiment of the present disclosure.
  • the electronic device may include a processor 51 and a memory 53, and may further include a communication interface 52 and a bus 54.
  • the processor 51, the communication interface 52, and the memory 53 can complete communication with each other through the bus 54.
  • Communication interface 52 can be used for information transmission.
  • the processor 51 can call the logic instructions in the memory 53 to perform the method of restoring the virtual machine of the above embodiment.
  • the logic instructions in the memory 53 described above may be implemented in the form of a software functional unit and sold or used as a stand-alone product, and may be stored in a computer readable storage medium.
  • the technical solution of the present disclosure may be embodied in the form of a software product stored in a storage medium, including a plurality of instructions for causing a computer device (which may be a personal computer, a server, or a network) The device or the like) performs all or part of the steps of the method described in various embodiments of the present disclosure.
  • the foregoing storage medium may be a non-transitory storage medium, including: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
  • a medium that can store program code, or a transitory storage medium including: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
  • the failed computing node is modified in the process of modifying the computing node corresponding to the virtual machine satisfying the remote regenerative condition by the control node.
  • the operating state of the virtual machine that regenerates the condition thereby reducing the conflict caused by the recovery operations of the same virtual machine by two different computing nodes.

Abstract

The disclosure discloses a method and device for restoring a virtual machine, wherein the method comprises: a control node detects a virtual machine satisfying an off-site restoration condition, searches in a correspondence relationship between the virtual machine, a compute node, and an operating state for a first operating state corresponding to the virtual machine satisfying the off-site restoration condition, determines that the first operating state is an empty state, and changes a compute node corresponding to the virtual machine satisfying the off-site restoration condition in the correspondence relationship to be a target compute node; and the control node searches in the correspondence relationship for a second operating state corresponding to the virtual machine satisfying the off-site restoration condition, determines that the second operating state is an empty state, changes the second operating state corresponding to the virtual machine satisfying the off-site restoration condition in the correspondence relationship to indicate that a virtual machine is being rebuilt, and sends to the target compute node a message that off-site restoration is performed. The invention realizes a virtual machine satisfying an off-site restoration condition.

Description

恢复虚拟机的方法和装置Method and device for restoring virtual machine 技术领域Technical field
本公开涉及虚拟技术,例如涉及一种恢复虚拟机的方法和装置。The present disclosure relates to virtual technologies, such as to a method and apparatus for recovering a virtual machine.
背景技术Background technique
OpenStack是一个由美国国家航空航天局(NASA,National Aeronautics and Space)和Rackspace合作研发并发起的,以Apache许可证授权的自由软件和开放源代码云计算管理平台项目,OpenStack通过各种互补的服务提供了基础设施即服务(Infrastructure as a Service,IaaS)的解决方案,是一个旨在为公共及私有云的建设与管理提供软件的开源项目。OpenStack is a free software and open source cloud computing management platform project licensed and developed by NASA (National Aeronautics and Space) and Rackspace. OpenStack supports a variety of complementary services. Provided as an Infrastructure as a Service (IaaS) solution, an open source project designed to provide software for the construction and management of public and private clouds.
OpenStack对虚拟机的实现中,当计算节点异常宕机时,计算节点上的虚拟机无法运行,虽然虚拟机的业务可能考虑了主备虚拟机的切换,但也需要把故障计算节点上的虚拟机及时在可用的计算节点上重新启动起来,这种场景下的虚拟机重生,就是虚拟机的异地重生。虚拟机在异地重生时会根据这个虚拟机在数据库中保存的原始信息,在目的计算节点上部署起来。In the implementation of the virtual machine in OpenStack, when the compute node is abnormally down, the virtual machine on the compute node cannot run. Although the service of the virtual machine may consider the switchover of the active and standby virtual machines, it is also necessary to virtualize the faulty compute node. The machine restarts on the available computing nodes in time. The virtual machine reborn in this scenario is the re-emergence of the virtual machine. When the virtual machine is reborn in another place, it is deployed on the destination computing node according to the original information stored in the database by the virtual machine.
发明内容Summary of the invention
本公开的一个实施例提出了一种恢复虚拟机的方法,包括:One embodiment of the present disclosure provides a method for recovering a virtual machine, including:
控制节点检测到需要对虚拟机进行异地重生,在虚拟机、计算节点和操作状态之间的对应关系中,查找满足异地重生条件的虚拟机对应的第一操作状态;判断出第一操作状态为空状态,将对应关系中满足异地重生条件的虚拟机对应的计算节点更改为目标计算节点;以及 The control node detects that the virtual machine needs to be regenerated in another place. In the corresponding relationship between the virtual machine, the computing node, and the operation state, the first operation state corresponding to the virtual machine that satisfies the remote regeneration condition is found; and the first operation state is determined as An empty state, changing a computing node corresponding to the virtual machine that satisfies the regenerative condition in the corresponding relationship to the target computing node;
控制节点在对应关系中查找满足异地重生条件的虚拟机对应的第二操作状态,判断出第二操作状态为空状态,将对应关系中满足异地重生条件的虚拟机对应的第二操作状态更改为正在重建虚拟机,并向目的计算节点发送进行异地重生的消息。The control node searches for a second operation state corresponding to the virtual machine that satisfies the remote regeneration condition in the corresponding relationship, determines that the second operation state is an empty state, and changes the second operation state corresponding to the virtual machine that satisfies the remote regeneration condition in the corresponding relationship to The virtual machine is being rebuilt and a message to regenerate the alien is sent to the destination compute node.
可选的,在所述控制节点检测到需要对虚拟机进行异地重生后,在所述查找满足异地重生条件的虚拟机对应的第一操作状态之前,所述方法还包括:Optionally, after the control node detects that the virtual machine needs to be regenerated in another place, before the first operation state corresponding to the virtual machine that satisfies the remote regeneration condition, the method further includes:
所述控制节点判断出满足异地重生的条件。The control node determines that the condition for re-emergence is satisfied.
可选的,当所述控制节点判断出所述第二操作状态为非空状态时,该方法还包括:Optionally, when the control node determines that the second operation state is a non-empty state, the method further includes:
所述控制节点将所述满足异地重生条件的虚拟机对应的计算节点更改为更改之前的计算节点。The control node changes the computing node corresponding to the virtual machine that satisfies the off-site regeneration condition to the computing node before the change.
可选的,所述对应关系还包括虚拟机状态,所述控制节点检测到需要对虚拟机进行异地重生包括:Optionally, the corresponding relationship further includes a virtual machine state, where the control node detects that the virtual machine needs to be regenerated locally:
所述控制节点检测到计算节点下电,在所述对应关系中查找下电的计算节点对应的虚拟机和虚拟机状态,判断出查找到的虚拟机状态为运行状态,确定需要对查找到的虚拟机进行异地重生。The control node detects that the computing node is powered off, finds the virtual machine and the virtual machine state corresponding to the powered-down computing node in the corresponding relationship, and determines that the found virtual machine state is in the running state, and determines that the discovered node needs to be found. The virtual machine is reborn in another place.
本公开的另一个实施例提出了一种恢复虚拟机的方法,包括:Another embodiment of the present disclosure provides a method for recovering a virtual machine, including:
计算节点在发生故障后重新上电过程中,在虚拟机、计算节点和操作状态之间的对应关系中,查找虚拟机对应的第一计算节点和第一操作状态;判断出查找到的第一计算节点为自身,且查找到的第一操作状态为空状态,将虚拟机对应的第一操作状态更改为上电状态;以及The computing node searches for the first computing node corresponding to the virtual machine and the first operating state in the corresponding relationship between the virtual machine, the computing node, and the operating state during the re-powering process after the fault occurs; determining the first found The computing node is itself, and the first operating state that is found is an empty state, and the first operating state corresponding to the virtual machine is changed to the power-on state;
计算节点在对应关系中查找虚拟机对应的第二计算节点和第二操作状态,判断出查找到的第二计算节点为自身,且查找到的第二操作状态为上电状态, 启动虚拟机。The computing node searches for the second computing node and the second operating state corresponding to the virtual machine in the corresponding relationship, and determines that the found second computing node is the self, and the found second operating state is the power-on state. Start the virtual machine.
可选的,当所述计算节点判断出所述第二计算节点不是自身时,该方法还包括:Optionally, when the computing node determines that the second computing node is not itself, the method further includes:
所述计算节点将所述虚拟机对应的第二操作状态更改为空状态。The computing node changes a second operational state corresponding to the virtual machine to an empty state.
可选的,所述对应关系还包括虚拟机状态,所述查找虚拟机对应的第一计算节点和第一操作状态包括:Optionally, the corresponding relationship further includes a virtual machine state, where the first computing node and the first operating state corresponding to the locating virtual machine include:
所述计算节点在所述对应关系中查找虚拟机状态为运行状态的虚拟机对应的第一计算节点和第一操作节点。The computing node searches for the first computing node and the first operating node corresponding to the virtual machine whose virtual machine state is in the running state in the corresponding relationship.
本公开的又一个实施例提出了一种控制节点,至少包括:Yet another embodiment of the present disclosure provides a control node, including at least:
检测模块,设置为检测到需要对虚拟机进行异地重生;The detecting module is configured to detect that the virtual machine needs to be reborn in another place;
第一查找模块,设置为在虚拟机、计算节点和操作状态之间的对应关系中,查找满足异地重生条件的虚拟机对应的第一操作状态;接收到第一通知消息,在对应关系中查找满足异地重生条件的虚拟机对应的第二操作状态;The first search module is configured to: in a correspondence between the virtual machine, the computing node, and the operation state, search for a first operation state corresponding to the virtual machine that satisfies the remote regeneration condition; receive the first notification message, and search in the corresponding relationship a second operational state corresponding to the virtual machine that satisfies the remote regeneration condition;
第一更改模块,设置为判断出第一操作状态为空状态,将对应关系中满足异地重生条件的虚拟机对应的计算节点更改为目标计算节点,向查找模块发送第一通知消息;判断出第二操作状态为空状态,将对应关系中满足异地重生条件的虚拟机对应的第二操作状态更改为正在重建虚拟机,并向目的计算节点发送进行异地重生的消息。The first change module is configured to determine that the first operation state is an empty state, and change a computing node corresponding to the virtual machine that satisfies the remote regeneration condition in the corresponding relationship to the target computing node, and send a first notification message to the searching module; The second operation state is an empty state, and the second operation state corresponding to the virtual machine that satisfies the remote regeneration condition in the corresponding relationship is changed to the virtual machine being reconstructed, and the message for re-origination is sent to the destination computing node.
可选的,所述第一查找模块设置为:Optionally, the first search module is configured to:
判断出满足异地重生的条件,在虚拟机、计算节点和操作状态之间的对应关系中,查找满足异地重生条件的虚拟机对应的第一操作状态;接收到第一通知消息,在对应关系中查找满足异地重生条件的虚拟机对应的第二操作状态。The first operation state corresponding to the virtual machine that satisfies the remote regenerative condition is found in the correspondence between the virtual machine, the computing node, and the operating state, and the first notification message is received in the corresponding relationship. Find a second operational state corresponding to the virtual machine that satisfies the alienation condition.
可选的,所述第一更改模块还设置为: Optionally, the first change module is further configured to:
判断出所述第二操作状态为非空状态,将所述满足异地重生条件的虚拟机对应的计算节点更改为更改之前的计算节点。Determining that the second operation state is a non-empty state, and changing the computing node corresponding to the virtual machine that satisfies the alienation condition to the computing node before the change.
可选的,所述对应关系还包括虚拟机状态,所述检测模块设置为:Optionally, the corresponding relationship further includes a virtual machine state, and the detecting module is configured to:
检测到计算节点下电,在所述对应关系中查找下电的计算节点对应的虚拟机和虚拟机状态,判断出查找到的虚拟机状态为运行状态,确定需要对查找到的虚拟机进行异地重生。The computing node is powered off, and the virtual machine and the virtual machine state corresponding to the powered off computing node are searched in the corresponding relationship, and the found virtual machine state is determined to be in an operating state, and it is determined that the discovered virtual machine needs to be offsite. Rebirth.
本公开的又一个实施例提出了一种计算节点,包括:Yet another embodiment of the present disclosure provides a computing node, including:
第二查找模块,设置为在发生故障后重新上电过程中,在虚拟机、计算节点和操作状态之间的对应关系中,查找虚拟机对应的第一计算节点和第一操作状态;接收到第二通知消息,在对应关系中查找虚拟机对应的第二计算节点和第二操作状态;The second search module is configured to: in the corresponding relationship between the virtual machine, the computing node, and the operating state, search for the first computing node corresponding to the virtual machine and the first operating state; a second notification message, where the second computing node corresponding to the virtual machine and the second operating state are searched in the corresponding relationship;
第二更改模块,设置为判断出查找到的第一计算节点为自身,且查找到的第一操作状态为空状态,将虚拟机对应的第一操作状态更改为上电状态,向第二查找模块发送第二通知消息;判断出查找到的第二计算节点为自身,且查找到的第二操作状态为上电状态,启动虚拟机。The second change module is configured to determine that the first calculated node is the self, and the first operation state that is found is an empty state, and the first operation state corresponding to the virtual machine is changed to the power-on state, and the second search is performed. The module sends a second notification message, determines that the found second computing node is itself, and finds that the second operating state is the power-on state, and starts the virtual machine.
可选的,所述第二更改模块还设置为:Optionally, the second change module is further configured to:
判断出所述第二计算节点不是自身,将所述虚拟机对应的第二操作状态更改为空状态。It is determined that the second computing node is not itself, and the second operating state corresponding to the virtual machine is changed to an empty state.
本公开的又一个实施例提供了一种非暂态存储介质,存储有计算机可执行指令,所述计算机可执行指令设置为执行上述的恢复虚拟机的方法。Yet another embodiment of the present disclosure provides a non-transitory storage medium storing computer executable instructions arranged to perform the method of restoring a virtual machine as described above.
本公开的又一个实施例提供了一种计算机程序产品,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算机程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时,使所述计算机执行上述的恢复虚 拟机的方法。Yet another embodiment of the present disclosure provides a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions when the program instructions are When the computer executes, causing the computer to perform the above-mentioned recovery virtual The method of the machine.
本公开的又一个实施例提供了一种电子设备,包括至少一个处理器和与所述至少一个处理器通信连接的存储器,所述存储器用于存储可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行时,使所述至少一个处理器执行上述的恢复虚拟机的方法。Yet another embodiment of the present disclosure provides an electronic device including at least one processor and a memory communicatively coupled to the at least one processor, the memory for storing instructions executable by the at least one processor, The instructions, when executed by the at least one processor, cause the at least one processor to perform the method of restoring a virtual machine as described above.
满足异地重生条件的虚拟机满足异地重生条件的虚拟机满足异地重生条件的虚拟机满足异地重生条件的虚拟机满足异地重生条件的虚拟机满足异地重生条件的虚拟机根据本发明的恢复虚拟机的方法和装置,避免了发生故障的计算节点在控制节点修改满足异地重生条件的虚拟机对应的计算节点的过程中修改满足异地重生条件的虚拟机的操作状态,从而减少了不同的两个计算节点对同一个虚拟机的恢复操作导致的冲突。A virtual machine that satisfies the regenerative condition of the remote meeting satisfies the condition of the regenerative condition of the virtual machine that satisfies the condition of the regenerative condition of the virtual machine that satisfies the condition of the regenerative condition of the virtual machine that satisfies the condition of the regenerative condition of the virtual machine that satisfies the condition of the regenerative condition of the regenerative virtual machine. The method and the device prevent the faulty computing node from modifying the operating state of the virtual machine satisfying the regenerative condition in the process of modifying the computing node corresponding to the virtual machine satisfying the regenerative condition, thereby reducing two different computing nodes A conflict caused by a recovery operation on the same virtual machine.
附图说明DRAWINGS
一个或多个实施例通过与之对应的附图中的图片进行示例性说明,这些示例性说明并不构成对实施例的限定,附图中具有相同参考数字标号的元件表示为类似的元件,除非有特别申明,附图中的图不构成比例限制。The one or more embodiments are exemplified by the accompanying drawings in the accompanying drawings, and FIG. The figures in the drawings do not constitute a scale limitation unless otherwise stated.
图1为本公开恢复虚拟机的方法的流程图;1 is a flow chart of a method for restoring a virtual machine according to the present disclosure;
图2为本公开另一种恢复虚拟机的方法的流程图;2 is a flowchart of another method for restoring a virtual machine according to the present disclosure;
图3为本公开控制节点的结构组成示意图;3 is a schematic structural diagram of a control node of the present disclosure;
图4为本公开计算节点的结构组成示意图;4 is a schematic structural diagram of a computing node of the present disclosure;
图5为本公开的实施例提供的电子设备的结构框图。 FIG. 5 is a structural block diagram of an electronic device according to an embodiment of the present disclosure.
具体实施方式detailed description
以下结合附图对本公开的实施例进行详细说明,在不冲突的情况下,以下实施例和实施例中的特征可以相互组合。The embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings, and the features of the following embodiments and embodiments may be combined with each other without conflict.
相关技术的恢复虚拟机的方法大致包括:Related art methods for recovering virtual machines generally include:
计算节点发生故障后,控制节点接收到来自用户所在的计算节点的进行异地重生的请求,判断出满足进行异地重生的条件(如用户是否具有发起异地重生的权限、虚拟机是否满足异地重生的条件等),在虚拟机、计算节点和操作状态之间的对应关系中,查找进行异地重生的请求中的需要进行重生的虚拟机对应的操作状态,当查找到的操作状态为空状态时,将进行重生的虚拟机、计算节点和操作状态之间的对应关系中的操作状态更改为正在重建虚拟机,并向目的计算节点发送进行异地重生的消息;其中,进行异地重生的消息中包括需要进行重生的虚拟机的进行重生所需要的信息;目的计算节点根据进行异地重生的消息中的进行重生所需要的信息进行虚拟机的重生,并将进行重生的虚拟机、计算节点和操作状态之间的对应关系中的计算节点更改为目的计算节点。After the computing node fails, the control node receives the request for re-occurrence from the computing node where the user is located, and determines that the condition for re-occurrence is satisfied (for example, whether the user has the right to initiate the re-origination, and whether the virtual machine satisfies the condition of re-occurrence Etc., in the correspondence between the virtual machine, the computing node, and the operational state, look up the operation state corresponding to the virtual machine that needs to be regenerated in the request for re-occurrence, and when the found operation state is empty, The operation state in the correspondence between the regenerated virtual machine, the computing node, and the operation state is changed to the virtual machine being rebuilt, and the message for re-origination is sent to the destination computing node; wherein the message for re-occurrence includes the need to perform The information required for the rebirth of the reborn virtual machine; the destination computing node regenerates the virtual machine according to the information needed to regenerate the message in the regenerated message, and will regenerate between the virtual machine, the computing node, and the operational state. The compute node in the corresponding relationship is changed to the destination Node.
相关技术的恢复虚拟机的方法中,在进行虚拟机的重生过程中,当发生故障的计算节点因电源等非计算节点本身原因下电时,一段时间后可能会在环境恢复或者人为干预的情况下重新上电,计算节点在上电过程中,在虚拟机、计算节点、虚拟机状态和操作状态之间的对应关系中,查找计算节点为自身,且虚拟机状态为运行状态对应的虚拟机和操作状态,将查找到的操作状态为空状态的虚拟机对应的操作状态更改为上电状态,并把查找到的操作状态为空状态的虚拟机启动起来,这样,就会导致发生故障的计算节点和目的计算节点同时配置同一个虚拟机,造成互联网协议(IP,Internet Protocol)地址等一系列资源和流程的冲突,甚至可能会导致虚拟机的业务无法正常运行。 In the method for recovering a virtual machine in the related art, in the process of regenerating a virtual machine, when the failed computing node is powered off due to a non-computing node such as a power source, the environment may be restored or human intervention may occur after a period of time. In the process of power-on, the computing node searches for the virtual machine in the corresponding state between the virtual machine, the computing node, the virtual machine state, and the operating state, and the virtual machine state is the virtual machine corresponding to the running state. And the operation state, the operation state corresponding to the virtual machine whose operation state is found to be empty is changed to the power-on state, and the virtual machine whose found operation state is empty is started, and thus the failure occurs. The compute node and the destination compute node are configured with the same VM at the same time, causing conflicts between a series of resources and processes such as the Internet Protocol (IP) address, and may even cause the VM service to fail.
参见图1,本公开提出了一种恢复虚拟机的方法,包括:Referring to FIG. 1, the present disclosure proposes a method for restoring a virtual machine, including:
步骤100、控制节点检测到需要对虚拟机进行异地重生,在虚拟机、计算节点和操作状态之间的对应关系中,查找满足异地重生条件的虚拟机对应的第一操作状态;判断出查找到的第一操作状态为空状态,将对应关系中满足异地重生条件的虚拟机对应的计算节点更改为目标计算节点。Step 100: The control node detects that the virtual machine needs to be regenerated in another place. In the corresponding relationship between the virtual machine, the computing node, and the operating state, the first operating state corresponding to the virtual machine that satisfies the remote regenerative condition is searched; The first operational state is an empty state, and the computing node corresponding to the virtual machine that satisfies the remote regenerative condition in the corresponding relationship is changed to the target computing node.
本步骤中,控制节点可以定时检测是否需要对虚拟机进行异地重生。In this step, the control node can periodically detect whether the virtual machine needs to be regenerated in another place.
本步骤中,对应关系还包括虚拟机状态,控制节点检测到需要对虚拟机进行异地重生包括:In this step, the corresponding relationship also includes a virtual machine state, and the control node detects that the virtual machine needs to be regenerated locally:
控制节点检测到计算节点下电,在对应关系中查找下电的计算节点对应的虚拟机和虚拟机状态,判断出查找到的虚拟机状态为运行状态,确定需要对查找到的虚拟机进行异地重生。The control node detects that the computing node is powered off, finds the virtual machine and virtual machine state corresponding to the powered-off computing node in the corresponding relationship, determines that the found virtual machine state is in the running state, and determines that the discovered virtual machine needs to be off-site. Rebirth.
本步骤中,控制节点检测到需要对虚拟机进行异地重生后,在查找满足异地重生条件的虚拟机对应的第一操作状态之前还包括:In this step, after the control node detects that the virtual machine needs to be regenerated in another place, before the first operation state corresponding to the virtual machine that satisfies the remote regenerative condition, the control node further includes:
所述控制节点判断出满足异地重生的条件。The control node determines that the condition for re-emergence is satisfied.
本步骤中,对应关系可以由控制节点自身保存,也可以保存在系统中的一个专门用户存储数据的计算节点中。控制节点可以向该计算节点获取对应关系。In this step, the correspondence relationship may be saved by the control node itself, or may be stored in a computing node of a dedicated user in the system to store data. The control node can obtain a correspondence from the computing node.
本步骤中,目标计算节点可以由用户输入,也可以由控制节点分配。In this step, the target computing node may be input by the user or may be allocated by the control node.
本步骤中,当控制节点判断出查找到的第一操作状态为非空状态时,结束本流程。In this step, when the control node determines that the first operation state found is not empty, the process ends.
步骤101、控制节点在对应关系中查找满足异地重生条件的虚拟机对应的第二操作状态,判断出查找到的第二操作状态为空状态,将对应关系中满足异地重生条件的虚拟机对应的第二操作状态更改为正在重建虚拟机,并向目的计算节点发送进行异地重生的消息。 Step 101: The control node searches for a second operation state corresponding to the virtual machine that satisfies the remote regeneration condition in the corresponding relationship, and determines that the found second operation state is an empty state, and corresponds to the virtual machine that satisfies the remote regenerative condition in the corresponding relationship. The second operational state is changed to re-establish the virtual machine and send a message to the destination computing node for re-emergence.
本步骤中,当控制节点判断出第二操作状态为非空状态时,控制节点将满足异地重生条件的虚拟机对应的计算节点更改为更改之前的计算节点。也就是说,如果第二操作状态为非空状态(如正在创建虚拟机等),则将满足异地重生条件的虚拟机对应的计算节点更改为步骤100中更改之前的计算节点,即不对满足异地重生条件的虚拟机进行异地重生。In this step, when the control node determines that the second operation state is a non-empty state, the control node changes the computing node corresponding to the virtual machine that satisfies the off-site re-generation condition to the computing node before the change. That is, if the second operational state is a non-empty state (eg, a virtual machine is being created, etc.), the computing node corresponding to the virtual machine that satisfies the off-site re-generation condition is changed to the computing node before the change in step 100, that is, the difference is not satisfied. The virtual machine with the reborn condition is reborn in another place.
步骤100和步骤101中,第一操作状态和第二操作状态仅仅是为了区别不同时间查找到的虚拟机的操作状态,第一操作状态和第二操作状态可能相同,也可能不同。In step 100 and step 101, the first operating state and the second operating state are only for distinguishing the operating states of the virtual machines found at different times, and the first operating states and the second operating states may be the same or different.
通过本公开的方法,控制节点在修改满足异地重生条件的虚拟机对应的计算节点前后均先判断满足异地重生条件的虚拟机的操作状态是否为空状态,若均为空状态,则进行异地重生,避免了发生故障的计算节点在控制节点修改满足异地重生条件的虚拟机对应的计算节点的过程中修改满足异地重生条件的虚拟机的操作状态,从而减少了不同的两个计算节点对同一个虚拟机的恢复操作导致的冲突。Through the method of the present disclosure, the control node first determines whether the operation state of the virtual machine that satisfies the remote regenerative condition is empty before and after modifying the computing node corresponding to the virtual machine that satisfies the remote regenerative condition, and if it is all empty, the remote reborn The computing node that avoids the failure is modified to modify the operation state of the virtual machine satisfying the regenerative condition in the process of modifying the computing node corresponding to the virtual machine that satisfies the remote regenerative condition, thereby reducing the difference between the two different computing nodes. The conflict caused by the recovery operation of the virtual machine.
参见图2,本公开还提出了一种恢复虚拟机的方法,包括:Referring to FIG. 2, the present disclosure also provides a method for restoring a virtual machine, including:
步骤200、计算节点在发生故障后重新上电过程中,在虚拟机、计算节点和操作状态之间的对应关系中,查找虚拟机对应的第一计算节点和第一操作状态;判断出查找到的第一计算节点为自身,且查找到的第一操作状态为空状态,将虚拟机对应的第一操作状态更改为上电状态。Step 200: The computing node searches for the first computing node corresponding to the virtual machine and the first operating state in the corresponding relationship between the virtual machine, the computing node, and the operating state during the re-powering process after the fault occurs; The first computing node is itself, and the first operating state that is found is an empty state, and the first operating state corresponding to the virtual machine is changed to the powered state.
本步骤中,计算节点在对应关系中查找虚拟机对应的第一计算节点和第一操作状态之前可以先在对应关系中查找自身对应的虚拟机,然后在确定是否启动查找到的虚拟机之前,先执行查找查找到的虚拟机对应的第一计算节点和第一操作状态的步骤。 In this step, before the computing node searches for the first computing node corresponding to the virtual machine and the first operating state in the corresponding relationship, the computing node may first search for the corresponding virtual machine in the corresponding relationship, and then determine whether to start the found virtual machine before determining whether to start the discovered virtual machine. The step of searching for the first computing node corresponding to the found virtual machine and the first operating state is performed first.
也可以遍历系统中的所有虚拟机,查找系统中的虚拟机对应的第一计算节点和第一操作状态,本公开不做限定。It is also possible to traverse all the virtual machines in the system, and to find the first computing node and the first operating state corresponding to the virtual machines in the system, which is not limited in this disclosure.
本步骤中,当查找到的第一计算节点不是自身时,结束本流程。In this step, when the first computing node found is not itself, the process ends.
本步骤中,对应关系还包括虚拟机状态,查找虚拟机对应的第一计算节点和第一操作状态包括:计算节点在对应关系中查找虚拟机状态为运行状态的虚拟机对应的第一计算节点和第一操作节点。In this step, the corresponding relationship further includes a virtual machine state, and the first computing node corresponding to the virtual machine and the first operating state include: the computing node searches for the first computing node corresponding to the virtual machine whose virtual machine state is in the running state in the corresponding relationship. And the first operating node.
步骤201、计算节点在对应关系中查找虚拟机对应的第二计算节点和第二操作状态,判断出查找到的第二计算节点为自身,且查找到的第二操作状态为上电状态,启动虚拟机。Step 201: The computing node searches for the second computing node corresponding to the virtual machine and the second operating state in the corresponding relationship, determines that the found second computing node is itself, and the found second operating state is the power-on state, and starts. virtual machine.
本步骤中,当计算节点判断出第二计算节点不是自身时,计算节点将虚拟机对应的第二操作状态更改为空状态。In this step, when the computing node determines that the second computing node is not itself, the computing node changes the second operating state corresponding to the virtual machine to an empty state.
步骤200和步骤201中,第一计算节点和第二计算节点仅仅是为了区别不同时间查找到的虚拟机对应的计算节点,第一计算节点和第二计算节点可能相同,也可能不同;第一操作状态和第二操作状态仅仅是为了区别不同时间查找到的虚拟机的操作状态,第一操作状态和第二操作状态可能相同,也可能不同。In step 200 and step 201, the first computing node and the second computing node are only used to distinguish the computing nodes corresponding to the virtual machines found at different times, and the first computing node and the second computing node may be the same or different; The operational state and the second operational state are merely for distinguishing the operational states of the virtual machines found at different times, and the first operational states and the second operational states may be the same or different.
通过本公开的方法,计算节点在修改虚拟机的操作状态前后均判断虚拟机对应的计算节点是否是自身,若均为自身,则启动虚拟机,避免了控制节点在计算节点修改虚拟机对应的操作状态的过程中修改虚拟机对应的计算节点,从而减少了不同的两个计算节点对同一个虚拟机的恢复操作导致的冲突。Through the method of the present disclosure, the computing node determines whether the computing node corresponding to the virtual machine is itself before and after modifying the operating state of the virtual machine. If both are themselves, the virtual machine is started, and the control node is prevented from modifying the virtual machine corresponding to the computing node. During the operation state, the computing node corresponding to the virtual machine is modified, thereby reducing the conflict caused by the recovery operations of the same virtual machine by two different computing nodes.
下面通过几个实施例详细说明本公开的方法。The method of the present disclosure is described in detail below by several embodiments.
第一实施例,某一个计算节点发生故障后,控制节点检测到需要对虚拟机进行异地重生,判断出满足异地重生的条件,在虚拟机、计算节点和操作状态之间的对应关系中,查找满足异地重生条件的虚拟机对应的第一操作状态;判 断出查找到的第一操作状态为空状态,将对应关系中满足异地重生条件的虚拟机对应的计算节点更改为目标计算节点。In the first embodiment, after a certain computing node fails, the control node detects that the virtual machine needs to be regenerated in another place, determines that the condition of re-occupation is satisfied, and searches for the correspondence between the virtual machine, the computing node, and the operating state. The first operational state corresponding to the virtual machine satisfying the regenerative condition of the different place; The first operation state that is found to be interrupted is an empty state, and the computing node corresponding to the virtual machine that satisfies the remote regenerative condition in the corresponding relationship is changed to the target computing node.
发生故障的计算节点重新上电过程中,在对应关系中查找满足异地重生条件的虚拟机对应的第一计算节点和第一操作状态,判断出查找到的第一计算节点为目标计算节点而非自身,结束启动满足异地重生条件的虚拟机的流程。During the re-power-on of the failed computing node, the first computing node corresponding to the virtual machine that satisfies the re-emergence condition and the first operating state are searched in the corresponding relationship, and it is determined that the first computing node that is found is the target computing node instead of By itself, the process of starting a virtual machine that satisfies the conditions for re-generation of the alienation is started.
控制节点在对应关系中查找满足异地重生条件的虚拟机对应的第二操作状态,判断出查找到的第二操作状态为空状态,将对应关系中满足异地重生条件的虚拟机对应的第二操作状态更改为正在重建虚拟机,并向目的计算节点发送进行异地重生的消息。The control node searches for a second operation state corresponding to the virtual machine that satisfies the remote regeneration condition in the corresponding relationship, and determines that the found second operation state is an empty state, and the second operation corresponding to the virtual machine that satisfies the remote regeneration condition in the correspondence relationship The status changes to the virtual machine being rebuilt and a message is sent to the destination compute node for re-emergence.
第二实施例,某一个计算节点发生故障后,控制节点检测到需要对虚拟机进行异地重生,判断出满足异地重生的条件,在虚拟机、计算节点和操作状态之间的对应关系中,查找满足异地重生条件的虚拟机对应的第一操作状态。In the second embodiment, after a certain computing node fails, the control node detects that the virtual machine needs to be regenerated in another place, determines that the condition of re-occupation is satisfied, and searches for the correspondence between the virtual machine, the computing node, and the operating state. The first operational state corresponding to the virtual machine that satisfies the re-emergence condition.
发生故障的计算节点重新上电过程中,在对应关系中查找满足异地重生条件的虚拟机对应的第一计算节点和第一操作状态。During the re-powering of the failed computing node, the first computing node corresponding to the virtual machine that satisfies the remote regenerative condition and the first operating state are searched for in the corresponding relationship.
控制节点判断出查找到的第一操作状态为空状态,将对应关系中满足异地重生条件的虚拟机对应的计算节点更改为目标计算节点。发生故障的计算节点判断出查找到的第一计算节点为自身,且查找到的第一操作状态为空状态,将虚拟机对应的第一操作状态更改为上电状态。The control node determines that the first operational state that is found is an empty state, and changes the computing node corresponding to the virtual machine that satisfies the remote regenerative condition in the corresponding relationship to the target computing node. The faulty computing node determines that the first computing node that is found is itself, and the first operating state that is found is empty, and changes the first operating state corresponding to the virtual machine to the power-on state.
控制节点在对应关系中查找满足异地重生条件的虚拟机对应的第二操作状态,判断出查找到的第二操作状态为非空状态,结束异地重生的流程。The control node searches for a second operation state corresponding to the virtual machine that satisfies the remote regeneration condition in the correspondence, determines that the found second operation state is a non-empty state, and ends the process of re-occurrence.
发生故障的计算节点在对应关系中查找虚拟机对应的第二计算节点和第二操作状态,判断出查找到的第二计算节点不是自身,结束启动满足异地重生条件的虚拟机的流程。 The faulty computing node searches for the second computing node and the second operating state corresponding to the virtual machine in the corresponding relationship, determines that the found second computing node is not itself, and ends the process of starting the virtual machine that satisfies the remote regenerative condition.
第三实施例,某一个计算节点发生故障后,在重新上电的过程中,在虚拟机、计算节点和操作状态之间的对应关系中,查找虚拟机对应的第一计算节点和第一操作状态;判断出查找到的第一计算节点为自身,且查找到的第一操作状态为空状态,将虚拟机对应的第一操作状态更改为上电状态。In the third embodiment, after a fault occurs in a computing node, in the process of re-powering, in the corresponding relationship between the virtual machine, the computing node, and the operating state, the first computing node corresponding to the virtual machine and the first operation are searched. The state determines that the first computing node that is found is itself, and the first operating state that is found is in an empty state, and changes the first operating state corresponding to the virtual machine to the power-on state.
控制节点检测到需要对虚拟机进行异地重生,判断出满足异地重生的条件,在对应关系中查找虚拟机对应的第一操作状态,判断出查找到的第一操作状态为非空状态,结束进行异地重生的流程。The control node detects that the virtual machine needs to be regenerated in another place, determines that the condition of re-occupation is satisfied, searches for the first operation state corresponding to the virtual machine in the corresponding relationship, and determines that the first operation state that is found is non-empty, and ends. The process of rebirth in different places.
计算节点在对应关系中查找虚拟机对应的第二计算节点和第二操作状态,判断出查找到的第二计算节点为自身,且查找到的第二操作状态为上电状态,启动虚拟机。The computing node searches for the second computing node and the second operating state corresponding to the virtual machine in the corresponding relationship, determines that the found second computing node is itself, and finds that the second operating state is the power-on state, and starts the virtual machine.
参见图3,本公开还提出了一种控制节点,包括:Referring to FIG. 3, the present disclosure also proposes a control node, including:
检测模块,设置为检测到需要对虚拟机进行异地重生;The detecting module is configured to detect that the virtual machine needs to be reborn in another place;
第一查找模块,设置为判断出满足异地重生的条件,在虚拟机、计算节点和操作状态之间的对应关系中,查找满足异地重生条件的虚拟机对应的第一操作状态;接收到第一通知消息,在对应关系中查找满足异地重生条件的虚拟机对应的第二操作状态;The first searching module is configured to determine that the condition for re-occupation of the remote location is satisfied, and in the correspondence between the virtual machine, the computing node, and the operating state, searching for a first operating state corresponding to the virtual machine that satisfies the re-emergence condition; receiving the first a notification message, in the corresponding relationship, searching for a second operation state corresponding to the virtual machine that satisfies the remote regenerative condition;
第一更改模块,设置为判断出查找到的第一操作状态为空状态,将对应关系中满足异地重生条件的虚拟机对应的计算节点更改为目标计算节点,向查找模块发送第一通知消息;判断出查找到的第二操作状态为空状态,将对应关系中满足异地重生条件的虚拟机对应的第二操作状态更改为正在重建虚拟机,并向目的计算节点发送进行异地重生的消息。a first change module, configured to determine that the first operation state that is found is an empty state, and change a computing node corresponding to the virtual machine that satisfies the remote regenerative condition in the corresponding relationship to the target computing node, and send a first notification message to the searching module; It is determined that the found second operation state is an empty state, and the second operation state corresponding to the virtual machine that satisfies the remote regeneration condition in the corresponding relationship is changed to the virtual machine being reconstructed, and the message for re-origination is sent to the destination computing node.
本公开的控制节点中,第一查找模块设置为:In the control node of the present disclosure, the first lookup module is set to:
判断出满足异地重生的条件,在虚拟机、计算节点和操作状态之间的对应 关系中,查找满足异地重生条件的虚拟机对应的第一操作状态;接收到第一通知消息,在对应关系中查找满足异地重生条件的虚拟机对应的第二操作状态。Judging the correspondence between the virtual machine, the computing node, and the operating state In the relationship, the first operation state corresponding to the virtual machine satisfying the regenerative condition is searched; the first notification message is received, and the second operation state corresponding to the virtual machine that satisfies the remote regenerative condition is searched for in the corresponding relationship.
本公开的控制节点中,第一更改模块还设置为:In the control node of the present disclosure, the first change module is further configured to:
判断出第二操作状态为非空状态,将满足异地重生条件的虚拟机对应的计算节点更改为更改之前的计算节点。It is determined that the second operation state is a non-empty state, and the computing node corresponding to the virtual machine that satisfies the remote regeneration condition is changed to the computing node before the change.
本公开的控制节点中,对应关系还包括虚拟机状态,检测模块设置为:In the control node of the present disclosure, the corresponding relationship further includes a virtual machine state, and the detection module is configured to:
检测到计算节点下电,在对应关系中查找下电的计算节点对应的虚拟机和虚拟机状态,判断出查找到的虚拟机状态为运行状态,确定需要对查找到的虚拟机进行异地重生。The computing node is powered off, and the virtual machine and the virtual machine state corresponding to the powered-off computing node are searched for in the corresponding relationship, and the found virtual machine state is determined to be in an operating state, and it is determined that the discovered virtual machine needs to be regenerated in another place.
参见图4,本公开还提出了一种计算节点,包括:Referring to FIG. 4, the present disclosure also proposes a computing node, including:
第二查找模块,设置为在发生故障后重新上电过程中,在虚拟机、计算节点和操作状态之间的对应关系中,查找虚拟机对应的第一计算节点和第一操作状态;接收到第二通知消息,在对应关系中查找虚拟机对应的第二计算节点和第二操作状态;The second search module is configured to: in the corresponding relationship between the virtual machine, the computing node, and the operating state, search for the first computing node corresponding to the virtual machine and the first operating state; a second notification message, where the second computing node corresponding to the virtual machine and the second operating state are searched in the corresponding relationship;
第二更改模块,设置为判断出查找到的第一计算节点为自身,且查找到的第一操作状态为空状态,将虚拟机对应的第一操作状态更改为上电状态,向第二查找模块发送第二通知消息;判断出查找到的第二计算节点为自身,且查找到的第二操作状态为上电状态,启动虚拟机。The second change module is configured to determine that the first calculated node is the self, and the first operation state that is found is an empty state, and the first operation state corresponding to the virtual machine is changed to the power-on state, and the second search is performed. The module sends a second notification message, determines that the found second computing node is itself, and finds that the second operating state is the power-on state, and starts the virtual machine.
可选地,第二更改模块还设置为:Optionally, the second change module is further configured to:
判断出第二计算节点不是自身,将虚拟机对应的第二操作状态更改为空状态。It is determined that the second computing node is not itself, and the second operating state corresponding to the virtual machine is changed to an empty state.
本公开还提供了一种非暂态存储介质,存储有计算机可执行指令,所述计算机可执行指令设置为执行上述实施例的恢复虚拟机的方法。 The present disclosure also provides a non-transitory storage medium storing computer executable instructions arranged to perform the method of restoring a virtual machine of the above-described embodiments.
本公开还提供了一种计算机程序产品,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算机程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时,使所述计算机执行上述实施例的恢复虚拟机的方法。The present disclosure also provides a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions, when the program instructions are executed by a computer, The computer is caused to execute the method of restoring a virtual machine of the above embodiment.
本公开还提供了一种电子设备。图5是本公开实施例提供的电子设备的结构框图。该电子设备可以包括:处理器(processor)51和存储器(memory)53,还可以包括通信接口(Communications Interface)52和总线54。其中,处理器51、通信接口52、存储器53可以通过总线54完成相互间的通信。通信接口52可以用于信息传输。处理器51可以调用存储器53中的逻辑指令,以执行上述实施例的恢复虚拟机的方法。The present disclosure also provides an electronic device. FIG. 5 is a structural block diagram of an electronic device according to an embodiment of the present disclosure. The electronic device may include a processor 51 and a memory 53, and may further include a communication interface 52 and a bus 54. The processor 51, the communication interface 52, and the memory 53 can complete communication with each other through the bus 54. Communication interface 52 can be used for information transmission. The processor 51 can call the logic instructions in the memory 53 to perform the method of restoring the virtual machine of the above embodiment.
此外,上述的存储器53中的逻辑指令可以通过软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本公开的技术方案可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本公开各个实施例所述方法的全部或部分步骤。而前述的存储介质可以是非暂态存储介质,包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质,也可以是暂态存储介质。In addition, the logic instructions in the memory 53 described above may be implemented in the form of a software functional unit and sold or used as a stand-alone product, and may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present disclosure may be embodied in the form of a software product stored in a storage medium, including a plurality of instructions for causing a computer device (which may be a personal computer, a server, or a network) The device or the like) performs all or part of the steps of the method described in various embodiments of the present disclosure. The foregoing storage medium may be a non-transitory storage medium, including: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk. A medium that can store program code, or a transitory storage medium.
工业实用性Industrial applicability
根据本发明的恢复虚拟机的方法和装置,避免了发生故障的计算节点在控制节点修改满足异地重生条件的虚拟机对应的计算节点的过程中修改满足异地 重生条件的虚拟机的操作状态,从而减少了不同的两个计算节点对同一个虚拟机的恢复操作导致的冲突。 According to the method and apparatus for restoring a virtual machine according to the present invention, it is avoided that the failed computing node is modified in the process of modifying the computing node corresponding to the virtual machine satisfying the remote regenerative condition by the control node. The operating state of the virtual machine that regenerates the condition, thereby reducing the conflict caused by the recovery operations of the same virtual machine by two different computing nodes.

Claims (16)

  1. 一种恢复虚拟机的方法,包括:A method of restoring a virtual machine, including:
    控制节点检测到满足异地重生条件的虚拟机,在虚拟机、计算节点和操作状态之间的对应关系中,查找满足异地重生条件的虚拟机对应的第一操作状态;判断出第一操作状态为空状态,将对应关系中满足异地重生条件的虚拟机对应的计算节点更改为目标计算节点;以及The control node detects a virtual machine that satisfies the condition of re-occurrence, and searches for a first operation state corresponding to the virtual machine that satisfies the remote re-generation condition in the corresponding relationship between the virtual machine, the computing node, and the operation state; and determines that the first operation state is An empty state, changing a computing node corresponding to the virtual machine that satisfies the regenerative condition in the corresponding relationship to the target computing node;
    控制节点在对应关系中查找满足异地重生条件的虚拟机对应的第二操作状态,判断出第二操作状态为空状态,将对应关系中满足异地重生条件的虚拟机对应的第二操作状态更改为正在重建虚拟机,并向目的计算节点发送进行异地重生的消息。The control node searches for a second operation state corresponding to the virtual machine that satisfies the remote regeneration condition in the corresponding relationship, determines that the second operation state is an empty state, and changes the second operation state corresponding to the virtual machine that satisfies the remote regeneration condition in the corresponding relationship to The virtual machine is being rebuilt and a message to regenerate the alien is sent to the destination compute node.
  2. 根据权利要求1所述的方法,其中,所述控制节点检测到满足异地重生条件的虚拟机后,在所述查找满足异地重生条件的虚拟机对应的第一操作状态之前还包括:The method of claim 1, wherein the control node further includes: after the detecting, by the control node, the virtual machine that satisfies the remote regeneration condition, before the first operation state corresponding to the virtual machine that satisfies the remote regeneration condition:
    所述控制节点判断出满足异地重生的条件。The control node determines that the condition for re-emergence is satisfied.
  3. 根据权利要求1所述的方法,其中,当所述控制节点判断出所述第二操作状态为非空状态时,该方法还包括:The method of claim 1, wherein when the control node determines that the second operational state is a non-empty state, the method further comprises:
    所述控制节点将所述满足异地重生条件的虚拟机对应的计算节点更改为更改之前的计算节点。The control node changes the computing node corresponding to the virtual machine that satisfies the off-site regeneration condition to the computing node before the change.
  4. 根据权利要求1所述的方法,其中,所述对应关系还包括虚拟机状态,所述控制节点检测到满足异地重生条件的虚拟机包括:The method according to claim 1, wherein the correspondence further includes a virtual machine state, and the control node detects that the virtual machine that satisfies the re-emergence condition includes:
    所述控制节点检测到计算节点下电,在所述对应关系中查找下电的计算节点对应的虚拟机和虚拟机状态,判断出虚拟机状态为运行状态,确定需要对查找到的虚拟机满足异地重生条件。The control node detects that the computing node is powered off, finds the virtual machine and the virtual machine state corresponding to the powered-down computing node in the corresponding relationship, determines that the virtual machine state is in the running state, and determines that the found virtual machine needs to be satisfied. Rebirth conditions in different places.
  5. 一种恢复虚拟机的方法,包括: A method of restoring a virtual machine, including:
    计算节点在发生故障后重新上电过程中,在虚拟机、计算节点和操作状态之间的对应关系中,查找虚拟机对应的第一计算节点和第一操作状态;判断出第一计算节点为自身,且第一操作状态为空状态,将第一操作状态更改为上电状态;以及The computing node searches for the first computing node corresponding to the virtual machine and the first operating state in the corresponding relationship between the virtual machine, the computing node, and the operating state, and determines that the first computing node is Self, and the first operational state is an empty state, changing the first operational state to a powered state;
    计算节点在对应关系中查找虚拟机对应的第二计算节点和第二操作状态,判断出第二计算节点为自身,且第二操作状态为上电状态,启动虚拟机。The computing node searches for the second computing node and the second operating state corresponding to the virtual machine in the corresponding relationship, determines that the second computing node is the self, and the second operating state is the power-on state, and starts the virtual machine.
  6. 根据权利要求5所述的方法,其中,当所述计算节点判断出所述第二计算节点不是自身时,该方法还包括:The method of claim 5, wherein when the computing node determines that the second computing node is not itself, the method further comprises:
    所述计算节点将所述第二操作状态更改为空状态。The computing node changes the second operational state to an empty state.
  7. 根据权利要求5或6所述的方法,其中,所述对应关系还包括虚拟机状态,所述查找虚拟机对应的第一计算节点和第一操作状态包括:The method according to claim 5 or 6, wherein the correspondence further includes a virtual machine state, and the first computing node and the first operating state corresponding to the locating virtual machine include:
    所述计算节点在所述对应关系中查找虚拟机状态为运行状态的虚拟机对应的第一计算节点和第一操作节点。The computing node searches for the first computing node and the first operating node corresponding to the virtual machine whose virtual machine state is in the running state in the corresponding relationship.
  8. 一种控制节点,包括:A control node comprising:
    检测模块,设置为检测满足异地重生条件的虚拟机;a detection module configured to detect a virtual machine that satisfies an off-site regeneration condition;
    第一查找模块,设置为在虚拟机、计算节点和操作状态之间的对应关系中,查找满足异地重生条件的虚拟机对应的第一操作状态;接收到第一通知消息,在对应关系中查找满足异地重生条件的虚拟机对应的第二操作状态;The first search module is configured to: in a correspondence between the virtual machine, the computing node, and the operation state, search for a first operation state corresponding to the virtual machine that satisfies the remote regeneration condition; receive the first notification message, and search in the corresponding relationship a second operational state corresponding to the virtual machine that satisfies the remote regeneration condition;
    第一更改模块,设置为判断出第一操作状态为空状态,将对应关系中满足异地重生条件的虚拟机对应的计算节点更改为目标计算节点,向查找模块发送第一通知消息;判断出第二操作状态为空状态,将对应关系中满足异地重生条件的虚拟机对应的第二操作状态更改为正在重建虚拟机,并向目的计算节点发送进行异地重生的消息。 The first change module is configured to determine that the first operation state is an empty state, and change a computing node corresponding to the virtual machine that satisfies the remote regeneration condition in the corresponding relationship to the target computing node, and send a first notification message to the searching module; The second operation state is an empty state, and the second operation state corresponding to the virtual machine that satisfies the remote regeneration condition in the corresponding relationship is changed to the virtual machine being reconstructed, and the message for re-origination is sent to the destination computing node.
  9. 根据权利要求8所述的控制节点,其中,所述第一查找模块设置为:The control node according to claim 8, wherein the first lookup module is configured to:
    判断出满足异地重生的条件,在虚拟机、计算节点和操作状态之间的对应关系中,查找满足异地重生条件的虚拟机对应的第一操作状态;接收到第一通知消息,在对应关系中查找满足异地重生条件的虚拟机对应的第二操作状态。The first operation state corresponding to the virtual machine that satisfies the remote regenerative condition is found in the correspondence between the virtual machine, the computing node, and the operating state, and the first notification message is received in the corresponding relationship. Find a second operational state corresponding to the virtual machine that satisfies the alienation condition.
  10. 根据权利要求8所述的控制节点,其中,所述第一更改模块还设置为:The control node according to claim 8, wherein the first change module is further configured to:
    判断出所述第二操作状态为非空状态,将所述满足异地重生条件的虚拟机对应的计算节点更改为更改之前的计算节点。Determining that the second operation state is a non-empty state, and changing the computing node corresponding to the virtual machine that satisfies the alienation condition to the computing node before the change.
  11. 根据权利要求8所述的控制节点,其中,所述对应关系还包括虚拟机状态,所述检测模块设置为:The control node according to claim 8, wherein the correspondence further includes a virtual machine state, and the detecting module is configured to:
    检测到计算节点下电,在所述对应关系中查找下电的计算节点对应的虚拟机和虚拟机状态,判断出查找到的虚拟机状态为运行状态,确定需要对查找到的虚拟机进行异地重生。The computing node is powered off, and the virtual machine and the virtual machine state corresponding to the powered off computing node are searched in the corresponding relationship, and the found virtual machine state is determined to be in an operating state, and it is determined that the discovered virtual machine needs to be offsite. Rebirth.
  12. 一种计算节点,包括:A computing node that includes:
    第二查找模块,在发生故障后重新上电过程中,在虚拟机、计算节点和操作状态之间的对应关系中,查找虚拟机对应的第一计算节点和第一操作状态;接收到第二通知消息,在对应关系中查找虚拟机对应的第二计算节点和第二操作状态;以及The second searching module searches for a first computing node corresponding to the virtual machine and the first operating state in the corresponding relationship between the virtual machine, the computing node, and the operating state during the re-powering process after the failure occurs; and receives the second operation state; a notification message, in the correspondence relationship, searching for a second computing node corresponding to the virtual machine and a second operation state;
    第二更改模块,设置为判断出查找到的第一计算节点为自身,且查找到的第一操作状态为空状态,将虚拟机对应的第一操作状态更改为上电状态,向第二查找模块发送第二通知消息;判断出查找到的第二计算节点为自身,且查找到的第二操作状态为上电状态,启动虚拟机。The second change module is configured to determine that the first calculated node is the self, and the first operation state that is found is an empty state, and the first operation state corresponding to the virtual machine is changed to the power-on state, and the second search is performed. The module sends a second notification message, determines that the found second computing node is itself, and finds that the second operating state is the power-on state, and starts the virtual machine.
  13. 根据权利要求12所述的计算节点,其中,所述第二更改模块还设置为:The computing node of claim 12 wherein said second change module is further configured to:
    判断出所述第二计算节点不是自身,将所述虚拟机对应的第二操作状态更 改为空状态。Determining that the second computing node is not itself, and the second operating state corresponding to the virtual machine is further Change to empty state.
  14. 一种非暂态存储介质,存储有计算机可执行指令,所述计算机可执行指令设置为执行权利要求1-7任一项所述的恢复虚拟机的方法。A non-transitory storage medium storing computer executable instructions, the computer executable instructions being arranged to perform the method of recovering a virtual machine of any of claims 1-7.
  15. 一种计算机程序产品,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算机程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时,使所述计算机执行权利要求1-7任一项所述的恢复虚拟机的方法。A computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions that, when executed by a computer, cause the computer to execute A method of recovering a virtual machine as claimed in any of claims 1-7.
  16. 一种电子设备,包括至少一个处理器和与所述至少一个处理器通信连接的存储器,所述存储器用于存储可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行时,使所述至少一个处理器执行权利要求1-7任一项所述的恢复虚拟机的方法。 An electronic device comprising at least one processor and a memory communicatively coupled to the at least one processor, the memory for storing instructions executable by the at least one processor, the instructions being processed by the at least one When executed, the at least one processor is caused to perform the method of recovering a virtual machine according to any one of claims 1-7.
PCT/CN2016/107036 2016-01-18 2016-11-24 Method and device for restoring virtual machine WO2017124829A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610032981.7A CN106980528A (en) 2016-01-18 2016-01-18 A kind of method and apparatus for recovering virtual machine
CN201610032981.7 2016-01-18

Publications (1)

Publication Number Publication Date
WO2017124829A1 true WO2017124829A1 (en) 2017-07-27

Family

ID=59341160

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/107036 WO2017124829A1 (en) 2016-01-18 2016-11-24 Method and device for restoring virtual machine

Country Status (2)

Country Link
CN (1) CN106980528A (en)
WO (1) WO2017124829A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3764226A4 (en) 2018-04-12 2021-03-10 Huawei Technologies Co., Ltd. Method and device for detecting state of virtual machine
CN112445634B (en) * 2019-08-29 2024-04-16 青岛海信宽带多媒体技术有限公司 Fault repairing method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102932413A (en) * 2012-09-26 2013-02-13 华为软件技术有限公司 Computing resource allocation method, cloud management platform node and computing resource cluster
US20150149813A1 (en) * 2013-11-26 2015-05-28 Hitachi, Ltd. Failure recovery system and method of creating the failure recovery system
CN105095001A (en) * 2014-05-08 2015-11-25 中国银联股份有限公司 Virtual machine exception recovery method under distributed environment
US20150370659A1 (en) * 2014-06-23 2015-12-24 Vmware, Inc. Using stretched storage to optimize disaster recovery

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102932413A (en) * 2012-09-26 2013-02-13 华为软件技术有限公司 Computing resource allocation method, cloud management platform node and computing resource cluster
US20150149813A1 (en) * 2013-11-26 2015-05-28 Hitachi, Ltd. Failure recovery system and method of creating the failure recovery system
CN105095001A (en) * 2014-05-08 2015-11-25 中国银联股份有限公司 Virtual machine exception recovery method under distributed environment
US20150370659A1 (en) * 2014-06-23 2015-12-24 Vmware, Inc. Using stretched storage to optimize disaster recovery

Also Published As

Publication number Publication date
CN106980528A (en) 2017-07-25

Similar Documents

Publication Publication Date Title
EP3128719B1 (en) Post-cluster brain split quorum processing method and quorum storage device and system
CN105790980B (en) fault repairing method and device
US8984123B2 (en) Rejuvenation processing device, rejuvenation processing system, computer program, and data processing method
CN102708018B (en) Method and system for exception handling, proxy equipment and control device
EP3550436A1 (en) Method and apparatus for detecting and recovering fault of virtual machine
WO2017067484A1 (en) Virtualization data center scheduling system and method
CN107480014B (en) High-availability equipment switching method and device
WO2013044828A1 (en) Virtual cluster system, processing method and device thereof
CN105159798A (en) Dual-machine hot-standby method for virtual machines, dual-machine hot-standby management server and system
CN107656705B (en) Computer storage medium and data migration method, device and system
CN102394914A (en) Cluster brain-split processing method and device
CN104516789A (en) Method and system for failover detection and treatment in checkpoint systems
EP3232609A1 (en) Locking request processing method and server
CN109361542A (en) The fault handling method of client, device, system, terminal and server
CN105589756A (en) Batch processing cluster system and method
CN104503861A (en) Abnormality handling method and system, agency device and control device
WO2017124829A1 (en) Method and device for restoring virtual machine
CN114064217B (en) OpenStack-based node virtual machine migration method and device
CN103902401A (en) Virtual machine fault tolerance method and device based on monitoring
CN107168774B (en) Virtual machine migration method and system based on local storage
CN110196749B (en) Virtual machine recovery method and device, storage medium and electronic device
CN104753992A (en) Method, device and system for data storage and method and device for virtual platform failure recovery
CN114363356B (en) Data synchronization method, system, device, computer equipment and storage medium
CN114124803B (en) Device management method and device, electronic device and storage medium
CN115766405A (en) Fault processing method, device, equipment and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16886089

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16886089

Country of ref document: EP

Kind code of ref document: A1