A host upgrading method, device, equipment and medium

CN115599420BActive Publication Date: 2026-07-21JINAN INSPUR DATA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
JINAN INSPUR DATA TECH CO LTD
Filing Date
2022-10-21
Publication Date
2026-07-21

Smart Images

  • Figure CN115599420B_ABST
    Figure CN115599420B_ABST
Patent Text Reader

Abstract

The application discloses a host upgrading method and device, equipment and medium, and relates to the field of virtualization systems. The method comprises the following steps: when a rolling upgrade instruction is received, determining an un-upgraded target upgrading host from a target host in a system; the target host is a host that meets a preset rolling upgrade condition among all hosts; migrating virtual machines in the target upgrading host to a target migration host, and recording migration information in a preset database; upgrading the target upgrading host, and restarting the target upgrading host after the upgrading is completed; when the target upgrading host meets a preset upgrading success condition after being restarted, migrating a virtual machine to be migrated to the target upgrading host based on the migration information; re-determining the target upgrading host from the target host, and performing the step of rolling upgrade of migrating the virtual machines in the target upgrading host to the target migration host.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of virtualization systems, and in particular to a host upgrade method, apparatus, device, and medium. Background Technology

[0002] Virtualization systems often involve many modules, such as hosts, storage, and networks. Many updates require restarting the host to take effect, which will shut down the virtual machines running on it and cause business interruption. For many organizations and enterprises, the time window is usually short, and some core business operations cannot be interrupted. This requires that virtual machines be migrated to other hosts online before upgrading.

[0003] Currently, few virtualization products can achieve fully automated rolling upgrades. They require shutting down virtual machines or manual monitoring before the upgrade, with manual intervention at critical points to ultimately complete the system upgrade.

[0004] As can be seen from the above, how to avoid the situation where the host cannot be automatically rolled up during the virtualization process is a problem that needs to be solved in this field. Summary of the Invention

[0005] In view of this, the purpose of this invention is to provide a host upgrade method, apparatus, device, and medium that can complete unattended rolling upgrades of virtualization systems while ensuring uninterrupted service during upgrades, reducing labor costs and improving upgrade efficiency throughout the process. The specific solution is as follows:

[0006] In a first aspect, this application discloses a host upgrade method, including:

[0007] When a rolling upgrade instruction is received, the target upgrade host that has not been upgraded is determined from the target hosts in the current system; the target host is the host that meets the preset rolling upgrade conditions among all hosts;

[0008] The virtual machines in the target upgrade host are migrated to the target migration host, and the migration information is recorded in a preset database;

[0009] Upgrade the target upgrade host, and restart the target upgrade host after the upgrade is complete;

[0010] When the target upgrade host restarts and meets the preset upgrade success conditions, the virtual machine to be migrated is migrated to the target upgrade host based on the migration information;

[0011] A new target upgrade host is determined from the target hosts, and the step of migrating the virtual machines in the target upgrade host to the target migration host is performed until there are no un-upgraded hosts in the target hosts.

[0012] Optionally, before determining the un-upgraded target upgrade host from the target hosts in the current system, the method further includes:

[0013] Identify all hosts in the current system and check the virtual machine status, storage resource status, and network status of each host to determine the target host as the host whose virtual machine status, storage resource status, and network status meet the preset rolling upgrade conditions.

[0014] Optionally, the step of migrating the virtual machines in the target upgrade host to the target migration host and recording the migration information in a preset database includes:

[0015] For the virtual machines in the target upgrade host, determine the target migration host and generate migration pairing information;

[0016] Based on the migration pairing information, a migration task is generated and sent to a preset virtual machine migration device, so that the preset virtual machine migration device can migrate the virtual machine in the target upgrade host to the target migration host.

[0017] The migration information of the migration task is recorded in a preset database.

[0018] Optionally, upgrading the target upgrade host and restarting the target upgrade host after the upgrade is completed includes:

[0019] Once all migration tasks of the preset virtual machine migration device are completed, the target upgrade host is upgraded, and the target upgrade host is restarted after the upgrade is completed.

[0020] Optionally, the step of migrating the virtual machine to be migrated to the target upgrade host based on the migration information after the target upgrade host restarts and meets the preset upgrade success conditions includes:

[0021] The target upgrade host is monitored using a preset host status detection device at a preset detection frequency.

[0022] When the preset host status detection device determines that the status of the target upgrade host after restarting meets the preset upgrade success conditions, the virtual machine to be migrated is migrated to the target upgrade host based on the migration information.

