Virtualization system updating method, computer device, storage medium and program product

Through the virtualization system update method, according to the characteristics of the entities to be updated and the update package, the appropriate update strategy is selected, which solves the problems of business downtime and operation complexity during the virtualization system update process, and improves the flexibility and reliability of the update. Reduced maintenance costs.

CN118567689BActive Publication Date: 2025-01-03JINAN INSPUR DATA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411026196.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-30
Publication Date
2025-01-03
Estimated Expiration
2044-07-30

AI Technical Summary

Technical Problem

The update and upgrade of existing virtualization systems requires reservations for a time window in advance, resulting in business downtime, complex operations and error-prone, and increasing maintenance costs.

Method used

Provide a virtualized system update method, by obtaining update packages, determine the target update package and update methods, including in-situ thermal upgrade, rolling hot upgrade and cold upgrade, based on the restartable time of the entity to be updated and the update time value of the update package. Select the appropriate update policy to control the entities to be updated to perform update tasks.

Benefits of technology

Improves the flexibility and ease of use of virtualized system updates, reduces manual operation errors, reduces maintenance costs, and ensures the reliability and maintainability of the update process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118567689B_ABST
    Figure CN118567689B_ABST
Patent Text Reader

Abstract

The present application relates to a virtualization system update method, computer equipment, storage medium and program product, and belongs to the field of virtualization technology. The method includes: obtaining at least one update package, and determining a target update package from the update package based on the constructed entity to be updated, wherein the virtualization system includes at least one entity to be updated; determining a target update method based on a first time value of the entity to be updated and a second time value of the target update package; and controlling the entity to be updated to perform a corresponding update task based on the target update method and the target update package. The present application can improve the flexibility of virtualization system updates, avoid a series of problems caused by manual operation errors, improve the reliability and maintainability of virtualization system updates, and reduce costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of virtualization technology, and in particular to a virtualization system updating method, computer equipment, storage medium and program product. Background Art

[0002] In the prior art, the update and upgrade of most virtualization systems require an appointment window with the customer in advance. This upgrade method will cause the virtual machine business to be shut down, and in the case of multiple architectures, it usually requires multiple operations, one architecture at a time, to finally complete the upgrade and update of all hosts in the virtualization system. For users, the usability is relatively poor, and manual operations are inevitably prone to errors, resulting in increased maintenance costs.

[0003] Therefore, there is an urgent need to propose a virtualization system update method, computer equipment, storage medium and program product that can improve the flexibility, ease of use and maintainability of upgrades and updates. Summary of the invention

[0004] Based on this, it is necessary to provide a virtualization system update method, computer equipment, storage medium and program product that can improve the flexibility, ease of use and maintainability of upgrades and updates in response to the above technical problems.

[0005] In a first aspect, a virtualization system update method is provided, the method comprising:

[0006] Acquire at least one update package, and determine a target update package from the update packages based on the constructed entity to be updated, wherein the virtualization system includes at least one entity to be updated;

[0007] Determine a target update mode based on a first time value of the entity to be updated and a second time value of the target update package, wherein the update mode includes at least in-place hot upgrade, rolling hot upgrade and cold upgrade, the first time value is used to describe the duration of the entity to be updated that can be used for restarting, and the second time value is used to describe the update duration of the update package;

[0008] Based on the target update mode and the target update package, the entity to be updated is controlled to execute a corresponding update task.

[0009] Optionally, before obtaining at least one update package, the method further includes:

[0010] Check whether the name of the update package meets the preset standard;

[0011] In response to detecting that the name of the update package meets a preset standard, decompressing and parsing the update package;

[0012] Verify the parsed update package;

[0013] In response to detecting that the update package has passed the verification, storing the parsed update package in the database of the master node;

[0014] At the same time, check whether there is a backup node;

[0015] In response to detecting the existence of a standby node, the parsed update package is synchronized to a database of the standby node.

[0016] Optionally, the method for constructing the entity to be updated includes:

[0017] Acquire attribute parameters of the entity, and filter the attribute parameters to obtain attribute parameters for updating;

[0018] The entity to be updated is generated based on the mapping relationship formed between the attribute parameters for updating and the corresponding entity.

[0019] Optionally, the method for determining the target update package includes:

[0020] Get the attribute parameters of the entity to be updated;

[0021] Based on the attribute parameters of the entity to be updated, the update packages in the database are matched, and the update package that is successfully matched is defined as the target update package.

[0022] Optionally, determining the target update mode based on the first time value of the entity to be updated and the second time value of the target update package includes:

[0023] Acquire a business scenario to which the entity to be updated belongs, and determine a first time value based on the business scenario;

[0024] Obtaining a second time value corresponding to the target update package;

[0025] In response to detecting that the first time value is less than or equal to a first preset threshold, determining that the target update mode is a rolling hot upgrade or an in-place hot upgrade;

[0026] In response to detecting that the first time value is greater than a first preset threshold, comparing the first time value and the second time value;

[0027] Based on the comparison results, the target update method is determined.

[0028] Optionally, based on the comparison result, determining the target update method includes:

[0029] In response to detecting that the second time value is less than or equal to the first time value, and the time range between the current time and the target time is within a preset time range, determining that the target update mode is a cold upgrade;

[0030] In response to detecting that the second time value is greater than the first time value, and the time range between the current moment and the target moment is within a preset time range, determining that the target update mode is a cold upgrade, an in-place hot upgrade, or a rolling hot upgrade;

[0031] In response to detecting that the first time value is greater than a first preset threshold and the time range between the current time and the target time is not within the preset time range, determining that the target update mode is an in-place hot upgrade or a rolling hot upgrade.

[0032] Optionally, in response to detecting that the target update mode is an in-place hot upgrade or a rolling hot upgrade, the method further includes:

[0033] In response to detecting that a business resource migration is required, determining that a target update mode is a rolling hot upgrade;

[0034] In response to detecting that no business resource migration is required, determining that the target update mode is an in-place hot upgrade.

[0035] Optionally, before controlling the to-be-updated entity to perform a corresponding update task based on the target update mode and the target update package, the method further includes:

[0036] Build inspection result sets and inspection items;

[0037] Based on the inspection items, inspect the environment of the virtualization system, and add the inspection results to the inspection result set;

[0038] In response to detecting that all check items in the check result set are marked as passed, the to-be-updated entity is controlled to execute a corresponding update task based on the target update mode and the target update package.

[0039] Optionally, in response to detecting that the target update mode is an in-place hot upgrade, controlling the entity to be updated to perform a corresponding update task includes:

[0040] In response to detecting an update task, controlling the entity to be updated to enter a maintenance mode;

[0041] In response to detecting that the entity to be updated has entered a maintenance mode, updating the entity to be updated based on the target update package;

[0042] In response to detecting the update result, the maintenance mode is exited, and the configuration of the entity to be updated is synchronized to complete the execution of the update task.

[0043] Optionally, in response to detecting that the target update mode is a cold upgrade, controlling the entity to be updated to perform a corresponding update task includes:

[0044] In response to detecting an update task, controlling the entity to be updated to enter a maintenance mode;

[0045] In response to detecting that the entity to be updated has entered a maintenance mode, updating the entity to be updated in a target partition based on the target update package;

[0046] In response to detecting that there is an entity to be updated that has been updated in the virtualization system, detecting whether the entity to be updated corresponding to the active and standby management nodes has been restarted;

[0047] In response to detecting that the entities to be updated corresponding to the active and standby management nodes have all been restarted, installing a third-party package, refreshing the boot item, and shutting down the virtual machine running in the entity to be updated;

[0048] In response to detecting that all virtual machines running in the entity to be updated have been successfully shut down, restarting the entity to be updated;

[0049] In response to detecting that at least one running virtual machine in the entities to be updated has not been successfully shut down, re-detecting whether there are entities to be updated that have been updated in the virtualization system, and repeating the cycle.

[0050] Optionally, in response to detecting that there are active and standby management nodes that have not been completely restarted, the method includes:

[0051] Check whether the entity to be updated currently belongs to the primary and backup management nodes;

[0052] In response to detecting that the current entity to be updated belongs to the primary and standby management nodes, installing a third-party package, refreshing the boot item, and shutting down the virtual machine running in the current entity to be updated;

[0053] In response to detecting that all virtual machines running in the entity to be updated have been successfully shut down, restarting the entity to be updated;

[0054] In response to detecting that at least one running virtual machine in the entities to be updated has not been successfully shut down, re-detecting whether there is an entity to be updated that has been updated in the virtualization system, and repeating the process in a loop;

[0055] In response to detecting that the current node is not the active / standby management node and that there are entities to be updated corresponding to the active / standby management nodes that have not been restarted, re-detecting whether there are entities to be updated that have been updated in the virtualization system, and repeating the cycle.

[0056] Optionally, in response to detecting that the entity to be updated has been restarted successfully, the method includes:

[0057] Exit maintenance mode and synchronize the configuration of the entity to be updated;

[0058] Check whether the storage pool of the entity to be updated has been restored and mounted;

[0059] In response to detecting that the storage pool of the entity to be updated has been restored to mount, the shut down virtual machine is started to complete the execution of the update task.

[0060] Optionally, in response to detecting that the target update mode is a rolling hot upgrade, controlling the entity to be updated to perform a corresponding update task includes:

[0061] In response to detecting an update task, determining whether the entity to be updated belongs to a primary or standby management node;

[0062] In response to detecting that the entity to be updated belongs to the primary and standby management nodes, controlling the entity to be updated to enter a maintenance mode;

[0063] In response to detecting that the entity to be updated has entered a maintenance mode, detecting whether there is a running virtual machine in the entity to be updated;

[0064] In response to detecting the existence of a running virtual machine, migrating the running virtual machine;

[0065] In response to detecting that the running virtual machine has been successfully migrated, updating the entity to be updated in the target partition;

[0066] In response to detecting that the entity to be updated has been successfully updated, installing a third-party package, refreshing the boot item, and restarting the entity to be updated;

[0067] In response to detecting that the entity to be updated has been successfully restarted, exiting the maintenance mode and synchronizing the configuration of the entity to be updated;

[0068] Check whether the storage pool of the entity to be updated has been restored and mounted;

[0069] In response to detecting that the storage pool of the entity to be updated has been restored and mounted, the virtual machine is migrated back to complete the execution of the update task.

[0070] Optionally, in response to detecting that the target update mode is a rolling hot upgrade, controlling the entity to be updated to perform a corresponding update task includes:

[0071] In response to detecting an update task, determining whether the entity to be updated belongs to a primary or standby management node;

[0072] In response to detecting that the entity to be updated does not belong to the primary and standby management nodes, determining whether all entities to be updated that belong to the primary and standby management nodes have been updated;

[0073] In response to detecting that all entities to be updated belonging to the primary and standby management nodes have completed updating, controlling the entities to be updated to enter a maintenance mode;

[0074] In response to detecting that the entity to be updated has entered a maintenance mode, detecting whether there is a running virtual machine in the entity to be updated;

[0075] In response to detecting the existence of a running virtual machine, migrating the running virtual machine;

[0076] In response to detecting that the running virtual machine has been successfully migrated, updating the entity to be updated in the target partition;

[0077] In response to detecting that the entity to be updated has been successfully updated, installing a third-party package, refreshing the boot item, and restarting the entity to be updated;

[0078] In response to detecting that the entity to be updated has been successfully restarted, exiting the maintenance mode and synchronizing the configuration of the entity to be updated;

[0079] Check whether the storage pool of the entity to be updated has been restored and mounted;

[0080] In response to detecting that the storage pool of the entity to be updated has been restored and mounted, the virtual machine is migrated back to complete the execution of the update task.

[0081] Optionally, in response to detecting that the target update mode is a rolling hot upgrade, controlling the entity to be updated to perform a corresponding update task includes:

