Identification method and device for evacuation result of virtual machine and electronic equipment
By obtaining the IP address of the abnormal server and the configuration information of the virtual machine, comparing the IP address, and automatically determining the evacuation results of the virtual machine, solving the problem of low manual identification efficiency in the cloud computing environment, and achieving the effect of quickly obtaining evacuation results.
Patent Information
- Application Number
- CN202510219716.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-26
- Publication Date
- 2025-06-13
AI Technical Summary
In a cloud computing environment, it is less efficient to manually identify evacuation results on each virtual machine that completes evacuation operations in turn, resulting in an extended time for confirmation of evacuation results.
By obtaining the IP address of the abnormal server from the server detection platform, obtaining the configuration information of the virtual machine configured on the abnormal server from the running ledger based on the IP address, sending information acquisition instructions to each virtual machine interface, obtaining the host IP address of the virtual machine feedback, and comparing the original IP address with the feedback IP address to determine the evacuation result of the virtual machine.
It realizes the rapid and parallel acquisition of evacuation results of each virtual machine, improves the efficiency of obtaining evacuation results of virtual machine, and solves the problem of low manual identification efficiency.
Smart Images

Figure CN120144349A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of big data, and in particular, to a method, an apparatus, and an electronic device for identifying the evacuation result of a virtual machine. Background Art
[0002] With the growth of the number of devices and the scale of data centers in financial institutions, financial institutions have gradually adopted cloud computing technologies and services for business operations. In a cloud computing environment, since a large number of virtual machines may run on a single physical machine, the downtime of a physical machine node may lead to large-scale service interruptions, affecting user services. Therefore, financial institutions need to monitor physical machines and, in the event of an abnormality in a physical machine, evacuate the virtual machines on the abnormal physical machine through HA evacuation to ensure the normal operation of the virtual machines.
[0003] However, after evacuating the virtual machines, it is still necessary to determine whether the virtual machines can operate normally. At this time, the maintenance department usually needs to detect the status of each virtual machine in turn to ensure the normal operation of the virtual machines. However, detecting each virtual machine one by one means that it is necessary to check key indicators such as the running status, network connection, and storage access of each virtual machine one by one. As the number of virtual machines in the virtualized environment continues to increase, the detection efficiency of this method will drop significantly, resulting in an extended time for confirming the evacuation result.
[0004] Regarding the problem of the low efficiency of manually identifying the evacuation results of each virtual machine that has completed the evacuation operation in the related art, no effective solution has been proposed yet. Summary of the Invention
[0005] The main purpose of this application is to provide a method, an apparatus, and an electronic device for identifying the evacuation result of a virtual machine, so as to solve the problem of low efficiency in manually identifying the evacuation results of each virtual machine that has completed the evacuation operation in the related art.
[0006] To achieve the above object, according to one aspect of the present application, a method for identifying the evacuation result of a virtual machine is provided. The method includes: obtaining the IP address of an abnormal server from a server detection platform to obtain a first IP address; obtaining the configuration information of the virtual machines configured on the abnormal server from the operation ledger according to the first IP address to obtain M pieces of virtual machine configuration information, where the operation ledger is used to record the configuration information of the virtual machines configured on the abnormal server before the abnormality occurs; sending information acquisition instructions to the interfaces of each virtual machine according to the M pieces of virtual machine configuration information, and obtaining the host IP addresses fed back by each virtual machine to obtain M second IP addresses, where the information acquisition instructions are used to obtain the IP address of the host where the virtual machine is located after the abnormal server has an abnormality; comparing the first IP address with the M second IP addresses to obtain M comparison results, and determining the evacuation result of the virtual machines in the abnormal server according to the M comparison results.
[0007] Optionally, obtaining the IP address of an abnormal server from a server detection platform to obtain a first IP address includes: obtaining a set of alarm information at a target time from the server detection platform; screening the alarm information of the servers with an abnormal running state in the set of alarm information to obtain target alarm information; obtaining the server indicated by the target alarm information to obtain an abnormal server, and obtaining the IP address of the abnormal server to obtain a first IP address.
[0008] Optionally, obtaining the configuration information of the virtual machines configured on the abnormal server from the operation ledger according to the first IP address to obtain M pieces of virtual machine configuration information includes: obtaining the virtual machines configured on the abnormal server in the operation ledger according to the first IP address to obtain a plurality of initial virtual machines; obtaining the virtualization type of each initial virtual machine, and determining the initial virtual machines with the virtualization type being a preset type as target virtual machines to obtain M target virtual machines; obtaining the configuration information of each target virtual machine to obtain M pieces of virtual machine configuration information.
[0009] Optionally, comparing the first IP address with the M second IP addresses to obtain M comparison results includes: comparing the first IP address with each second IP address respectively; in the case where the first IP address is the same as the second IP address, determining the comparison result as the addresses being the same; in the case where the first IP address is different from the second IP address, determining the comparison result as the addresses being different; combining the comparison results obtained by comparing each second IP address with the first IP address into M comparison results.
[0010] Optionally, determining the evacuation result of the virtual machines in the abnormal server according to the M comparison results includes: when there is a comparison result indicating that the first IP address is the same as the second IP address among the M comparison results, determining that the evacuation result is abnormal; when all M comparison results indicate that the first IP address is different from the second IP address, determining that the evacuation result is normal.
[0011] Optionally, after determining that the evacuation result is normal, the method further includes: sending a target signal to each virtual machine, and determining whether a feedback signal is received within a preset time period; when feedback signals sent by all virtual machines are received, determining that the evacuation result is normal; when a feedback signal sent by the first virtual machine is not received, determining that the evacuation result is abnormal, and generating a prompt message according to the configuration information of the first virtual machine, where the prompt message is used to indicate that the evacuation result of the first virtual machine is abnormal; or, obtaining the services processed by each virtual machine to obtain M service information; sequentially sending service requests to the corresponding virtual machines according to each service information, and receiving the service processing results fed back by each virtual machine to obtain M service processing results; when all M service processing results are normal, determining that the evacuation result is normal; when there is an abnormal service processing result, determining that the evacuation result is abnormal.
[0012] Optionally, after determining that the evacuation result is abnormal, the method further includes: obtaining the virtual machines with the same address in the comparison result, and determining whether the running state of the virtual machine is the shutdown state; when the running state of the virtual machine is the shutdown state, changing the evacuation result to normal; when the running state of the virtual machine is not the shutdown state, determining that the evacuation result is abnormal.
[0013] To achieve the above object, according to another aspect of the present application, there is provided a recognition device for the evacuation result of a virtual machine. The device includes: a first obtaining unit, configured to obtain the IP address of the abnormal server from the server detection platform to obtain a first IP address; a second obtaining unit, configured to obtain the configuration information of the virtual machines configured in the abnormal server from the operation ledger according to the first IP address to obtain M virtual machine configuration information, where the operation ledger is used to record the configuration information of the virtual machines configured in the abnormal server before the abnormal occurs; a first sending unit, configured to send an information obtaining instruction to the interfaces of each virtual machine according to the M virtual machine configuration information, and obtain the host IP addresses fed back by each virtual machine to obtain M second IP addresses, where the information obtaining instruction is used to obtain the IP address of the host where the virtual machine is located after the abnormal occurs in the abnormal server; a first determining unit, configured to compare the first IP address with the M second IP addresses to obtain M comparison results, and determine the evacuation result of the virtual machines in the abnormal server according to the M comparison results.
[0014] Optionally, the first acquisition unit includes: a first acquisition module, configured to acquire a set of alarm information at a target moment from a server detection platform; a screening module, configured to screen out alarm information of servers with an abnormal running state from the set of alarm information to obtain target alarm information; a second acquisition module, configured to acquire the servers indicated by the target alarm information to obtain abnormal servers, and acquire the IP addresses of the abnormal servers to obtain first IP addresses.
[0015] Optionally, the second acquisition unit includes: a third acquisition module, configured to acquire virtual machines configured in the abnormal servers from an operation ledger according to the first IP addresses to obtain a plurality of initial virtual machines; a fourth acquisition module, configured to acquire the virtualization types of the respective initial virtual machines, and determine the initial virtual machines with a virtualization type being a preset type as target virtual machines to obtain M target virtual machines; a fifth acquisition module, configured to acquire the configuration information of the respective target virtual machines to obtain M pieces of virtual machine configuration information.
[0016] Optionally, the first determination unit includes: a comparison module, configured to compare the first IP address with each of the second IP addresses respectively; a first determination module, configured to determine that the comparison result is that the addresses are the same when the first IP address is the same as the second IP address; a second determination module, configured to determine that the comparison result is that the addresses are different when the first IP address is different from the second IP address; a combination module, configured to combine the comparison results obtained by comparing each of the second IP addresses with the first IP address into M comparison results.
[0017] Optionally, the first determination unit includes: a third determination module, configured to determine that the evacuation result is abnormal when there is a comparison result indicating that the first IP address is the same as the second IP address among the M comparison results; a fourth determination module, configured to determine that the evacuation result is normal when all of the M comparison results indicate that the first IP address is different from the second IP address.
[0018] Optionally, after determining that the evacuation result is normal, the device further includes: a second sending unit, configured to send a target signal to each virtual machine and determine whether a feedback signal is received within a preset time period; a second determining unit, configured to determine that the evacuation result is normal when feedback signals sent by all virtual machines are received; a third determining unit, configured to determine that the evacuation result is abnormal when a feedback signal sent by a first virtual machine is not received, and generate a prompt message according to the configuration information of the first virtual machine, where the prompt message is used to indicate that the evacuation result of the first virtual machine is abnormal; or, a third obtaining unit, configured to obtain services processed by each virtual machine to obtain M service messages; a third sending unit, configured to sequentially send service requests to corresponding virtual machines according to each service message and receive service processing results fed back by each virtual machine to obtain M service processing results; a fourth determining unit, configured to determine that the evacuation result is normal when all M service processing results are normal; a fifth determining unit, configured to determine that the evacuation result is abnormal when there is an abnormal service processing result.
[0019] Optionally, after determining that the evacuation result is abnormal, the device further includes: a fourth obtaining unit, configured to obtain virtual machines with the same address as the comparison result and determine whether the running state of the virtual machine is a shutdown state; a change unit, configured to change the evacuation result to normal when the running state of the virtual machine is a shutdown state; a sixth determining unit, configured to determine that the evacuation result is abnormal when the running state of the virtual machine is not a shutdown state.
[0020] In the embodiment of the present application, the IP address of the abnormal server is detected from the server detection platform to obtain the first IP address; according to the first IP address, the configuration information of the virtual machines configured on the abnormal server is obtained from the operation ledger to obtain M pieces of virtual machine configuration information, where the operation ledger is used to record the configuration information of the virtual machines configured on the abnormal server before the abnormality occurs; according to the M pieces of virtual machine configuration information, an information acquisition instruction is sent to the interfaces of each virtual machine, and the IP addresses of the host machines fed back by each virtual machine are obtained to obtain M second IP addresses, where the information acquisition instruction is used to obtain the IP address of the host machine where the virtual machine is located after the abnormal server has an abnormality; the first IP address and the M second IP addresses are compared to obtain M comparison results, and according to the M comparison results, the evacuation result of the virtual machines in the abnormal server is determined. By obtaining the IP address of the abnormal server and comparing it with the IP address of the current host machine of the virtual machines originally configured on the abnormal server, it is possible to batch determine whether the virtual machines have completed the evacuation operation, achieving the purpose of quickly and concurrently obtaining the evacuation results of each virtual machine, thereby realizing the technical effect of improving the acquisition efficiency of the virtual machine evacuation results, and further solving the problem of low efficiency in the related art of manually identifying the evacuation results of each virtual machine that has completed the evacuation operation one by one. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The schematic embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation to the present application. In the drawings:
[0022] Figure 1 The hardware structure block diagram of a computer terminal for implementing a method for identifying the evacuation result of a virtual machine is shown;
[0023] Figure 2 is a flowchart of a method for identifying the evacuation result of a virtual machine according to Embodiment 1 of the present application;
[0024] Figure 3 is a flowchart of an optional method for identifying the evacuation result of a virtual machine according to Embodiment 1 of the present application;
[0025] Figure 4 is a schematic diagram of a device for identifying the evacuation result of a virtual machine according to Embodiment 2 of the present application;
[0026] Figure 5 is a structure block diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0027] It should be noted that, without conflict, the embodiments in the present application and the features in the embodiments may be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0028] In order to enable those skilled in the art to better understand the solution of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without making creative efforts shall fall within the protection scope of the present application.
[0029] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily need to be used to describe a specific order or sequence. It should be understood that such used data can be interchanged under appropriate circumstances so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units does not necessarily need to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0030] It should be noted that the method, device and electronic device for identifying the evacuation result of the virtual machine determined in the present disclosure can be used in the big data field, and can also be used in any field other than the big data field. The application field of the method, device and electronic device for identifying the evacuation result of the virtual machine determined in the present disclosure is not limited.
[0031] It should be noted that the information collected, user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) used in the present application are all information and data authorized by the user or fully authorized by all parties. And the processing of collection, storage, use, processing, transmission, provision, disclosure and application of relevant data and the like all comply with the relevant laws, regulations and standards of the relevant regions, take necessary confidentiality measures, do not violate public order and good customs, and provide corresponding operation entrances for users to choose to authorize the use or refuse to use. If the user chooses to refuse, the expert decision-making process will be entered. For example, an interface is set between the present system and relevant users or institutions. Before obtaining relevant information, a request for obtaining information needs to be sent to the aforementioned users or institutions through the interface, and after receiving the consent information feedback from the aforementioned users or institutions, the relevant information is obtained.
[0032] The embodiments or examples of the present disclosure are not exhaustive. They are only illustrations of some embodiments or examples and do not constitute specific limitations on the protection scope of the present disclosure. Without contradiction, each step in a certain embodiment or example can be implemented as an independent embodiment, and the steps can be combined arbitrarily. For example, the solution after removing some steps in a certain embodiment or example can also be implemented as an independent embodiment, and the order of the steps in a certain embodiment or example can be exchanged arbitrarily. In addition, the optional modes or optional examples in a certain embodiment or example can be combined arbitrarily; furthermore, the embodiments or examples can be combined arbitrarily. For example, some or all of the steps of different embodiments or examples can be combined arbitrarily, and a certain embodiment or example can be combined arbitrarily with the optional modes or optional examples of other embodiments or examples.
[0033] For ease of description, some nouns or terms related to the embodiments of the present application are described below:
[0034] HA evacuation (High Availability evacuation): In the context of high availability, a strategy for migrating resources or services from one system or node to another system or node to improve the fault tolerance and flexibility of the system. For example, in virtualization technology, HA evacuation may refer to migrating a virtual machine from one physical host to another physical host to ensure continuous service in case of host failure.
[0035] Embodiment 1
[0036] According to the embodiments of the present application, an embodiment of a method for identifying the evacuation result of a virtual machine is also provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. And although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.
[0037] The method embodiment provided in Embodiment 1 of the present application can be executed on a mobile terminal, a computer terminal or a similar computing device. Figure 1 A hardware structure block diagram of a computer terminal for implementing the method for identifying the evacuation result of a virtual machine is shown. As Figure 1As shown, the computer terminal 10 (or mobile device) may include one or more processors 102 (illustrated as 102a, 102b, ……, 102n in the figure) (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may further include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply, and / or a camera. Those of ordinary skill in the art can understand that Figure 1 the structure shown is only schematic and does not limit the structure of the above-mentioned electronic device. For example, the computer terminal 10 may further include more or fewer components than Figure 1 shown in, or have a different configuration from Figure 1 that shown.
[0038] It should be noted that the above one or more processors 102 and / or other data processing circuits can generally be referred to as "data processing circuits" in this article. The data processing circuit may be embodied in software, hardware, firmware, or any combination thereof, in whole or in part. In addition, the data processing circuit may be a single independent processing module, or be incorporated in whole or in part into any one of the other elements in the computer terminal 10 (or mobile device). As involved in the embodiments of the present application, the data processing circuit is a kind of processor control (such as the selection of a variable resistor terminal path connected to an interface).
[0039] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the method for identifying the evacuation result of the virtual machine in the embodiments of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, implements the above-mentioned method for identifying the evacuation result of the virtual machine. The memory 104 may include a high-speed random access memory, and may further include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memories. In some instances, the memory 104 may further include a memory remotely set relative to the processor 102, and these remote memories can be connected to the computer terminal 10 through a network. Examples of the above network include, but are not limited to, the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.
[0040] The transmission device 106 is used to receive or send data via a network. Specific examples of the above-mentioned network may include a wireless network provided by the communication provider of the computer terminal 10. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a Radio Frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0041] The display can be, for example, a touch-screen liquid crystal display (LCD), which enables the user to interact with the user interface of the computer terminal 10 (or mobile device).
[0042] Under the above operating environment, the present application provides an identification method for the evacuation result of a virtual machine as Figure 2 shown. Figure 2 is a flowchart of the identification method for the evacuation result of a virtual machine provided in Embodiment 1 of the present application. As Figure 2 shown, the method includes:
[0043] Step S201, obtain the IP address of the abnormal server from the server detection platform to obtain the first IP address.
[0044] It should be noted that the execution subject of this embodiment can be an evacuation result identification platform, which can be connected to the server detection platform to query and obtain the IP address of the abnormal server from the server detection platform. The server detection platform can be a platform for detecting servers, responsible for continuously monitoring all computing nodes (i.e., servers) in the cloud environment, and capable of identifying and recording abnormalities in the server status, such as abnormalities in resources such as CPU, memory, disk, and network, as well as abnormalities in the connection status of the server. Each server is a physical machine, and multiple virtual machines are running on the server. After detecting an abnormal server, the server detection platform can record the server information of the abnormal server and generate an alarm message according to the server information and the abnormal type, so as to complete the monitoring operation of the physical machine.
[0045] Specifically, when the server detection platform identifies that a certain server is abnormal, it will record the information of the abnormal server, including the IP address, so that the specific server can be quickly located through the IP address for subsequent fault handling and virtual machine evacuation judgment. In the case of determining that a certain server is abnormal, the IP address of the abnormal server can be recorded, that is, the first IP address.
[0046] Step S202: Obtain the configuration information of the virtual machines configured on the abnormal server from the operation ledger according to the first IP address, and obtain M pieces of virtual machine configuration information. The operation ledger is used to record the configuration information of the virtual machines configured on the abnormal server before the abnormality occurs.
[0047] It should be noted that the operation ledger can be a database or a data management system in the cloud platform. In the operation ledger, the detailed information of all servers and the virtual machines configured on them can be recorded. For example, the operation ledger can contain information about multiple servers, as well as the configuration information, host information, status information, etc. of the virtual machines configured on each server, and it is a resource management database that is updated in real time.
[0048] It should be noted that the virtual machine configuration information refers to the detailed information of the virtual machines configured on the server, including but not limited to the name, ID, status, host information, network configuration, storage configuration, etc. of the virtual machines.
[0049] Specifically, after determining the abnormal server, the virtual machines corresponding to the first IP address can be obtained from the operation ledger according to the first IP address of the abnormal server, and M virtual machines can be obtained. These M virtual machines are all the virtual machines that ran on this server before the abnormal server had an abnormality. After determining the M virtual machines, the configuration information of each virtual machine can be obtained from the operation ledger, so as to obtain M pieces of virtual machine configuration information, and then the evacuation results of each virtual machine can be determined according to the M pieces of virtual machine configuration information.
[0050] Step S203: Send information acquisition instructions to the interfaces of each virtual machine according to the M pieces of virtual machine configuration information, and obtain the host IP addresses fed back by each virtual machine, and obtain M second IP addresses. The information acquisition instruction is used to obtain the IP address of the host where the virtual machine is located after the abnormal server has an abnormality.
[0051] Specifically, since the interface information of the virtual machines is included in the virtual machine configuration information, the interface information of each virtual machine can be obtained from the virtual machine configuration information, and information acquisition instructions can be sent to each virtual machine according to the interface information, so as to obtain the IP addresses of the real-time hosts where each virtual machine is located after the failure by calling the virtual machine interfaces provided by the cloud base (i.e., the core component of the cloud platform), and obtain M second IP addresses.
[0052] Step S204: Compare the first IP address with the M second IP addresses to obtain M comparison results, and determine the evacuation results of the virtual machines in the abnormal server according to the M comparison results.
[0053] Specifically, after obtaining the first IP address and M second IP addresses, the first IP address and the M second IP addresses can be compared to obtain M comparison results. When the comparison results indicate that the first IP address is the same as the second IP address, it can be determined that the virtual machine has not completed the evacuation operation, and an alarm needs to be issued to inform the operation and maintenance personnel that there are virtual machines that have not been successfully evacuated, so as to ensure the normal operation of the virtual machine through manual intervention. When the first IP address is different from the second IP address, it indicates that the virtual machine has completed the evacuation. At this time, no manual processing is required for this virtual machine, thus improving the efficiency of obtaining the evacuation results of the virtual machine.
[0054] The method for identifying the evacuation result of a virtual machine provided by the embodiments of the present application adopts the following steps: obtaining the IP address of an abnormal server from the server detection platform to obtain the first IP address; obtaining the configuration information of the virtual machines configured on the abnormal server from the operation ledger according to the first IP address to obtain M pieces of virtual machine configuration information, where the operation ledger is used to record the configuration information of the virtual machines configured on the abnormal server before the abnormality occurs; sending information acquisition instructions to the interfaces of each virtual machine according to the M pieces of virtual machine configuration information, and obtaining the host IP addresses fed back by each virtual machine to obtain M second IP addresses, where the information acquisition instructions are used to obtain the IP address of the host where the virtual machine is located after the abnormal server has an abnormality; comparing the first IP address with the M second IP addresses to obtain M comparison results, and determining the evacuation result of the virtual machines in the abnormal server according to the M comparison results. By obtaining the IP address of the abnormal server and comparing it with the IP address of the current host of the virtual machine originally configured on the abnormal server, it is possible to batch determine whether the virtual machine has completed the evacuation operation, achieving the purpose of quickly and concurrently obtaining the evacuation results of each virtual machine, thereby realizing the technical effect of improving the efficiency of obtaining the evacuation results of the virtual machine, and further solving the problem of low efficiency in identifying the evacuation results of each virtual machine that has completed the evacuation operation manually in the related art.
[0055] Optionally, in the method for identifying the evacuation result of a virtual machine provided by the embodiments of the present application, obtaining the IP address of an abnormal server from the server detection platform to obtain the first IP address includes: obtaining the alarm information set at the target moment from the server detection platform; screening the alarm information of the servers with abnormal running status in the alarm information set to obtain the target alarm information; obtaining the server indicated by the target alarm information to obtain the abnormal server, and obtaining the IP address of the abnormal server to obtain the first IP address.
[0056] Specifically, when obtaining the first IP address of the abnormal server, the system needs to set a timed task for obtaining alarm information, so as to obtain the latest alarm information from the server detection platform at a set fixed period. For example, the system can be set to automatically obtain alarm information from the server detection platform every minute to form an alarm information set.
[0057] After obtaining the alarm information set, these alarm information can be further processed based on specific filtering conditions, so as to screen out the servers that may need to evacuate virtual machines from the alarm information set, and thus determine which servers are abnormal servers that need to be evacuated. For example, the filtering condition is: filter the alarm information with the running status of "host status abnormal" or "host connection status abnormal" and determine it as the target alarm information, so that the alarm information that although there is an abnormality but does not require virtual machine evacuation can be removed, and the abnormal servers that may need to evacuate virtual machines can be quickly located according to the server information carried in the target alarm information, thereby ensuring the accuracy of the servers that need to be evacuated.
[0058] It should be noted that when screening the target alarm information, it can be screened not only by the running status, but also by the name of the alarm. The specific filtering conditions are not limited to screening only according to the running status.
[0059] Furthermore, after determining the target alarm information, the relevant information of the abnormal server can be determined according to the server information carried in the target alarm information, and the IP address of the abnormal server can be obtained from it to get the first IP address.
[0060] It should be noted that after obtaining the target alarm information, the alarm sequence number of the target alarm information also needs to be obtained, and compared with the alarm sequence numbers of the target alarm information collected at historical moments, so as to avoid the phenomenon of repeated target alarm information.
[0061] This embodiment ensures the accuracy rate of the subsequent determination of the virtual machine evacuation result and improves the efficiency of determining the evacuation result by obtaining alarm information in real time and quickly screening out the target alarm information indicating that the virtual machine needs to be evacuated, so as to accurately determine the IP address of the server that needs to evacuate the virtual machine.
[0062] Optionally, in the method for identifying the evacuation result of a virtual machine provided in the embodiments of the present application, the configuration information of the virtual machines configured on the abnormal server is obtained from the operation ledger according to the first IP address, and M pieces of virtual machine configuration information are obtained, including: obtaining the virtual machines configured on the abnormal server in the operation ledger according to the first IP address to obtain a plurality of initial virtual machines; obtaining the virtualization type of each initial virtual machine, and determining the initial virtual machines with the virtualization type being a preset type as target virtual machines to obtain M target virtual machines; obtaining the configuration information of each target virtual machine to obtain M pieces of virtual machine configuration information.
[0063] It should be noted that when obtaining the virtual machine configuration information, since not all virtual machines configured on the abnormal server need to be evacuated, the virtual machines can be screened first, and then the virtual machines that need to identify the evacuation result can be obtained, so as to ensure the accurate identification of the evacuation result.
[0064] Specifically, the operation ledger is the core resource management database in the cloud environment, which details the virtual machine information configured on each server. Therefore, after determining the first IP address of the abnormal server, all virtual machines configured on this computing node can be searched and obtained in the operation ledger, that is, a plurality of initial virtual machines.
[0065] Furthermore, the virtualization type represents the implementation method of the virtual machine, and common ones include KVM, Xen, VMware, etc. After obtaining the initial virtual machines, the system can determine their virtualization types by querying the detailed information of the virtual machines, and determine the virtual machines with the virtualization type being a preset type as target virtual machines, such as KVM-type virtual machines, so as to screen out the virtual machines that need to identify the evacuation result through the virtualization type, thereby ensuring the accurate identification of the evacuation result.
[0066] After determining the target virtual machines, the detailed configuration information of these virtual machines can be further extracted from the operation ledger, including but not limited to the ID, name, host information, status (such as running, paused, shutdown), interface information, etc. of the virtual machines. Thus, in the subsequent operation process, the interface information of each virtual machine can be obtained through the configuration information, and then the relevant information of the host corresponding to each virtual machine after evacuation can be obtained according to the interface information for data interaction with the virtual machine.
[0067] In this embodiment, by screening the virtual machines with the virtualization type being a preset type, the accuracy and relevance of the subsequent evacuation result judgment are ensured, the ineffective processing of non-KVM virtual machines is avoided, and the efficiency of the overall process is improved.
[0068] Optionally, in the method for identifying the evacuation result of a virtual machine provided in the embodiments of the present application, comparing the first IP address with M second IP addresses to obtain M comparison results includes: comparing the first IP address with each of the second IP addresses respectively; when the first IP address is the same as the second IP address, determining that the comparison result is the same address; when the first IP address is different from the second IP address, determining that the comparison result is a different address; combining the comparison results obtained by comparing each of the second IP addresses with the first IP address into M comparison results.
[0069] It should be noted that after obtaining the M second IP addresses, in order to determine the evacuation result, it is necessary to compare the first IP address with each of the second IP addresses respectively, so as to obtain M comparison results, and then determine the evacuation result according to the M comparison results.
[0070] Specifically, after obtaining the first IP address of the abnormal server and the M second IP addresses of the virtual machines after evacuation, the comparison process can be started. This process involves comparing the first IP address with each of the M second IP addresses one by one to check whether the virtual machine has been evacuated from the abnormal computing node to a different host server.
[0071] If it is found during the comparison process that a certain second IP address is the same as the first IP address, it indicates that the corresponding virtual machine may not have been successfully evacuated from the abnormal server. At this time, the comparison result is determined to be the same address. On the contrary, if the comparison result shows that the second IP address is different from the first IP address, then it can be considered that the virtual machine has been successfully evacuated from the abnormal server to a new host server, that is, the comparison result is a different address, so as to obtain the comparison results of the IP addresses of each virtual machine.
[0072] In this embodiment, by comparing the first IP address with the M second IP addresses to obtain M comparison results, the comparison results of the IP addresses of each virtual machine are obtained in parallel. Furthermore, while improving the efficiency of obtaining the comparison results, the subsequent evacuation result identification process can be executed according to the M comparison results, ensuring the accuracy of identifying the evacuation result based on the comparison results.
[0073] Optionally, in the method for identifying the evacuation result of a virtual machine provided in the embodiments of the present application, determining the evacuation result of the virtual machine in the abnormal server according to the M comparison results includes: when there is a comparison result indicating that the first IP address is the same as the second IP address among the M comparison results, determining that the evacuation result is abnormal; when all of the M comparison results indicate that the first IP address is different from the second IP address, determining that the evacuation result is normal.
[0074] It should be noted that after obtaining M comparison results, the evacuation result of the virtual machine can be determined based on the comparison results, thereby ensuring the accuracy of the evacuation result.
[0075] Specifically, after obtaining M comparison results, it is necessary to comprehensively analyze the M comparison results. If it is found that the second IP address of at least one virtual machine is the same as the first IP address among these comparison results, it means that the virtual machine has not been evacuated from the abnormal server to other host machines. At this time, the evacuation result can be determined as abnormal, thus ensuring that any situation of virtual machine evacuation failure can be quickly identified, thereby triggering further fault handling processes, such as system status checks and the intervention of professionals, to resume normal services as soon as possible.
[0076] Optionally, if the system finds that the second IP address of all virtual machines is different from the first IP address when analyzing the M comparison results, that is, all virtual machines have been successfully evacuated from the abnormal server to other host machines, the system will determine the evacuation result as normal. This result indicates that the HA evacuation mechanism has been successfully executed and the virtual machines have all migrated to new servers, thereby ensuring business continuity and stability.
[0077] This embodiment can quickly and accurately determine the evacuation result of the virtual machines in the abnormal server by analyzing the M comparison results. This mechanism avoids the delay and potential errors in the traditional manual inspection process, ensuring the efficiency and accuracy of fault response. In the case where the evacuation result is abnormal, the system can immediately start the fault handling process, including notifying relevant maintenance personnel and professional teams for manual intervention to quickly solve the problem of evacuation failure. In the case where the evacuation result is normal, the system can automatically enter the next stage of processing, such as system status checks and application verification, thereby realizing the automation and optimization of the fault management process, minimizing the business interruption time, and improving the high availability and overall service level of the cloud platform.
[0078] Optionally, in the method for identifying the evacuation result of a virtual machine provided in the embodiments of the present application, after determining that the evacuation result is normal, the method further includes: sending a target signal to each virtual machine, and determining whether a feedback signal is received within a preset time period; in the case of receiving feedback signals sent by all virtual machines, determining that the evacuation result is normal; in the case of not receiving a feedback signal sent by a first virtual machine, determining that the evacuation result is abnormal, and generating a prompt message according to the configuration information of the first virtual machine, where the prompt message is used to indicate that the evacuation result of the first virtual machine is abnormal; or, obtaining the services processed by each virtual machine to obtain M service information; sequentially sending service requests to the corresponding virtual machines according to each service information, and receiving the service processing results fed back by each virtual machine to obtain M service processing results; in the case where all M service processing results are normal, determining that the evacuation result is normal; in the case where there is an abnormal service processing result, determining that the evacuation result is abnormal.
[0079] It should be noted that in the case where the evacuation result is determined to be normal by comparing IP addresses, it may not be possible to ensure that the virtual machine can still run normally on the new host. At this time, it is necessary to further determine the running state of the virtual machine to determine whether the evacuation result is normal.
[0080] It should be noted that the target signal can be a specific signal sent to the virtual machine, which is used to test whether the virtual machine can respond to external requests to judge its running state after evacuation. The preset time period can be a time window set by the system for waiting for the virtual machine to feedback on the target signal. If feedback from all virtual machines is received within this time period, the evacuation result is confirmed to be normal; otherwise, it may indicate an evacuation anomaly. The feedback signal can be a response signal sent by the virtual machine to the system after receiving the target signal, indicating that the virtual machine can receive and process external requests and run normally.
[0081] Specifically, the method of sending a target signal to each virtual machine and determining whether a feedback signal is received within a preset time period can be used to determine whether each virtual machine is running normally. In the case of not receiving a feedback signal sent by a certain first virtual machine, it indicates that the virtual machine cannot run normally. At this time, the evacuation result is determined to be abnormal, and a prompt message is generated according to the configuration information of the first virtual machine. Furthermore, by sending a target signal, it is verified whether the virtual machine has been successfully started on the new host server and can normally receive external requests, thereby indirectly judging whether the HA evacuation is successful. The setting of the preset time period ensures that the system can receive feedback in a timely manner and avoids infinite waiting.
[0082] If the system receives feedback signals from all virtual machines within the preset time, it indicates that all virtual machines have been successfully evacuated and can run normally, and the evacuation result is determined to be normal, thus ensuring the integrity and accuracy of the HA evacuation.
[0083] Further, it is also possible to determine whether each virtual machine can process the corresponding service request by sending a service request, so as to determine the evacuation result according to the service processing results fed back by each virtual machine. In the case where a virtual machine fails to feed back a service processing result or the service processing result is abnormal, it is determined that the evacuation result is abnormal, and this virtual machine is determined as an abnormal virtual machine, so as to ensure that each virtual machine can still run normally after being evacuated to other servers, and further ensure the normal operation of the service.
[0084] In this embodiment, the virtual machine is tested by sending a target signal and a service request, realizing the instant verification of the HA evacuation result and abnormal detection. This process can not only quickly confirm whether the virtual machine evacuation is successful, but also further confirm the impact of the evacuation on service continuity through service verification, ensuring the rapid recovery and high availability of the cloud platform after a failure occurs. By generating a prompt message, the system can timely notify the operation and maintenance personnel of the abnormally evacuated virtual machine, accelerating the location and solution of problems, reducing the service interruption time, and improving the overall system stability and user experience.
[0085] Optionally, in the method for identifying the evacuation result of the virtual machine provided in the embodiment of the present application, after determining that the evacuation result is abnormal, the method further includes: obtaining the virtual machines with the same address in the comparison result, and determining whether the running state of the virtual machine is the shutdown state; in the case where the running state of the virtual machine is the shutdown state, changing the evacuation result to normal; in the case where the running state of the virtual machine is not the shutdown state, determining that the evacuation result is abnormal.
[0086] It should be noted that since the virtual machine in the shutdown state cannot perform the evacuation operation, therefore, in the case where it is determined that the first IP address and the second IP address of a certain virtual machine are the same, it is also necessary to determine whether the running state of the virtual machine is the shutdown state, so as to distinguish the virtual machine that has stopped running before evacuation from the virtual machine that fails to be successfully migrated due to problems during the evacuation process.
[0087] In the case where the running state of the virtual machine is the shutdown state, it indicates that this virtual machine does not need to perform the evacuation operation, so the evacuation result of this virtual machine is set to normal, thereby reducing the occurrence of misjudgment of the virtual machine evacuation result. In the case where the running state of the virtual machine is not the shutdown state, it indicates that this virtual machine was in a normal running state before evacuation, but it is still located on the same host server after evacuation, thus determining that there is an abnormal evacuation phenomenon for this virtual machine, thereby ensuring the accurate identification of the server with abnormal evacuation operation.
[0088] In this embodiment, by identifying the running states of virtual machines, the virtual machines that have been powered off before evacuation and the virtual machines that have anomalies during evacuation are distinguished, avoiding the misjudgment of virtual machines in the normal shutdown state as evacuation failures, and ensuring the accuracy and rationality of the evacuation result judgment. Through this mechanism, the system can automatically correct the evacuation result, remove the virtual machines in the shutdown state from the list of abnormal evacuations, and at the same time promptly identify the truly abnormally evacuated virtual machines and notify the maintenance department for handling, improving the efficiency of fault response and resolution, reducing the service impact time, and enhancing the high availability and reliability management capabilities of the cloud platform.
[0089] Figure 3 It is a flowchart of an optional method for identifying the evacuation result of a virtual machine provided in Embodiment 1 of the present application. As Figure 3 shown, first, obtain the first IP address of the abnormal server from the server detection platform, obtain the configuration information of the virtual machines configured on the abnormal server, obtain the interface information of each virtual machine from the configuration information, and determine the second IP address of the current host configured for each virtual machine according to the interface information, and compare the first IP address with the second IP address to obtain a comparison result. When the comparison result indicates that the addresses are the same, it is necessary to send external information, such as a target signal or a service request, to the virtual machine, and determine whether the virtual machine can feedback the correct feedback information. When it can receive and feedback the correct feedback information, determine that the evacuation result is normal. When it cannot receive and feedback the correct feedback information, determine that the evacuation result is abnormal.
[0090] Furthermore, when the comparison result indicates that the addresses are different, determine whether the virtual machine is in the shutdown state. When it is in the shutdown state, determine that the evacuation result is normal. When it is not in the shutdown state, determine that the evacuation result is abnormal. Thus, by obtaining the IP address of the abnormal server and comparing this IP address with the current host IP address of the virtual machine originally configured on this abnormal server, it is possible to batch-determine whether the virtual machines have completed the evacuation operation, achieving the purpose of quickly and concurrently obtaining the evacuation results of each virtual machine, and thus realizing the technical effect of improving the acquisition efficiency of the virtual machine evacuation result.
[0091] It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. And although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.
[0092] Embodiment 2
[0093] The embodiments of the present application also provide a recognition device for the evacuation result of a virtual machine. It should be noted that the recognition device for the evacuation result of the virtual machine in the embodiments of the present application can be used to execute the recognition method for the evacuation result of the virtual machine provided in the above embodiments. The following introduces the recognition device for the evacuation result of the virtual machine provided in the embodiments of the present application.
[0094] According to the embodiments of the present application, there is also provided a device for implementing the above recognition method for the evacuation result of a virtual machine. Figure 4 It is a schematic diagram of the recognition device for the evacuation result of the virtual machine provided in Embodiment 2 of the present application. As Figure 4 shown, the device includes:
[0095] A first acquisition unit 41, configured to acquire the IP address of an abnormal server from a server detection platform to obtain a first IP address.
[0096] A second acquisition unit 42, configured to acquire the configuration information of the virtual machines configured on the abnormal server from an operation ledger according to the first IP address to obtain M pieces of virtual machine configuration information, where the operation ledger is used to record the configuration information of the virtual machines configured on the abnormal server before the abnormality occurs.
[0097] A first sending unit 43, configured to send an information acquisition instruction to the interfaces of each virtual machine according to the M pieces of virtual machine configuration information, and acquire the host IP addresses fed back by each virtual machine to obtain M second IP addresses, where the information acquisition instruction is used to acquire the IP address of the host where the virtual machine is located after the abnormal server has an abnormality.
[0098] A first determination unit 44, configured to compare the first IP address with the M second IP addresses to obtain M comparison results, and determine the evacuation result of the virtual machines in the abnormal server according to the M comparison results.
[0099] The recognition device for the evacuation result of a virtual machine provided by an embodiment of the present application uses a first acquisition unit 41 to acquire the IP address of an abnormal server from a server detection platform, obtaining a first IP address; a second acquisition unit 42 acquires the configuration information of the virtual machines configured on the abnormal server from an operation ledger according to the first IP address, obtaining M pieces of virtual machine configuration information, where the operation ledger is used to record the configuration information of the virtual machines configured on the abnormal server before the abnormality occurs; a first sending unit 43 sends an information acquisition instruction to the interfaces of each virtual machine according to the M pieces of virtual machine configuration information, and acquires the host IP addresses fed back by each virtual machine, obtaining M second IP addresses, where the information acquisition instruction is used to acquire the IP address of the host where the virtual machine is located after the abnormal server has an abnormality; a first determination unit 44 compares the first IP address with the M second IP addresses, obtaining M comparison results, and determines the evacuation result of the virtual machines in the abnormal server according to the M comparison results. By acquiring the IP address of the abnormal server and comparing it with the IP address of the current host of the virtual machines originally configured on the abnormal server, it is possible to batch determine whether the virtual machines have completed the evacuation operation, achieving the purpose of quickly and concurrently acquiring the evacuation results of each virtual machine, thereby realizing the technical effect of improving the acquisition efficiency of the virtual machine evacuation results, and further solving the problem of low efficiency in the related art of manually identifying the evacuation results of each virtual machine that has completed the evacuation operation one by one.
[0100] Optionally, in the recognition device for the evacuation result of a virtual machine provided by an embodiment of the present application, the first acquisition unit 41 includes: a first acquisition module for acquiring a set of alarm information at a target moment from a server detection platform; a screening module for screening the alarm information of the servers with an abnormal running state from the set of alarm information to obtain target alarm information; a second acquisition module for acquiring the server indicated by the target alarm information to obtain an abnormal server, and acquiring the IP address of the abnormal server to obtain a first IP address.
[0101] Optionally, in the recognition device for the evacuation result of a virtual machine provided by an embodiment of the present application, the second acquisition unit 42 includes: a third acquisition module for acquiring the virtual machines configured in the abnormal server from the operation ledger according to the first IP address, obtaining a plurality of initial virtual machines; a fourth acquisition module for acquiring the virtualization type of each initial virtual machine, and determining the initial virtual machines with the virtualization type being a preset type as target virtual machines, obtaining M target virtual machines; a fifth acquisition module for acquiring the configuration information of each target virtual machine to obtain M pieces of virtual machine configuration information.
[0102] Optionally, in the recognition device for the evacuation result of a virtual machine provided in the embodiments of the present application, the first determination unit 44 includes: a comparison module configured to compare the first IP address with each second IP address respectively; a first determination module configured to determine that the comparison result is the same address when the first IP address is the same as the second IP address; a second determination module configured to determine that the comparison result is different addresses when the first IP address is different from the second IP address; and a combination module configured to combine the comparison results obtained by comparing each second IP address with the first IP address into M comparison results.
[0103] Optionally, in the recognition device for the evacuation result of a virtual machine provided in the embodiments of the present application, the first determination unit 44 includes: a third determination module configured to determine that the evacuation result is abnormal when there is a comparison result indicating that the first IP address is the same as the second IP address among the M comparison results; a fourth determination module configured to determine that the evacuation result is normal when all M comparison results indicate that the first IP address is different from the second IP address.
[0104] Optionally, in the recognition device for the evacuation result of a virtual machine provided in the embodiments of the present application, after determining that the evacuation result is normal, the device further includes: a second sending unit configured to send a target signal to each virtual machine and determine whether a feedback signal is received within a preset time period; a second determination unit configured to determine that the evacuation result is normal when feedback signals sent by all virtual machines are received; a third determination unit configured to determine that the evacuation result is abnormal when a feedback signal sent by the first virtual machine is not received, and generate a prompt message according to the configuration information of the first virtual machine, where the prompt message is used to indicate that the evacuation result of the first virtual machine is abnormal; or, a third obtaining unit configured to obtain the services processed by each virtual machine to obtain M service information; a third sending unit configured to sequentially send service requests to the corresponding virtual machines according to each service information and receive the service processing results fed back by each virtual machine to obtain M service processing results; a fourth determination unit configured to determine that the evacuation result is normal when all M service processing results are normal; a fifth determination unit configured to determine that the evacuation result is abnormal when there is an abnormal service processing result.
[0105] Optionally, in the recognition device for the evacuation result of a virtual machine provided in the embodiments of the present application, after determining that the evacuation result is abnormal, the device further includes: a fourth obtaining unit configured to obtain the virtual machines with the comparison result of the same address and determine whether the running state of the virtual machine is the shutdown state; a change unit configured to change the evacuation result to normal when the running state of the virtual machine is the shutdown state; a sixth determination unit configured to determine that the evacuation result is abnormal when the running state of the virtual machine is not the shutdown state.
[0106] It should be noted here that the above-mentioned first acquisition unit 41, second acquisition unit 42, first transmission unit 43, and first determination unit 44 correspond to steps S201 to S204 in Embodiment 1. The instances and application scenarios implemented by the two modules and the corresponding steps are the same, but are not limited to the content disclosed in the above-mentioned Embodiment 1. It should be noted that the above-mentioned module or unit can be a hardware component or software component stored in a memory (for example, memory 104) and processed by one or more processors (for example, processors 102a, 102b,..., 102n). The above-mentioned module can also be part of a device and can run in the computer terminal 10 provided in Embodiment 1.
[0107] Embodiment 3
[0108] An embodiment of the present application can provide an electronic device. Figure 5 It is a structural block diagram of an electronic device according to an embodiment of the present application. As Figure 5 shown, the electronic device may include: one or more ( Figure 5 only one is shown in the figure) processors 1002, a memory 1004, a storage controller, and a peripheral interface. Among them, the peripheral interface is connected to a radio frequency module, an audio module, and a display.
[0109] Among them, the memory can be used to store software programs and modules, such as program instructions / modules corresponding to the method and device for identifying the evacuation result of a virtual machine in an embodiment of the present application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, implements the above-mentioned method. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some instances, the memory may further include a memory remotely provided relative to the processor, and these remote memories can be connected to the terminal through a network. Examples of the above-mentioned network include but are not limited to the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.
[0110] The processor can call the information and application programs stored in the memory through the transmission device to execute the following steps: obtain the IP address of the abnormal server from the server detection platform to get the first IP address; obtain the configuration information of the virtual machines configured on the abnormal server from the operation ledger according to the first IP address to get M virtual machine configuration information, where the operation ledger is used to record the configuration information of the virtual machines configured on the abnormal server before the abnormality occurs; send information acquisition instructions to the interfaces of each virtual machine according to the M virtual machine configuration information and obtain the host IP addresses fed back by each virtual machine to get M second IP addresses, where the information acquisition instructions are used to obtain the IP address of the host where the virtual machine is located after the abnormal server has an abnormality; compare the first IP address with the M second IP addresses to get M comparison results, and determine the evacuation result of the virtual machines in the abnormal server according to the M comparison results.
[0111] The processor can also call the information and application programs stored in the memory through the transmission device to execute the following steps: obtaining the IP address of the abnormal server from the server detection platform to get the first IP address includes: obtaining the set of alarm information at the target moment from the server detection platform; screening the alarm information of the servers with abnormal running status in the set of alarm information to get the target alarm information; obtaining the server indicated by the target alarm information to get the abnormal server, and obtaining the IP address of the abnormal server to get the first IP address.
[0112] The processor can also call the information and application programs stored in the memory through the transmission device to execute the following steps: obtain the virtual machines configured in the abnormal server from the operation ledger according to the first IP address to get multiple initial virtual machines; obtain the virtualization type of each initial virtual machine, and determine the initial virtual machines with the virtualization type being the preset type as the target virtual machines to get M target virtual machines; obtain the configuration information of each target virtual machine to get M virtual machine configuration information.
[0113] The processor can also call the information and application programs stored in the memory through the transmission device to execute the following steps: compare the first IP address with each second IP address respectively; in the case where the first IP address is the same as the second IP address, determine that the comparison result is the same address; in the case where the first IP address is different from the second IP address, determine that the comparison result is different addresses; combine the comparison results obtained by comparing each second IP address with the first IP address into M comparison results.
[0114] The processor can also call the information and application programs stored in the memory through the transmission device to perform the following steps: when there is a comparison result indicating that the first IP address is the same as the second IP address among the M comparison results, determine that the evacuation result is abnormal; when all M comparison results indicate that the first IP address is different from the second IP address, determine that the evacuation result is normal.
[0115] The processor can also call the information and application programs stored in the memory through the transmission device to perform the following steps: send a target signal to each virtual machine and determine whether a feedback signal is received within a preset time period; when feedback signals sent by all virtual machines are received, determine that the evacuation result is normal; when a feedback signal sent by the first virtual machine is not received, determine that the evacuation result is abnormal and generate a prompt message according to the configuration information of the first virtual machine, where the prompt message is used to indicate that the evacuation result of the first virtual machine is abnormal; or, obtain the services processed by each virtual machine to obtain M service information; send service requests to the corresponding virtual machines in sequence according to each service information and receive the service processing results fed back by each virtual machine to obtain M service processing results; when all M service processing results are normal, determine that the evacuation result is normal; when there is an abnormal service processing result, determine that the evacuation result is abnormal.
[0116] The processor can also call the information and application programs stored in the memory through the transmission device to perform the following steps: after determining that the evacuation result is abnormal, the method further includes: obtaining the virtual machines with the same address in the comparison results and determining whether the running state of the virtual machine is the shutdown state; when the running state of the virtual machine is the shutdown state, change the evacuation result to normal; when the running state of the virtual machine is not the shutdown state, determine that the evacuation result is abnormal.
[0117] Those of ordinary skill in the art can understand that Figure 5 the structure shown is only schematic, and the electronic device can also be a terminal device such as a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a handheld computer, and a Mobile Internet Device (MID), a PAD, etc. Figure 5 It does not limit the structure of the above-mentioned electronic device. For example, the electronic device may further include more or fewer components (such as a network interface, a display device, etc.) than those shown Figure 5 in the figure, or have a different configuration from that shown Figure 5 in the figure.
[0118] Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, and the storage medium can include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, an optical disk, etc.
[0119] Embodiment 4
[0120] An embodiment of the present application further provides a storage medium. Optionally, in this embodiment, the above storage medium can be used to store the program code executed by the method for identifying the evacuation result of the virtual machine provided in the first embodiment above.
[0121] Optionally, in this embodiment, the above storage medium can be located in any one of the computer terminals in the computer terminal group in the computer network, or in any one of the mobile terminals in the mobile terminal group.
[0122] The present application also provides a computer program product, which is suitable for executing the program of the steps of the method for identifying the evacuation result of the virtual machine when executed on a data processing device.
[0123] The present application also provides a computer-readable storage medium, which includes an executable program stored therein. When the above executable program runs, it controls the device where the computer-readable storage medium is located to execute the program of the steps of the method for identifying the evacuation result of the virtual machine.
[0124] The serial numbers of the above embodiments of the present application are only for description and do not represent the advantages and disadvantages of the embodiments.
[0125] In the above embodiments of the present application, the descriptions of each embodiment have their own emphases. For the parts not detailed in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0126] In the several embodiments provided by the present application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point, the displayed or discussed coupling or direct coupling or communication connection between each other can be through some interfaces. The indirect coupling or communication connection of the units or modules can be in an electrical or other form.
[0127] The unit described as a separation component may or may not be physically separated. The component displayed as a unit may or may not be a physical unit, that is, it may be located in one place or may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0128] In addition, each functional unit in various embodiments of the present application may be integrated in a processing unit, may exist independently physically for each unit, or two or more units may be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
[0129] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present application. The aforementioned storage medium includes: USB flash drives, read-only memories (ROMs), random access memories (RAMs), mobile hard disks, magnetic disks or optical discs and other various media that can store program codes.
[0130] The above are only the preferred embodiments of the present application. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present application, several improvements and refinements can still be made, and these improvements and refinements should also be regarded as the protection scope of the present application.
Claims
1. A method for identifying evacuation results of a virtual machine, characterized in that: include: Obtaining the IP address of the abnormal server from the server detection platform to obtain a first IP address; According to the first IP address, the configuration information of the virtual machine configured on the abnormal server is obtained from the operation record to obtain M virtual machine configuration information, wherein the operation record is used to record the configuration information of the virtual machine configured on the abnormal server before the abnormality occurs, and M is a positive integer; Sending an information acquisition instruction to the interface of each virtual machine according to the M virtual machine configuration information, and acquiring the host machine IP address fed back by each virtual machine to obtain M second IP addresses, wherein the information acquisition instruction user acquires the IP address of the host machine where the virtual machine is located after the abnormal server occurs an abnormality; The first IP address is compared with the M second IP addresses to obtain M comparison results, and the evacuation result of the virtual machine in the abnormal server is determined according to the M comparison results.
2. The method according to claim 1, characterized in that Obtaining the IP address of the abnormal server from the server detection platform, the first IP address includes: Acquire a set of alarm information at a target time from the server detection platform; Filtering the alarm information of the server whose running status is abnormal in the alarm information set to obtain the target alarm information; The server indicated by the target alarm information is obtained to obtain the abnormal server, and the IP address of the abnormal server is obtained to obtain the first IP address.
3. The method according to claim 1, characterized in that According to the first IP address, the configuration information of the virtual machine configured on the abnormal server is obtained from the operation record, and the M virtual machine configuration information is obtained, including: According to the first IP address, a virtual machine configured in the abnormal server is obtained in the operation log to obtain a plurality of initial virtual machines; Acquire the virtualization type of each initial virtual machine, and determine the initial virtual machine with the virtualization type of the preset type as the target virtual machine, to obtain M target virtual machines; The configuration information of each target virtual machine is obtained to obtain the M virtual machine configuration information.
4. The method according to claim 1, characterized in that: The first IP address is compared with the M second IP addresses to obtain M comparison results including: Comparing the first IP address with each second IP address respectively; When the first IP address is the same as the second IP address, determining that the comparison result is that the addresses are the same; When the first IP address is different from the second IP address, determining that the comparison result is that the addresses are different; The comparison results obtained after comparing each second IP address with the first IP address are combined into the M comparison results.
5. The method according to claim 1, characterized in that Determining the evacuation result of the virtual machine in the abnormal server according to the M comparison results includes: If there is a comparison result indicating that the first IP address and the second IP address are the same among the M comparison results, determining that the evacuation result is abnormal; When the M comparison results all indicate that the first IP address is different from the second IP address, it is determined that the evacuation result is normal.
6. The method according to claim 5, characterized in that After determining that the evacuation result is normal, the method further includes: Sending a target signal to each virtual machine and determining whether a feedback signal is received within a preset time period; In the case of receiving feedback signals sent by all virtual machines, determining that the evacuation result is normal; In the case where no feedback signal sent by the first virtual machine is received, determining that the evacuation result is abnormal, and generating prompt information according to the configuration information of the first virtual machine, wherein the prompt information is used to indicate that the evacuation result of the first virtual machine is abnormal; or, Obtain the services processed by each virtual machine and obtain M service information; Send service requests to the corresponding virtual machines in turn according to each service information, and receive service processing results fed back by each virtual machine to obtain M service processing results; When the M business processing results are all normal, determining that the evacuation result is normal; In the case where there is an abnormal business processing result, the evacuation result is determined to be abnormal.
7. The method according to claim 5, characterized in that After determining that the evacuation result is abnormal, the method further includes: Acquire virtual machines whose addresses are the same as the comparison results, and determine whether the running state of the virtual machines is a shutdown state; When the running state of the virtual machine is the shutdown state, the evacuation result is changed to normal; when the running state of the virtual machine is not the shutdown state, the evacuation result is determined to be abnormal.
8. A device for identifying evacuation results of a virtual machine, characterized in that: include: A first acquisition unit, configured to acquire an IP address of an abnormal server from a server detection platform to obtain a first IP address; A second acquisition unit is used to acquire configuration information of a virtual machine configured on the abnormal server from an operation record according to the first IP address, to obtain M virtual machine configuration information, wherein the operation record is used to record the configuration information of the virtual machine configured on the abnormal server before the abnormality occurs; A first sending unit is used to send an information acquisition instruction to the interface of each virtual machine according to the M virtual machine configuration information, and obtain the host machine IP address fed back by each virtual machine to obtain M second IP addresses, wherein the information acquisition instruction user obtains the IP address of the host machine where the virtual machine is located after the abnormal server occurs an abnormality; The first determining unit is used to compare the first IP address with the M second IP addresses to obtain M comparison results, and determine the evacuation result of the virtual machine in the abnormal server according to the M comparison results.
9. A computer program product comprising computer instructions, characterized in that When the computer instructions are executed by a processor, the steps of the method for identifying the evacuation result of a virtual machine described in any one of claims 1 to 7 are implemented.
10. An electronic device, characterized in that: include: A memory storing an executable program; A processor is used to run the program, wherein the program, when running, executes the method for identifying the evacuation result of the virtual machine as described in any one of claims 1 to 7.