[0023] Optionally, when the preset host status detection device determines that the status of the target upgrade host after restarting meets the preset upgrade success conditions, the virtual machine to be migrated is migrated to the target upgrade host based on the migration information, including:

[0024] When the preset host status detection device determines that the target upgrade host has restarted and reconnected to the current system, and that the storage resource status and network status are both normal, the virtual machine to be migrated will be migrated to the target upgrade host based on the migration information.

[0025] Optionally, after determining the un-upgraded target upgrade host from the target hosts in the current system, the method further includes:

[0026] Set the target upgrade host to maintenance mode;

[0027] Accordingly, after the target upgrade host restarts and meets the preset upgrade success conditions, the process further includes:

[0028] The target upgrade host is then removed from maintenance mode.

[0029] Secondly, this application discloses a host upgrade device, comprising:

[0030] The target upgrade host determination module is used to determine the un-upgraded target upgrade host from the target hosts in the current system when a rolling upgrade instruction is received; the target host is the host that meets the preset rolling upgrade conditions among all hosts;

[0031] The virtual machine migration module is used to migrate virtual machines in the target upgrade host to the target migration host and record the migration information in a preset database;

[0032] The host upgrade module is used to upgrade the target upgrade host and restart the target upgrade host after the upgrade is completed;

[0033] The virtual machine migration module is used to migrate the virtual machine to be migrated to the target upgrade host based on the migration information when the target upgrade host restarts and meets the preset upgrade success conditions.

[0034] The target upgrade host re-determination module is used to re-determine the target upgrade host from the target hosts and perform the step of migrating the virtual machines to be migrated in the target upgrade host to the target migration host until there are no un-upgraded hosts in the target hosts.

[0035] Thirdly, this application discloses an electronic device, including:

[0036] Memory, used to store computer programs;

[0037] A processor for executing the computer program to implement the aforementioned host upgrade method.

[0038] Fourthly, this application discloses a computer storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the steps of the aforementioned disclosed host upgrade method.

[0039] When this application receives a rolling upgrade instruction, it determines the un-upgraded target upgrade host from the target hosts in the current system; the target host is the host that meets the preset rolling upgrade conditions among all hosts; it migrates the virtual machines in the target upgrade host to the target migration host and records the migration information in a preset database; it upgrades the target upgrade host and restarts it after the upgrade is completed; when the target upgrade host meets the preset upgrade success conditions after restarting, it migrates the virtual machines to be migrated to the target upgrade host based on the migration information; it re-determines the target upgrade host from the target hosts and executes the step of migrating the virtual machines in the target upgrade host to the target migration host, until there are no un-upgraded hosts in the target hosts. In this way, by migrating the virtual machines in the target upgrade host to the target migration host and recording the migration information in the preset database, and migrating the virtual machines to be migrated back to the target upgrade host based on the migration information after the host is successfully upgraded, and by repeatedly executing the step of determining the target upgrade host, rolling upgrades of system hosts can be achieved without manual intervention and without interrupting business operations. Attached Figure Description

[0040] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0041] Figure 1 A flowchart of a host upgrade method provided in this application;

[0042] Figure 2 A flowchart of a specific host upgrade method provided in this application;

[0043] Figure 3 A flowchart of the overall solution provided in this application;

[0044] Figure 4 A schematic diagram of a host upgrade device provided in this application;

[0045] Figure 5 This application provides a structural diagram of an electronic device. Detailed Implementation

[0046] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0047] In existing technologies, virtualization systems require the virtual machines to be shut down or manually monitored before host upgrades. This manual intervention at critical points is labor-intensive and cannot achieve fully automated rolling upgrades. This application addresses this by enabling unattended rolling upgrades of virtualization systems while ensuring uninterrupted business operations. This reduces labor costs and improves upgrade efficiency throughout the process.

[0048] This invention discloses a host upgrade method, see [link to relevant documentation]. Figure 1 The method includes:

[0049] Step S11: When a rolling upgrade instruction is received, the target upgrade host that has not been upgraded is determined from the target hosts in the current system; the target host is the host that meets the preset rolling upgrade conditions among all hosts.

[0050] In this embodiment, the step of determining the un-upgraded target host from the target hosts in the current system when a rolling upgrade instruction is received may include: determining the un-upgraded target host from the target hosts in the current system when a rolling upgrade instruction triggered by a scheduled task or a one-click switch instruction is received.