[0082] In response to detecting an update task, determining whether the entity to be updated belongs to a primary or standby management node;

[0083] In response to detecting that the entity to be updated does not belong to the primary and standby management nodes, determining whether all entities to be updated that belong to the primary and standby management nodes have been updated;

[0084] In response to detecting that there is a target entity to be updated that belongs to the primary and standby management nodes and has not been updated, controlling the target entity to be updated to enter a maintenance mode;

[0085] In response to detecting that the target entity to be updated has entered a maintenance mode, detecting whether there is a running virtual machine in the target entity to be updated;

[0086] In response to detecting the existence of a running virtual machine, migrating the running virtual machine;

[0087] In response to detecting that the running virtual machine has been successfully migrated, updating the target entity to be updated in the target partition;

[0088] In response to detecting that the target entity to be updated has been successfully updated, installing a third-party package, refreshing the boot item, and restarting the target entity to be updated;

[0089] In response to detecting that the target entity to be updated has been successfully restarted, exiting the maintenance mode and synchronizing the configuration of the target entity to be updated;

[0090] Check whether the storage pool of the target entity to be updated has been restored and mounted;

[0091] In response to detecting that the storage pool of the target entity to be updated has been restored and mounted, the virtual machine is migrated back to complete the execution of the update task.

[0092] Optionally, the method further includes:

[0093] In response to detecting that the virtual machine has not been successfully migrated or the storage pool has not been restored or the virtual machine has not been successfully migrated back, it is re-determined whether the entity to be updated belongs to the primary or standby management node, and the process is repeated.

[0094] Optionally, before migrating the virtual machine, the method further includes:

[0095] Based on a preset function, the storage pool usage rate after the virtual machine migration is calculated and determined, wherein the preset function includes:

[0096] ;

[0097] in, K Indicates the storage pool usage after the virtual machine is migrated. x Indicates the storage pool usage. y Indicates the total capacity of the storage pool. D Indicates the current virtual machine disk capacity. f Indicates the total capacity of the storage pool;

[0098] In response to detecting that the storage pool usage rate after the migration of the virtual machine is greater than a second preset threshold, shutting down a target number of virtual machines.

[0099] Optionally, the method for determining the target quantity includes:

[0100] Sort the virtual machines in descending order according to their importance;

[0101] Based on the preset intervals, the sorted virtual machines are divided to obtain multiple virtual machine intervals, and the virtual machine intervals are marked in descending order based on the sum of the importance of the virtual machines in the intervals;

[0102] Determining an excess amount of storage pool resource usage according to a difference between the storage pool usage rate after the virtual machine migration and a second preset threshold;

[0103] Based on the excess usage of the storage pool resources, determine the virtual machine intervals that need to shut down the virtual machines in order of marking from low to high;

[0104] In response to detecting that all virtual machines in the target virtual machine interval do not need to be shut down, matching and determining virtual machines in the target virtual machine interval that need to be shut down according to the current excess storage pool resource usage and the resource occupancy of each virtual machine in the target virtual machine interval;

[0105] The target number is determined based on the virtual machines that need to be shut down.

[0106] Optionally, the virtual machine migration method includes:

[0107] Obtain the currently running virtual machines in the entity to be updated, generate a one-to-one mapping relationship, and sort them in descending order according to the load of the virtual machines;

[0108] Determine the migration method of the virtual machine based on the storage area of ​​the virtual machine;

[0109] A target entity list is obtained, and based on a sorting order and a target migration mode, the virtual machines are gradually migrated to the target entities in a multi-threaded manner.

[0110] In a second aspect, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the following steps are implemented:

[0111] Acquire at least one update package, and determine a target update package from the update packages based on the constructed entity to be updated, wherein the virtualization system includes at least one entity to be updated;

[0112] Determine a target update mode based on a first time value of the entity to be updated and a second time value of the target update package, wherein the update mode includes at least in-place hot upgrade, rolling hot upgrade and cold upgrade, the first time value is used to describe the duration of the entity to be updated that can be used for restarting, and the second time value is used to describe the update duration of the update package;

[0113] Based on the target update mode and the target update package, the entity to be updated is controlled to execute a corresponding update task.

[0114] In a third aspect, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0115] Acquire at least one update package, and determine a target update package from the update packages based on the constructed entity to be updated, wherein the virtualization system includes at least one entity to be updated;

[0116] Determine a target update mode based on a first time value of the entity to be updated and a second time value of the target update package, wherein the update mode includes at least in-place hot upgrade, rolling hot upgrade and cold upgrade, the first time value is used to describe the duration of the entity to be updated that can be used for restarting, and the second time value is used to describe the update duration of the update package;

[0117] Based on the target update mode and the target update package, the entity to be updated is controlled to execute a corresponding update task.

[0118] In a fourth aspect, a computer program product is provided, the computer program product comprising a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0119] Acquire at least one update package, and determine a target update package from the update packages based on the constructed entity to be updated, wherein the virtualization system includes at least one entity to be updated;

[0120] Determine a target update mode based on a first time value of the entity to be updated and a second time value of the target update package, wherein the update mode includes at least in-place hot upgrade, rolling hot upgrade and cold upgrade, the first time value is used to describe the duration of the entity to be updated that can be used for restarting, and the second time value is used to describe the update duration of the update package;

[0121] Based on the target update mode and the target update package, the entity to be updated is controlled to execute a corresponding update task.

[0122] The above-mentioned virtualization system update method, computer device, storage medium and program product, the method includes: obtaining at least one update package, and determining a target update package from the update package based on the constructed entity to be updated, wherein the virtualization system includes at least one entity to be updated; determining a target update method based on a first time value of the entity to be updated and a second time value of the target update package, wherein the update method at least includes in-place hot upgrade, rolling hot upgrade and cold upgrade, the first time value is used to describe the length of time that the entity to be updated can be used for restarting, and the second time value is used to describe the update duration of the update package; based on the target update method and the target update package, controlling the entity to be updated to perform a corresponding update task, the present application can be applied to a multi-architecture virtualization environment, and can provide different update methods and corresponding update strategies according to different environments and various update scenarios, thereby improving the flexibility of virtualization system updates, avoiding a series of problems caused by manual operation errors, improving the reliability and maintainability of virtualization system updates, and reducing costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0123] Figure 1An application environment diagram of a virtualization system update method in an embodiment;

[0124] Figure 2 A flowchart of a virtualization system update method in one embodiment;

[0125] Figure 3 is another flowchart of a virtualization system updating method in one embodiment;

[0126] Figure 4 A schematic diagram of an update package uploading process of a virtualization system update method in an embodiment;

[0127] Figure 5 A schematic diagram of a pre-update environment check process of a virtualization system update method in one embodiment;

[0128] Figure 6 A schematic diagram of an update task submission process of a virtualization system update method in one embodiment;

[0129] Figure 7 A schematic diagram of an in-situ hot upgrade process of a virtualization system update method in one embodiment;

[0130] Figure 8 A schematic diagram of a cold upgrade process of a virtualization system update method in one embodiment;

[0131] Fig. 9 A schematic diagram of a rolling hot upgrade process of a virtualization system update method in an embodiment;

[0132] Fig.10 A schematic diagram of a virtual machine scheduling process before upgrading of a rolling hot upgrade of a virtualization system update method in one embodiment;

[0133] Fig.11 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0134] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0135] It should be understood that in the description of the present application, unless the context clearly requires otherwise, words such as "include", "comprises", and the like throughout the specification should be interpreted as including rather than being exclusive or exhaustive; that is, as including but not limited to.

[0136] It should also be understood that the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, in the description of this application, unless otherwise specified, "plurality" means two or more.

[0137] It should be noted that the terms "S1", "S2", etc. are only used for the purpose of describing the steps, and do not specifically refer to the order or sequence, nor are they used to limit the present application. They are only for the convenience of describing the method of the present application, and cannot be understood as indicating the order of the steps. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in this field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection required by the present application.

[0138] The virtualization system update method provided in this application can be applied to Figure 1 In the application environment shown, the terminal 102 communicates with the data processing platform set on the server 104 through the network, wherein the terminal 102 can be but not limited to various personal computers, laptops, smart phones, tablet computers and portable wearable devices, and the server 104 can be implemented by an independent server or a server cluster composed of multiple servers.

[0139] In one embodiment, Figure 2-Figure 3 As shown, a virtualization system update method is provided, which is applied to Figure 1 The terminal in is used as an example to illustrate, including the following steps:

[0140] S1: Acquire at least one update package, and determine a target update package from the update packages based on a constructed entity to be updated, wherein the virtualization system includes at least one entity to be updated.

[0141] It should be noted that the update package is a compressed package containing files, scripts, configuration information and other information required for the host upgrade, which may include patch packages and upgrade packages. The entity to be updated refers to the entity that needs to be upgraded or patched, which may include management nodes, computing nodes, data centers, clusters, etc., which are composed of hosts. For example, the entity to be updated is a host to be updated configured with update parameters. The virtualization system is composed of multiple hosts. After the virtualization system is deployed, multiple data centers may be running in the same virtualization environment. Each data center may also be deployed with multiple clusters of different CPU (Central Processing Unit) architectures, such as x86_64 or aarch64. The present application includes a management node (1 or 2) and several computing nodes. The underlying upgrade components are running on both the management node and the computing node. The management node not only runs the underlying upgrade components, but also includes platform-level upgrade services to complete unified control and task scheduling of the entire upgrade task.

[0142] In some specific embodiments, Figure 4 As shown, before obtaining at least one update package, the method further includes:

[0143] Check whether the name of the update package meets the preset standard, that is, check whether the name of the update package meets the specification, wherein the specification generally refers to the existing server application specification, which will not be repeated here;

[0144] In response to detecting that the name of the update package meets the preset standard, the update package is decompressed and parsed, wherein the decompression and parsing are common methods and will not be described in detail here;

[0145] Verify the parsed update package, wherein here the information of the parsed update package is verified, generally the integrity of the package is verified, which is a commonly used verification method and will not be described in detail here;

[0146] In response to detecting that the update package has passed the verification, storing the parsed update package in the database of the master node;

[0147] At the same time, check whether there is a backup node;

[0148] In response to detecting the presence of a standby node, synchronizing the parsed update package to a database of the standby node;

[0149] Among them, both the master node and the standby node have database services, but the database service of the standby node is generally in a closed state, and only the database service of the master node is in a running state. If there is a standby node, the parsed information will be synchronized to the database of the standby node for storage to achieve persistence of the update package information.

[0150] In some specific implementations, the method for constructing the entity to be updated includes:

[0151] Acquire attribute parameters of the entity, and filter the attribute parameters to obtain attribute parameters for updating, wherein the attribute parameters of the entity generally refer to specification parameters of the host, such as hardware configuration parameters, performance index parameters and interface performance, etc. The filtered parameters are generally parameters required when the host is updated, such as memory information, performance index, version number and other parameters;

[0152] Based on the mapping relationship formed between the attribute parameters for updating and the corresponding entities, the entity to be updated is generated, that is, detailed entity update information is constructed for the entity, and a corresponding mapping relationship is formed to generate the entity to be updated.

[0153] In some specific implementations, the method for determining the target update package includes:

[0154] Get the attribute parameters of the entity to be updated;

[0155] Based on the attribute parameters of the entity to be updated, the update packages in the database are matched, and the successfully matched update package is defined as the target update package, wherein here, generally, the version number and the dependent version number of the update package are compared with the version of the entity to be updated to see whether they match, and whether the CPU architecture applicable to the update package matches the CPU architecture of the entity to be updated, and whether the product type used by the update package matches the product type of the entity to be updated, etc. After a successful match, the successfully matched update package is defined as the target update package and downloaded.

[0156] In the above implementation, by constructing the entity to be updated, the update package can be matched accurately and quickly, thereby improving the update efficiency and accuracy of the virtualization system.

