WO2016165290A1 - Method, apparatus and virtualization management center for managing state of virtual machines - Google Patents

Method, apparatus and virtualization management center for managing state of virtual machines Download PDF

Info

Publication number
WO2016165290A1
WO2016165290A1 PCT/CN2015/090961 CN2015090961W WO2016165290A1 WO 2016165290 A1 WO2016165290 A1 WO 2016165290A1 CN 2015090961 W CN2015090961 W CN 2015090961W WO 2016165290 A1 WO2016165290 A1 WO 2016165290A1
Authority
WO
WIPO (PCT)
Prior art keywords
virtual machine
state
list
host
ids
Prior art date
Application number
PCT/CN2015/090961
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 WO2016165290A1 publication Critical patent/WO2016165290A1/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

Abstract

Provided are a method, an apparatus and a virtualization management center for managing the state of virtual machines. The method comprises: receiving a first virtual machine information list reported by a host, the first virtual machine information list including ID and state information of all virtual machines running on the host; when there existing a virtual machine ID in the first virtual machine information list being different from that in a second virtual machine information list corresponding to the host saved locally, and the different virtual machine ID and the state of the virtual machine corresponding to the different virtual machine ID being searched in other locally-stored virtual machine lists than the second virtual machine information list, managing the state of virtual machines according to the search result. By means of the invention, the state information of the virtual machines is reasonably managed, and the problem of startup failure or repetitious startup of the virtual machines is avoided.

Description