[0051] Step S12: Migrate the virtual machines in the target upgrade host to the target migration host, and record the migration information in the preset database.

[0052] In this embodiment, the target upgrade host may be running virtual machines. To ensure uninterrupted service, the virtual machines will be migrated to other hosts before the host upgrade. In a specific implementation, a corresponding target migration host can be determined for each virtual machine in the target upgrade host, and then the virtual machine migration can be completed based on the mapping between virtual machines and target migration hosts. Since the virtual machines need to be migrated back to the current host after the host update is completed, migration information will be recorded at this time so that the virtual machines can be migrated back later based on the recorded migration information.

[0053] Step S13: Upgrade the target upgrade host and restart the target upgrade host after the upgrade is completed.

[0054] In this embodiment, the target upgrade host will be automatically restarted after the upgrade is performed so that the upgrade takes effect.

[0055] Step S14: When the target upgrade host restarts and meets the preset upgrade success conditions, the virtual machine to be migrated is migrated to the target upgrade host based on the migration information.

[0056] In this embodiment, when the target upgrade host restarts and meets the preset upgrade success conditions, the virtual machine to be migrated will be migrated back to the target upgrade host based on the migration information recorded in step S12. In specific implementations, the methods for determining whether the target upgrade host meets the preset upgrade success conditions after restarting include, but are not limited to, determining whether the target upgrade host's network has been restored, and determining whether the storage connected to the host has been successfully mounted.

[0057] Step S15: Re-determine the target upgrade host from the target hosts, and perform the step of migrating the virtual machines in the target upgrade host to the target migration host until there are no un-upgraded hosts in the target hosts.

[0058] It is understood that in this embodiment, migrating the virtual machine to be migrated to the target upgrade host indicates that the upgrade process of the current target upgrade host has been completed. Then, a new target upgrade host will be determined from the target hosts, and the upgrade of the next host will begin.

[0059] In this embodiment, after determining the un-upgraded target upgrade host from the target hosts in the current system, the process may further include: setting the target upgrade host to maintenance mode; correspondingly, after the target upgrade host restarts and meets the preset upgrade success conditions, the process may further include: exiting the maintenance mode of the target upgrade host.

[0060] In this embodiment, the step of re-determining the target upgrade host from the target host and performing the step of migrating the virtual machines in the target upgrade host to the target migration host, until there are no un-upgraded hosts in the target host, may further include: checking the health status of the upgraded system and automatically generating an inspection report for the user to view and understand. It should be noted that the process of checking the health status of the upgraded system and automatically generating an inspection report can be completed using a preset post-upgrade inspection device.

[0061] In this embodiment, upon receiving a rolling upgrade instruction, an un-upgraded target upgrade host is determined from the target hosts in the current system. The target host is a host among all hosts that meets the preset rolling upgrade conditions. Virtual machines in the target upgrade host are migrated to a target migration host, and the migration information is recorded in a preset database. The target upgrade host is upgraded, and restarted after the upgrade. When the target upgrade host restarts and meets the preset upgrade success conditions, the virtual machine to be migrated is migrated to the target upgrade host based on the migration information. A new target upgrade host is determined from the target hosts, and the step of migrating the virtual machines in the target upgrade host to the target migration host is executed until there are no un-upgraded hosts in the target hosts. Thus, by migrating the virtual machines in the target upgrade host to the target migration host and recording the migration information in the preset database, and by migrating the virtual machines to be migrated back to the target upgrade host based on the migration information after a successful host upgrade, and by repeatedly executing the step of determining the target upgrade host, rolling upgrades of system hosts can be achieved without manual intervention and without interrupting business operations.

[0062] Figure 2 This is a flowchart illustrating a specific host upgrade method provided in an embodiment of this application. See also... Figure 2 As shown, the method includes:

[0063] Step S21: When a rolling upgrade instruction is received, the target upgrade host that has not been upgraded is determined from the target hosts in the current system, and the target upgrade host is set to maintenance mode; the target host is the host that meets the preset rolling upgrade conditions among all hosts.

[0064] In this embodiment, before determining the target upgrade host that has not been upgraded from the target hosts in the current system, it may further include: determining all hosts in the current system, and checking the virtual machine status, storage resource status and network status of each host, so as to determine the host whose virtual machine status, storage resource status and network status meet the preset rolling upgrade conditions as the target host.