[0157] S2: Determine the target update method based on the first time value of the entity to be updated and the second time value of the target update package, wherein the update method includes at least in-place hot upgrade, rolling hot upgrade and cold upgrade, the first time value is used to describe the duration of the entity to be updated that can be used for restarting, and the second time value is used to describe the update duration of the update package.

[0158] It should be noted that both patch packages and upgrade packages support three upgrade methods: in-place hot upgrade, rolling hot upgrade and cold upgrade. Among them, the upgrade of patch packages is generally in-place upgrade, that is, all updated RPM packages (Redhat Linux Packet Manager, Redhat's package manager, is an executable program of software under LINUX) are directly written into the configuration file, and the RPM source files are also copied to the specific directory to be upgraded. When upgrading, the RPM installation command is directly called to upgrade directly. The in-place hot upgrade implementation process corresponding to the upgrade package is consistent with the hot upgrade of the patch package. The rolling hot upgrade and cold upgrade are upgraded in the second partition at the bottom layer. After the upgrade is successful, the partition switching is completed after the host is restarted. Furthermore, hot or cold refers to whether the virtual machine is stopped during the upgrade process. For machines, if the user's business operation is suspended for some time, it is recommended to use the cold upgrade method. Before the upgrade or restart, the running virtual machine will be automatically shut down, and the virtual machine will be automatically started after the upgrade is completed and restarted; rolling hot upgrade is mainly used to solve the problem that the user's business cannot be stopped and the virtual machine is not allowed to be shut down. When using this method, the hosts in the cluster need to be upgraded serially. Before upgrading a host, migrate the virtual machines running on it to other hosts. Then, after the host is upgraded and restarted, migrate the migrated virtual machines back to the host, and then continue to upgrade the next host. Finally, under the premise of not affecting the virtual machine business, the upgrade of all hosts in the cluster is completed. In the process of upgrading, the in-place hot upgrade has no impact on the business of the upgraded server, and there is no need to migrate business resources in advance.

[0159] In some specific implementations, based on the entity to be updated and the target update package, determining the target update mode includes:

[0160] Obtaining the business scenario to which the entity to be updated belongs, and determining a first time value based on the business scenario, wherein the first time value can usually be determined based on big data according to the business scenario, and the business scenario can include a host operation scenario, such as financial business, etc. The first time value generally refers to the length of time that the host can be used for restarting in different business scenarios. For example, in a financial business scenario, it is usually required that the virtual machine business cannot be shut down or the downtime window time is limited. At this time, it is necessary to determine the corresponding first time value to determine the specific update method;

[0161] Obtaining a second time value corresponding to the target update package, wherein the second time value refers to the length of time required for the update package to be updated;

[0162] In response to detecting that the first time value is less than or equal to a first preset threshold, determining that the target update mode is a rolling hot upgrade or an in-place hot upgrade, wherein the first preset threshold can be set according to actual needs, preferably, the first preset threshold can be 0, that is, the time length that the host can be used for restarting is 0, and the selected update mode is a rolling hot upgrade or an in-place hot upgrade;

[0163] In response to detecting that the first time value is greater than a first preset threshold, comparing the first time value and the second time value;

[0164] Based on the comparison results, the target update method is determined.

[0165] In some specific implementations, determining the target update method based on the comparison result includes:

[0166] In response to detecting that the second time value is less than or equal to the first time value, and the time range between the current time and the target time is within the preset time range, determining that the target update mode is a cold upgrade, wherein the target time is a time when the host can be used for restarting, such as 3 a.m., and the preset time range can be set according to actual needs, such as 30 minutes, 1 hour, etc. If some hosts need to be updated immediately, the set time range can be 1 minute, etc., and examples are not repeated here;

[0167] In response to detecting that the second time value is greater than the first time value, and the time range between the current moment and the target moment is within the preset time range, determining that the target update mode is a cold upgrade, and an in-place hot upgrade or a rolling hot upgrade, wherein the second time value is greater than the first time value means that the update duration is greater than the restartable duration, at this time, determining that the update mode is a cold upgrade, and combining it with an in-place hot upgrade or a rolling hot upgrade, the cold upgrade is an upgrade mode performed during the restartable time period, and the in-place hot upgrade or the rolling hot upgrade is an upgrade mode performed beyond the restartable time period;

[0168] In response to detecting that the first time value is greater than a first preset threshold, and the time range between the current moment and the target moment is not within the preset time range, the target update mode is determined to be an in-place hot upgrade or a rolling hot upgrade, that is, the time range between the current moment and the target moment is too long, and waiting for a cold upgrade may affect the processing speed of the business. At this time, the update mode is defined as an in-place hot upgrade or a rolling hot upgrade.

[0169] In some specific implementations, in response to detecting that the target update mode is an in-place hot upgrade or a rolling hot upgrade, the method further includes:

[0170] In response to detecting the need for business resource migration, determining the target update mode as rolling hot upgrade, that is, determining whether business migration is needed based on information such as the business importance of the business scenario. If the user business cannot be stopped and the virtual machine is not allowed to be shut down, the rolling hot upgrade mode is used for update;

[0171] In response to detecting that no business resource migration is required, the target update mode is determined to be an in-place hot upgrade. Similarly, if it is determined that business migration is possible, the in-place hot upgrade mode is used for updating.

[0172] Specifically, in a multi-architecture virtualization environment, that is, when the hosts in the system include X86_64 and aarch64, the system can automatically filter out the different available update packages corresponding to the two architectures in the above manner. After issuing the update task, the background will select the update package suitable for the architecture according to the architecture type of the node when building the update subtask, so as to achieve the update of all nodes in the multi-architecture environment. If the cold upgrade method is selected, you need to select the restart method. The default is to restart immediately, which can also be changed to manual restart or scheduled restart. If rolling hot upgrade is selected, the restart method can only be automatic restart, and the order of hosts in the cluster can be adjusted. After selecting the host order, the system will perform a pre-upgrade check to check whether the virtual machines running on the selected hosts can be migrated to other hosts. The rolling hot upgrade requires sufficient free resources in the system. If the free resources are insufficient, unimportant virtual machines will be shut down in advance.

[0173] In the above implementation, the corresponding update method is determined by time value and other related information to meet the personalized needs of different user virtual machine services, improve the flexibility of update method selection, and greatly improve usability, maintainability and product competitiveness.

[0174] S3: Based on the target update mode and the target update package, control the entity to be updated to execute a corresponding update task.

[0175] In some specific embodiments, Figure 5-Figure 6 As shown, before controlling the entity to be updated to perform the corresponding update task based on the target update mode and the target update package, the method further includes checking the virtualization environment, specifically:

[0176] Build a check result set and check items, where the check items may include license check, whether there are running tasks, software package consistency check, bad disk check, whether the log partition is full, and other factors that may affect the update;

[0177] Based on the inspection items, the environment of the virtualization system is inspected, and the inspection results are added to the inspection result set, wherein if the inspection item meets the standard, it is marked as passed, and if not, it is marked as failed, and a detailed reason is prompted, and the inspection result is added to the inspection result set;

[0178] In response to detecting that all check items are marked as passed in the check result set, that is, all check items are passed, the update task is submitted, and after all hosts (that is, the entity to be updated) have submitted the update task, based on the target update method and the target update package, the entity to be updated is controlled to execute the corresponding update task.

[0179] In some specific embodiments, Figure 7 As shown, in response to detecting that the target update mode is an in-place hot upgrade, controlling the entity to be updated to perform a corresponding update task includes:

[0180] In response to detecting an update task, controlling the entity to be updated to enter a maintenance mode;

[0181] In response to detecting that the entity to be updated has entered a maintenance mode, updating the entity to be updated based on the target update package;

[0182] In response to detecting an update result, the maintenance mode is exited and the configuration of the entity to be updated is synchronized to complete the execution of the update task, wherein the update result may be successful execution of the update task or failed execution of the update task. Whether the execution is successful is determined by the upgrade status. If the upgrade is not successful, the task execution fails. At this time, the host exits the maintenance mode and synchronizes the configuration of the host.

[0183] In some specific embodiments, Figure 8 As shown, in response to detecting that the target update mode is a cold upgrade, controlling the entity to be updated to perform a corresponding update task includes:

[0184] In response to detecting an update task, controlling all entities to be updated in the virtualization system to start an entity upgrade task to be updated, and controlling the entities to be updated to enter a maintenance mode;

[0185] In response to detecting that the entity to be updated has entered the maintenance mode and all entities to be updated have started the upgrade task, based on the target update package, the entity to be updated is updated in the target partition, wherein the target partition is the second partition used for updating at the bottom layer, so as to prevent problems such as host paralysis caused by accidental interruption during the update process, and improve the reliability of system upgrade;

[0186] In response to detecting that there is an entity to be updated that has been updated in the virtualization system, detecting whether the entity to be updated corresponding to the active and standby management nodes has been restarted, wherein in the virtualization system, the hosts belonging to the active and standby management nodes are updated and restarted first, and if the entities to be updated corresponding to the active and standby management nodes have all been restarted, then continue to update and restart the hosts of other nodes, where the entity to be updated is the entity to be updated that does not belong to the active and standby management nodes;

[0187] In response to detecting that the entities to be updated corresponding to the active and standby management nodes have all been restarted, installing a third-party package, refreshing the boot item, and shutting down the virtual machine running in the entity to be updated, wherein the third-party package refers to a package that is not installed during installation, and is a component that the customer needs to install additionally due to some needs, such as an antivirus software package, etc., and the boot item refers to a group of menu items used to select different operating system versions or different startup configurations when starting the host;

[0188] In response to detecting that all virtual machines running in the entity to be updated have been successfully shut down, restarting the entity to be updated;

[0189] In response to detecting that at least one running virtual machine in the entities to be updated has not been successfully shut down, re-detect whether there are entities to be updated that have been updated in the virtualization system, and repeat the above steps in a loop until the update is completed.

[0190] In some specific implementations, in response to detecting that there are active and standby management nodes that have not been completely restarted, that is, there are active and standby management nodes that have not been updated and restarted in the system, the method includes:

[0191] Check whether the entity to be updated currently belongs to the primary and backup management nodes;

[0192] In response to detecting that the current entity to be updated belongs to the primary and standby management nodes, the third-party package is installed, the boot item is refreshed, and the virtual machine running in the current entity to be updated is shut down, wherein the steps here are the same as above and will not be repeated here;

[0193] In response to detecting that all virtual machines running in the entity to be updated have been successfully shut down, restarting the entity to be updated;

[0194] In response to detecting that at least one running virtual machine in the entity to be updated has not been successfully shut down, re-detecting whether there is an entity to be updated that has been updated in the virtualization system, and looping back and forth, that is, looping and repeating the above steps until the update is completed;

[0195] In response to detecting that the current node is not the active / standby management node and that there are entities to be updated corresponding to the active / standby management nodes that have not been restarted, re-detect whether there are entities to be updated that have been updated in the virtualization system, and repeat the above steps in a loop until the update is completed.

[0196] In some specific implementations, in response to detecting that the entity to be updated has been successfully restarted, the method includes:

[0197] The entity to be updated exits maintenance mode and synchronizes the configuration of the entity to be updated;

[0198] Check whether the storage pool of the entity to be updated has been restored;

[0199] In response to detecting that the storage pool of the entity to be updated has been restored and mounted, the shut down virtual machine is started, which refers to starting the virtual machine shut down before the upgrade, to complete the execution of the update task, and exits if the polling times out.

[0200] In some specific embodiments, Fig. 9 As shown, in response to detecting that the target update mode is a rolling hot upgrade, controlling the entity to be updated to perform a corresponding update task includes:

[0201] In response to detecting an update task, determining whether the entity to be updated belongs to the primary and standby management nodes. This step is to give priority to processing the entities to be updated corresponding to the primary and standby management nodes;

[0202] In response to detecting that the entity to be updated belongs to the primary and standby management nodes, controlling the entity to be updated to enter a maintenance mode;

[0203] In response to detecting that the entity to be updated has entered a maintenance mode, detecting whether there is a running virtual machine in the entity to be updated;

[0204] In response to detecting the existence of a running virtual machine, migrating the running virtual machine, wherein generally the virtual machine is migrated to another host that does not need to be updated;

[0205] In response to detecting that the running virtual machine has been successfully migrated, updating the entity to be updated in the target partition, wherein, as above, the target partition is the second partition for updating;

[0206] In response to detecting that the entity to be updated has been successfully updated, installing a third-party package, refreshing the boot item, and restarting the entity to be updated, the steps are the same as above and will not be repeated here;

[0207] In response to detecting that the entity to be updated has been successfully restarted, exiting the maintenance mode and synchronizing the configuration of the entity to be updated;

[0208] Check whether the storage pool of the entity to be updated has been restored and mounted. This step is the same as above and will not be repeated here;

[0209] In response to detecting that the storage pool of the entity to be updated has been restored and mounted, the virtual machine is migrated back, that is, the migrated virtual machine is migrated back to the original host to complete the execution of the update task.

[0210] In some specific implementations, in response to detecting that the target update mode is a rolling hot upgrade, controlling the entity to be updated to perform a corresponding update task includes:

[0211] In response to detecting an update task, determining whether the entity to be updated belongs to a primary or standby management node;

[0212] In response to detecting that the entity to be updated does not belong to the primary and standby management nodes, determining whether the entities to be updated that belong to the primary and standby management nodes have been updated. This step is to give priority to updating the entities to be updated corresponding to the primary and standby management nodes in the system;

[0213] In response to detecting that all entities to be updated belonging to the primary and standby management nodes have completed updating, controlling the entities to be updated to enter a maintenance mode;

[0214] In response to detecting that the entity to be updated has entered a maintenance mode, detecting whether there is a running virtual machine in the entity to be updated;

[0215] In response to detecting the existence of a running virtual machine, migrating the running virtual machine;

[0216] In response to detecting that the running virtual machine has been successfully migrated, updating the entity to be updated in the target partition, wherein, as above, the target partition is the second partition for updating;

[0217] In response to detecting that the entity to be updated has been successfully updated, installing the third-party package, refreshing the boot item, and restarting the entity to be updated, as described above, which will not be repeated here;

[0218] In response to detecting that the entity to be updated has been successfully restarted, exiting the maintenance mode and synchronizing the configuration of the entity to be updated;

[0219] Check whether the storage pool of the entity to be updated has been restored and mounted;

[0220] In response to detecting that the storage pool of the entity to be updated has been restored and mounted, the virtual machine is migrated back to complete the execution of the update task.

[0221] In some specific implementations, in response to detecting that the target update mode is a rolling hot upgrade, controlling the entity to be updated to perform a corresponding update task includes:

[0222] In response to detecting an update task, determining whether the entity to be updated belongs to a primary or standby management node;

[0223] In response to detecting that the entity to be updated does not belong to the primary and standby management nodes, determining whether all entities to be updated that belong to the primary and standby management nodes have been updated;

[0224] In response to detecting that there is a target entity to be updated that belongs to the primary and standby management nodes and has not been updated, controlling the target entity to be updated to enter a maintenance mode, wherein the target entity to be updated is an entity to be updated corresponding to the primary and standby management nodes and has not been updated;

[0225] In response to detecting that the target entity to be updated has entered a maintenance mode, detecting whether there is a running virtual machine in the target entity to be updated;

[0226] In response to detecting the existence of a running virtual machine, migrating the running virtual machine;

[0227] In response to detecting that the running virtual machine has been successfully migrated, updating the target entity to be updated in the target partition;

[0228] In response to detecting that the target entity to be updated has been successfully updated, installing a third-party package, refreshing the boot item, and restarting the target entity to be updated;

[0229] In response to detecting that the target entity to be updated has been successfully restarted, exiting the maintenance mode and synchronizing the configuration of the target entity to be updated;

[0230] Check whether the storage pool of the target entity to be updated has been restored and mounted;

[0231] In response to detecting that the storage pool of the target entity to be updated has been restored and mounted, the virtual machine is migrated back to complete the execution of the update task.

[0232] In some embodiments, the method further comprises:

[0233] In response to detecting that the virtual machine has not been successfully migrated or the storage pool has not been restored or the virtual machine has not been successfully migrated back, it is re-determined whether the entity to be updated belongs to the primary or standby management node, and the above steps are repeated repeatedly until the update is completed.

[0234] In the above implementation, different migration strategies are proposed for different migration methods to achieve upgrading from any current version to the latest version, thereby greatly meeting the personalized business needs of users and improving the flexibility, usability and maintainability of virtualization system updates.

[0235] In some specific embodiments, Fig.10 As shown, before migrating the virtual machine, the method further includes:

[0236] Based on a preset function, the storage pool usage rate after the virtual machine migration is calculated and determined, wherein the preset function includes:

[0237] ;

[0238] in, K Indicates the storage pool usage after the virtual machine is migrated. x Indicates the storage pool usage. y Indicates the total capacity of the storage pool. D Indicates the current virtual machine disk capacity. f Indicates the total capacity of the storage pool, which refers to the storage pool of the target host;

[0239] In response to detecting that the storage pool usage after the virtual machine migration is greater than a second preset threshold, a target number of virtual machines are shut down, wherein the second preset threshold can be set according to actual needs, such as 90%, that is, the storage pool usage cannot be higher than a certain value (such as 90%), to avoid virtual machines being suspended due to excessive storage pool load after migration.

[0240] In some specific embodiments, the method for determining the target quantity includes:

[0241] Sort the virtual machines in descending order according to their importance. The importance of the virtual machines here is mainly determined by the importance of the tasks they process. Generally, professionals can evaluate the corresponding importance and sort them, with the more important ones being placed in front and the less important ones being placed in the back.

[0242] Based on the preset intervals, the sorted virtual machines are divided to obtain multiple virtual machine intervals, and based on the sum of the importance of the virtual machines in the intervals, the virtual machine intervals are marked in descending order, wherein the preset intervals may be divided in numerical form, such as if there are 100 virtual machines, then the value corresponding to the preset interval is 5, that is, 5 virtual machines are defined as a group in order and marked, such as the first interval is marked as 20, the second interval is marked as 19, and so on, wherein the virtual machine interval corresponding to the mark 20 has the largest sum of importance;

[0243] Determine the excess amount of storage pool resource usage according to the difference between the storage pool usage rate after the virtual machine migration and the second preset threshold value. For example, if the storage pool usage rate after the virtual machine migration is 95% and the second preset threshold value is 90%, the excess amount of storage pool resource usage is 5%;

[0244] Based on the excess usage of the storage pool resources, determine the virtual machine intervals that need to shut down virtual machines in order of marking from low to high, that is, shut down virtual machines that are less important and may cause excessive load after migration;

[0245] In response to detecting that all virtual machines in the target virtual machine interval do not need to be shut down, the virtual machines that need to be shut down in the target virtual machine interval are matched and determined according to the current excess storage pool resource usage and the resource occupancy of each virtual machine in the target virtual machine interval. Specifically, if it is determined that the virtual machine intervals that need to be shut down are 2 plus some virtual machines in the third virtual machine interval according to the excess storage pool resource usage and the virtual machine resource occupancy of each virtual machine interval, then it is determined how much excess storage pool resource usage is left after shutting down the virtual machines in the two virtual machine intervals, and according to the excess, a single virtual machine or a virtual machine with the closest excess after cumulative addition in the third interval is selected as the virtual machine that needs to be shut down, wherein the resource occupancy of a single virtual machine is compared first, and then the accumulated resource occupancy of multiple virtual machines is considered, thereby reducing the number of virtual machines to be shut down to avoid problems such as business data loss;

[0246] The target number is determined based on the virtual machines that need to be shut down, that is, the corresponding number is determined according to the virtual machines that need to be shut down. For example, if two virtual machine intervals and three virtual machines in the third virtual machine interval need to be shut down, the corresponding target number is 13.

[0247] In some specific implementations, the virtual machine migration method includes:

[0248] Get the currently running virtual machines in the entity to be updated, generate a one-to-one mapping relationship, and sort them in descending order according to the load of the virtual machine. The load of the virtual machine can be determined according to the operation status of the memory computing logic memory, memory, CPU, and disk. Sorting them is to facilitate the subsequent priority matching of the target host for the virtual machine with high load, so as to avoid the situation where the large configuration virtual machine is scheduled last and cannot find an available host, thus preventing the upgrade;

[0249] Determine the migration method of the virtual machine based on the storage area of ​​the virtual machine. If the virtual machine is on shared storage, use computing migration. If the virtual machine is on local storage, use whole machine migration. Computing migration only changes the host, while whole machine migration is cross-host and cross-storage migration.

[0250] Obtain a list of target entities, and based on the sorting order and the target migration method, gradually migrate the virtual machines to the target entities in a multi-threaded manner, wherein the target entity refers to a host that does not need to be updated, and migrate the virtual machines in order of load from large to small and in a corresponding migration method.

[0251] Specifically, before the virtual machine is migrated, a list of virtual machines running on the host is obtained and a set of virtual machines and target hosts is created. The list of virtual machines is traversed. At the same time, a list of non-host machines where the current virtual machine is not running and a list of hosts where the current virtual machine is running are traversed. The virtual machines that need to be migrated are determined based on the virtual machine storage area and storage pool, and the virtual machines and the current host are added to the value pairing combination. At this time, the pairing set is traversed and the corresponding virtual machines are migrated.

[0252] Furthermore, when a virtual machine selects a target host, the following principles must be met: To avoid queuing and wasting time when all virtual machines are migrated to the same host, if the target host meets the conditions, virtual machines should be migrated to different hosts as much as possible, and as many virtual machines as possible should be migrated concurrently; virtual machines running on the host should be sorted from high to low according to load (memory calculation logical memory, and memory, CPU, disk, etc. should also be considered), and target hosts should be matched with high-load virtual machines first to avoid the situation where large-configuration virtual machines are scheduled last and cannot find available hosts, thus preventing upgrades; during the upgrade process, the speed limit for migrating virtual machines should be canceled or increased as much as possible; on shared storage The virtual machines on the local storage use compute migration, and the virtual machines on the local storage use whole machine migration. When calculating whether the storage pool capacity is sufficient, not only the utilization rate but also the remaining capacity is considered. The storage pool utilization rate after the virtual machine migration is calculated through a preset function. The lower the utilization rate, the higher the priority. The final storage pool utilization rate cannot be higher than a certain value (90%) to avoid virtual machine suspension due to excessive storage pool load after migration. Reduce the number of virtual machine migrations. A virtual machine is only migrated twice, namely, migration out and migration back. Provide a method to support migration planning before upgrading, and organize it into a migration planning configuration file in a specific format. When migrating virtual machines, migration is performed according to this configuration file first.

[0253] Furthermore, the present application configures corresponding upgrade strategies for different upgrade methods. After selecting the entity to be updated and the update package, the system will perform an environmental test. If the test passes, it will give a recommended upgrade method based on the update package information and the specific situation of the selected entity to be updated. The upgrade strategies corresponding to different upgrade methods are also different. For example, cold upgrade supports the configuration of restart method. The restart method supports immediate restart, manual restart and scheduled restart. Rolling hot upgrade supports the hosts in the cluster to adjust the upgrade order, and rolling hot upgrade will perform a pre-migration check before the upgrade. If the virtual machine of a certain node does not support migration to other hosts, an error will be reported to the user to prevent the upgrade. The rolling hot upgrade and cold upgrade of the update package, if the user wants to roll back after the update, it can support rolling back to the previous version. Just refresh the boot item and restart and switch to the original partition. After the update task is issued, it supports the display of upgrade details in the form of a carousel, including the start time, end time, status, description and other information of each key update step of the node updated by the task, and also displays the overall progress and total time of the entire update task. After the update is successful, the update information of each node will be recorded in the update history.

[0254] In the above implementation, by determining the number of virtual machines that need to be shut down and shutting down the corresponding number of virtual machines before migration, it is avoided that the virtual machines are suspended due to excessive storage pool load after migration, and the virtual machines are migrated concurrently to avoid the situation where a large-configuration virtual machine is last scheduled and cannot find an available host, thereby preventing the upgrade, thereby improving the reliability of the virtualization system update.

[0255] In the above-mentioned virtualization system update method, the method includes: obtaining at least one update package, and based on the constructed entity to be updated, determining a target update package from the update package, wherein the virtualization system includes at least one entity to be updated; based on the entity to be updated and the target update package, determining a target update method, wherein the update method at least includes in-place hot upgrade, rolling hot upgrade and cold upgrade; based on the target update method and the target update package, controlling the entity to be updated to perform a corresponding update task. The present application can be applied to a multi-architecture virtualization environment, and can provide different update methods and corresponding update strategies according to different environments and various update scenarios, thereby improving the flexibility of virtualization system updates, avoiding a series of problems caused by manual operation errors, improving the reliability and maintainability of virtualization system updates, and reducing costs.

[0256] It should be understood that although Figure 2-Figure 3 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2-Figure 3 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.

[0257] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Fig.11 As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a virtualization system update method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.

[0258] Those skilled in the art will understand that Fig.11 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0259] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:

[0260] S1: obtaining at least one update package, and determining a target update package from the update packages based on the constructed entity to be updated, wherein the virtualization system includes at least one entity to be updated;

[0261] S2: Determine a target update mode based on a first time value of the entity to be updated and a second time value of the target update package, wherein the update mode includes at least in-place hot upgrade, rolling hot upgrade and cold upgrade, the first time value is used to describe the duration of the entity to be updated that can be used for restarting, and the second time value is used to describe the update duration of the update package;

[0262] S3: Based on the target update mode and the target update package, control the entity to be updated to execute a corresponding update task.

[0263] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0264] Check whether the name of the update package meets the preset standard;

[0265] In response to detecting that the name of the update package meets a preset standard, decompressing and parsing the update package;

[0266] Verify the parsed update package;

[0267] In response to detecting that the update package has passed the verification, storing the parsed update package in the database of the master node;

[0268] At the same time, check whether there is a backup node;

[0269] In response to detecting the existence of a standby node, the parsed update package is synchronized to a database of the standby node.

[0270] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0271] Acquire attribute parameters of the entity, and filter the attribute parameters to obtain attribute parameters for updating;

[0272] The entity to be updated is generated based on the mapping relationship formed between the attribute parameters for updating and the corresponding entity.

[0273] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0274] Get the attribute parameters of the entity to be updated;