一种管理虚拟机状态的方法、装置和虚拟化管理中心Method, device and virtualization management center for managing virtual machine state 技术领域Technical field
本发明涉及虚拟机领域,尤指一种管理虚拟机状态的方法、装置和虚拟化管理中心。The present invention relates to the field of virtual machines, and more particularly to a method, an apparatus, and a virtualization management center for managing virtual machine states.
背景技术Background technique
虚拟化管理中心保存其管理的虚拟机信息,并根据主机上报的虚拟机信息定时更新虚拟机信息。由于虚拟机内部的自动重启,主机在两个上报周期内没有上报虚拟机状态,虚拟化管理中心会删除该主机的虚拟机信息。这样导致虚拟化管理中心认为该虚拟机可以在主机上启动,如果在上报的主机上启动,导致虚拟机重启失败,如果在其他的主机上启动,导致虚拟机在多台主机上启动。因而现有技术中存在无法合理管理虚拟机状态而导致虚拟机重启失败或多起等问题。The virtualization management center saves the virtual machine information it manages, and periodically updates the virtual machine information according to the virtual machine information reported by the host. The virtual machine does not report the status of the VM during the two reporting periods. The virtualization management center deletes the VM information of the host. This causes the virtualization management center to think that the virtual machine can be started on the host. If it is started on the reported host, the virtual machine fails to restart. If it is started on another host, the virtual machine starts on multiple hosts. Therefore, in the prior art, there is a problem that the virtual machine state cannot be reasonably managed, and the virtual machine restarts or fails.
发明内容Summary of the invention
为了解决上述管理虚拟机状态的技术问题,本发明实施例提供了一种管理虚拟机状态的方法、装置和虚拟化管理中心。In order to solve the technical problem of managing the state of the virtual machine, the embodiment of the present invention provides a method, an apparatus, and a virtualization management center for managing the state of the virtual machine.
本发明实施例提供了一种管理虚拟机状态的方法,该方法包括:接收主机上报的第一虚拟机信息列表,所述第一虚拟机信息列表中包括所述主机上运行的所有虚拟机的ID和状态信息;当所述第一虚拟机信息列表中存在与在本地保存的所述主机对应的第二虚拟机信息列表中不同的虚拟机ID,并在本地保存的除所述第二虚拟机信息列表之外的其他虚拟机列表中查询到所述不同的虚拟机ID和所述不同的虚拟机ID对应的虚拟机状态时,根据查询结果管理虚拟机状态。An embodiment of the present invention provides a method for managing a state of a virtual machine, where the method includes: receiving a first virtual machine information list reported by a host, where the first virtual machine information list includes all virtual machines running on the host ID and status information; when there is a different virtual machine ID in the second virtual machine information list corresponding to the host locally saved in the first virtual machine information list, and locally saved except the second virtual When the different virtual machine IDs and the virtual machine states corresponding to the different virtual machine IDs are queried in the list of other virtual machines other than the machine information list, the virtual machine state is managed according to the query result.
优选的,当所述查询结果为,在所述其他虚拟机列表中所述不同虚拟机ID对应的虚拟机状态为关机状态,则根据所述第一虚拟机信息列表更新所述不同的虚拟机ID对应的主机和状态信息。Preferably, when the query result is that the virtual machine state corresponding to the different virtual machine IDs in the other virtual machine list is in a shutdown state, updating the different virtual machines according to the first virtual machine information list. The host and status information corresponding to the ID.
优选的,当所述查询结果为,在所述其他虚拟机列表中所述不同虚拟机ID对应的虚拟机状态为以下至少之一时:挂起、挂死、暂停、离线,则触发告警。优选的,该方法还包括,当在本地保存的其他虚拟机列表中未查询所述不同的虚拟机ID时,丢弃所述第一虚拟机信息列表中所述不同的虚拟机ID对应的信息。Preferably, when the query result is that the virtual machine state corresponding to the different virtual machine IDs in the other virtual machine list is at least one of the following: suspend, hang, pause, or offline, an alarm is triggered. Preferably, the method further includes discarding information corresponding to the different virtual machine IDs in the first virtual machine information list when the different virtual machine IDs are not queried in the list of other virtual machines saved locally.
本发明实施例提供了一种管理虚拟机状态的装置,该装置包括:接收模块,用于接收主机上报的第一虚拟机信息列表,所述第一虚拟机信息列表中包括所述主机上运行的所有虚拟机的ID和状态信息;处理模块,用于当所述第一虚拟机信息列表中存在与在本地保存的所述 主机对应的第二虚拟机信息列表中不同的虚拟机ID,并在本地保存的除所述第二虚拟机信息列表之外的其他虚拟机列表中查询到所述不同的虚拟机ID和所述不同的虚拟机ID对应的虚拟机状态时,根据查询结果管理虚拟机状态。An embodiment of the present invention provides an apparatus for managing a state of a virtual machine, where the apparatus includes: a receiving module, configured to receive a first virtual machine information list reported by a host, where the first virtual machine information list includes the host running ID and status information of all the virtual machines; a processing module, configured to: when the first virtual machine information list exists and stored locally Having different virtual machine IDs in the second virtual machine information list corresponding to the host, and querying the different virtual machine IDs in the locally saved virtual machine list other than the second virtual machine information list When the virtual machine state corresponding to different virtual machine IDs is used, the virtual machine state is managed according to the query result.
优选的,所述处理模块,具体用于,当所述查询结果为,在所述其他虚拟机列表中所述不同虚拟机ID对应的虚拟机状态为关机状态,则根据所述第一虚拟机信息列表更新所述不同的虚拟机ID对应的主机和状态信息。Preferably, the processing module is configured to: when the query result is that the virtual machine state corresponding to the different virtual machine IDs in the other virtual machine list is in a shutdown state, according to the first virtual machine The information list updates the host and status information corresponding to the different virtual machine IDs.
优选的,所述处理模块,具体用于,当所述查询结果为,在所述其他虚拟机列表中所述不同虚拟机ID对应的虚拟机状态为挂起或挂死或暂停或离线或未知状态,则触发告警。Preferably, the processing module is specifically configured to: when the query result is, the virtual machine state corresponding to the different virtual machine IDs in the other virtual machine list is suspended or suspended or suspended or offline or unknown The status triggers an alarm.
优选的,所述处理模块,具体用于,当所述查询结果为,在所述其他虚拟机列表中所述不同虚拟机ID对应的虚拟机状态为运行状态,则触发告警。Preferably, the processing module is configured to: when the query result is that the virtual machine state corresponding to the different virtual machine IDs in the other virtual machine list is in an running state, an alarm is triggered.
本发明实施例还提供了一种虚拟化管理中心,所述虚拟机管理中心包括数据库和处理器;所述数据库中保存有所述虚拟机管理中心管理的所有虚拟机的信息,所述信息包括虚拟机ID、虚拟机状态、归属主机;所述处理器用于当所述第一虚拟机信息列表中存在与在本地保存的所述主机对应的第二虚拟机信息列表中不同的虚拟机ID,并在本地保存的除所述第二虚拟机信息列表之外的其他虚拟机列表中查询到所述不同的虚拟机ID和所述不同的虚拟机ID对应的虚拟机状态时,根据查询结果管理虚拟机状态。The embodiment of the present invention further provides a virtualization management center, where the virtual machine management center includes a database and a processor; the database stores information of all virtual machines managed by the virtual machine management center, where the information includes a virtual machine ID, a virtual machine state, and a home host; the processor is configured to: when the first virtual machine information list has a different virtual machine ID in the second virtual machine information list corresponding to the locally saved host, And querying, according to the query result, the different virtual machine IDs and the virtual machine states corresponding to the different virtual machine IDs are queried in the locally saved virtual machine list except the second virtual machine information list. Virtual machine status.
通过本发明的上述实施例,接收主机上报的第一虚拟机信息列表,所述第一虚拟机信息列表中包括所述主机上运行的所有虚拟机的ID和状态信息;当所述第一虚拟机信息列表中存在与在本地保存的所述主机对应的第二虚拟机信息列表中不同的虚拟机ID,并在本地保存的其他虚拟机列表中查询到所述不同的虚拟机ID时,根据查询结果进行相应处理。可以通过告警机制,合理管理和更新虚拟机状态信息,进而避免了虚拟机启动失败或者多起的问题。Receiving, by the foregoing embodiment of the present invention, a first virtual machine information list reported by a host, where the first virtual machine information list includes IDs and status information of all virtual machines running on the host; when the first virtual In the machine information list, there are different virtual machine IDs in the second virtual machine information list corresponding to the locally saved host, and when the different virtual machine IDs are queried in the locally saved other virtual machine list, according to the The result of the query is processed accordingly. The alarm mechanism can be used to properly manage and update the virtual machine status information, thereby avoiding the problem of virtual machine startup failure or multiple problems.
本发明的其它特征和优点将在随后的说明书中阐述,并且,部分地从说明书中变得显而易见,或者通过实施本发明而了解。本发明的目的和其他优点可通过在说明书、权利要求书以及附图中所特别指出的结构来实现和获得。Other features and advantages of the invention will be set forth in the description which follows, The objectives and other advantages of the invention may be realized and obtained by means of the structure particularly pointed in the appended claims.
附图说明DRAWINGS
附图用来提供对本发明技术方案的进一步理解,并且构成说明书的一部分,与本申请的实施例一起用于解释本发明的技术方案,并不构成对本发明技术方案的限制。The drawings are used to provide a further understanding of the technical solutions of the present invention, and constitute a part of the specification, which together with the embodiments of the present application are used to explain the technical solutions of the present invention, and do not constitute a limitation of the technical solutions of the present invention.
图1为本发明具体实施方式的一种管理虚拟机状态的方法的流程图;1 is a flowchart of a method for managing a state of a virtual machine according to an embodiment of the present invention;
图2为本发明一种管理虚拟机状态的方法的具体应用场景的示意图;2 is a schematic diagram of a specific application scenario of a method for managing a state of a virtual machine according to the present invention;
图3为本发明具体实施方式的一种管理虚拟机状态的装置的结构示意图;3 is a schematic structural diagram of an apparatus for managing a state of a virtual machine according to an embodiment of the present invention;
图4为本发明具体实施方式的一种虚拟化管理中心的结构图结构示意图。 FIG. 4 is a schematic structural diagram of a structure of a virtualization management center according to an embodiment of the present invention.
具体实施方式detailed description
为使本发明的目的、技术方案和优点更加清楚明白,下文中将结合附图对本发明的实施例进行详细说明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互任意组合。The embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be noted that, in the case of no conflict, the features in the embodiments and the embodiments in the present application may be arbitrarily combined with each other.
在附图的流程图示出的步骤可以在诸如一组计算机可执行指令的计算机系统中执行。并且,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。The steps illustrated in the flowchart of the figures may be executed in a computer system such as a set of computer executable instructions. Also, although logical sequences are shown in the flowcharts, in some cases the steps shown or described may be performed in a different order than the ones described herein.
本发明实施例提供了一种管理虚拟机状态的方法,如图1所示,该方法包括:The embodiment of the invention provides a method for managing the state of a virtual machine. As shown in FIG. 1 , the method includes:
步骤101,接收主机上报的第一虚拟机信息列表,所述第一虚拟机信息列表中包括所述主机上运行的所有虚拟机的ID和状态信息;Step 101: Receive a first virtual machine information list reported by the host, where the first virtual machine information list includes IDs and status information of all virtual machines running on the host;
步骤103,当所述第一虚拟机信息列表中存在与在本地保存的所述主机对应的第二虚拟机信息列表中不同的虚拟机ID,并在本地保存的除所述第二虚拟机信息列表之外的其他虚拟机列表中查询到所述不同的虚拟机ID和所述不同的虚拟机ID对应的虚拟机状态时,根据查询结果管理虚拟机状态。Step 103: When there is a different virtual machine ID in the second virtual machine information list corresponding to the host locally saved in the first virtual machine information list, and locally saved in the second virtual machine information When the different virtual machine IDs and the virtual machine states corresponding to the different virtual machine IDs are queried in the list of other virtual machines other than the list, the virtual machine state is managed according to the query result.
具体的,当所述查询结果为,在所述其他虚拟机列表中所述不同虚拟机ID对应的虚拟机状态为关机状态,则根据所述第一虚拟机信息列表更新所述不同的虚拟机ID对应的主机和状态信息。Specifically, when the query result is that the virtual machine state corresponding to the different virtual machine IDs in the other virtual machine list is in a shutdown state, updating the different virtual machines according to the first virtual machine information list. The host and status information corresponding to the ID.
具体的,当所述查询结果为,在所述其他虚拟机列表中所述不同虚拟机ID对应的虚拟机状态为挂起或挂死或暂停或离线或未知状态,则触发告警。Specifically, when the query result is that the virtual machine state corresponding to the different virtual machine IDs in the other virtual machine list is suspended or suspended or suspended or offline or unknown, an alarm is triggered.
具体的,当所述查询结果为,在所述其他虚拟机列表中所述不同虚拟机ID对应的虚拟机状态为运行状态,则触发告警。Specifically, when the query result is that the virtual machine state corresponding to the different virtual machine IDs in the other virtual machine list is in an running state, an alarm is triggered.
具体的,该方法还包括,当在本地保存的其他虚拟机列表中未查询所述不同的虚拟机ID时,丢弃所述第一虚拟机信息列表中所述不同的虚拟机ID对应的信息。Specifically, the method further includes discarding information corresponding to the different virtual machine IDs in the first virtual machine information list when the different virtual machine IDs are not queried in the other virtual machine list saved locally.
下面通过下面的实例进行详细阐述,该实例以虚拟化管理中心(Virtual management center,简称为VMC)为执行主体,其中,虚拟化管理中心VMC在内存和数据库中保存了归属其管理的所有虚拟机信息,包括虚拟机各自的ID、虚拟机运行在哪台主机下、虚拟机当前状态等信息。即VMC保存了归属其管理的所有主机对应的虚拟机信息列表(vmlist)。对应的主机向虚拟化管理中心定时上报其虚拟机信息列表,包含当前主机上运行的所有的虚拟机信息,包括虚拟机ID(例如,可以是通用唯一识别码(Universally Unique Identifier,简称为UUID))、运行状态等,VMC收到这条消息后,同步更新内存或数据库中的虚拟机信息列表,包括该虚拟机运行在哪台主机下、当前状态等信息。The following is a detailed description of the example. The virtual management center (VMC) is the execution entity. The virtualized management center VMC stores all the virtual machines that belong to its management in the memory and database. Information, including the ID of each virtual machine, under which host the virtual machine runs, and the current state of the virtual machine. That is, the VMC saves a list of virtual machine information (vmlist) corresponding to all hosts that it manages. The corresponding host periodically reports the virtual machine information list to the virtualization management center, including all the virtual machine information running on the current host, including the virtual machine ID (for example, a Universally Unique Identifier (UUID). After the VMC receives this message, it updates the list of virtual machine information in the memory or database synchronously, including the host under which the virtual machine is running, the current status, and so on.
具体的,VMC如果判断这台主机上报上来的vmlist中和VMC中保存的该主机的vmlist中的虚拟机UUID都一致,则逐一将内存和数据库中的虚拟机状态更新成最新的,即更新为 上报的信息。Specifically, if the VMC determines that the virtual machine UUID in the vmlist reported by the host is the same as the virtual machine UUID in the vmlist of the host saved in the VMC, the VM state in the memory and the database is updated to the latest one, that is, updated to Reported information.
本发明实例提供了如下优化实例,来解决上述问题。The present invention provides the following optimization examples to solve the above problems.
1、根据上报的vmlist,到VMC内存保存的vmlist中循环比较查询,如果查询不到,则说明该上报的虚拟机并非VMC管理的虚拟机,则VMC对该上报的虚拟机消息不做处理。;1. According to the reported vmlist, the loop comparison query is performed in the vmlist saved in the VMC memory. If the query is not found, the virtual machine that is reported is not the virtual machine managed by the VMC, and the VMC does not process the reported virtual machine message. ;
2、如果能查询到,则说明该上报的虚拟机属于VMC管理的虚拟机,获取该虚拟机在VMC保存状态。虚拟机状态可以为虚拟机不在主机上或虚拟机处于运行状态或虚拟机处于挂死状态或虚拟机挂起状态或虚拟机暂停状态或虚拟机离线状态或虚拟机未知状态;2. If the query is available, the reported virtual machine belongs to the VM managed by the VMC, and the virtual machine is obtained in the VMC save state. The virtual machine state may be that the virtual machine is not on the host or the virtual machine is running or the virtual machine is in a dead state or a virtual machine suspended state or a virtual machine suspended state or a virtual machine offline state or a virtual machine offline state;
3、如果该虚拟机是VMC管理的虚拟机,且该虚拟机处于关机状态,则以主机上报的虚拟机状态为准,将VMC中该虚拟机的运行主机和状态等信息更新成与主机上报的信息一致;3. If the virtual machine is a virtual machine managed by the VMC, and the virtual machine is in a shutdown state, the virtual machine state reported by the host is used to update the running host and status of the virtual machine in the VMC to be reported to the host. The information is consistent;
4、如果该虚拟机是VMC管理的虚拟机,且VMC侧保存的该虚拟机状态为挂起或挂死或或暂停或离线或未知状态,此时VMC触发告警;4. If the virtual machine is a virtual machine managed by the VMC, and the virtual machine state saved on the VMC side is suspended or suspended or suspended or offline or unknown state, the VMC triggers an alarm;
5、如果该虚拟机是VMC管理的虚拟机,且VMC侧保存的该虚拟机是处于运行状态(运行在其他主机),则说明该虚拟机存在多起的问题,此时VMC触发告警。5. If the virtual machine is a virtual machine managed by the VMC, and the virtual machine saved on the VMC side is in a running state (running on another host), it indicates that the virtual machine has multiple problems, and the VMC triggers an alarm.
当VMC判断这台主机的上报上来的vmlist中存在的虚拟机ID,在VMC的内存保存的该主机的vmlist中找不到时,如果VMC不再进行其他控制,在现网运行过程中容易导致虚拟机多起的情况发生,因为VMC侧认为该虚拟机是处于关闭状态的,可以从界面正常发起启动的,这样如果启动在当前主机,则虚拟机启动失败,如果启动在其他主机,就会导致虚拟机双起。通过本发明方案通过告警机制,及时向管理或者运维人员发送给告警,然后通过干预机制解决虚拟机启动失败或多起等问题。When the VMC judges that the VM ID existing in the vmlist reported by the host is not found in the vmlist of the host saved in the VMC memory, if the VMC does not perform other control, it is easy to cause in the live network operation. The virtual machine has multiple occurrences, because the VMC side thinks that the virtual machine is in the closed state, and can start normally from the interface, so if the startup is on the current host, the virtual machine fails to start, if it starts on other hosts, it will Causes the virtual machine to double up. Through the alarm mechanism of the present invention, the alarm is sent to the management or operation and maintenance personnel in time, and then the intervention mechanism is used to solve the problem that the virtual machine fails to start or increase.
下面阐述一本发明一种管理虚拟机状态的方法的具体应用场景,如图2所示,The following describes a specific application scenario of a method for managing a virtual machine state, as shown in FIG. 2,
1、主机1每隔30秒定时向虚拟化管理中心vmc上报本主机上的虚拟机信息列表(虚拟机1到虚拟机n)。1. The host 1 reports the virtual machine information list (virtual machine 1 to virtual machine n) on the host to the virtualization management center vmc every 30 seconds.
2、虚拟化管理中心vmc本地保存的的虚拟机信息列表中没有虚拟机n,此时虚拟化管理中心vmc认为虚拟机n可以在主机上启动,如果在主机1上启动,则启动失败,在主机2上启动,则造成虚拟机在多台主机上重启。2. There is no virtual machine n in the virtual machine information list saved by the virtualization management center vmc. At this time, the virtualization management center vmc thinks that the virtual machine n can be started on the host. If it is started on the host 1, the startup fails. Booting on host 2 causes the virtual machine to restart on multiple hosts.
3、为克服上述问题,需要在主机1上报虚拟机信息列表时进行处理。如果该虚拟机n是VMC管理的虚拟机,并且VMC侧保存的该虚拟机是处于关机状态,则以主机1上报的虚拟机状态为准,将VMC中该虚拟机的运行主机和状态等信息更新成与主机上报信息一致;如果该虚拟机是VMC管理的虚拟机,并且VMC侧保存的该虚拟机是处于开机运行状态(运行在其他主机,比如主机2),则说明该虚拟机存在多起的问题,此时VMC触发告警。可以向网管或者虚拟机管理单元等发送告警信息,可也以设定具体的虚拟机管理界面接收告警信息。3. To overcome the above problem, it is necessary to process when the host 1 reports the virtual machine information list. If the virtual machine n is a virtual machine managed by the VMC, and the virtual machine saved on the VMC side is in a shutdown state, the running host and status of the virtual machine in the VMC are determined based on the state of the virtual machine reported by the host 1. The update is consistent with the host reporting information; if the virtual machine is a VM managed by the VMC, and the virtual machine saved on the VMC side is in a running state (running on another host, such as host 2), it indicates that the virtual machine exists. The problem is that the VMC triggers an alarm. The alarm information can be sent to the network management system or the virtual machine management unit, and the alarm information can be received by setting a specific virtual machine management interface.
本系统和方法的目标是同步虚拟化管理中心和主机实时上报的虚拟机状态信息。也可以针对在多主机启动的虚拟机发送告警给虚拟机管理界面,进行相关处理。后续处理跟本发明 实施例方案无关,暂不详述。The goal of the system and method is to synchronize the virtual machine state information reported by the virtualization management center and the host in real time. You can also send alarms to the VM management interface for VMs that are started by multiple hosts to perform related processing. Subsequent processing and the present invention The embodiment is not relevant and will not be described in detail.
本发明实施例还提供了一种管理虚拟机状态的装置,如图3所示,该装置包括:The embodiment of the invention further provides a device for managing the state of the virtual machine. As shown in FIG. 3, the device includes:
接收模块,用于接收主机上报的第一虚拟机信息列表,所述第一虚拟机信息列表中包括所述主机上运行的所有虚拟机的ID和状态信息;a receiving module, configured to receive a first virtual machine information list reported by the host, where the first virtual machine information list includes IDs and status information of all virtual machines running on the host;
处理模块,当所述第一虚拟机信息列表中存在与在本地保存的所述主机对应的第二虚拟机信息列表中不同的虚拟机ID,并在本地保存的除所述第二虚拟机信息列表之外的其他虚拟机列表中查询到所述不同的虚拟机ID和所述不同的虚拟机ID对应的虚拟机状态时,根据查询结果管理虚拟机状态。a processing module, when the first virtual machine information list has a different virtual machine ID in the second virtual machine information list corresponding to the locally saved host, and is locally saved except the second virtual machine information When the different virtual machine IDs and the virtual machine states corresponding to the different virtual machine IDs are queried in the list of other virtual machines other than the list, the virtual machine state is managed according to the query result.
具体的,当所述查询结果为,在所述其他虚拟机列表中所述不同虚拟机ID对应的虚拟机状态为关机状态,则根据所述第一虚拟机信息列表更新所述不同的虚拟机ID对应的主机和状态信息。Specifically, when the query result is that the virtual machine state corresponding to the different virtual machine IDs in the other virtual machine list is in a shutdown state, updating the different virtual machines according to the first virtual machine information list. The host and status information corresponding to the ID.
具体的,当所述查询结果为,在所述其他虚拟机列表中所述不同虚拟机ID对应的虚拟机状态为挂起或挂死或暂停或离线或未知状态,则触发告警。Specifically, when the query result is that the virtual machine state corresponding to the different virtual machine IDs in the other virtual machine list is suspended or suspended or suspended or offline or unknown, an alarm is triggered.
具体的,当所述查询结果为,在所述其他虚拟机列表中所述不同虚拟机ID对应的虚拟机状态为运行状态,则触发告警。Specifically, when the query result is that the virtual machine state corresponding to the different virtual machine IDs in the other virtual machine list is in an running state, an alarm is triggered.
具体的,该方法还包括,当在本地保存的其他虚拟机列表中未查询所述不同的虚拟机ID时,丢弃所述第一虚拟机信息列表中所述不同的虚拟机ID对应的信息。Specifically, the method further includes discarding information corresponding to the different virtual machine IDs in the first virtual machine information list when the different virtual machine IDs are not queried in the other virtual machine list saved locally.
本发明实施例中,还提供一种虚拟化管理中心,如图4所示,所述虚拟机管理中心包括数据库和处理器;In the embodiment of the present invention, a virtualization management center is further provided. As shown in FIG. 4, the virtual machine management center includes a database and a processor.
所述数据库中保存有所述虚拟机管理中心管理的所有虚拟机的信息,所述信息包括虚拟机ID、虚拟机状态、归属主机等信息;The information of all the virtual machines managed by the virtual machine management center is saved in the database, and the information includes information such as a virtual machine ID, a virtual machine state, and a home host.
所述处理器用于接收主机上报的第一虚拟机信息列表,所述第一虚拟机信息列表中包括所述主机上运行的所有虚拟机的ID和状态信息;The processor is configured to receive a first virtual machine information list reported by the host, where the first virtual machine information list includes IDs and status information of all virtual machines running on the host;
当所述第一虚拟机信息列表中存在与在本地保存的所述主机对应的第二虚拟机信息列表中不同的虚拟机ID,并在本地保存的除所述第二虚拟机信息列表之外的其他虚拟机列表中查询到所述不同的虚拟机ID和所述不同的虚拟机ID对应的虚拟机状态时,根据查询结果管理虚拟机状态。When there is a different virtual machine ID in the second virtual machine information list corresponding to the host locally saved in the first virtual machine information list, and stored locally except the second virtual machine information list When the different virtual machine IDs and the virtual machine states corresponding to the different virtual machine IDs are queried in the other virtual machine list, the virtual machine state is managed according to the query result.
具体的,上述数据库可以是内存数据库也可以是其他存储设备。Specifically, the foregoing database may be an in-memory database or other storage device.
具体的,上述虚拟化管理中心还可以包括虚拟机管理界面,用于接收处理器发出的告警,并展示给运维或其他管理人员,后续针对告警如何处理不是本发明内容,暂不详细叙述。Specifically, the foregoing virtualization management center may further include a virtual machine management interface, which is configured to receive an alarm sent by the processor and display it to the operation and maintenance or other management personnel. The subsequent processing of the alarm is not the content of the present invention, and is not described in detail.
具体的,当所述查询结果为,在所述其他虚拟机列表中所述不同虚拟机ID对应的虚拟机状态为关机状态,则根据所述第一虚拟机信息列表更新所述不同的虚拟机ID对应的主机和状 态信息。Specifically, when the query result is that the virtual machine state corresponding to the different virtual machine IDs in the other virtual machine list is in a shutdown state, updating the different virtual machines according to the first virtual machine information list. ID corresponding host and shape State information.
具体的,当所述查询结果为,在所述其他虚拟机列表中所述不同虚拟机ID对应的虚拟机状态为挂起或挂死或暂停或离线或未知状态,则触发告警。Specifically, when the query result is that the virtual machine state corresponding to the different virtual machine IDs in the other virtual machine list is suspended or suspended or suspended or offline or unknown, an alarm is triggered.
具体的,当所述查询结果为,在所述其他虚拟机列表中所述不同虚拟机ID对应的虚拟机状态为运行状态,则触发告警。Specifically, when the query result is that the virtual machine state corresponding to the different virtual machine IDs in the other virtual machine list is in an running state, an alarm is triggered.
具体的,该方法还包括,当在本地保存的其他虚拟机列表中未查询所述不同的虚拟机ID时,丢弃所述第一虚拟机信息列表中所述不同的虚拟机ID对应的信息。Specifically, the method further includes discarding information corresponding to the different virtual machine IDs in the first virtual machine information list when the different virtual machine IDs are not queried in the other virtual machine list saved locally.
采取上述方案,针对虚拟机状态进行及时管理,规避了虚拟机启动失败或者在多主机虚拟机重复启动等问题。The above solution is adopted to timely manage the state of the virtual machine, and avoids problems such as failure of the virtual machine to start or repeated startup of the multi-host virtual machine.
在另外一个实施例中,还提供了一种软件,该软件用于执行上述实施例及优选实施方式中描述的技术方案。In another embodiment, software is also provided for performing the technical solutions described in the above embodiments and preferred embodiments.
在另外一个实施例中,还提供了一种存储介质,该存储介质中存储有上述软件,该存储介质包括但不限于:光盘、软盘、硬盘、可擦写存储器等。In another embodiment, a storage medium is further provided, wherein the software includes the above-mentioned software, including but not limited to: an optical disk, a floppy disk, a hard disk, an erasable memory, and the like.
虽然本发明所揭露的实施方式如上所述,但所述的内容仅为便于理解本发明而采用的实施方式,并非用以限定本发明。任何本发明所属领域内的技术人员,在不脱离本发明所揭露的精神和范围的前提下,可以在实施的形式及细节上进行任何的修改与变化,但本发明的专利保护范围,仍须以所附的权利要求书所界定的范围为准。 While the embodiments of the present invention have been described above, the described embodiments are merely for the purpose of understanding the invention and are not intended to limit the invention. Any modification and variation in the form and details of the embodiments may be made by those skilled in the art without departing from the spirit and scope of the invention. The scope defined by the appended claims shall prevail.

Claims (10)

  1. 一种管理虚拟机状态的方法,该方法包括:A method of managing a virtual machine state, the method comprising:
    接收主机上报的第一虚拟机信息列表,所述第一虚拟机信息列表中包括所述主机上运行的所有虚拟机的ID和状态信息;Receiving, by the host, the first virtual machine information list, where the first virtual machine information list includes IDs and status information of all virtual machines running on the host;
    当所述第一虚拟机信息列表中存在与在本地保存的所述主机对应的第二虚拟机信息列表中不同的虚拟机ID,并在本地保存的除所述第二虚拟机信息列表之外的其他虚拟机列表中查询到所述不同的虚拟机ID和所述不同的虚拟机ID对应的虚拟机状态时,根据查询结果管理虚拟机状态。When there is a different virtual machine ID in the second virtual machine information list corresponding to the host locally saved in the first virtual machine information list, and stored locally except the second virtual machine information list When the different virtual machine IDs and the virtual machine states corresponding to the different virtual machine IDs are queried in the other virtual machine list, the virtual machine state is managed according to the query result.
  2. 根据权利要求1所述的管理虚拟机状态的方法,其中,当所述查询结果为,在所述其他虚拟机列表中所述不同虚拟机ID对应的虚拟机状态为关机状态,则根据所述第一虚拟机信息列表更新所述不同的虚拟机ID对应的主机和状态信息。The method for managing the state of a virtual machine according to claim 1, wherein, when the query result is that the virtual machine state corresponding to the different virtual machine IDs in the other virtual machine list is in a shutdown state, according to the The first virtual machine information list updates the host and status information corresponding to the different virtual machine IDs.
  3. 根据权利要求1所述的管理虚拟机状态的方法,其中,当所述查询结果为,在所述其他虚拟机列表中所述不同虚拟机ID对应的虚拟机状态为以下至少之一时:挂起、挂死、暂停、离线,则触发告警。The method of managing the state of a virtual machine according to claim 1, wherein when the query result is that the virtual machine state corresponding to the different virtual machine IDs in the other virtual machine list is at least one of the following: hang If the device is hung, suspended, or offline, an alarm is triggered.
  4. 根据权利要求1所述的管理虚拟机状态的方法,其中,当所述查询结果为,在所述其他虚拟机列表中所述不同虚拟机ID对应的虚拟机状态为运行状态,则触发告警。The method of managing the state of a virtual machine according to claim 1, wherein the alarm is triggered when the result of the query is that the virtual machine state corresponding to the different virtual machine IDs is in an running state in the other virtual machine list.
  5. 根据权利要求1所述的管理虚拟机状态的方法,其中,该方法还包括,当在本地保存的其他虚拟机列表中未查询所述不同的虚拟机ID时,丢弃所述第一虚拟机信息列表中所述不同的虚拟机ID对应的信息。The method of managing a virtual machine state according to claim 1, wherein the method further comprises: discarding the first virtual machine information when the different virtual machine ID is not queried in another virtual machine list saved locally; The information corresponding to the different virtual machine IDs in the list.
  6. 一种管理虚拟机状态的装置,该装置包括:A device for managing the state of a virtual machine, the device comprising:
    接收模块,设置为接收主机上报的第一虚拟机信息列表,所述第一虚拟机信息列表中包括所述主机上运行的所有虚拟机的ID和状态信息;a receiving module, configured to receive a first virtual machine information list reported by the host, where the first virtual machine information list includes IDs and status information of all virtual machines running on the host;
    处理模块,设置为当所述第一虚拟机信息列表中存在与在本地保存的所述主机对应的第二虚拟机信息列表中不同的虚拟机ID,并在本地保存的除所述第二虚拟机信息列表之外的其他虚拟机列表中查询到所述不同的虚拟机ID和所述不同的虚拟机ID对应的虚拟机状态时,根据查询结果管理虚拟机状态。a processing module, configured to: when the first virtual machine information list has a different virtual machine ID in the second virtual machine information list corresponding to the locally saved host, and save the locally saved virtual virtual machine ID When the different virtual machine IDs and the virtual machine states corresponding to the different virtual machine IDs are queried in the list of other virtual machines other than the machine information list, the virtual machine state is managed according to the query result.
  7. 根据权利要求6所述的管理虚拟机状态的装置,其中,所述处理模块,进一步设置为,当所述查询结果为,在所述其他虚拟机列表中所述不同虚拟机ID对应的虚拟机状态为关机状态,则根据所述第一虚拟机信息列表更新所述不同的虚拟机ID对应的主机和状态信息。The apparatus for managing the state of a virtual machine according to claim 6, wherein the processing module is further configured to: when the query result is, the virtual machine corresponding to the different virtual machine ID in the other virtual machine list The state is the shutdown state, and the host and state information corresponding to the different virtual machine IDs are updated according to the first virtual machine information list.
  8. 根据权利要求6所述的管理虚拟机状态的装置,其中,所述处理模块,进一步设置为,当所述查询结果为,在所述其他虚拟机列表中所述不同虚拟机ID对应的虚拟机状态为挂起或挂死或暂停或离线或未知状态,则触发告警。 The apparatus for managing the state of a virtual machine according to claim 6, wherein the processing module is further configured to: when the query result is, the virtual machine corresponding to the different virtual machine ID in the other virtual machine list An alarm is triggered when the status is suspended or suspended or suspended or offline or unknown.
  9. 根据权利要求6所述的管理虚拟机状态的装置,其中,所述处理模块,进一步设置为,当所述查询结果为,在所述其他虚拟机列表中所述不同虚拟机ID对应的虚拟机状态为运行状态,则触发告警。The apparatus for managing the state of a virtual machine according to claim 6, wherein the processing module is further configured to: when the query result is, the virtual machine corresponding to the different virtual machine ID in the other virtual machine list When the status is running, an alarm is triggered.
  10. 一种虚拟化管理中心,所述虚拟机管理中心包括数据库和处理器;A virtualization management center, the virtual machine management center includes a database and a processor;
    所述数据库中保存有所述虚拟机管理中心管理的所有虚拟机的信息,所述信息包括虚拟机ID、虚拟机状态、归属主机;The database stores information of all virtual machines managed by the virtual machine management center, where the information includes a virtual machine ID, a virtual machine state, and a home host;
    所述处理器设置为接收当所述第一虚拟机信息列表中存在与在本地保存的所述主机对应的第二虚拟机信息列表中不同的虚拟机ID,并在本地保存的除所述第二虚拟机信息列表之外的其他虚拟机列表中查询到所述不同的虚拟机ID和所述不同的虚拟机ID对应的虚拟机状态时,根据查询结果管理虚拟机状态。 The processor is configured to receive, when the first virtual machine information list has a different virtual machine ID in the second virtual machine information list corresponding to the host that is saved locally, and save the locally saved When the different virtual machine IDs and the virtual machine states corresponding to the different virtual machine IDs are queried in the list of other virtual machines other than the virtual machine information list, the virtual machine state is managed according to the query result.
PCT/CN2015/090961 2015-04-14 2015-09-28 Method, apparatus and virtualization management center for managing state of virtual machines WO2016165290A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510175387.9 2015-04-14
CN201510175387.9A CN106155762A (en) 2015-04-14 2015-04-14 A kind of method, device and virtual management center managing virtual machine state

Publications (1)

Publication Number Publication Date
WO2016165290A1 true WO2016165290A1 (en) 2016-10-20

Family

ID=57127075

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/090961 WO2016165290A1 (en) 2015-04-14 2015-09-28 Method, apparatus and virtualization management center for managing state of virtual machines

Country Status (2)

Country Link
CN (1) CN106155762A (en)
WO (1) WO2016165290A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107357638A (en) * 2017-09-01 2017-11-17 郑州云海信息技术有限公司 The control method and control device of a kind of power supply status
CN110321678B (en) * 2019-06-19 2021-08-31 北京信安世纪科技股份有限公司 Control method, device, equipment and medium of virtual system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130145179A1 (en) * 2008-05-08 2013-06-06 Microsoft Corporation Corralling Virtual Machines With Encryption Keys
CN103473113A (en) * 2013-09-04 2013-12-25 国云科技股份有限公司 Universal virtual-machine adopting method
CN103703724A (en) * 2013-08-15 2014-04-02 华为技术有限公司 Resource payment method

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102479099B (en) * 2010-11-22 2015-06-10 中兴通讯股份有限公司 Virtual machine management system and use method thereof
WO2011127860A2 (en) * 2011-05-18 2011-10-20 华为技术有限公司 Method, server and system for starting application
US9286101B2 (en) * 2011-07-28 2016-03-15 Red Hat, Inc. Free page hinting
CN102609295A (en) * 2011-10-18 2012-07-25 华中科技大学 Dynamic operation scheduling system of virtual machine
US9268591B2 (en) * 2012-10-18 2016-02-23 Vmware, Inc. Systems and methods for detecting system exceptions in guest operating systems

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130145179A1 (en) * 2008-05-08 2013-06-06 Microsoft Corporation Corralling Virtual Machines With Encryption Keys
CN103703724A (en) * 2013-08-15 2014-04-02 华为技术有限公司 Resource payment method
CN103473113A (en) * 2013-09-04 2013-12-25 国云科技股份有限公司 Universal virtual-machine adopting method

Also Published As

Publication number Publication date
CN106155762A (en) 2016-11-23

Similar Documents

Publication Publication Date Title
US10915412B2 (en) System and method for live migration of a virtual machine
US8775372B2 (en) Retrieving historical object-related configuration data
KR101242908B1 (en) Distributed virtual switch for virtualized computer systems
US20120030669A1 (en) Mechanism for Delayed Hardware Upgrades in Virtualization Systems
JP5609335B2 (en) Server management program, server management apparatus, and server management method
JP2012234336A (en) Method and system for executing monitoring-target process
WO2018192478A1 (en) Cloud management platform, virtual machine management method, system thereof
US20200076689A1 (en) Cloud migration
WO2013044828A1 (en) Virtual cluster system, processing method and device thereof
US9565243B2 (en) System and method for managing event tracking
US9690832B2 (en) Enterprise reporting capabilities in storage management systems
WO2014000497A1 (en) Graceful shutdown method and system for virtual system
US10949111B2 (en) Updating operating system images of inactive compute instances
WO2018137520A1 (en) Service recovery method and apparatus
CN107656705B (en) Computer storage medium and data migration method, device and system
US20140122430A1 (en) Retrieving historical tags hierarchy plus related objects
WO2009089746A1 (en) Method, device and system for realizing task in cluster environment
CN111641716B (en) Self-healing method of parameter server, parameter server and parameter service system
US11675611B2 (en) Software service intervention in a computing system
WO2016165290A1 (en) Method, apparatus and virtualization management center for managing state of virtual machines
US10928883B2 (en) System management device
US11693647B2 (en) Deployment of new versions of event consumers in an event-driven system
WO2019080386A1 (en) Network service management method and system
US8812900B2 (en) Managing storage providers in a clustered appliance environment
WO2016183735A1 (en) Method, apparatus and device for synchronizing virtualized network function (vnf) states

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: 15888987

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: 15888987

Country of ref document: EP

Kind code of ref document: A1