[0065] It is understood that in this embodiment, during the process of determining the target upgrade host from the target hosts in the current system, the host that meets the preset rolling upgrade conditions among all hosts will be identified as the target host first. In a specific implementation, the system resources will be checked first, such as the host status, storage devices, and whether the virtual machines running on the host support online migration, etc. Then, hosts whose resources do not support rolling upgrade will be investigated, and the host whose resources all meet the rolling upgrade conditions will be identified as the target host.

[0066] It should be noted that, in the preferred embodiment, the process of checking the system resources before the host upgrade can be completed by a preset pre-upgrade check device.

[0067] Step S22: Determine the target migration host for the virtual machines in the target upgrade host and generate migration pairing information.

[0068] In this embodiment, the target upgrade host may run multiple virtual machines, each of which needs to be migrated to another host. Therefore, before issuing the migration task in this step, resource scheduling is performed on the virtual machines on the current processing host, that is, finding an available target host for each virtual machine. If a virtual machine cannot be migrated, the upgrade cannot continue, and an error message will pop up for the user to identify. It should be noted that in this step, it must be ensured that each virtual machine running on the host corresponds to its target migration host.

[0069] In this embodiment, if the target migration host corresponding to each virtual machine is successfully determined, migration pairing information representing the correspondence between the virtual machine and the target migration host will be generated.

[0070] Step S23: Generate a migration task based on the migration pairing information and send it to a preset virtual machine migration device so that the preset virtual machine migration device can migrate the virtual machine in the target upgrade host to the target migration host.

[0071] In this embodiment, after generating migration pairing information, a migration task is generated based on the migration pairing information and sent to a preset virtual machine migration device. The migration device then executes the migration task to complete the migration of the virtual machine.

[0072] Step S24: Record the migration information of the migration task into a preset database.

[0073] In specific implementations, the task ID (i.e., identification, unique identifier) ​​of the migration task can be recorded in the database, and in some preferred implementations, the migration information can be stored in the preset database in tabular form.

[0074] Step S25: When all migration tasks of the preset virtual machine migration device are completed, the target upgrade host is upgraded, and the target upgrade host is restarted after the upgrade is completed.

[0075] In this embodiment, since multiple virtual machines may be running on the same target upgrade host, the preset virtual machine migration device will receive multiple migration tasks at the same time. When the preset virtual machine migration device has completed all the current migration tasks, it indicates that there are no virtual machines on the target upgrade host. At this time, the target upgrade host can be upgraded, and the host will be restarted after the upgrade is completed to make the upgrade effective.

[0076] It should be noted that, in the preferred embodiment, the process of upgrading the target upgrade host described above can be completed by a preset upgrade device, and the process of restarting the target upgrade host after the upgrade is completed can be completed by a preset host restart device.

[0077] Step S26: Use a preset host status detection device to perform status detection on the target upgrade host at a preset detection frequency.

[0078] It is understood that in this embodiment, the process of monitoring whether the preset upgrade success conditions are met after the target upgrade host restarts can be completed by the preset host detection device. Since the host restart in the previous step consumes a certain amount of time, the preset host status detection device in this step will continuously perform status detection on the target upgrade host according to a preset detection frequency.

[0079] Step S27: When the preset host status detection device determines that the target upgrade host has restarted and reconnected to the current system, and that the storage resource status and network status are both normal, the target upgrade host is taken out of maintenance mode, and the virtual machine to be migrated is migrated to the target upgrade host based on the migration information.

[0080] In a specific implementation, the preset host status detection device will continuously request to check whether the host has restarted successfully, whether the network has been restored, and whether the storage connected to the host has been successfully mounted according to the preset detection frequency. If the host restarts successfully, the network has been restored, and the storage connected to the host has been successfully mounted, it indicates that the storage resource status and network status are normal after the host restarts successfully. At this time, the virtual machine to be migrated can be migrated to the target upgrade host based on the migration information.

[0081] Step S28: Re-determine the target upgrade host from the target hosts, and perform the step of migrating the virtual machines in the target upgrade host to the target migration host until there are no un-upgraded hosts in the target hosts.

[0082] It should be noted that the migration of the virtual machine to be migrated to the target upgrade host in this step can also be completed by a preset virtual machine migration device.