[0275] Based on the attribute parameters of the entity to be updated, the update packages in the database are matched, and the update package that is successfully matched is defined as the target update package.

[0276] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0277] Acquire a business scenario to which the entity to be updated belongs, and determine a first time value based on the business scenario;

[0278] Obtaining a second time value corresponding to the target update package;

[0279] In response to detecting that the first time value is less than or equal to a first preset threshold, determining that the target update mode is a rolling hot upgrade or an in-place hot upgrade;

[0280] In response to detecting that the first time value is greater than a first preset threshold, comparing the first time value and the second time value;

[0281] Based on the comparison results, the target update method is determined.

[0282] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0283] In response to detecting that the second time value is less than or equal to the first time value, and the time range between the current time and the target time is within a preset time range, determining that the target update mode is a cold upgrade;

[0284] In response to detecting that the second time value is greater than the first time value, and the time range between the current moment and the target moment is within a preset time range, determining that the target update mode is a cold upgrade, an in-place hot upgrade, or a rolling hot upgrade;

[0285] In response to detecting that the first time value is greater than a first preset threshold and the time range between the current time and the target time is not within the preset time range, determining that the target update mode is an in-place hot upgrade or a rolling hot upgrade.

[0286] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0287] In response to detecting that a business resource migration is required, determining that a target update mode is a rolling hot upgrade;

[0288] In response to detecting that no business resource migration is required, determining that the target update mode is an in-place hot upgrade.

[0289] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0290] Build inspection result sets and inspection items;

[0291] Based on the inspection items, inspect the environment of the virtualization system, and add the inspection results to the inspection result set;

[0292] In response to detecting that all check items in the check result set are marked as passed, the to-be-updated entity is controlled to execute a corresponding update task based on the target update mode and the target update package.

[0293] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0294] In response to detecting an update task, controlling the entity to be updated to enter a maintenance mode;

[0295] In response to detecting that the entity to be updated has entered a maintenance mode, updating the entity to be updated based on the target update package;

[0296] In response to detecting the update result, the maintenance mode is exited, and the configuration of the entity to be updated is synchronized to complete the execution of the update task.

[0297] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0298] In response to detecting an update task, controlling the entity to be updated to enter a maintenance mode;

[0299] In response to detecting that the entity to be updated has entered a maintenance mode, updating the entity to be updated in a target partition based on the target update package;

[0300] In response to detecting that there is an entity to be updated that has been updated in the virtualization system, detecting whether the entity to be updated corresponding to the active and standby management nodes has been restarted;

[0301] In response to detecting that the entities to be updated corresponding to the active and standby management nodes have all been restarted, installing a third-party package, refreshing the boot item, and shutting down the virtual machine running in the entity to be updated;

[0302] In response to detecting that all virtual machines running in the entity to be updated have been successfully shut down, restarting the entity to be updated;

[0303] In response to detecting that at least one running virtual machine in the entities to be updated has not been successfully shut down, re-detecting whether there are entities to be updated that have been updated in the virtualization system, and repeating the cycle.

[0304] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0305] Check whether the entity to be updated currently belongs to the primary and backup management nodes;

[0306] In response to detecting that the current entity to be updated belongs to the primary and standby management nodes, installing a third-party package, refreshing the boot item, and shutting down the virtual machine running in the current entity to be updated;

[0307] In response to detecting that all virtual machines running in the entity to be updated have been successfully shut down, restarting the entity to be updated;

[0308] In response to detecting that at least one running virtual machine in the entities to be updated has not been successfully shut down, re-detecting whether there is an entity to be updated that has been updated in the virtualization system, and repeating the process in a loop;

[0309] In response to detecting that the current node is not the active / standby management node and that there are entities to be updated corresponding to the active / standby management nodes that have not been restarted, re-detecting whether there are entities to be updated that have been updated in the virtualization system, and repeating the cycle.

[0310] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0311] Exit maintenance mode and synchronize the configuration of the entity to be updated;

[0312] Check whether the storage pool of the entity to be updated has been restored and mounted;

[0313] In response to detecting that the storage pool of the entity to be updated has been restored to mount, the shut down virtual machine is started to complete the execution of the update task.

[0314] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0315] In response to detecting an update task, determining whether the entity to be updated belongs to a primary or standby management node;

[0316] In response to detecting that the entity to be updated belongs to the primary and standby management nodes, controlling the entity to be updated to enter a maintenance mode;

[0317] In response to detecting that the entity to be updated has entered a maintenance mode, detecting whether there is a running virtual machine in the entity to be updated;

[0318] In response to detecting the existence of a running virtual machine, migrating the running virtual machine;

[0319] In response to detecting that the running virtual machine has been successfully migrated, updating the entity to be updated in the target partition;

[0320] In response to detecting that the entity to be updated has been successfully updated, installing a third-party package, refreshing the boot item, and restarting the entity to be updated;

[0321] In response to detecting that the entity to be updated has been successfully restarted, exiting the maintenance mode and synchronizing the configuration of the entity to be updated;

[0322] Check whether the storage pool of the entity to be updated has been restored and mounted;

[0323] In response to detecting that the storage pool of the entity to be updated has been restored and mounted, the virtual machine is migrated back to complete the execution of the update task.

[0324] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0325] In response to detecting an update task, determining whether the entity to be updated belongs to a primary or standby management node;

[0326] In response to detecting that the entity to be updated does not belong to the primary and standby management nodes, determining whether all entities to be updated that belong to the primary and standby management nodes have been updated;

[0327] In response to detecting that all entities to be updated belonging to the primary and standby management nodes have completed updating, controlling the entities to be updated to enter a maintenance mode;

[0328] In response to detecting that the entity to be updated has entered a maintenance mode, detecting whether there is a running virtual machine in the entity to be updated;

[0329] In response to detecting the existence of a running virtual machine, migrating the running virtual machine;

[0330] In response to detecting that the running virtual machine has been successfully migrated, updating the entity to be updated in the target partition;

[0331] In response to detecting that the entity to be updated has been successfully updated, installing a third-party package, refreshing the boot item, and restarting the entity to be updated;

[0332] In response to detecting that the entity to be updated has been successfully restarted, exiting the maintenance mode and synchronizing the configuration of the entity to be updated;

[0333] Check whether the storage pool of the entity to be updated has been restored and mounted;

[0334] In response to detecting that the storage pool of the entity to be updated has been restored and mounted, the virtual machine is migrated back to complete the execution of the update task.

[0335] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0336] In response to detecting an update task, determining whether the entity to be updated belongs to a primary or standby management node;

[0337] In response to detecting that the entity to be updated does not belong to the primary and standby management nodes, determining whether all entities to be updated that belong to the primary and standby management nodes have been updated;

[0338] In response to detecting that there is a target entity to be updated that belongs to the primary and standby management nodes and has not been updated, controlling the target entity to be updated to enter a maintenance mode;

[0339] In response to detecting that the target entity to be updated has entered a maintenance mode, detecting whether there is a running virtual machine in the target entity to be updated;

[0340] In response to detecting the existence of a running virtual machine, migrating the running virtual machine;

[0341] In response to detecting that the running virtual machine has been successfully migrated, updating the target entity to be updated in the target partition;

[0342] In response to detecting that the target entity to be updated has been successfully updated, installing a third-party package, refreshing the boot item, and restarting the target entity to be updated;

[0343] In response to detecting that the target entity to be updated has been successfully restarted, exiting the maintenance mode and synchronizing the configuration of the target entity to be updated;

[0344] Check whether the storage pool of the target entity to be updated has been restored and mounted;

[0345] In response to detecting that the storage pool of the target entity to be updated has been restored and mounted, the virtual machine is migrated back to complete the execution of the update task.

[0346] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0347] In response to detecting that the virtual machine has not been successfully migrated or the storage pool has not been restored or the virtual machine has not been successfully migrated back, it is re-determined whether the entity to be updated belongs to the primary or standby management node, and the process is repeated.

[0348] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0349] Based on a preset function, the storage pool usage rate after the virtual machine migration is calculated and determined, wherein the preset function includes:

[0350] ;

[0351] in, K Indicates the storage pool usage after the virtual machine is migrated. x Indicates the storage pool usage. y Indicates the total capacity of the storage pool. D Indicates the current virtual machine disk capacity. f Indicates the total capacity of the storage pool;

[0352] In response to detecting that the storage pool usage rate after the migration of the virtual machine is greater than a second preset threshold, shutting down a target number of virtual machines.

[0353] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0354] Sort the virtual machines in descending order according to their importance;

[0355] Based on the preset intervals, the sorted virtual machines are divided to obtain multiple virtual machine intervals, and the virtual machine intervals are marked in descending order based on the sum of the importance of the virtual machines in the intervals;

[0356] Determining an excess amount of storage pool resource usage according to a difference between the storage pool usage rate after the virtual machine migration and a second preset threshold;

[0357] Based on the excess usage of the storage pool resources, determine the virtual machine intervals that need to shut down the virtual machines in order of marking from low to high;

