Method and device for realizing high availability of virtual machine, cloud management platform, and storage medium
By combining IPMI power state detection and heartbeat storage state judgment in the virtualized cloud platform, the problem of insufficient IPMI detection is solved, and high availability and accurate fault judgment of virtual machines are achieved.
Patent Information
- Application Number
- CN202010520852.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-06-10
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2040-06-10
AI Technical Summary
The means of simply detecting the power state of the node host through IPMI is too single, and the real operation of the host server cannot be accurately obtained, resulting in limited virtual machine high availability.
In the virtualized cloud platform, the power state of the computing node host is detected through IPMI, and the heartbeat storage status is detected through the second computing node host to determine whether the virtual machine triggers the high availability function. If so, the virtual machine is started and run on the second computing node host according to the configured startup policy.
By combining IPMI power status detection and heartbeat storage status judgment, the accurate judgment of the operating conditions of the failed host virtual machine is improved, artificial misoperation is avoided, and the high availability of the virtual machine is ensured.
Smart Images

Figure CN113778607B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to, but are not limited to, the field of virtualized cloud platforms, and specifically, relate to, but are not limited to, methods and devices for implementing high availability of virtual machines, cloud management platforms, and storage media. Background Art
[0002] In the virtualized cloud platform system, the stable, reliable, and sustainable operation of virtual machines is very important for the business deployed in the virtual machine system. However, various failures are inevitable in the daily operation of the cloud platform, such as network interruption, hardware failure, sudden power failure of equipment in the computer room, etc. At this time, the cloud management platform is required to monitor the operation of the virtual machine in real time. When the host machine where the virtual machine is located fails, the virtual machine can be restarted on other computing node hosts that are running normally, so as to restore the operation of the business system on the virtual machine as soon as possible.
[0003] In the related technology, IPMI is used to implement VMC (Virtualization Management Center) in the local area network to remotely monitor the power status of the computing node host, and perform server power on and off operations. After the virtualization cloud platform is set to enable the high availability function, when the computing node host where the virtual machine is located fails, the computing node host and the virtual machine status on the cloud management platform change from running to offline. At this time, the process of judging whether the virtual machine triggers high availability is as follows:
[0004] 1. VMC detects the power status of the computing node host server through IPMI. If the power detection result returned by IPMI is power off, the cloud management platform sets the offline computing node host and virtual machine status to shut down at the same time. The shut down virtual machine triggers the high availability function, and according to the configured startup policy, the virtual machine is started to run on other normal computing node hosts.
[0005] 2. If the power detection result returned by IPMI is power on, the cloud management platform will not do anything to the offline virtual machine, and the system administrator needs to manually confirm the running status of the computing node host and virtual machine at this time. The cloud management platform only provides the "confirm shutdown" function for offline virtual machines. If it is confirmed to be shut down, the virtual machine will trigger high availability and start the virtual machine to run on other normal computing node hosts.
[0006] However, the above-mentioned method of achieving high availability of virtual machines has the following disadvantages in practical applications:
[0007] (1) There is a high possibility that the computing node host and virtual machine status will be offline, requiring the operation and maintenance personnel to be able to accurately determine the actual operating status of the host and virtual machine at this time. If the host and virtual machine status is reset to shutdown on the cloud management platform by human error, the shutdown virtual machine will trigger the high availability function and start on other computing node hosts. However, in fact, the virtual machine is still running normally on the source host at the same time. At this time, the virtual machine will be started twice, which will damage the virtual machine disk data.
[0008] (2) Simply using IPMI to detect the power status of the computing node host is too simple. When the computing node host operating system is abnormally stuck, or the server device loses power and the IPMI network is unreachable, it is impossible to accurately obtain the actual operating status of the host server. Summary of the invention
[0009] The method and device for realizing high availability of a virtual machine provided by the embodiment of the present invention mainly solve the technical problem that the means of detecting the power status of a computing node host simply through IPMI is too simple and cannot accurately obtain the actual operation status of the host server.
[0010] In order to solve the above technical problems, an embodiment of the present invention provides a method for realizing high availability of a virtual machine in a virtualized cloud platform, comprising:
[0011] When the virtual machine status on the first computing node host and the first computing node host goes offline, the virtualization cloud management platform detects the power status of the first computing node host through IPMI, and detects the heartbeat storage status of the first computing node host through the second computing node host;
[0012] Determine whether the virtual machine triggers a high availability function according to the power status detection result returned by the IPMI and the heartbeat storage status;
[0013] If so, the virtual machine is started and run on the second computing node host according to the configured startup policy.
[0014] In one embodiment of the present invention, before detecting the power state of the first computing node host through IPMI and detecting the heartbeat storage state of the first computing node host through the second computing node host, the method includes:
[0015] The high availability function of the virtual machine is set to be turned on, and the production storage repository of the virtual machine storage device is set as the heartbeat storage repository on the resource pool pool;
[0016] A heartbeat file is created on the heartbeat storage repository, where the heartbeat file is used to store the first computing node host information and the virtual machine information.
[0017] The creating a heartbeat file on the heartbeat storage repository comprises:
[0018] In the computing node host operating system under the resource pool pool, an hbagentd service is started, the hbagentd service creates a heartbeat file of the first computing node host on the heartbeat storage repository, the hbagentd service writes the first computing node host information and the virtual machine information into the heartbeat file according to a preset time interval, and adds a timestamp.
[0019] The embodiment of the present invention also provides a device for realizing high availability of virtual machines in a virtualized cloud platform, a detection module, a judgment module, and a startup module;
[0020] The detection module is used for the virtualized cloud management platform to detect the power status of the first computing node host through IPMI, and to detect the heartbeat storage status of the first computing node host through the second computing node host;
[0021] The judgment module judges whether the virtual machine triggers a high availability function according to the power status detection result returned by the IPMI and the heartbeat storage status;
[0022] The startup module is used to start the virtual machine on the second computing node host according to the startup policy.
[0023] An embodiment of the present invention further provides a virtualized cloud management platform, the virtualized cloud management platform comprising a processor, a memory and a communication bus;
[0024] The communication bus is used to realize the connection and communication between the processor and the memory;
[0025] The processor is used to execute one or more computer programs stored in the memory to implement the steps of the method for achieving high availability of virtual machines in a virtualized cloud platform as described above.
[0026] An embodiment of the present invention also provides a computer storage medium, wherein the computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the method for achieving high availability of virtual machines in a virtualized cloud platform as described above.
[0027] According to the method, device and computer storage medium for realizing high availability of virtual machines provided by the embodiments of the present invention, the virtualization cloud management platform sets a heartbeat detection mechanism for storage by the computing node host, and uses the shared storage library where the virtual machine disk is located as the heartbeat storage library; when the computing node host and the virtual machine status are offline, the virtualization cloud management platform detects the host power status through IPMI, and judges the offline host's read and write detection of the heartbeat storage through the second computing node host, and judges whether the virtual machine triggers the high availability function according to the detection result of the host power status, and if so, the virtual machine is started to run on the second computing node host according to the configured startup policy. While detecting the host power status through IPMI, the fault host's read and write detection of the heartbeat storage is judged through other normally running computing node hosts, so as to improve the accurate judgment of the virtual machine operation status on the faulty host.
[0028] Other features and corresponding beneficial effects of the present invention are described in the latter part of the specification, and it should be understood that at least part of the beneficial effects become obvious from the description in the specification of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 A flowchart of a method for implementing high availability of a virtual machine according to the first embodiment of the present invention;
[0030] Figure 2 A flowchart of a method for configuring high availability of a virtual machine provided in Embodiment 1 of the present invention;
[0031] Figure 3 A flow chart of a method for achieving high availability of a virtual machine provided in Embodiment 2 of the present invention;
[0032] Figure 4A A state diagram for enabling the automatic recovery function of a virtual machine state provided in the second embodiment of the present invention;
[0033] Figure 4B A state diagram of a virtual machine startup strategy selection provided in Embodiment 2 of the present invention;
[0034] Figure 4C A state diagram of a heartbeat storage library of a configuration resource pool provided in the second embodiment of the present invention;
[0035] Figure 5 A flowchart of a method for achieving high availability of a virtual machine provided in Embodiment 3 of the present invention;
[0036] Figure 6 A flowchart of a method for achieving high availability of a virtual machine provided in Embodiment 4 of the present invention;
[0037] Figure 7 A block diagram of a device for realizing high availability of a virtual machine provided in Embodiment 5 of the present invention;
[0038] Figure 8 A block diagram of a virtualized cloud management platform provided in Example 6 of the present invention. DETAILED DESCRIPTION
[0039] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the following is a further detailed description of the embodiments of the present invention through specific implementation methods combined with the accompanying drawings. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0040] Embodiment 1:
[0041] In order to solve the problem that the method of detecting the power status of the computing node host simply through IPMI in the related art is too simple and cannot accurately obtain the real operating status of the host server and the virtual machine, the embodiment of the present invention provides a method for realizing high availability of virtual machines, see Figure 1 , which is a flow chart of a method for realizing high availability of a virtual machine provided by the present invention, comprising:
[0042] S101: When the first computing node host and the virtual machine status are offline, the virtualization cloud management platform detects the power status of the first computing node host through IPMI, and detects the heartbeat storage status of the first computing node host through the second computing node host;
[0043] S102: judging whether the virtual machine triggers a high availability function according to the power status detection result and the heartbeat storage status returned by the IPMI;
[0044] S103: If yes, start and run the virtual machine on the second computing node host according to the configured startup policy.
[0045] Before step S101, the high availability function of the virtual machine needs to be set to on, the virtualization cloud management platform adds a heartbeat detection mechanism for the storage of the first computing node host, and uses the shared storage library of the storage device where the virtual machine is located as the heartbeat storage library at the same time. Specifically, the virtualization cloud management platform sets the production storage library where the virtual machine disk is located as the heartbeat storage library on the resource pool pool. The heartbeat storage in this embodiment can set multiple heartbeat storage libraries according to the actual application situation. A heartbeat file is created on the heartbeat storage library, and the heartbeat file is used to store the first computing node host information and the virtual machine information. Specifically, establishing a heartbeat file in the heartbeat storage library includes: in the computing node host operating system under the resource pool pool, starting an hbagentd service, the hbagentd service creates a heartbeat file of the first computing node host on the heartbeat storage library, and the hbagentd service writes the first computing node host information and the virtual machine information into the heartbeat file according to a preset time interval, and timestamps it.
[0046] In an example of this embodiment, in the computing node host operating system under the resource pool, an hbagentd service is started. The hbagentd service will create a file named host UUID.hb on the set heartbeat storage library, and the hbagentd service will write the current computing node host information and the running virtual machine information into the heartbeat file according to the preset time interval, and add a timestamp. It should be understood that in this embodiment, the time interval for the hbagentd service to write the current computing node host information and the running virtual machine information into the UUID.hb file can be configured according to actual needs, for example, every 20hbagentd service writes the current computing node host information and the running virtual machine information into the heartbeat file, or every 30hbagentd service writes the current computing node host information and the running virtual machine information into the heartbeat file. The specific interval time can be flexibly configured according to needs, and this embodiment does not limit the interval time.
[0047] The virtual machine must have high availability configured to be turned on, that is, the automatic recovery of the virtual machine status should be set to enabled. When a computing node host fails, the status of the host and the virtual machine on the virtualization cloud management platform becomes offline. The cloud management platform sets the offline computing node host and virtual machine status to closed at the same time, and the virtual machine can trigger the high availability function. Figure 2 The flowchart of configuring high availability of a virtual machine provided in this embodiment is shown, including:
[0048] S201: Set to enable the virtual state automatic recovery function in the DC data center basic information;
[0049] S202: Set the high availability of the virtual machine to enabled, and select a virtual startup policy;
[0050] S203: Set the production storage repository where the virtual machine disk is located as the heartbeat storage repository of the resource pool pool.
[0051] In step S202, when the high availability function is triggered, a strategy for selecting a host when starting up is set for a single virtual machine, and the high availability master switch needs to be turned on. The virtual machine startup strategy includes any one of the startup methods of randomly selecting a host for startup, restarting on the host where the virtual machine was running before the failure, and restarting on another host.
[0052] In step S101, when the first computing node host fails, the status of the host and the virtual machine on the virtualization cloud management platform becomes offline. At this time, the host power status is detected through IPMI, and the read and write detection of the offline host on the heartbeat storage is also judged through the second computing node host.
[0053] In step S102, it is determined whether the virtual machine triggers the high availability function according to the detection result of the host power state and the heartbeat storage state. The virtualization cloud management platform detects the host power state through IPMI, and IPMI returns the detection result to the virtualization cloud management platform. The detection result returned may be one of power off, power on, and null. If the power detection result returned by IPMI is power off, the cloud management platform sets the offline computing node host and virtual machine status to shut down at the same time. The shut down virtual machine triggers the high availability function, and according to the configured startup policy, the virtual machine is started to run on other normal computing node hosts.
[0054] If the power detection result returned by IPMI is power on, the cloud management platform detects through the second computing node that the faulty host has not updated the hb file for a preset number of consecutive times. The cloud management platform uses IPMI to restart the faulty host system and updates the offline virtual machine status to shutdown. The virtual machine in the shutdown state triggers high availability and is started to run on other normal computing node hosts. The preset number of times in this embodiment can be flexibly configured according to the actual application situation. For example: the cloud management platform detects through the second computing node that the faulty host has not updated the hb file for 4 consecutive times. The cloud management platform uses IPMI to restart the faulty host system and updates the offline virtual machine status to shutdown.
[0055] If the power detection result returned by IPMI is null, the cloud management platform finds through the second computing node detection that the faulty host has not updated the hb file for a preset number of consecutive times, and the cloud management platform resets the status of the faulty computing node host and the virtual machine to shut down. The shut down virtual machine triggers high availability and starts running on other normal computing node hosts.
[0056] In this embodiment, the virtualization cloud management platform sets a heartbeat detection mechanism for the storage of the computing node host, and uses the shared storage library where the virtual machine disk is located as the heartbeat storage library; when the computing node host and the virtual machine status are offline, the virtualization cloud management platform detects the host power status through IPMI, and judges the offline host's read and write detection of the heartbeat storage through the second computing node host, and judges whether the virtual machine triggers the high availability function according to the detection result of the host power status. If so, the virtual machine is started to run on the second computing node host according to the configured startup policy. While detecting the host power status through IPMI, the fault host's read and write detection of the heartbeat storage is judged through other normally running computing node hosts, thereby improving the accurate judgment of the virtual machine operation status on the faulty host and avoiding human error.
[0057] Embodiment 2:
[0058] In this embodiment, the method for realizing high availability of a virtual machine is described by taking the case where the network cable of a computing node host is unplugged as an example. Figure 3 As shown in FIG. 1 , a flowchart of a method for achieving high availability of a virtual machine in this example is shown, including:
[0059] S301: Enable the high availability function of the virtual machine and configure the heartbeat storage library in the resource pool;
[0060] See also Figure 4A -C is a state diagram for configuring high availability of virtual machines. Figure 4A To enable the automatic recovery function of the virtual machine status, set the automatic recovery function of the virtual machine status in the DC Book Center Basics; Figure 4B To select a virtual machine startup strategy state diagram, the startup strategy of the virtual machine can be selected according to actual application requirements: randomly selecting a host to start, restarting on the host where the virtual machine was running before the failure, and restarting on another host. Figure 4C To configure the resource pool heartbeat repository state diagram, set the production repository where the virtual machine disk resides as the heartbeat repository of the resource pool pool.
[0061] S302: The status of the computing node host and the virtual machine on the virtualization cloud management platform becomes offline;
[0062] Unplug the management network cable of the compute node host. The communication between the compute node and the management node is interrupted due to network failure. At this time, the status of the compute node host and the running virtual machine on the cloud platform management portal becomes offline. In fact, the virtual machine is still running normally on the compute node host.
[0063] S303: The virtualized cloud management platform detects the power status of the host through IPMI, and determines the read and write detection of the heartbeat storage by the offline host through the second computing node host;
[0064] S304: The power detection result returned by IPMI to the virtualization cloud management platform is null;
[0065] S305: The cloud management platform detects through the second computing node that the faulty host has not updated the UUID.hb file for four consecutive times;
[0066] S306: The cloud management platform resets the status of the failed computing node host and virtual machine to shut down at the same time;
[0067] S307: The virtual machine triggers the high availability function and restarts the virtual machine according to the configured startup policy.
[0068] In the embodiment of the present invention, when the computing node host and the virtual machine status are offline, the virtualization cloud management platform detects the host power status through IPMI, and judges the offline host's read and write detection of the heartbeat storage through the second computing node host, judges whether the virtual machine triggers the high availability function according to the detection result of the host power status, and starts the virtual machine to run on the second computing node host according to the configured startup policy. While detecting the host power status through IPMI, the fault host's read and write detection of the heartbeat storage is judged through other normally running computing node hosts, thereby improving the accurate judgment of the virtual machine operation status on the faulty host.
[0069] Embodiment three:
[0070] In this embodiment, the method for achieving high availability of a virtual machine is described by taking the freezing of the computing node host operating system as an example. Figure 5 As shown in FIG. 1 , a flowchart of a method for achieving high availability of a virtual machine in this example is shown, including:
[0071] S501: Enable the high availability function of the virtual machine and configure the heartbeat storage library in the resource pool;
[0072] S502: The status of the computing node host and the virtual machine on the virtualization cloud management platform becomes offline;
[0073] At this time, the computing node host and the running virtual machine on the virtualization cloud management platform become offline, but the virtual machine is still running normally on the computing node host.
[0074] S503: The virtualized cloud management platform detects the power status of the host through IPMI, and determines the read and write detection of the heartbeat storage by the offline host through the second computing node host;
[0075] S504: The power detection result returned by IPMI to the virtualization cloud management platform is power on;
[0076] S505: The cloud management platform detects through the second computing node that the faulty host has not updated the UUID.hb file for four consecutive times;
[0077] S506: The cloud management platform resets the status of the failed computing node host and virtual machine to shut down at the same time;
[0078] The cloud management platform resets the status of the failed computing node host and virtual machine to shutdown and generates a vmc log:
[0079] hbrepos report vmlist failed,sa=0814c57f-a9d8-47fd-acd2-5d415c3331fd,
[0080] hbfile= / dev / ZXVE-cea4af50-f91c-42e4-8bd2-38ea7b9ecfbc / 0814c57f-a9d8-47fd-acd2-5d415c3331fd.hb,
[0081] hbrepos report failed 4 times,need to fence pm 0814c57f-a9d8-47fd-acd2-5d415c3331fd.
[0082] S507: The virtual machine triggers the high availability function and restarts the virtual machine according to the configured startup policy.
[0083] In the embodiment of the present invention, when the computing node host and the virtual machine status are offline, the virtualization cloud management platform detects the host power status through IPMI, and judges the offline host's read and write detection of the heartbeat storage through the second computing node host, judges whether the virtual machine triggers the high availability function according to the detection result of the host power status, and starts the virtual machine to run on the second computing node host according to the configured startup policy. While detecting the host power status through IPMI, the fault host's read and write detection of the heartbeat storage is judged through other normally running computing node hosts, thereby improving the accurate judgment of the virtual machine operation status on the faulty host.
[0084] Embodiment 4:
[0085] In this embodiment, the method for realizing high availability of a virtual machine is described by taking abnormal power failure of a computing node host as an example. Figure 6 As shown in FIG. 1 , a flowchart of a method for achieving high availability of a virtual machine in this example is shown, including:
[0086] S601: Enable the high availability function of the virtual machine and configure the heartbeat storage library in the resource pool;
[0087] S602: The status of the computing node host and the virtual machine on the virtualization cloud management platform becomes offline;
[0088] At this time, the computing node host and the running virtual machine on the virtualization cloud management platform become offline.
[0089] S603: The virtualized cloud management platform detects the power status of the host through IPMI, and determines the read and write detection of the heartbeat storage by the offline host through the second computing node host;
[0090] S604: The power detection result returned by IPMI to the virtualization cloud management platform is power off;
[0091] S605: The cloud management platform detects through the second computing node that the faulty host has not updated the UUID.hb file for four consecutive times;
[0092] S606: The cloud management platform resets the status of the failed computing node host and virtual machine to shutdown at the same time;
[0093] The cloud management platform resets the status of the failed computing node host and virtual machine to shutdown and generates a vmc log:
[0094] hbrepos report vmlist failed,sa=442cb0e8-1889-4946-bb74-af1210caace2,
[0095] hbfile= / dev / ZXVE-cea4af50-f91c-42e4-8bd2-38ea7b9ecfbc / 442cb0e8-1889-4946-bb74-af1210caace2.hb,
[0096] hbrepos report failed 4times,need to fence pm 442cb0e8-1889-4946-bb74-af1210caace2.
[0097] S607: The virtual machine triggers the high availability function and restarts the virtual machine according to the configured startup policy.
[0098] In the embodiment of the present invention, when the computing node host and the virtual machine status are offline, the virtualization cloud management platform detects the host power status through IPMI, and judges the offline host's read and write detection of the heartbeat storage through the second computing node host, judges whether the virtual machine triggers the high availability function according to the detection result of the host power status, and starts the virtual machine to run on the second computing node host according to the configured startup policy. While detecting the host power status through IPMI, the fault host's read and write detection of the heartbeat storage is judged through other normally running computing node hosts, thereby improving the accurate judgment of the virtual machine operation status on the faulty host.
[0099] Embodiment five:
[0100] This embodiment provides a virtual machine to achieve high availability device, such as Figure 7 As shown, it is a block diagram of a device for realizing high availability of a virtual machine provided by this embodiment, including: a setting module 701, a detection module 702, a judgment module 703, a startup module 704, a creation module 705, and a processing module 706;
[0101] The setting module 701 in this embodiment is used for the virtualized cloud management platform to set the heartbeat detection mechanism of the computing node host to the storage, and set the shared storage repository where the virtual machine disk is located as the heartbeat storage repository; it is also used to set the high availability function of the virtual machine to be turned on, and set the production storage repository where the virtual machine disk is located on the resource pool pool as the heartbeat storage repository
[0102] The detection module 702 in this embodiment is used by the virtualized cloud management platform to detect the power status of the host through IPMI;
[0103] The judgment module 703 in this embodiment is used by the virtualized cloud management platform to judge the read and write detection of the heartbeat storage by the offline host through the second computing node host; and is also used to judge whether the virtual machine triggers the high availability function according to the detection result of the power status of the host;
[0104] The startup module 704 in this embodiment is used to start an hbagentd service in the computing node host operating system under the resource pool pool;
[0105] The creation module 705 is used to create a computing node host UUID.hb file on the heartbeat storage library;
[0106] The processing module 706 is used to start the virtual machine to run on the second computing node host according to the configured startup policy; IPMI will return the detection result to the virtualization cloud management platform, and the detection result returned may be one of power off, power on, and null. If the power detection result returned by IPMI is power off, the cloud management platform will set the offline computing node host and virtual machine status to shut down at the same time. The shut down virtual machine triggers the high availability function, and according to the configured startup policy, the virtual machine is started to run on other normal computing node hosts.
[0107] If the power detection result returned by IPMI is power on, the cloud management platform detects through the second computing node that the faulty host has not updated the hb file for a preset number of consecutive times. The cloud management platform uses IPMI to restart the faulty host system and updates the offline virtual machine status to shutdown. The virtual machine in the shutdown state triggers high availability and is started to run on other normal computing node hosts. The preset number of times in this embodiment can be flexibly configured according to the actual application situation. For example: the cloud management platform detects through the second computing node that the faulty host has not updated the hb file for 4 consecutive times. The cloud management platform uses IPMI to restart the faulty host system and updates the offline virtual machine status to shutdown.
[0108] If the power detection result returned by IPMI is null, the cloud management platform finds through the second computing node detection that the faulty host has not updated the hb file for a preset number of consecutive times, and the cloud management platform resets the status of the faulty computing node host and the virtual machine to shut down. The shut down virtual machine triggers high availability and starts running on other normal computing node hosts.
[0109] The virtualization cloud management platform device provided in this embodiment is used by the virtualization cloud management platform to set a heartbeat detection mechanism for storage by the computing node host, and use the shared storage library where the virtual machine disk is located as the heartbeat storage library; when the computing node host and the virtual machine status are offline, the virtualization cloud management platform detects the host power status through IPMI, and judges the offline host's read and write detection of the heartbeat storage through the second computing node host, and judges whether the virtual machine triggers the high availability function according to the detection result of the host power status, and if so, the virtual machine is started to run on the second computing node host according to the configured startup policy. While detecting the host power status through IPMI, the fault host's read and write detection of the heartbeat storage is judged through other normally running computing node hosts, thereby improving the accurate judgment of the virtual machine operation status on the faulty host and avoiding human error.
[0110] Embodiment six:
[0111] This embodiment also provides a virtualized cloud management platform. Figure 8 As shown, it includes a processor 81, a memory 82 and a communication bus 83, wherein:
[0112] The communication bus 83 is used to realize the connection and communication between the processor 81 and the memory 82;
[0113] The processor 81 is used to execute one or more computer programs stored in the memory 82 to implement at least one step in the method for achieving high availability of a virtual machine in a virtualized cloud platform in the above-mentioned embodiments 1 to 4.
[0114] The present embodiment also provides a computer-readable storage medium, which includes volatile or non-volatile, removable or non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, computer program modules or other data). Computer-readable storage media include, but are not limited to, RAM (Random Access Memory), ROM (Read-Only Memory), EEPROM (Electrically Erasable Programmable read only memory), flash memory or other memory technology, CD-ROM (Compact Disc Read-Only Memory), digital versatile disk (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer.
[0115] It can be seen that those skilled in the art should understand that all or some of the steps, systems, and functional modules / units in the above disclosed methods can be implemented as software (which can be implemented with computer program code executable by a computing device), firmware, hardware, and appropriate combinations thereof. In hardware implementations, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component can have multiple functions, or a function or step can be performed by several physical components in cooperation. Some or all physical components can be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit.
[0116] In addition, it is well known to those skilled in the art that communication media generally contain computer readable instructions, data structures, computer program modules or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery media. Therefore, the present invention is not limited to any specific hardware and software combination.
[0117] The above contents are further detailed descriptions of the embodiments of the present invention in combination with specific implementation methods, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as falling within the protection scope of the present invention.
Claims
1. A method for achieving high availability of a virtual machine in a virtualized cloud platform, comprising: When the virtual machine status on the first computing node host and the first computing node host goes offline, the virtualization cloud management platform detects the power status of the first computing node host through IPMI, and detects the heartbeat storage status of the first computing node host through the second computing node host; Determine whether the virtual machine triggers a high availability function according to the power status detection result returned by the IPMI and the heartbeat storage status; Wherein, judging whether the virtual machine triggers the high availability function according to the power status detection result returned by the IPMI and the heartbeat storage status includes: If the power status detection result returned by the IPMI is power off, the virtualization cloud management platform sets the first computing node host and the virtual machine to a shutdown state at the same time, and the virtual machine in the shutdown state triggers a high availability function; If the power status detection result returned by the IPMI is power on, and the virtualization cloud management platform detects through the second computing node host that the first computing node host has not updated the heartbeat file for a preset number of consecutive times, the virtualization cloud management platform restarts the first computing node host system through the IPMI, and updates the virtual machine state to a shutdown state, and the virtual machine in the shutdown state triggers a high availability function; If the power status detection result returned by the IPMI is null, and the virtualization cloud management platform detects through the second computing node host that the first computing node host has not updated the heartbeat file for a preset number of consecutive times, the virtualization cloud management platform sets the first computing node host and the virtual machine status to a shutdown state at the same time, and the virtual machine in the shutdown state triggers a high availability function; If so, the virtual machine is started and run on the second computing node host according to the configured startup policy.
2. The method for realizing high availability of virtual machines in a virtualized cloud platform according to claim 1, characterized in that: Before detecting the power state of the first computing node host through IPMI and detecting the heartbeat storage state of the first computing node host through the second computing node host, the method includes: The high availability function of the virtual machine is set to be turned on, and the production storage repository of the virtual machine storage device is set as the heartbeat storage repository on the resource pool pool; A heartbeat file is created on the heartbeat storage repository, where the heartbeat file is used to store the first computing node host information and the virtual machine information.
3. The method for realizing high availability of virtual machines in a virtualized cloud platform according to claim 2, characterized in that: The creating a heartbeat file on the heartbeat storage repository comprises: In the computing node host operating system under the resource pool pool, an hbagentd service is started, the hbagentd service creates a heartbeat file of the first computing node host on the heartbeat storage repository, the hbagentd service writes the first computing node host information and the virtual machine information into the heartbeat file according to a preset time interval, and adds a timestamp.
4. The method for realizing high availability of virtual machines in a virtualized cloud platform according to any one of claims 1 to 3, characterized in that: The startup strategy includes any one of the following startup methods: randomly selecting a host to start, restarting on the host where the virtual machine was running before the failure, and restarting on another host.
5. A device for realizing high availability of virtual machines in a virtualized cloud platform, comprising: Detection module, judgment module, startup module; The detection module is used for the virtualized cloud management platform to detect the power status of the first computing node host through IPMI, and to detect the heartbeat storage status of the first computing node host through the second computing node host; The judgment module is used to judge whether the virtual machine triggers the high availability function according to the power status detection result returned by the IPMI and the heartbeat storage status, wherein the judgment module is specifically used to, if the power status detection result returned by the IPMI is power off, then the virtualization cloud management platform sets the first computing node host and the virtual machine to a shutdown state at the same time, and the virtual machine in the shutdown state triggers the high availability function; if the power status detection result returned by the IPMI is power on, and the virtualization cloud management platform detects through the second computing node host that the first computing node host has not updated the heartbeat file for a preset number of consecutive times, then the virtualization cloud management platform restarts the first computing node host system through the IPMI, and updates the virtual machine state to a shutdown state at the same time, and the virtual machine in the shutdown state triggers the high availability function; if the power status detection result returned by the IPMI is null, and the virtualization cloud management platform detects through the second computing node host that the first computing node host has not updated the heartbeat file for a preset number of consecutive times, then the virtualization cloud management platform sets the first computing node host and the virtual machine state to a shutdown state at the same time, and the virtual machine in the shutdown state triggers the high availability function; The startup module is used to start and run the virtual machine on the second computing node host according to the startup policy.
6. The device for realizing high availability of virtual machines in a virtualized cloud platform according to claim 5, characterized in that: It also includes setting up modules and creating modules; The setting module is used to set the high availability function of the virtual machine to be turned on; The creation module is used to set the production storage repository of the virtual machine storage device as the heartbeat storage repository on the resource pool pool.
7. A virtualized cloud management platform, comprising a processor, a memory and a communication bus; The communication bus is used to realize the connection and communication between the processor and the memory; The processor is used to execute one or more computer programs stored in the memory to implement the steps of the method for achieving high availability of a virtual machine in a virtualized cloud platform according to any one of claims 1 to 4.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores one or more computer programs, and the one or more computer programs can be executed by one or more processors to implement the steps of the method for achieving high availability of a virtual machine in a virtualized cloud platform as described in any one of claims 1-4.
Citation Information
Patent Citations
Method and device for realizing virtual machine migration and cluster system
CN103810016A
System and method for implementing virtualization management platform high availability
CN105302661A