[0083] Figure 3This is a schematic diagram of the overall process proposed in this invention. First, a resource check is performed on all resources within the system. If the resource check passes, it is determined whether there are any un-upgraded hosts among all hosts that meet the preset rolling upgrade conditions. If so, an un-upgraded host is identified and put into maintenance mode. Virtual machines on the host are scheduled and the migration information list is returned. After the virtual machine migration is completed, the host is upgraded, restarted to make the upgrade effective, and the host status is checked. Once the host has successfully restarted, its status is normal, and the host is connected to the system, the maintenance mode is exited, and the virtual machine migration is completed. This process is repeated to upgrade other hosts in the system that meet the preset rolling upgrade conditions. When it is determined that there are no un-upgraded hosts among the hosts that meet the preset rolling upgrade conditions, the system upgrade is complete. At this point, the system health status can be trained, and an inspection report can be generated for users to view and understand.

[0084] This embodiment proposes that when multiple virtual machines are running on the target upgrade host, resource scheduling is first performed on the virtual machines, and migration pairing information is generated. Then, the virtual machines are migrated based on the migration pairing information. During the process, it is necessary to ensure that each virtual machine has its corresponding target migration host to guarantee the rigor of the virtual machine migration process and ensure that no manual intervention is required during the migration. Furthermore, it proposes to use a preset pre-upgrade check device, a preset virtual machine migration device, a preset upgrade device, a preset host restart device, a preset host status detection device, and a preset post-upgrade inspection device to complete the rolling upgrade of the virtualization system, achieving unattended operation.

[0085] See Figure 4 As shown in the figure, this application discloses a host upgrade device, which may specifically include:

[0086] The target upgrade host determination module 11 is used to determine the un-upgraded target upgrade host from the target hosts in the current system when a rolling upgrade instruction is received; the target host is the host that meets the preset rolling upgrade conditions among all hosts;

[0087] Virtual machine migration module 12 is used to migrate virtual machines in the target upgrade host to the target migration host and record migration information in a preset database;

[0088] The host upgrade module 13 is used to upgrade the target upgrade host and restart the target upgrade host after the upgrade is completed;

[0089] The virtual machine migration module 14 is used to migrate the virtual machine to be migrated to the target upgrade host based on the migration information when the target upgrade host restarts and meets the preset upgrade success conditions.

[0090] The target upgrade host re-determination module 15 is used to re-determine the target upgrade host from the target hosts and perform the step of migrating the virtual machines to be migrated in the target upgrade host to the target migration host until there are no un-upgraded hosts in the target hosts.

[0091] In this application, upon receiving a rolling upgrade instruction, an un-upgraded target upgrade host is determined from the target hosts in the current system; the target host is a host among all hosts that meets the preset rolling upgrade conditions; virtual machines in the target upgrade host are migrated to a target migration host, and the migration information is recorded in a preset database; the target upgrade host is upgraded, and restarted after the upgrade is completed; when the target upgrade host restarts and meets the preset upgrade success conditions, the virtual machine to be migrated is migrated to the target upgrade host based on the migration information; a new target upgrade host is determined from the target hosts, and the step of migrating the virtual machines in the target upgrade host to the target migration host is executed, until there are no un-upgraded hosts in the target hosts. In this way, by migrating the virtual machines in the target upgrade host to the target migration host and recording the migration information in the preset database, and migrating the virtual machines to be migrated back to the target upgrade host based on the migration information after a successful host upgrade, and by repeatedly executing the step of determining the target upgrade host, rolling upgrades of system hosts can be achieved without manual intervention and without interrupting business operations.

[0092] In some specific embodiments, the host upgrade device further includes:

[0093] The system resource check module is used to identify all hosts in the current system and check the virtual machine status, storage resource status, and network status of each host, so as to identify the host whose virtual machine status, storage resource status, and network status meet the preset rolling upgrade conditions as the target host.

[0094] In some specific embodiments, the virtual machine migration module 12 includes:

[0095] The migration pairing information generation unit is used to determine the target migration host for the virtual machines in the target upgrade host and generate migration pairing information;

[0096] A virtual machine migration unit is used to generate a migration task based on the migration pairing information and send it to a preset virtual machine migration device so that the preset virtual machine migration device can migrate the virtual machines in the target upgrade host to the target migration host.

[0097] The migration information recording unit is used to record the migration information of the migration task into a preset database.

[0098] In some specific embodiments, the host upgrade module 13 includes:

[0099] The host upgrade unit is used to upgrade the target upgrade host when all migration tasks of the preset virtual machine migration device have been completed, and to restart the target upgrade host after the upgrade is completed.

