Virtual resource processing method and device, electronic equipment and storage medium
By obtaining local cache pool status information in the virtualization platform and migrating the virtual machine to the target node, the synchronous backup problem caused by cache pool pressure when the virtual machine is busy is solved, ensuring the business continuity and system performance of the virtual machine.
Patent Information
- Application Number
- CN202411154333.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-21
- Publication Date
- 2024-12-03
AI Technical Summary
In the virtualization platform, when the production virtual machine business is busy, the pressure of cached interactive log files to the local cache pool is too high, which may cause the cache pool to fail or overflow, and the real-time synchronous backup of the placeholder virtual machine cannot be realized, affecting the business continuity of the virtual machine sex.
By obtaining the current status information of the local cache pool, filter the target nodes in the node cluster and migrating the target production virtual machine to the target node to ensure that its synchronous backup data is cached normally and ensure that the placeholder virtual machine can synchronize backups in real time.
It effectively avoids local cache pool failure, ensures business continuity of virtual machines, and improves the overall performance and resource utilization of the system.
Smart Images

Figure CN119065791A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a virtual resource processing method, device, electronic device and storage medium. Background Art
[0002] Currently, in order to meet users' business continuity requirements for virtualization platforms, virtualization platform developers often set up disaster recovery solutions for virtualization platforms.
[0003] In the related art, usually when a production virtual machine is turned on and incremental data is generated, the interaction log file of the production virtual machine is first cached to a local cache pool, and disaster recovery data of the production virtual machine is generated based on the interaction log file. The disaster recovery data is then cached to a remote placeholder cache pool through a disaster recovery network to synchronize the interaction data of the production virtual machine to the remote placeholder virtual machine remotely.
[0004] However, when the production virtual machine business is busy, a large number of interaction log files will be cached in the local cache pool, increasing the cache pressure of the local cache pool and may even cause the local cache pool to fail or overflow, making it impossible to achieve the purpose of real-time synchronous backup of the placeholder virtual machine, which is not conducive to ensuring the business continuity of the virtual machine. Summary of the invention
[0005] The present application provides a virtual resource processing method, device, electronic device and storage medium to solve the defects of related technologies such as being unable to achieve the purpose of real-time synchronous backup of placeholder virtual machines and being unfavorable for ensuring the business continuity of virtual machines.
[0006] The first aspect of the present application provides a virtual resource processing method, comprising:
[0007] Obtaining current status information of a local cache pool to be tested; wherein the local cache pool to be tested is used to cache synchronous backup data of a target production virtual machine on a local node;
[0008] When the current state information of the local cache pool to be tested indicates that an abnormality occurs in the local cache pool to be tested, obtaining current configuration information of each node in the node cluster;
[0009] Selecting a target node in the node cluster according to current configuration information of each node in the node cluster;
[0010] The target production virtual machine is migrated to the target node, so that the synchronous backup data of the target production virtual machine is cached in the local cache pool of the target node.
[0011] In an optional embodiment, the method further includes:
[0012] Determine the mounting state and storage resource usage rate of the local cache pool to be tested according to the current state information of the local cache pool to be tested;
[0013] When the mount state of the local cache pool to be tested is not mounted, or when the storage resource usage of the local cache pool to be tested reaches a preset usage threshold, it is determined that an abnormality occurs in the local cache pool to be tested, and cache pool alarm information is generated.
[0014] In an optional implementation, the screening of the target node in the node cluster according to the current configuration information of each node in the node cluster includes:
[0015] Determine the service network status, cache pool status and disaster recovery network status of each node in the node cluster according to the current configuration information of each node in the node cluster;
[0016] Determining whether the service network status of the local node is normal;
[0017] When it is determined that the service network status of the local node is normal, the nodes in the node cluster whose service network status, cache pool status and disaster recovery network status are normal are selected as candidate nodes;
[0018] When the number of the candidate nodes is not 1, for any of the candidate nodes, the read and write speed of the local cache pool of the candidate node and the read and write speed of the placeholder cache pool of the remote node corresponding to the candidate node are obtained;
[0019] Determine the comprehensive speed of each of the candidate nodes according to the read and write speed of the local cache pool of the candidate node and the read and write speed of the placeholder cache pool of the remote node corresponding to the candidate node;
[0020] The node with the highest comprehensive speed is selected as a candidate node;
[0021] When the number of the candidate nodes is not 1, for any of the candidate nodes, obtaining hardware configuration information of the candidate node;
[0022] Determining the comprehensive health of each of the candidate nodes according to the hardware configuration information of the candidate nodes;
[0023] The candidate node with the highest comprehensive health is used as the target node.
[0024] In an optional embodiment, the method further includes:
[0025] When it is determined that the service network states of all nodes in the node cluster are abnormal, cluster service network alarm information is generated.
[0026] In an optional implementation, before migrating the target production virtual machine to the target node, the method further includes:
[0027] Obtaining a business processing policy for the target production virtual machine;
[0028] Determining whether the target production virtual machine meets a preset hot migration condition according to the business processing policy of the target production virtual machine;
[0029] In the case where it is determined that the target production virtual machine meets the preset hot migration condition, the step of migrating the target production virtual machine to the target node is performed.
[0030] In an optional implementation, migrating the target production virtual machine to the target node includes:
[0031] In a case where the target production virtual machine is running a backup scheduling task, the backup scheduling task is canceled, so as to migrate the target production virtual machine after the backup scheduling task is canceled to the target node.
[0032] In an optional implementation, migrating the target production virtual machine to the target node includes:
[0033] When the target production virtual machine is running a data transmission task, terminating the data transmission task and determining a termination point of the data transmission task;
[0034] After migrating the target production virtual machine to the target node, the data transmission task is reissued at the target node according to the termination point of the data transmission task, so as to continue running the data transmission task at the target node.
[0035] A second aspect of the present application provides a virtual resource processing device, including:
[0036] A first acquisition module is used to acquire current status information of a local cache pool to be tested; wherein the local cache pool to be tested is used to cache synchronous backup data of a target production virtual machine on a local node;
[0037] A second acquisition module is used to acquire current configuration information of each node in the node cluster when the current state information of the local cache pool to be tested indicates that an abnormality has occurred in the local cache pool to be tested;
[0038] A screening module, used to screen target nodes in the node cluster according to current configuration information of each node in the node cluster;
[0039] The migration module is used to migrate the target production virtual machine to the target node, so that the synchronous backup data of the target production virtual machine is cached in the local cache pool of the target node.
[0040] A third aspect of the present application provides an electronic device, comprising: at least one processor and a memory;
[0041] The memory stores computer-executable instructions;
[0042] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor performs the method described in the first aspect and various possible designs of the first aspect.
[0043] A fourth aspect of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions. When a processor executes the computer-executable instructions, the method described in the first aspect and various possible designs of the first aspect are implemented.
[0044] A fifth aspect of the present application provides a computer program product, including computer instructions, which are used to enable a computer to execute the method described in the first aspect and various possible designs of the first aspect.
[0045] The technical solution of this application has the following advantages:
[0046] The present application provides a virtual resource processing method, device, electronic device and storage medium, the method comprising: obtaining the current status information of a local cache pool to be tested; wherein the local cache pool to be tested is used to cache the synchronous backup data of a target production virtual machine on a local node; when the current status information of the local cache pool to be tested indicates that an abnormality has occurred in the local cache pool to be tested, obtaining the current configuration information of each node in the node cluster; screening the target node in the node cluster according to the current configuration information of each node in the node cluster; migrating the target production virtual machine to the target node so that the synchronous backup data of the target production virtual machine is cached in the local cache pool of the target node. The method provided by the above scheme performs status detection on the local cache pool to be tested, and migrates the production virtual machine to the target node when an abnormality has occurred in the local cache pool to be tested, so as to ensure that the synchronous backup data of the production virtual machine is cached normally, so that the corresponding placeholder virtual machine can be synchronously backed up in real time, laying a foundation for improving the business continuity of the virtual machine. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the following is a brief introduction to the drawings required for use in the embodiments or the related technical descriptions. Obviously, the drawings described below are some embodiments of the present application, and a person skilled in the art can also obtain other drawings based on these drawings.
[0048] Figure 1 A schematic diagram of the structure of a virtual resource processing system based on an embodiment of the present application;
[0049] Figure 2 A flowchart of a virtual resource processing method provided in an embodiment of the present application;
[0050] Figure 3 A schematic diagram of the overall process of the virtual resource processing method provided in the embodiment of the present application;
[0051] Figure 4 A schematic diagram of the structure of a virtual resource processing device provided in an embodiment of the present application;
[0052] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0053] The above drawings have shown clear embodiments of the present application, which will be described in more detail below. These drawings and text descriptions are not intended to limit the scope of the present disclosure in any way, but to illustrate the concepts of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0054] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0055] In addition, the terms "first", "second", etc. are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. In the description of the following embodiments, the meaning of "multiple" is more than two, unless otherwise clearly and specifically defined.
[0056] In related technologies, with the development of cloud computing, more and more enterprise-level users have higher requirements for business continuity when using virtualization platforms. The cloud platform provides a set of disaster recovery solutions, that is, to build two virtualization platforms respectively. When the disaster recovery virtual machine is turned on and continuously generates incremental data, the qemu-io process will intercept the IO data of the disaster recovery virtual machine that has been stored on the disk and temporarily store it in the shared memory of the host. At the same time, the cdp-worker process will generate IO cache disks and bitmaps and other synchronous backup data according to the periodicity of the IO data in the shared memory and store them in the cache storage pool of the current host. The transmission module will transmit the IO cache disks and bitmaps in the cache storage pool through the disaster recovery network to the production storage pool corresponding to the disaster recovery site, and receive them by the data receiving module of the host where the placeholder virtual machine is located. After receiving, the data merging module will merge the data in the IO cache disk into the disk of the placeholder virtual machine according to the position of the bitmap, thereby achieving the purpose of real-time synchronous backup of virtual machine data in different locations. However, there is a problem at present, that is, the business data volume of the virtual machine increases sharply during the busy period, causing the cache storage pool (the cache storage pool is used to store the site disaster recovery IO log files) to be overused, or the cache storage pool is abnormal due to some reason. In this case, the disaster recovery virtual machine cannot normally write incremental data to the cache storage pool, thereby failing to achieve the purpose of real-time synchronous backup, which is not conducive to ensuring the business continuity of the virtual machine.
[0057] In response to the above problems, an embodiment of the present application provides a virtual resource processing method, device, electronic device and storage medium, the method comprising: obtaining the current status information of the local cache pool to be tested; wherein the local cache pool to be tested is used to cache the synchronous backup data of the target production virtual machine on the local node; when the current status information of the local cache pool to be tested indicates that an abnormality has occurred in the local cache pool to be tested, obtaining the current configuration information of each node in the node cluster; screening the target node in the node cluster according to the current configuration information of each node in the node cluster; migrating the target production virtual machine to the target node so that the synchronous backup data of the target production virtual machine is cached in the local cache pool of the target node. The method provided by the above scheme performs status detection on the local cache pool to be tested, and migrates the production virtual machine to the target node when an abnormality has occurred in the local cache pool to be tested, so as to ensure that the synchronous backup data of the production virtual machine is cached normally, so that the corresponding placeholder virtual machine can be synchronously backed up in real time, laying a foundation for improving the business continuity of the virtual machine.
[0058] The following specific embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. The embodiments of the present invention will be described below in conjunction with the accompanying drawings.
[0059] First, the structure of the virtual resource processing system on which this application is based is described:
[0060] The virtual resource processing method, device, electronic device and storage medium provided in the embodiments of the present application are suitable for performing node migration on the production virtual machine when an abnormality occurs in the local cache pool of the production virtual machine, so as to ensure that the synchronous backup data of the production virtual machine is cached normally. Figure 1 The figure shows a schematic diagram of the structure of the virtual resource processing system based on the embodiment of the present application, which mainly includes multiple nodes, a data collection device and a virtual resource processing device. Among them, the node is used to deploy production virtual machines, the data collection device is used to collect the current status information of the local cache pool on the node, and the obtained data is sent to the virtual resource processing device, and the virtual resource processing device determines whether the virtual machine migration is required based on the obtained data, and determines the target node for migration.
[0061] The embodiment of the present application provides a virtual resource processing method for performing node migration on a production virtual machine when an abnormality occurs in a local cache pool of the production virtual machine. The execution subject of the embodiment of the present application is an electronic device, such as a server, a desktop computer, a laptop computer, a tablet computer, and other electronic devices that can be used for virtual resource processing.
[0062] like Figure 2 FIG. 1 is a flow chart of a virtual resource processing method provided in an embodiment of the present application, the method comprising:
[0063] Step 201, obtaining current status information of the local cache pool to be tested.
[0064] Among them, the local cache pool to be tested is used to cache the synchronous backup data of the target production virtual machine on the local node, and the virtual resources include virtual machines. The hosts to which the production virtual machines and the placeholder virtual machines in the node protection group belong all create cache storage pools. The cache storage pools are created and converted from the local storage pools, and their function is to store synchronous backup data such as site disaster recovery IO log files. The virtual machines in the protection group are all located on the shared storage pool. Virtual machines located on the local storage pool or hosts in the protection group that do not have a cache storage pool added do not support the cache storage pool HA function. For ease of distinction, the cache storage pool of the production virtual machine is referred to as the local cache, and the cache storage pool of the placeholder virtual machine is referred to as the placeholder cache pool in the embodiment of the present application.
[0065] Step 202 : when the current state information of the local cache pool to be tested indicates that an abnormality occurs in the local cache pool to be tested, obtain the current configuration information of each node in the node cluster.
[0066] Specifically, when the current status information of the local cache pool to be tested indicates that an abnormality has occurred in the local cache pool to be tested, it is determined that the synchronous backup data of the target production virtual machine cannot be cached normally to the local cache pool to be tested. Therefore, in order to avoid the loss of the synchronous backup data of the target production virtual machine, it is decided to perform node migration on the target production virtual machine.
[0067] Specifically, in one embodiment, the mounting status and storage resource utilization rate of the local cache pool to be tested can be determined based on the current status information of the local cache pool to be tested; when the mounting status of the local cache pool to be tested is not mounted, or when the storage resource utilization rate of the local cache pool to be tested reaches a preset utilization rate threshold, it is determined that an abnormality has occurred in the local cache pool to be tested, and cache pool alarm information is generated.
[0068] The current status information of the local cache pool to be tested includes the mounting status and the storage resource usage rate. When the local cache pool to be tested fails, the mounting status of the local cache pool to be tested is not mounted.
[0069] Specifically, the mounting status of the host cache pool to which the disaster recovery virtual machine (target production virtual machine) belongs is checked every n time intervals. If it is not mounted, the system generates an alarm. At the same time, if the cache storage pool usage is greater than or equal to m% (the preset usage threshold), an alarm for excessive cache storage pool usage will also be generated. m and n can be adjusted dynamically. The default n is 5 minutes and m is 90. After these two alarms are generated, the cache storage pool HA judgment conditions will be triggered, and HA means migration. In general, HA will only be triggered when the cache storage pool is disconnected. If the cache storage pool is full, it cannot receive IO cache disk and bitmap information, resulting in the inability to synchronize the newly added data to the disaster recovery site in real time. Based on this scenario, a cache storage pool HA mechanism is added to ensure that incremental data can be synchronized to the disaster recovery site in real time and uninterruptedly when the virtual machine is turned on.
[0070] Step 203: Filter the target node in the node cluster according to the current configuration information of each node in the node cluster.
[0071] Specifically, the performance of each node can be determined according to the current configuration information of each node in the node cluster, and then the node with better performance can be selected as the target node.
[0072] Step 204: Migrate the target production virtual machine to the target node, so that the synchronous backup data of the target production virtual machine is cached in the local cache pool of the target node.
[0073] It should be noted that the synchronous backup data specifically refers to the IO cache disk and bitmap generated according to a period. By caching the synchronous backup data to the placeholder cache pool of the host where the placeholder virtual machine is located, real-time data synchronization can be achieved between the placeholder virtual machine and the production virtual machine. When an abnormality occurs in the production virtual machine, the placeholder virtual machine can respond to the business request sent by the user to the production virtual machine to ensure the business continuity of the virtual machine.
[0074] Specifically, by migrating the target production virtual machine to the target node, the subsequent synchronized backup data of the target production virtual machine will be cached in the local cache pool of the target node, and then transmitted to the placeholder cache pool of the placeholder virtual machine at the disaster recovery site through the disaster recovery network to achieve data synchronization between the placeholder virtual machine and the production virtual machine.
[0075] On the basis of the above embodiments, in order to select the best target node in the node cluster so as to improve the overall performance of the system while ensuring that the synchronous backup data of the production virtual machine is normally cached, as an implementable manner, on the basis of the above embodiments, in one embodiment, according to the current configuration information of each node in the node cluster, the target node is selected in the node cluster, including:
[0076] Step 2031, determining the service network status, cache pool status and disaster recovery network status of each node in the node cluster according to the current configuration information of each node in the node cluster;
[0077] Step 2032, determining whether the service network status of the local node is normal;
[0078] Step 2033: When it is determined that the service network status of the local node is normal, the node in the node cluster whose service network status, cache pool status and disaster recovery network status are all normal is selected as a candidate node;
[0079] Step 2034: when the number of nodes to be selected is not 1, for any node to be selected, obtain the read and write speed of the local cache pool of the node to be selected and the read and write speed of the placeholder cache pool of the remote node corresponding to the node to be selected;
[0080] Step 2035, determining the comprehensive speed of each candidate node according to the read and write speed of the local buffer pool of the candidate node and the read and write speed of the placeholder buffer pool of the remote node corresponding to the candidate node;
[0081] Step 2036, taking the candidate node with the highest comprehensive speed as the candidate node;
[0082] Step 2037: when the number of candidate nodes is not 1, for any candidate node, obtain the hardware configuration information of the candidate node;
[0083] Step 2038, determining the comprehensive health of each candidate node according to the hardware configuration information of the candidate node;
[0084] Step 2039, taking the candidate node with the highest comprehensive health as the target node.
[0085] Among them, the business network status of the node is used to respond to the user's business request. The most important thing in selecting the target node is to ensure that the business network status is normal. Based on the comprehensive speed, the disaster recovery virtual machine (target production virtual machine) can be scheduled to the host with the best disaster recovery performance. Based on the comprehensive health, the resource utilization in the cloud platform can be balanced.
[0086] Specifically, the comprehensive speed of the node to be selected = local cache pool read and write speed*50%+occupied cache pool read and write speed*50%.
[0087] Specifically, the hardware configuration information of the candidate node includes at least the host processor usage (CPU usage) and the host memory usage. The comprehensive health of the candidate node = host CPU usage*50%+host memory usage*50%.
[0088] Specifically, when it is determined that the business network status of the local node is abnormal, the nodes in the node cluster whose business network status, cache pool status and disaster recovery network status are normal are prioritized as candidate nodes. Secondly, the nodes in the node cluster whose business network status is normal but the cache pool status and / or disaster recovery network status are abnormal are prioritized as candidate nodes.
[0089] Accordingly, in one embodiment, when it is determined that the service network states of all nodes in the node cluster are abnormal, cluster service network alarm information is generated.
[0090] Among them, if the business network status of all nodes in the node cluster is abnormal, it means that all nodes cannot provide normal business response for users. Therefore, cluster business network alarm information is generated to remind relevant technical personnel to maintain the business network of the cluster nodes to repair the cluster business network.
[0091] Specifically, in one embodiment, when the number of candidate nodes with the highest comprehensive health is not 1, the load balance, reliability index and performance index of several candidate nodes with the highest comprehensive health can be further calculated, and the final evaluation index of several candidate nodes with the highest comprehensive health is obtained by weighted calculation of the load balance, reliability index and performance index, and then the candidate node with the highest final evaluation index is used as the target node.
[0092] Among them, the load balancing degree can reflect the load balancing situation of the node. The load balancing degree can be evaluated by calculating the standard deviation or coefficient of variation of indicators such as the CPU usage rate, memory usage rate, and network bandwidth usage rate of the node. The lower the load balancing degree, the more balanced the load of the node is, and the more suitable it is as a target node. The reliability index can reflect the reliability of the node. The reliability can be evaluated by calculating the node's mean time between failures (MTBF) and mean time to repair (MTTR) and other indicators. The higher the reliability index, the higher the reliability of the node, and the more suitable it is as a target node. The performance index can reflect the performance of the node. The performance can be evaluated by calculating the node's CPU performance, memory performance, network performance and other indicators. The higher the performance index, the better the performance of the node, and the more suitable it is as a target node.
[0093] On the basis of the above embodiments, since different production virtual machines have different configurations, in order to ensure that the virtual machine migration method provided in the embodiment of the present application does not affect the original business processing of the production virtual machine, as an implementable method, on the basis of the above embodiments, in one embodiment, before migrating the target production virtual machine to the target node, the method further includes:
[0094] Step 301 obtains the business processing policy of the target production virtual machine;
[0095] Step 302, judging whether the target production virtual machine meets the preset hot migration condition according to the service processing policy of the target production virtual machine;
[0096] Step 303 : When it is determined that the target production virtual machine meets the preset hot migration condition, a step of migrating the target production virtual machine to the target node is performed.
[0097] It should be noted that before the virtual resource processing method provided in the embodiment of the present application is applied, the virtual machine HA (migration) switch is first turned on, and the cache storage pool HA switch is turned on. The cache storage pool is a local storage pool for storing synchronous backup data such as site disaster recovery IO log files. The cache storage pool supports HA processing strategies to support business continuity or business interruption, that is, the business processing strategy of the target production virtual machine is divided into business continuity and business interruption. If the business continuity strategy is adopted, the disaster recovery virtual machine is hot migrated, that is, the target production virtual machine is a disaster recovery virtual machine that supports hot migration, and it is determined that the target production virtual machine meets the preset hot migration conditions. For disaster recovery virtual machines that cannot be hot migrated, ignore the processing. If the business interruption strategy is selected, the disaster recovery virtual machine needs to be shut down and cold migrated to other hosts before starting up and running. It is suitable for disaster recovery virtual machines that cannot be hot migrated. If the virtual machine CPU mode is pass-through or with a pass-through device, etc., hot migration is not supported. Such production virtual machines are not suitable for the virtual resource processing method provided in the embodiment of the present application.
[0098] Specifically, in one embodiment, for a target production virtual machine that meets preset hot migration conditions, if the target production virtual machine is running a backup scheduling task, the backup scheduling task is canceled to migrate the target production virtual machine after the backup scheduling task is canceled to the target node.
[0099] Among them, backup scheduling tasks include virtual snapshot tasks, data backup tasks, system backup tasks and database backup tasks.
[0100] Specifically, in one embodiment, when the target production virtual machine is running a data transmission task, the data transmission task is terminated and the termination point of the data transmission task is determined; after the target production virtual machine is migrated to the target node, the data transmission task is reissued at the target node according to the termination point of the data transmission task to continue running the data transmission task at the target node.
[0101] Among them, the data transmission task can be a task for the target production virtual machine to transmit IO log files and other synchronous backup data to the local cache pool to be tested. Since the ongoing data transmission has a time limit and the data transmission on the original node cannot be guaranteed to be completed, the data transmission task is re-issued on the target node to complete the transmission of the untransmitted data. When the target production virtual machine is migrated to the new host (target node), real-time data backup is implemented on the new host.
[0102] For example, Figure 3As shown, it is a schematic diagram of the overall process of the virtual resource processing method provided by the embodiment of the present application. The virtualization / hyper-convergence platform has deployed production virtual machines a, added remote sites b, created node cluster E, and production virtual machines are deployed on nodes in node cluster E. Virtual machine HA and cache storage pool HA have been enabled, and the cache storage pool HA policy supports the selection of business continuity or business interruption. There are three hosts A, B, C, and D in the cluster. Each host has two shared storage pools CFS01 and CFS02 created, which are mounted by hosts A, B, C, and D. Hosts A, B, C, and D respectively create local storage pools localA, localB, localC, and localD to convert the four local storage pools into cache storage pools. The remote sites have hosts A1, B1, C1, and D1, each of which has cache storage pools localA1, localB1, localC1, and localD1 created on them. A virtual machine VM1 is created on host A and is located in storage pool CFS01. Correspondingly, a placeholder virtual machine corresponding to virtual machine VM1 is deployed on host A1. When cache storage pool localA is disconnected due to some fault or is full, the patrol mechanism detects the cache storage pool status every n time intervals. If it is disconnected, a cache storage pool disconnection alarm is generated. If the cache storage pool usage reaches m%, an alarm message is generated, and the cache storage pool localA usage is higher than m%. After the alarm is generated, the cache storage pool patrol detection mechanism immediately triggers the cache storage pool HA mechanism after detecting the alarm. First, check whether the service network of host A is normal. If so, the virtual machine can only HA to the host whose service network, cache storage pool and disaster recovery network are normal in hosts B, C, and D. If not, continue to determine whether the service network of hosts B, C, and D in the cluster is normal. If not, HA is not triggered. If so, the virtual machine will first HA to the host whose service network, cache storage pool and disaster recovery network are normal in the cluster, and then HA to the host whose service network is normal, but cache storage pool or disaster recovery network is abnormal. Next, we will determine whether the VM meets the computing migration conditions. For example, if the CPU mode of the ARM-based VM is direct-pass, online computing migration is not allowed. Or if the VM has direct-pass devices, computing migration is not supported. Similarly, HA will not be triggered.If there are multiple hosts that meet the computing migration conditions, the comprehensive speed of the hosts in the cluster will be calculated. The comprehensive speed = the read and write speed of the production virtual machine cache storage pool * 50% + the read and write speed of the cache storage pool to which the disaster recovery virtual machine belongs * 50%. If the comprehensive speed of host B = host C> host D, the comprehensive health will be calculated from host B and host C = host CPU usage * 50% + host memory usage * 50%. If the comprehensive health of host B > host C, host B will be selected as the destination host for the final cache storage pool HA scheduling. After the HA scheduling is successful, since the ongoing data transmission has a time limit and the data transmission on the original host (host A) cannot be guaranteed to be completed, a data transmission task will be re-issued on the original host to continue to transmit the untransmitted data. After the virtual machine HA is transferred to the new host (host B), real-time data backup is achieved on the new host without interruption.
[0103] The virtual resource processing method provided by the embodiment of the present application obtains the current status information of the local cache pool to be tested; wherein the local cache pool to be tested is used to cache the synchronous backup data of the target production virtual machine on the local node; when the current status information of the local cache pool to be tested indicates that the local cache pool to be tested is abnormal, the current configuration information of each node in the node cluster is obtained; according to the current configuration information of each node in the node cluster, the target node is screened in the node cluster; the target production virtual machine is migrated to the target node so that the synchronous backup data of the target production virtual machine is cached in the local cache pool of the target node. The method provided by the above scheme performs status detection on the local cache pool to be tested, and migrates the production virtual machine to the target node when an abnormality occurs in the local cache pool to be tested, so as to ensure that the synchronous backup data of the production virtual machine is cached normally, so that the corresponding placeholder virtual machine can be synchronously backed up in real time, which lays the foundation for improving the business continuity of the virtual machine. In addition, while achieving the continuity of data backup synchronization, the target node with the fastest rate can be selected preferentially, and the resource utilization rate in the cluster can also be taken into account, so that the resource utilization rate of each host is as balanced as possible.
[0104] An embodiment of the present application provides a virtual resource processing device, which is used to execute the virtual resource processing method provided in the above embodiment.
[0105] like Figure 4 , which is a schematic diagram of the structure of a virtual resource processing device provided in an embodiment of the present application. The virtual resource processing device 40 comprises: a first acquisition module 401 , a second acquisition module 402 , a screening module 403 and a migration module 404 .
[0106] Among them, the first acquisition module is used to obtain the current status information of the local cache pool to be tested; wherein the local cache pool to be tested is used to cache the synchronous backup data of the target production virtual machine on the local node; the second acquisition module is used to obtain the current configuration information of each node in the node cluster when the current status information of the local cache pool to be tested indicates that an abnormality has occurred in the local cache pool to be tested; the screening module is used to screen the target node in the node cluster according to the current configuration information of each node in the node cluster; the migration module is used to migrate the target production virtual machine to the target node, so that the synchronous backup data of the target production virtual machine is cached in the local cache pool of the target node.
[0107] Regarding the virtual resource processing device in this embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0108] The virtual resource processing device provided in the embodiment of the present application is used to execute the virtual resource processing method provided in the above embodiment. Its implementation method and principle are the same and will not be repeated here.
[0109] An embodiment of the present application provides an electronic device for executing the virtual resource processing method provided in the above embodiment.
[0110] like Figure 5 FIG. 5 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 50 includes: at least one processor 51 and a memory 52.
[0111] The memory stores computer-executable instructions; at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the virtual resource processing method provided in the above embodiment.
[0112] The electronic device provided in the embodiment of the present application is used to execute the virtual resource processing method provided in the above embodiment. Its implementation method and principle are the same and will not be repeated here.
[0113] An embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the virtual resource processing method provided in any of the above embodiments is implemented.
[0114] The storage medium containing computer executable instructions provided in the embodiment of the present application can be used to store computer executable instructions of the virtual resource processing method provided in the aforementioned embodiment. Its implementation method and principle are the same and will not be repeated here.
[0115] An embodiment of the present application provides a computer program product, including computer instructions, which are used to enable a computer to execute the virtual resource processing method provided in the aforementioned embodiment.
[0116] The embodiments of the present application provide a computer program product that can be used to execute computer instructions of the virtual resource processing method provided in the aforementioned embodiments. The implementation method and principle are the same and will not be repeated here.
[0117] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0118] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0119] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0120] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform some steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0121] A part of the present application may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of computer program instructions in computer-readable media includes, but is not limited to, source files, executable files, installation package files, etc., and accordingly, the way in which computer program instructions are executed by a computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to the computer.
[0122] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example for illustration. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0123] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A virtual resource processing method, characterized in that: include: Obtaining current status information of a local cache pool to be tested; wherein the local cache pool to be tested is used to cache synchronous backup data of a target production virtual machine on a local node; When the current state information of the local cache pool to be tested indicates that an abnormality occurs in the local cache pool to be tested, obtaining current configuration information of each node in the node cluster; Selecting a target node in the node cluster according to current configuration information of each node in the node cluster; The target production virtual machine is migrated to the target node, so that the synchronous backup data of the target production virtual machine is cached in the local cache pool of the target node.
2. The method according to claim 1, characterized in that The method further comprises: Determine the mounting state and storage resource usage rate of the local cache pool to be tested according to the current state information of the local cache pool to be tested; When the mount state of the local cache pool to be tested is not mounted, or when the storage resource usage of the local cache pool to be tested reaches a preset usage threshold, it is determined that an abnormality occurs in the local cache pool to be tested, and cache pool alarm information is generated.
3. The method according to claim 1, characterized in that The step of screening a target node in the node cluster according to current configuration information of each node in the node cluster includes: Determine the service network status, cache pool status and disaster recovery network status of each node in the node cluster according to the current configuration information of each node in the node cluster; Determining whether the service network status of the local node is normal; When it is determined that the service network status of the local node is normal, the nodes in the node cluster whose service network status, cache pool status and disaster recovery network status are normal are selected as candidate nodes; When the number of the candidate nodes is not 1, for any of the candidate nodes, the read and write speed of the local cache pool of the candidate node and the read and write speed of the placeholder cache pool of the remote node corresponding to the candidate node are obtained; Determine the comprehensive speed of each of the candidate nodes according to the read and write speed of the local cache pool of the candidate node and the read and write speed of the placeholder cache pool of the remote node corresponding to the candidate node; The node with the highest comprehensive speed is selected as a candidate node; When the number of the candidate nodes is not 1, for any of the candidate nodes, obtaining hardware configuration information of the candidate node; Determining the comprehensive health of each of the candidate nodes according to the hardware configuration information of the candidate nodes; The candidate node with the highest comprehensive health is used as the target node.
4. The method according to claim 3, characterized in that The method further comprises: When it is determined that the service network states of all nodes in the node cluster are abnormal, cluster service network alarm information is generated.
5. The method according to claim 1, characterized in that Before migrating the target production virtual machine to the target node, the method further includes: Obtaining a business processing policy for the target production virtual machine; Determining whether the target production virtual machine meets a preset hot migration condition according to the business processing policy of the target production virtual machine; In the case where it is determined that the target production virtual machine meets the preset hot migration condition, the step of migrating the target production virtual machine to the target node is performed.
6. The method according to claim 5, characterized in that Migrating the target production virtual machine to the target node includes: In a case where the target production virtual machine is running a backup scheduling task, the backup scheduling task is canceled, so as to migrate the target production virtual machine after the backup scheduling task is canceled to the target node.
7. The method according to claim 5, characterized in that Migrating the target production virtual machine to the target node includes: When the target production virtual machine is running a data transmission task, terminating the data transmission task and determining a termination point of the data transmission task; After migrating the target production virtual machine to the target node, the data transmission task is reissued at the target node according to the termination point of the data transmission task, so as to continue running the data transmission task at the target node.
8. A virtual resource processing device, characterized in that: include: A first acquisition module is used to acquire current status information of a local cache pool to be tested; wherein the local cache pool to be tested is used to cache synchronous backup data of a target production virtual machine on a local node; A second acquisition module is used to acquire current configuration information of each node in the node cluster when the current state information of the local cache pool to be tested indicates that an abnormality has occurred in the local cache pool to be tested; A screening module, used to screen target nodes in the node cluster according to current configuration information of each node in the node cluster; The migration module is used to migrate the target production virtual machine to the target node, so that the synchronous backup data of the target production virtual machine is cached in the local cache pool of the target node.
9. An electronic device, characterized in that: include: at least one processor and memory; The memory stores computer-executable instructions; The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the virtual resource processing method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions. When a processor executes the computer-executable instructions, the virtual resource processing method according to any one of claims 1 to 7 is implemented.