[0358] In response to detecting that all virtual machines in the target virtual machine interval do not need to be shut down, matching and determining virtual machines in the target virtual machine interval that need to be shut down according to the current excess storage pool resource usage and the resource occupancy of each virtual machine in the target virtual machine interval;

[0359] The target number is determined based on the virtual machines that need to be shut down.

[0360] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0361] Obtain the currently running virtual machines in the entity to be updated, generate a one-to-one mapping relationship, and sort them in descending order according to the load of the virtual machines;

[0362] Determine the migration method of the virtual machine based on the storage area of ​​the virtual machine;

[0363] A target entity list is obtained, and based on a sorting order and a target migration mode, the virtual machines are gradually migrated to the target entities in a multi-threaded manner.

[0364] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0365] S1: obtaining at least one update package, and determining a target update package from the update packages based on the constructed entity to be updated, wherein the virtualization system includes at least one entity to be updated;

[0366] S2: Determine a target update mode based on a first time value of the entity to be updated and a second time value of the target update package, wherein the update mode includes at least in-place hot upgrade, rolling hot upgrade and cold upgrade, the first time value is used to describe the duration of the entity to be updated that can be used for restarting, and the second time value is used to describe the update duration of the update package;

[0367] S3: Based on the target update mode and the target update package, control the entity to be updated to execute a corresponding update task.

[0368] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0369] Check whether the name of the update package meets the preset standard;

[0370] In response to detecting that the name of the update package meets a preset standard, decompressing and parsing the update package;

[0371] Verify the parsed update package;

[0372] In response to detecting that the update package has passed the verification, storing the parsed update package in the database of the master node;

[0373] At the same time, check whether there is a backup node;

[0374] In response to detecting the existence of a standby node, the parsed update package is synchronized to a database of the standby node.

[0375] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0376] Acquire attribute parameters of the entity, and filter the attribute parameters to obtain attribute parameters for updating;

[0377] The entity to be updated is generated based on the mapping relationship formed between the attribute parameters for updating and the corresponding entity.

[0378] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0379] Get the attribute parameters of the entity to be updated;

[0380] Based on the attribute parameters of the entity to be updated, the update packages in the database are matched, and the update package that is successfully matched is defined as the target update package.

[0381] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0382] Acquire a business scenario to which the entity to be updated belongs, and determine a first time value based on the business scenario;

[0383] Obtaining a second time value corresponding to the target update package;

[0384] In response to detecting that the first time value is less than or equal to a first preset threshold, determining that the target update mode is a rolling hot upgrade or an in-place hot upgrade;

[0385] In response to detecting that the first time value is greater than a first preset threshold, comparing the first time value and the second time value;

[0386] Based on the comparison results, the target update method is determined.

[0387] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0388] In response to detecting that the second time value is less than or equal to the first time value, and the time range between the current time and the target time is within a preset time range, determining that the target update mode is a cold upgrade;

[0389] In response to detecting that the second time value is greater than the first time value, and the time range between the current moment and the target moment is within a preset time range, determining that the target update mode is a cold upgrade, an in-place hot upgrade, or a rolling hot upgrade;

[0390] In response to detecting that the first time value is greater than a first preset threshold and the time range between the current time and the target time is not within the preset time range, determining that the target update mode is an in-place hot upgrade or a rolling hot upgrade.

[0391] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0392] In response to detecting that a business resource migration is required, determining that a target update mode is a rolling hot upgrade;

[0393] In response to detecting that no business resource migration is required, determining that the target update mode is an in-place hot upgrade.

[0394] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0395] Build inspection result sets and inspection items;

[0396] Based on the inspection items, inspect the environment of the virtualization system, and add the inspection results to the inspection result set;

[0397] In response to detecting that all check items in the check result set are marked as passed, the to-be-updated entity is controlled to execute a corresponding update task based on the target update mode and the target update package.

[0398] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0399] In response to detecting an update task, controlling the entity to be updated to enter a maintenance mode;

[0400] In response to detecting that the entity to be updated has entered a maintenance mode, updating the entity to be updated based on the target update package;

[0401] In response to detecting the update result, the maintenance mode is exited, and the configuration of the entity to be updated is synchronized to complete the execution of the update task.

[0402] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0403] In response to detecting an update task, controlling the entity to be updated to enter a maintenance mode;

[0404] In response to detecting that the entity to be updated has entered a maintenance mode, updating the entity to be updated in a target partition based on the target update package;

[0405] In response to detecting that there is an entity to be updated that has been updated in the virtualization system, detecting whether the entity to be updated corresponding to the active and standby management nodes has been restarted;

[0406] In response to detecting that the entities to be updated corresponding to the active and standby management nodes have all been restarted, installing a third-party package, refreshing the boot item, and shutting down the virtual machine running in the entity to be updated;

[0407] In response to detecting that all virtual machines running in the entity to be updated have been successfully shut down, restarting the entity to be updated;

[0408] In response to detecting that at least one running virtual machine in the entities to be updated has not been successfully shut down, re-detecting whether there are entities to be updated that have been updated in the virtualization system, and repeating the cycle.

[0409] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0410] Check whether the entity to be updated currently belongs to the primary and backup management nodes;

[0411] In response to detecting that the current entity to be updated belongs to the primary and standby management nodes, installing a third-party package, refreshing the boot item, and shutting down the virtual machine running in the current entity to be updated;

[0412] In response to detecting that all virtual machines running in the entity to be updated have been successfully shut down, restarting the entity to be updated;

[0413] In response to detecting that at least one running virtual machine in the entities to be updated has not been successfully shut down, re-detecting whether there is an entity to be updated that has been updated in the virtualization system, and repeating the process in a loop;

[0414] In response to detecting that the current node is not the active / standby management node and that there are entities to be updated corresponding to the active / standby management nodes that have not been restarted, re-detecting whether there are entities to be updated that have been updated in the virtualization system, and repeating the cycle.

[0415] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0416] Exit maintenance mode and synchronize the configuration of the entity to be updated;

[0417] Check whether the storage pool of the entity to be updated has been restored and mounted;

[0418] In response to detecting that the storage pool of the entity to be updated has been restored to mount, the shut down virtual machine is started to complete the execution of the update task.

[0419] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0420] In response to detecting an update task, determining whether the entity to be updated belongs to a primary or standby management node;

[0421] In response to detecting that the entity to be updated belongs to the primary and standby management nodes, controlling the entity to be updated to enter a maintenance mode;

[0422] In response to detecting that the entity to be updated has entered a maintenance mode, detecting whether there is a running virtual machine in the entity to be updated;

[0423] In response to detecting the existence of a running virtual machine, migrating the running virtual machine;

[0424] In response to detecting that the running virtual machine has been successfully migrated, updating the entity to be updated in the target partition;

[0425] In response to detecting that the entity to be updated has been successfully updated, installing a third-party package, refreshing the boot item, and restarting the entity to be updated;

[0426] In response to detecting that the entity to be updated has been successfully restarted, exiting the maintenance mode and synchronizing the configuration of the entity to be updated;

[0427] Check whether the storage pool of the entity to be updated has been restored and mounted;

[0428] In response to detecting that the storage pool of the entity to be updated has been restored and mounted, the virtual machine is migrated back to complete the execution of the update task.

[0429] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0430] In response to detecting an update task, determining whether the entity to be updated belongs to a primary or standby management node;

[0431] In response to detecting that the entity to be updated does not belong to the primary and standby management nodes, determining whether all entities to be updated that belong to the primary and standby management nodes have been updated;

[0432] In response to detecting that all entities to be updated belonging to the primary and standby management nodes have completed updating, controlling the entities to be updated to enter a maintenance mode;

[0433] In response to detecting that the entity to be updated has entered a maintenance mode, detecting whether there is a running virtual machine in the entity to be updated;

[0434] In response to detecting the existence of a running virtual machine, migrating the running virtual machine;

[0435] In response to detecting that the running virtual machine has been successfully migrated, updating the entity to be updated in the target partition;

[0436] In response to detecting that the entity to be updated has been successfully updated, installing a third-party package, refreshing the boot item, and restarting the entity to be updated;

[0437] In response to detecting that the entity to be updated has been successfully restarted, exiting the maintenance mode and synchronizing the configuration of the entity to be updated;

[0438] Check whether the storage pool of the entity to be updated has been restored and mounted;

[0439] In response to detecting that the storage pool of the entity to be updated has been restored and mounted, the virtual machine is migrated back to complete the execution of the update task.

[0440] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0441] In response to detecting an update task, determining whether the entity to be updated belongs to a primary or standby management node;

[0442] In response to detecting that the entity to be updated does not belong to the primary and standby management nodes, determining whether all entities to be updated that belong to the primary and standby management nodes have been updated;

[0443] In response to detecting that there is a target entity to be updated that belongs to the primary and standby management nodes and has not been updated, controlling the target entity to be updated to enter a maintenance mode;

[0444] In response to detecting that the target entity to be updated has entered a maintenance mode, detecting whether there is a running virtual machine in the target entity to be updated;

[0445] In response to detecting the existence of a running virtual machine, migrating the running virtual machine;

[0446] In response to detecting that the running virtual machine has been successfully migrated, updating the target entity to be updated in the target partition;

[0447] In response to detecting that the target entity to be updated has been successfully updated, installing a third-party package, refreshing the boot item, and restarting the target entity to be updated;

[0448] In response to detecting that the target entity to be updated has been successfully restarted, exiting the maintenance mode and synchronizing the configuration of the target entity to be updated;

[0449] Check whether the storage pool of the target entity to be updated has been restored and mounted;

[0450] In response to detecting that the storage pool of the target entity to be updated has been restored and mounted, the virtual machine is migrated back to complete the execution of the update task.

[0451] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0452] In response to detecting that the virtual machine has not been successfully migrated or the storage pool has not been restored or the virtual machine has not been successfully migrated back, it is re-determined whether the entity to be updated belongs to the primary or standby management node, and the process is repeated.

[0453] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0454] Based on a preset function, the storage pool usage rate after the virtual machine migration is calculated and determined, wherein the preset function includes:

[0455] ;

[0456] in, K Indicates the storage pool usage after the virtual machine is migrated. x Indicates the storage pool usage. y Indicates the total capacity of the storage pool. D Indicates the current virtual machine disk capacity. f Indicates the total capacity of the storage pool;

[0457] In response to detecting that the storage pool usage rate after the migration of the virtual machine is greater than a second preset threshold, shutting down a target number of virtual machines.

[0458] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0459] Sort the virtual machines in descending order according to their importance;

[0460] Based on the preset intervals, the sorted virtual machines are divided to obtain multiple virtual machine intervals, and the virtual machine intervals are marked in descending order based on the sum of the importance of the virtual machines in the intervals;

[0461] Determining an excess amount of storage pool resource usage according to a difference between the storage pool usage rate after the virtual machine migration and a second preset threshold;

[0462] Based on the excess usage of the storage pool resources, determine the virtual machine intervals that need to shut down the virtual machines in order of marking from low to high;

[0463] In response to detecting that all virtual machines in the target virtual machine interval do not need to be shut down, matching and determining virtual machines in the target virtual machine interval that need to be shut down according to the current excess storage pool resource usage and the resource occupancy of each virtual machine in the target virtual machine interval;

[0464] The target number is determined based on the virtual machines that need to be shut down.

[0465] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0466] Obtain the currently running virtual machines in the entity to be updated, generate a one-to-one mapping relationship, and sort them in descending order according to the load of the virtual machines;

[0467] Determine the migration method of the virtual machine based on the storage area of ​​the virtual machine;

[0468] A target entity list is obtained, and based on a sorting order and a target migration mode, the virtual machines are gradually migrated to the target entities in a multi-threaded manner.

[0469] In one embodiment, a computer program product is provided, the computer program product comprising a computer program, the computer program when executed by a processor implements the following steps:

[0470] S1: obtaining at least one update package, and determining a target update package from the update packages based on the constructed entity to be updated, wherein the virtualization system includes at least one entity to be updated;

[0471] S2: Determine a target update mode based on a first time value of the entity to be updated and a second time value of the target update package, wherein the update mode includes at least in-place hot upgrade, rolling hot upgrade and cold upgrade, the first time value is used to describe the duration of the entity to be updated that can be used for restarting, and the second time value is used to describe the update duration of the update package;

[0472] S3: Based on the target update mode and the target update package, control the entity to be updated to execute a corresponding update task.

[0473] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0474] Check whether the name of the update package meets the preset standard;

[0475] In response to detecting that the name of the update package meets a preset standard, decompressing and parsing the update package;

[0476] Verify the parsed update package;

[0477] In response to detecting that the update package has passed the verification, storing the parsed update package in the database of the master node;

[0478] At the same time, check whether there is a backup node;

[0479] In response to detecting the existence of a standby node, the parsed update package is synchronized to a database of the standby node.

[0480] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0481] Acquire attribute parameters of the entity, and filter the attribute parameters to obtain attribute parameters for updating;

[0482] The entity to be updated is generated based on the mapping relationship formed between the attribute parameters for updating and the corresponding entity.

[0483] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0484] Get the attribute parameters of the entity to be updated;

[0485] Based on the attribute parameters of the entity to be updated, the update packages in the database are matched, and the update package that is successfully matched is defined as the target update package.

[0486] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0487] Acquire a business scenario to which the entity to be updated belongs, and determine a first time value based on the business scenario;

[0488] Obtaining a second time value corresponding to the target update package;

[0489] In response to detecting that the first time value is less than or equal to a first preset threshold, determining that the target update mode is a rolling hot upgrade or an in-place hot upgrade;

[0490] In response to detecting that the first time value is greater than a first preset threshold, comparing the first time value and the second time value;

[0491] Based on the comparison results, the target update method is determined.

[0492] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0493] In response to detecting that the second time value is less than or equal to the first time value, and the time range between the current time and the target time is within a preset time range, determining that the target update mode is a cold upgrade;

[0494] In response to detecting that the second time value is greater than the first time value, and the time range between the current moment and the target moment is within a preset time range, determining that the target update mode is a cold upgrade, an in-place hot upgrade, or a rolling hot upgrade;

[0495] In response to detecting that the first time value is greater than a first preset threshold and the time range between the current time and the target time is not within the preset time range, determining that the target update mode is an in-place hot upgrade or a rolling hot upgrade.

[0496] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0497] In response to detecting that a business resource migration is required, determining that a target update mode is a rolling hot upgrade;

[0498] In response to detecting that no business resource migration is required, determining that the target update mode is an in-place hot upgrade.

[0499] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0500] Build inspection result sets and inspection items;

[0501] Based on the inspection items, inspect the environment of the virtualization system, and add the inspection results to the inspection result set;

[0502] In response to detecting that all check items in the check result set are marked as passed, the to-be-updated entity is controlled to execute a corresponding update task based on the target update mode and the target update package.

[0503] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0504] In response to detecting an update task, controlling the entity to be updated to enter a maintenance mode;

[0505] In response to detecting that the entity to be updated has entered a maintenance mode, updating the entity to be updated based on the target update package;

[0506] In response to detecting the update result, the maintenance mode is exited, and the configuration of the entity to be updated is synchronized to complete the execution of the update task.

[0507] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0508] In response to detecting an update task, controlling the entity to be updated to enter a maintenance mode;

[0509] In response to detecting that the entity to be updated has entered a maintenance mode, updating the entity to be updated in a target partition based on the target update package;

[0510] In response to detecting that there is an entity to be updated that has been updated in the virtualization system, detecting whether the entity to be updated corresponding to the active and standby management nodes has been restarted;

[0511] In response to detecting that the entities to be updated corresponding to the active and standby management nodes have all been restarted, installing a third-party package, refreshing the boot item, and shutting down the virtual machine running in the entity to be updated;

[0512] In response to detecting that all virtual machines running in the entity to be updated have been successfully shut down, restarting the entity to be updated;

[0513] In response to detecting that at least one running virtual machine in the entities to be updated has not been successfully shut down, re-detecting whether there are entities to be updated that have been updated in the virtualization system, and repeating the cycle.

[0514] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0515] Check whether the entity to be updated currently belongs to the primary and backup management nodes;

[0516] In response to detecting that the current entity to be updated belongs to the primary and standby management nodes, installing a third-party package, refreshing the boot item, and shutting down the virtual machine running in the current entity to be updated;

[0517] In response to detecting that all virtual machines running in the entity to be updated have been successfully shut down, restarting the entity to be updated;

[0518] In response to detecting that at least one running virtual machine in the entities to be updated has not been successfully shut down, re-detecting whether there is an entity to be updated that has been updated in the virtualization system, and repeating the process in a loop;

[0519] In response to detecting that the current node is not the active / standby management node and that there are entities to be updated corresponding to the active / standby management nodes that have not been restarted, re-detecting whether there are entities to be updated that have been updated in the virtualization system, and repeating the cycle.

[0520] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0521] Exit maintenance mode and synchronize the configuration of the entity to be updated;

[0522] Check whether the storage pool of the entity to be updated has been restored and mounted;

[0523] In response to detecting that the storage pool of the entity to be updated has been restored to mount, the shut down virtual machine is started to complete the execution of the update task.

[0524] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0525] In response to detecting an update task, determining whether the entity to be updated belongs to a primary or standby management node;

[0526] In response to detecting that the entity to be updated belongs to the primary and standby management nodes, controlling the entity to be updated to enter a maintenance mode;

[0527] In response to detecting that the entity to be updated has entered a maintenance mode, detecting whether there is a running virtual machine in the entity to be updated;

[0528] In response to detecting the existence of a running virtual machine, migrating the running virtual machine;

[0529] In response to detecting that the running virtual machine has been successfully migrated, updating the entity to be updated in the target partition;

[0530] In response to detecting that the entity to be updated has been successfully updated, installing a third-party package, refreshing the boot item, and restarting the entity to be updated;

[0531] In response to detecting that the entity to be updated has been successfully restarted, exiting the maintenance mode and synchronizing the configuration of the entity to be updated;

[0532] Check whether the storage pool of the entity to be updated has been restored and mounted;

[0533] In response to detecting that the storage pool of the entity to be updated has been restored and mounted, the virtual machine is migrated back to complete the execution of the update task.

[0534] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0535] In response to detecting an update task, determining whether the entity to be updated belongs to a primary or standby management node;

[0536] In response to detecting that the entity to be updated does not belong to the primary and standby management nodes, determining whether all entities to be updated that belong to the primary and standby management nodes have been updated;

[0537] In response to detecting that all entities to be updated belonging to the primary and standby management nodes have completed updating, controlling the entities to be updated to enter a maintenance mode;

[0538] In response to detecting that the entity to be updated has entered a maintenance mode, detecting whether there is a running virtual machine in the entity to be updated;

[0539] In response to detecting the existence of a running virtual machine, migrating the running virtual machine;

[0540] In response to detecting that the running virtual machine has been successfully migrated, updating the entity to be updated in the target partition;

[0541] In response to detecting that the entity to be updated has been successfully updated, installing a third-party package, refreshing the boot item, and restarting the entity to be updated;

[0542] In response to detecting that the entity to be updated has been successfully restarted, exiting the maintenance mode and synchronizing the configuration of the entity to be updated;

[0543] Check whether the storage pool of the entity to be updated has been restored and mounted;

[0544] In response to detecting that the storage pool of the entity to be updated has been restored and mounted, the virtual machine is migrated back to complete the execution of the update task.

[0545] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0546] In response to detecting an update task, determining whether the entity to be updated belongs to a primary or standby management node;

[0547] In response to detecting that the entity to be updated does not belong to the primary and standby management nodes, determining whether all entities to be updated that belong to the primary and standby management nodes have been updated;

[0548] In response to detecting that there is a target entity to be updated that belongs to the primary and standby management nodes and has not been updated, controlling the target entity to be updated to enter a maintenance mode;

[0549] In response to detecting that the target entity to be updated has entered a maintenance mode, detecting whether there is a running virtual machine in the target entity to be updated;

[0550] In response to detecting the existence of a running virtual machine, migrating the running virtual machine;

[0551] In response to detecting that the running virtual machine has been successfully migrated, updating the target entity to be updated in the target partition;

[0552] In response to detecting that the target entity to be updated has been successfully updated, installing a third-party package, refreshing the boot item, and restarting the target entity to be updated;

[0553] In response to detecting that the target entity to be updated has been successfully restarted, exiting the maintenance mode and synchronizing the configuration of the target entity to be updated;

[0554] Check whether the storage pool of the target entity to be updated has been restored and mounted;

[0555] In response to detecting that the storage pool of the target entity to be updated has been restored and mounted, the virtual machine is migrated back to complete the execution of the update task.

[0556] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0557] In response to detecting that the virtual machine has not been successfully migrated or the storage pool has not been restored or the virtual machine has not been successfully migrated back, it is re-determined whether the entity to be updated belongs to the primary or standby management node, and the process is repeated.

[0558] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0559] Based on a preset function, the storage pool usage rate after the virtual machine migration is calculated and determined, wherein the preset function includes:

[0560] ;

[0561] in, K Indicates the storage pool usage after the virtual machine is migrated. x Indicates the storage pool usage. y Indicates the total capacity of the storage pool. D Indicates the current virtual machine disk capacity. f Indicates the total capacity of the storage pool;

[0562] In response to detecting that the storage pool usage rate after the migration of the virtual machine is greater than a second preset threshold, shutting down a target number of virtual machines.

[0563] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0564] Sort the virtual machines in descending order according to their importance;

[0565] Based on the preset intervals, the sorted virtual machines are divided to obtain multiple virtual machine intervals, and the virtual machine intervals are marked in descending order based on the sum of the importance of the virtual machines in the intervals;

[0566] Determining an excess amount of storage pool resource usage according to a difference between the storage pool usage rate after the virtual machine migration and a second preset threshold;

[0567] Based on the excess usage of the storage pool resources, determine the virtual machine intervals that need to shut down the virtual machines in order of marking from low to high;

[0568] In response to detecting that all virtual machines in the target virtual machine interval do not need to be shut down, matching and determining virtual machines in the target virtual machine interval that need to be shut down according to the current excess storage pool resource usage and the resource occupancy of each virtual machine in the target virtual machine interval;

[0569] The target number is determined based on the virtual machines that need to be shut down.

[0570] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0571] Obtain the currently running virtual machines in the entity to be updated, generate a one-to-one mapping relationship, and sort them in descending order according to the load of the virtual machines;

[0572] Determine the migration method of the virtual machine based on the storage area of ​​the virtual machine;

[0573] A target entity list is obtained, and based on a sorting order and a target migration mode, the virtual machines are gradually migrated to the target entities in a multi-threaded manner.

[0574] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0575] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0576] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application.

Claims

1. A virtualization system update method, characterized in that: The method comprises: Acquire at least one update package, and determine a target update package from the update packages based on the constructed entity to be updated, wherein the virtualization system includes at least one entity to be updated; Based on the first time value of the entity to be updated and the second time value of the target update package, a target update mode is determined, wherein the update mode at least includes in-place hot upgrade, rolling hot upgrade and cold upgrade, the first time value is used to describe the duration of the entity to be updated that can be used for restarting, and the second time value is used to describe the update duration of the update package, including: In response to detecting that the first time value is less than or equal to a first preset threshold, determining that the target update mode is a rolling hot upgrade or an in-place hot upgrade; In response to detecting that the first time value is greater than a first preset threshold value and the second time value is less than or equal to the first time value, and the time range between the current moment and the target moment is within a preset time range, determining that the target update mode is a cold upgrade; Based on the target update mode and the target update package, the entity to be updated is controlled to execute a corresponding update task.