[0100] In some specific embodiments, the virtual machine migration module 14 includes:

[0101] A status detection unit is used to detect the status of the target upgrade host using a preset host status detection device at a preset detection frequency.

[0102] The virtual machine migration unit is used to migrate the virtual machine to be migrated to the target upgrade host based on the migration information when the preset host status detection device determines that the status of the target upgrade host after restarting meets the preset upgrade success conditions.

[0103] In some specific embodiments, the virtual machine migration unit includes:

[0104] The preset host status detection device application unit is used to migrate the virtual machine to be migrated to the target upgrade host based on the migration information when the preset host status detection device determines that the target upgrade host has restarted and reconnected to the current system, and that the storage resource status and network status are both normal.

[0105] In some specific embodiments, the host upgrade device further includes:

[0106] A maintenance mode setting unit is used to set the target upgrade host to maintenance mode;

[0107] The maintenance mode exit unit is used to exit the maintenance mode of the target upgrade host.

[0108] Furthermore, embodiments of this application also disclose an electronic device, Figure 5 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of use of this application.

[0109] Figure 5 This is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of this application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a display screen 24, an input / output interface 25, a communication interface 26, and a communication bus 27. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the following steps:

[0110] When a rolling upgrade instruction is received, the target upgrade host that has not been upgraded is determined from the target hosts in the current system; the target host is the host that meets the preset rolling upgrade conditions among all hosts;

[0111] The virtual machines in the target upgrade host are migrated to the target migration host, and the migration information is recorded in a preset database;

[0112] Upgrade the target upgrade host, and restart the target upgrade host after the upgrade is complete;

[0113] When the target upgrade host restarts and meets the preset upgrade success conditions, the virtual machine to be migrated is migrated to the target upgrade host based on the migration information;

[0114] A new target upgrade host is determined from the target hosts, and the step of migrating the virtual machines in the target upgrade host to the target migration host is performed until there are no un-upgraded hosts in the target hosts.

[0115] In addition, the electronic device 20 in this embodiment can specifically be an electronic computer. In this embodiment, the power supply 23 is used to provide operating voltage for the various hardware devices on the electronic device 20; the communication interface 26 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.

[0116] Furthermore, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk, or optical disk, etc. The resources stored on it can include an operating system 221, computer programs 222, and virtual machine data 223, etc. The virtual machine data 223 can include various types of data. The storage method can be temporary storage or permanent storage.

[0117] The operating system 221 is used to manage and control the various hardware devices on the electronic device 20 and the computer program 222, which may be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program capable of performing the host upgrade method executed by the electronic device 20 as disclosed in any of the foregoing embodiments, the computer program 222 may further include a computer program capable of performing other specific tasks.

[0118] Furthermore, this application also discloses a computer-readable storage medium, which includes random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disks, magnetic disks, optical disks, or any other form of storage medium known in the art. The computer program, when executed by a processor, implements the aforementioned host upgrade method. Specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.

[0119] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatuses disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple; relevant parts can be referred to the method section. Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this application.

[0120] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0121] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0122] The host upgrade method, apparatus, device, and storage medium provided by the present invention have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A host upgrade method, characterized in that, include: When a rolling upgrade instruction is received, the target upgrade host that has not been upgraded is determined from the target hosts in the current system; The target host is the host that meets the preset rolling upgrade conditions among all hosts; The virtual machines in the target upgrade host are migrated to the target migration host, and the migration information is recorded in a preset database; Upgrade the target upgrade host, and restart the target upgrade host after the upgrade is complete; When the target upgrade host restarts and meets the preset upgrade success conditions, the virtual machine to be migrated is migrated to the target upgrade host based on the migration information; A new target upgrade host is determined from the target hosts, and the step of migrating the virtual machines in the target upgrade host to the target migration host is performed until there are no un-upgraded hosts in the target hosts; Before determining the un-upgraded target upgrade host from the target hosts in the current system, the method further includes: Identify all hosts in the current system and check the virtual machine status, storage resource status, and network status of each host to identify the target hosts whose virtual machine status, storage resource status, and network status meet the preset rolling upgrade conditions. Check the resources of the current system to determine whether the host status, storage devices, and virtual machines running on the host all support online migration. Investigate hosts whose resources do not support rolling upgrades and identify the target hosts whose resources all meet the rolling upgrade conditions. The step of migrating the virtual machines in the target upgrade host to the target migration host and recording the migration information in a preset database includes: For the virtual machines in the target upgrade host, determine the target migration host and generate migration pairing information; Based on the migration pairing information, a migration task is generated and sent to a preset virtual machine migration device, so that the preset virtual machine migration device can migrate the virtual machine in the target upgrade host to the target migration host. The migration information of the migration task is recorded in a preset database; When the target upgrade host restarts and meets the preset upgrade success conditions, the virtual machine to be migrated is migrated to the target upgrade host based on the migration information, including: The target upgrade host is monitored using a preset host status detection device at a preset detection frequency. When the preset host status detection device determines that the status of the target upgrade host after restarting meets the preset upgrade success conditions, the virtual machine to be migrated is migrated to the target upgrade host based on the migration information; When the preset host status detection device determines that the status of the target upgrade host after restarting meets the preset upgrade success conditions, the virtual machine to be migrated is migrated to the target upgrade host based on the migration information, including: When the preset host status detection device determines that the target upgrade host has restarted and reconnected to the current system, and that the storage resource status and network status are both normal, the virtual machine to be migrated will be migrated to the target upgrade host based on the migration information.

2. The host upgrade method according to claim 1, characterized in that, The step of upgrading the target upgrade host and restarting the target upgrade host after the upgrade is completed includes: Once all migration tasks of the preset virtual machine migration device are completed, the target upgrade host is upgraded, and the target upgrade host is restarted after the upgrade is completed.

3. The host upgrade method according to claim 1 or 2, characterized in that, After determining the un-upgraded target upgrade host from the target hosts in the current system, the process further includes: Set the target upgrade host to maintenance mode; Accordingly, after the target upgrade host restarts and meets the preset upgrade success conditions, the process further includes: The target upgrade host is then removed from maintenance mode.

4. A host upgrade device, characterized in that, include: The target upgrade host determination module is used to determine the un-upgraded target upgrade host from the target hosts in the current system when a rolling upgrade instruction is received; The target host is the host that meets the preset rolling upgrade conditions among all hosts; The virtual machine migration module is used to migrate virtual machines in the target upgrade host to the target migration host and record the migration information in a preset database; The host upgrade module is used to upgrade the target upgrade host and restart the target upgrade host after the upgrade is completed; The virtual machine migration module is used to migrate the virtual machine to be migrated to the target upgrade host based on the migration information when the target upgrade host restarts and meets the preset upgrade success conditions. The target upgrade host re-determination module is used to re-determine the target upgrade host from the target hosts and perform the step of migrating the virtual machines to be migrated in the target upgrade host to the target migration host until there are no un-upgraded hosts in the target hosts; The system resource check module is used to identify all hosts in the current system and check the virtual machine status, storage resource status, and network status of each host, so as to identify the host whose virtual machine status, storage resource status, and network status meet the preset rolling upgrade conditions as the target host. Check the current system resources to determine whether the host status, storage devices, and virtual machines running on the host all support online migration. Investigate hosts whose resources do not support rolling upgrades and identify the hosts whose resources all meet the conditions for rolling upgrades as the target hosts. The virtual machine migration module includes: The migration pairing information generation unit is used to determine the target migration host for the virtual machines in the target upgrade host and generate migration pairing information; A virtual machine migration unit is used to generate a migration task based on the migration pairing information and send it to a preset virtual machine migration device so that the preset virtual machine migration device can migrate the virtual machine in the target upgrade host to the target migration host. A migration information recording unit is used to record the migration information of the migration task into a preset database; The virtual machine migration module includes: A status detection unit is used to detect the status of the target upgrade host using a preset host status detection device at a preset detection frequency. The virtual machine migration unit is used to migrate the virtual machine to be migrated to the target upgrade host based on the migration information when the preset host status detection device determines that the status of the target upgrade host after restarting meets the preset upgrade success conditions. The virtual machine migration unit includes: The preset host status detection device application unit is used to migrate the virtual machine to be migrated to the target upgrade host based on the migration information when the preset host status detection device determines that the target upgrade host has restarted and reconnected to the current system, and that the storage resource status and network status are both normal.

5. An electronic device, characterized in that, It includes a processor and a memory; wherein, when the processor executes a computer program stored in the memory, it implements the host upgrade method as described in any one of claims 1 to 3.

6. A computer-readable storage medium, characterized in that, Used to store computer programs; wherein, when the computer programs are executed by a processor, they implement the host upgrade method as described in any one of claims 1 to 3.