2. The virtualization system updating method according to claim 1, characterized in that: Before obtaining at least one update package, the method further includes: Check whether the name of the update package meets the preset standard; In response to detecting that the name of the update package meets a preset standard, decompressing and parsing the update package; Verify the parsed update package; In response to detecting that the update package has passed the verification, storing the parsed update package in the database of the master node; At the same time, check whether there is a backup node; In response to detecting the existence of a standby node, the parsed update package is synchronized to a database of the standby node.

3. The virtualization system updating method according to claim 1, characterized in that: The method for constructing the entity to be updated includes: Acquire attribute parameters of the entity, and filter the attribute parameters to obtain attribute parameters for updating; The entity to be updated is generated based on the mapping relationship formed between the attribute parameters for updating and the corresponding entity.

4. The virtualization system updating method according to claim 1, characterized in that: The method for determining the target update package includes: Get the attribute parameters of the entity to be updated; Based on the attribute parameters of the entity to be updated, the update packages in the database are matched, and the update package that is successfully matched is defined as the target update package.

5. The virtualization system updating method according to claim 1, characterized in that: Determining the target update mode based on the first time value of the to-be-updated entity and the second time value of the target update package includes: Acquire a business scenario to which the entity to be updated belongs, and determine a first time value based on the business scenario; Obtaining a second time value corresponding to the target update package; In response to detecting that the first time value is less than or equal to a first preset threshold, determining that the target update mode is a rolling hot upgrade or an in-place hot upgrade; In response to detecting that the first time value is greater than a first preset threshold, comparing the first time value and the second time value; Based on the comparison results, the target update method is determined.

6. The virtualization system updating method according to claim 5, characterized in that: Based on the comparison results, the target update method is determined to include: In response to detecting that the second time value is less than or equal to the first time value, and the time range between the current time and the target time is within a preset time range, determining that the target update mode is a cold upgrade; In response to detecting that the second time value is greater than the first time value, and the time range between the current moment and the target moment is within a preset time range, determining that the target update mode is a cold upgrade, an in-place hot upgrade, or a rolling hot upgrade; In response to detecting that the first time value is greater than a first preset threshold and the time range between the current time and the target time is not within the preset time range, determining that the target update mode is an in-place hot upgrade or a rolling hot upgrade.

7. The virtualization system updating method according to claim 5 or 6, characterized in that: In response to detecting that the target update mode is an in-place hot upgrade or a rolling hot upgrade, the method further includes: In response to detecting that a business resource migration is required, determining that a target update mode is a rolling hot upgrade; In response to detecting that no business resource migration is required, determining that the target update mode is an in-place hot upgrade.

8. The virtualization system updating method according to claim 1, characterized in that: Before controlling the to-be-updated entity to perform a corresponding update task based on the target update mode and the target update package, the method further includes: Build inspection result sets and inspection items; Based on the inspection items, inspect the environment of the virtualization system, and add the inspection results to the inspection result set; In response to detecting that all check items in the check result set are marked as passed, the to-be-updated entity is controlled to execute a corresponding update task based on the target update mode and the target update package.

9. The virtualization system updating method according to claim 1, characterized in that: In response to detecting that the target update mode is an in-place hot upgrade, controlling the entity to be updated to perform a corresponding update task includes: In response to detecting an update task, controlling the entity to be updated to enter a maintenance mode; In response to detecting that the entity to be updated has entered a maintenance mode, updating the entity to be updated based on the target update package; In response to detecting the update result, the maintenance mode is exited, and the configuration of the entity to be updated is synchronized to complete the execution of the update task.

10. The virtualization system updating method according to claim 1, characterized in that: In response to detecting that the target update mode is a cold upgrade, controlling the entity to be updated to perform a corresponding update task includes: In response to detecting an update task, controlling the entity to be updated to enter a maintenance mode; In response to detecting that the entity to be updated has entered a maintenance mode, updating the entity to be updated in a target partition based on the target update package; In response to detecting that there is an entity to be updated that has been updated in the virtualization system, detecting whether the entity to be updated corresponding to the active and standby management nodes has been restarted; In response to detecting that the entities to be updated corresponding to the active and standby management nodes have all been restarted, installing a third-party package, refreshing the boot item, and shutting down the virtual machine running in the entity to be updated; In response to detecting that all virtual machines running in the entity to be updated have been successfully shut down, restarting the entity to be updated; In response to detecting that at least one running virtual machine in the entities to be updated has not been successfully shut down, re-detecting whether there are entities to be updated that have been updated in the virtualization system, and repeating the cycle.

11. The virtualization system updating method according to claim 10, characterized in that: In response to detecting that there are active and standby management nodes that have not been completely restarted, the method includes: Check whether the entity to be updated currently belongs to the primary and backup management nodes; In response to detecting that the current entity to be updated belongs to the primary and standby management nodes, installing a third-party package, refreshing the boot item, and shutting down the virtual machine running in the current entity to be updated; In response to detecting that all virtual machines running in the entity to be updated have been successfully shut down, restarting the entity to be updated; In response to detecting that at least one running virtual machine in the entities to be updated has not been successfully shut down, re-detecting whether there is an entity to be updated that has been updated in the virtualization system, and repeating the process in a loop; In response to detecting that the current node is not the active / standby management node and that there are entities to be updated corresponding to the active / standby management nodes that have not been restarted, re-detecting whether there are entities to be updated that have been updated in the virtualization system, and repeating the cycle.

12. The virtualization system updating method according to claim 10, characterized in that: In response to detecting that the entity to be updated has been restarted successfully, the method includes: Exit maintenance mode and synchronize the configuration of the entity to be updated; Check whether the storage pool of the entity to be updated has been restored and mounted; In response to detecting that the storage pool of the entity to be updated has been restored to mount, the shut down virtual machine is started to complete the execution of the update task.

13. The virtualization system updating method according to claim 1, characterized in that: In response to detecting that the target update mode is a rolling hot upgrade, controlling the entity to be updated to perform a corresponding update task includes: In response to detecting an update task, determining whether the entity to be updated belongs to a primary or standby management node; In response to detecting that the entity to be updated belongs to the primary and standby management nodes, controlling the entity to be updated to enter a maintenance mode; In response to detecting that the entity to be updated has entered a maintenance mode, detecting whether there is a running virtual machine in the entity to be updated; In response to detecting the existence of a running virtual machine, migrating the running virtual machine; In response to detecting that the running virtual machine has been successfully migrated, updating the entity to be updated in the target partition; In response to detecting that the entity to be updated has been successfully updated, installing a third-party package, refreshing the boot item, and restarting the entity to be updated; In response to detecting that the entity to be updated has been successfully restarted, exiting the maintenance mode and synchronizing the configuration of the entity to be updated; Check whether the storage pool of the entity to be updated has been restored and mounted; In response to detecting that the storage pool of the entity to be updated has been restored and mounted, the virtual machine is migrated back to complete the execution of the update task.

14. The virtualization system updating method according to claim 1, characterized in that: In response to detecting that the target update mode is a rolling hot upgrade, controlling the entity to be updated to perform a corresponding update task includes: In response to detecting an update task, determining whether the entity to be updated belongs to a primary or standby management node; In response to detecting that the entity to be updated does not belong to the primary and standby management nodes, determining whether all entities to be updated that belong to the primary and standby management nodes have been updated; In response to detecting that all entities to be updated belonging to the primary and standby management nodes have completed updating, controlling the entities to be updated to enter a maintenance mode; In response to detecting that the entity to be updated has entered a maintenance mode, detecting whether there is a running virtual machine in the entity to be updated; In response to detecting the existence of a running virtual machine, migrating the running virtual machine; In response to detecting that the running virtual machine has been successfully migrated, updating the entity to be updated in the target partition; In response to detecting that the entity to be updated has been successfully updated, installing a third-party package, refreshing the boot item, and restarting the entity to be updated; In response to detecting that the entity to be updated has been successfully restarted, exiting the maintenance mode and synchronizing the configuration of the entity to be updated; Check whether the storage pool of the entity to be updated has been restored and mounted; In response to detecting that the storage pool of the entity to be updated has been restored and mounted, the virtual machine is migrated back to complete the execution of the update task.

15. The virtualization system updating method according to claim 1, characterized in that: In response to detecting that the target update mode is a rolling hot upgrade, controlling the entity to be updated to perform a corresponding update task includes: In response to detecting an update task, determining whether the entity to be updated belongs to a primary or standby management node; In response to detecting that the entity to be updated does not belong to the primary and standby management nodes, determining whether all entities to be updated that belong to the primary and standby management nodes have been updated; In response to detecting that there is a target entity to be updated that belongs to the primary and standby management nodes and has not been updated, controlling the target entity to be updated to enter a maintenance mode; In response to detecting that the target entity to be updated has entered a maintenance mode, detecting whether there is a running virtual machine in the target entity to be updated; In response to detecting the existence of a running virtual machine, migrating the running virtual machine; In response to detecting that the running virtual machine has been successfully migrated, updating the target entity to be updated in the target partition; In response to detecting that the target entity to be updated has been successfully updated, installing a third-party package, refreshing the boot item, and restarting the target entity to be updated; In response to detecting that the target entity to be updated has been successfully restarted, exiting the maintenance mode and synchronizing the configuration of the target entity to be updated; Check whether the storage pool of the target entity to be updated has been restored and mounted; In response to detecting that the storage pool of the target entity to be updated has been restored and mounted, the virtual machine is migrated back to complete the execution of the update task.

16. The virtualization system updating method according to any one of claims 13 to 15, characterized in that: The method further comprises: In response to detecting that the virtual machine has not been successfully migrated or the storage pool has not been restored or the virtual machine has not been successfully migrated back, it is re-determined whether the entity to be updated belongs to the primary or standby management node, and the process is repeated.

17. The virtualization system updating method according to any one of claims 13 to 15, characterized in that: Before migrating the virtual machine, the method further includes: Based on a preset function, the storage pool usage rate after the virtual machine migration is calculated and determined, wherein the preset function includes: ; in, K Indicates the storage pool usage after the virtual machine is migrated. x Indicates the storage pool usage. y Indicates the total capacity of the storage pool. D Indicates the current virtual machine disk capacity. f Indicates the total capacity of the storage pool; In response to detecting that the storage pool usage rate after the migration of the virtual machine is greater than a second preset threshold, shutting down a target number of virtual machines.

18. The virtualization system updating method according to claim 17, characterized in that: The method for determining the target quantity includes: Sort the virtual machines in descending order according to their importance; Based on the preset intervals, the sorted virtual machines are divided to obtain multiple virtual machine intervals, and the virtual machine intervals are marked in descending order based on the sum of the importance of the virtual machines in the intervals; Determining an excess amount of storage pool resource usage according to a difference between the storage pool usage rate after the virtual machine migration and a second preset threshold; Based on the excess usage of the storage pool resources, determine the virtual machine intervals that need to shut down the virtual machines in order of marking from low to high; In response to detecting that all virtual machines in the target virtual machine interval do not need to be shut down, matching and determining virtual machines in the target virtual machine interval that need to be shut down according to the current excess storage pool resource usage and the resource occupancy of each virtual machine in the target virtual machine interval; The target number is determined based on the virtual machines that need to be shut down.

19. The virtualization system updating method according to claim 17, characterized in that: The virtual machine migration method includes: Obtain the currently running virtual machines in the entity to be updated, generate a one-to-one mapping relationship, and sort them in descending order according to the load of the virtual machines; Determine the migration method of the virtual machine based on the storage area of ​​the virtual machine; A target entity list is obtained, and based on a sorting order and a target migration mode, the virtual machines are gradually migrated to the target entities in a multi-threaded manner.

20. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 19 is implemented.

21. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 19 is implemented.

22. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 19 is implemented.