Operating system migration method, computer equipment, storage medium and program product
By using probes to determine migration priorities and generate categorized migration templates, the problem of low operating system migration efficiency in supercomputing data centers was solved, enabling an efficient and customized operating system migration process and reducing costs.
Patent Information
- Application Number
- CN202411028933.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-30
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2044-07-30
AI Technical Summary
Existing technologies struggle to efficiently migrate operating systems from large server clusters, especially in supercomputing data centers, leading to wasted time, resources, and manpower, and making it difficult to determine which operating systems to migrate first.
The first probe is used to determine the migration priority, and the second probe is used to obtain system data and compare it with the migration knowledge base to generate a classified migration template. A customized migration process is carried out for each type of operating system, reducing the evaluation process.
It improves operating system migration efficiency and reduces time, manpower, and material costs, making it particularly suitable for data centers with a large number of servers.
Smart Images

Figure CN118567698B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to an operating system migration method, a computer device, a storage medium, and a program product. Background Art
[0002] The operating system plays a key role in the information technology industry. It not only serves as a bridge between users and computer hardware, but also manages system resources to ensure the smooth operation of applications. The stability and security of the operating system play an important role in protecting data and supporting business operations.
[0003] With the development of technology and changes in market demand, some existing operating systems may stop being maintained and updated, resulting in users no longer being able to obtain official patch support and difficulty in updating and upgrading the operating system, thus bringing huge challenges and risks to the business operations and digital transformation of enterprises. For example, the current version of the operating system cannot obtain subsequent technological evolution and version upgrades, resulting in the inability to continue using products developed based on the operating system; the security vulnerabilities in the operating system are not followed up and fixed by developers, resulting in threats to data security, and enterprises will face huge security vulnerabilities; the software and hardware systems launched later are difficult to be compatible with the existing operating system.
[0004] For these reasons, users have the need to migrate operating systems and convert the original operating systems of some servers to new operating systems. However, some enterprise users use a large number of servers, and the businesses running on these servers are relatively complex. Therefore, how to efficiently migrate the many operating systems in the server cluster is a relatively difficult problem. Summary of the invention
[0005] In view of this, one or more embodiments of the present disclosure provide an operating system migration method, a computer device, a storage medium, and a program product, which can improve the efficiency of migrating an operating system.
[0006] In a first aspect, the present disclosure provides an operating system migration method, the method comprising:
[0007] Using a first probe to traverse a server cluster, obtaining a working state of an operating system of a first current server traversed by the first probe, and determining a migration priority of the operating system of the first current server according to the working state;
[0008] Using a second probe to traverse the server cluster, obtaining system data of the operating system of the second current server traversed by the second probe, and comparing the system data with a migration knowledge base to determine migration difference information of the operating system of the second current server, wherein the migration knowledge base includes information on detection operations performed before migrating to the desired operating system;
[0009] Determine the operating system category to which the operating system of each server belongs according to the migration difference information corresponding to the operating system of each server in the server cluster, and generate a classification migration template for the operating system category, wherein the classification migration template is obtained based on the optimization of the migration knowledge base;
[0010] For a target server in the server cluster, the current operating system is migrated to the desired operating system according to a migration priority matching the current operating system of the target server and a classified migration template matching the current operating system.
[0011] In a second aspect, the present disclosure provides an operating system migration device, the device comprising:
[0012] A first scanning unit is used to traverse the server cluster using a first probe, obtain the working status of the operating system of the first current server traversed by the first probe, and determine the migration priority of the operating system of the first current server according to the working status;
[0013] a second scanning unit, configured to traverse the server cluster using a second probe, obtain system data of an operating system of a second current server traversed by the second probe, and compare the system data with a migration knowledge base to determine migration difference information of the operating system of the second current server, wherein the migration knowledge base includes information of detection operations performed before migration to a desired operating system;
[0014] A template generating unit, configured to determine the operating system category to which the operating system of each server belongs according to the migration difference information corresponding to the operating system of each server in the server cluster, and generate a classified migration template for the operating system category, wherein the classified migration template is obtained based on the optimization of the migration knowledge base;
[0015] The migration unit is used to migrate the current operating system of the target server in the server cluster to the desired operating system according to the migration priority matching the current operating system of the target server and the classified migration template matching the current operating system.
[0016] In a third aspect, the present disclosure provides a computer device, comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the operating system migration method of the first aspect by executing the computer instructions.
[0017] In a fourth aspect, the present disclosure provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the operating system migration method of the first aspect.
[0018] In a fifth aspect, the present disclosure provides a computer program product, including computer instructions, where the computer instructions are used to enable a computer to execute the operating system migration method of the first aspect.
[0019] The technical solution provided by one or more embodiments of the present disclosure uses a traversal probe to sort out the priority of system migration, which can reduce the adverse impact of the migration process of the operating system on user services; and uses another traversal probe to sort out the difference information between each operating system and a preset knowledge base, so that the operating systems in the server cluster can be classified. On this basis, the migration process can be customized for each type of operating system, reducing some unnecessary evaluation processes and reducing time costs.
[0020] The technical solution provided by one or more embodiments of the present disclosure optimizes the migration process of the operating system from two dimensions, greatly improving the migration efficiency of the operating system, and is particularly suitable for data centers with a large number of servers. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the specific embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the specific embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.
[0022] Figure 1 A schematic diagram showing the steps of an operating system migration method in one embodiment of the present invention is shown;
[0023] Figure 2 A schematic diagram of a creation process of a classification migration template in one embodiment of the present invention is shown;
[0024] Figure 3 A schematic diagram of a process flow of operating system migration in one embodiment of the present invention is shown;
[0025] Figure 4A schematic diagram of functional modules of an operating system migration device in one embodiment of the present invention is shown;
[0026] Figure 5 A schematic diagram of the structure of a computer device in one embodiment of the present invention is shown. DETAILED DESCRIPTION
[0027] In order to make the purpose, technical solutions and advantages of the embodiments of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present disclosure.
[0028] In the related art, the migration schemes of the operating system can be divided into in-place migration and extended migration. In-place migration refers to the process of upgrading the system to the target system by upgrading the software package or configuration based on the existing system. In-place migration generally does not require the replacement of hardware devices, but only requires software upgrades on existing hardware. Extended migration refers to the process of upgrading and expanding the system by adding new hardware devices or expanding existing hardware resources based on the existing system. Extended migration may require the addition of new servers, storage devices or other hardware resources. In-place migration can ensure lower costs and better use of existing hardware and software resources.
[0029] In the related art, a feature of a supercomputing data center is that it has a large number of computing nodes. Multiple computing nodes provide computing power, which is the core capability of a supercomputing data center. In a supercomputing data center, different computing nodes may have the same operating system and running services. Another feature of a supercomputing data center is that there are many users, which leads to stringent requirements for system upgrades, such as a shorter allowed downtime.
[0030] In the related art, some open source migration tools can be used to perform in-situ migration of operating systems in supercomputing data centers. In the process of upgrading the system, due to the inconsistency of software packages owned by different systems, many links in the upgrade process are redundant. For example, software packages or configurations that are not available in the target system do not need to be modified. However, these open source migration tools usually adopt a linear scanning solution, which generally involves multiple links and checks the original system in various dimensions, which easily increases the time cost. For supercomputing data centers, manual upgrades of each server are very labor-intensive and resource-intensive. In addition, for supercomputing data centers, it is also difficult to determine which type or which operating system to migrate first.
[0031] In view of this, one or more embodiments of the present disclosure can improve the efficiency of migrating the operating system. Figure 1 An operating system migration method provided by an embodiment of the present disclosure may include the following steps.
[0032] S1: using a first probe to traverse a server cluster, obtaining a working status of an operating system of a first current server traversed by the first probe, and determining a migration priority of the operating system of the first current server according to the working status.
[0033] In this embodiment, the server cluster may refer to all servers in a supercomputing data center. Through a probe, the entire server cluster may be traversed to obtain the current operating system working status of each server in the server cluster, and then determine the priority of each server when migrating the system.
[0034] It should be noted that, since the working state is dynamic, the process of determining the migration priority can also be performed cyclically. In this way, during the migration process, the first probe can be used to continuously and dynamically detect one or more operating systems suitable for migration.
[0035] In some implementations, the working state of the operating system of the first current server may include at least one sub-working state. For example, whether the business run by the operating system of the first current server is an online business; the CPU occupancy of the operating system of the first current server; the memory occupancy of the operating system of the first current server; whether the operating system of the first current server allows shutdown; whether the functional role of the operating system of the first current server is the host or the backup; and whether the operating system of the first current server is supported by the service provider.
[0036] Through these subdivided sub-working states, the resource usage, business type, and functional role (as a host or backup machine in a server cluster) of each operating system are fully considered, so that the migration priority of each operating system can be determined more scientifically and reasonably.
[0037] In some embodiments, the migration priority of the operating system of the first current server is determined according to the working state, which can be specifically: calculating an entropy index according to a plurality of sub-working states included in the working state of the operating system of the first current server; and determining the migration priority of the operating system of the first current server according to the value of the entropy index. Optionally, the higher the value of the entropy index, the higher the corresponding migration priority. In this way, based on the entropy index, the migration priority of each operating system is accurately indicated in the form of a quantified value.
[0038] In some implementations, for any sub-working state included in the working state of the operating system of the first current server, a scoring module may be used to determine a scoring value corresponding to the sub-working state. In addition, a weight value corresponding to the sub-working state may be obtained. Weighted statistics are performed on the scoring values corresponding to each sub-working state and the weight values corresponding to each sub-working state to obtain an entropy index. Depending on the actual application scenario, the scoring template and the weight value may be flexibly set.
[0039] In an actual application example, referring to Table 1, the sub-working status can be the business type, the CPU usage, the memory usage, whether to allow downtime, the functional role, and whether there is third-party support. For each sub-working status, there can be a corresponding predetermined score value, such as 10 points for online business and 30 points for offline business. Each sub-working status can have a corresponding predetermined weight value, such as the weight value of business type and whether to allow downtime is 3, and the weight value of CPU or memory resource usage, functional role, and whether there is third-party support is 2.
[0040] Optionally, an entropy index is calculated as follows:
[0041] Value_sys=3×value (business type)+2×value (resource usage)+3×value (whether shutdown is possible)+2×value (role)+2×value (whether support is available).
[0042] Among them, Value_sys represents the entropy index, value() represents the score value of each sub-working state, and the coefficient before value() represents the weight value of each sub-working state.
[0043] Table 1 Work status score table
[0044]
[0045] In some implementations, after a round of server clusters are traversed using the first probe, a preset period may be interval, and the first probe may be used to traverse the server clusters again. In each round of traversing the server clusters, servers that have successfully migrated operating systems may be skipped, and servers that are migrating operating systems may be skipped. The server clusters are traversed cyclically, realizing a dynamic scan, which can detect the operating system that is most suitable for migration in each time period.
[0046] In an actual application example, a first probe may be used to perform a dynamic scan in a supercomputing data center to determine the migration priority of the operating system of each server. Specific steps are as follows.
[0047] Step 1: After traversing to a certain system, check the resource usage, business type, and role (host or backup machine in the server cluster) of the current system.
[0048] Step 2: Send the relevant parameters of the current host back to the centralized management end for storage.
[0049] Step 3: Continue scanning other servers in the entire data center until the traversal is complete.
[0050] Step 4: After a period of time, start the second round of scanning, skipping the systems that have been migrated or are being migrated.
[0051] In this application example, a traversal probe can be used to sort out the priority of the migration system, so that the operating system migration process has the least impact on user services.
[0052] S2: Use a second probe to traverse the server cluster, obtain system data of the operating system of the second current server traversed by the second probe, and compare the system data with the migration knowledge base to determine the migration difference information of the operating system of the second current server, wherein the migration knowledge base includes information on detection operations performed before migrating to the desired operating system.
[0053] In this embodiment, another independent probe can traverse the entire server cluster to obtain the system data of the current operating system of each server in the server cluster, and then determine the difference information between the system data of each operating system and the migration knowledge base.
[0054] In this embodiment, before migrating an operating system, a series of evaluation and inspection operations are usually required for the operating system. The migration knowledge base may contain the full amount of information of these evaluation and inspection operations. The migration knowledge base may be obtained in advance, and the information contained in it may meet the needs of each operating system in the server cluster.
[0055] In some implementations, the full software package involved in the migration knowledge base can be determined, and the system software package involved in a certain system data can be determined. Based on the comparison result between the full software package and the system software package, migration difference information can be determined.
[0056] In some implementations, the full configuration file involved in the migration knowledge base can be determined, and the system configuration file involved in a certain system data can be determined. Based on the comparison result of the full configuration file and the system configuration file, the migration difference information can be determined.
[0057] In some implementations, the full amount of business software involved in the migration knowledge base can be determined, and the system business software involved in a certain system data can be determined. Based on the comparison result between the full amount of business software and the system business software, migration difference information can be determined.
[0058] In some implementations, the full hardware list involved in the migration knowledge base can be determined, and the system hardware list involved in a certain system data can be determined. Based on the comparison result of the full hardware list and the system hardware list, the migration difference information can be determined.
[0059] In some implementations, the full amount of security software involved in the migration knowledge base can be determined, and the system security software involved in a certain system data can be determined. Based on the comparison result between the full amount of security software and the system security software, migration difference information can be determined.
[0060] In some implementations, the full executable files involved in the migration knowledge base can be determined, and the system executable files involved in a certain system data can be determined. Based on the comparison results of the full executable files and the system executable files, migration difference information can be determined.
[0061] In an actual application example, referring to Table 2, the migration difference information between the system data and the migration knowledge base may include dimensions such as software package compatibility, configuration file compatibility, user data and business program compatibility, security software compatibility, and executable file compatibility.
[0062] Table 2 Migration knowledge base dimension table
[0063]
[0064] In an actual application example, a second probe may be used to perform a dynamic scan in a supercomputing data center to determine migration difference information of operating systems of various servers. Specific steps are as follows.
[0065] Step 1: Initialize the migration knowledge base, which contains all the inspection and upgrade objects used in the entire migration process.
[0066] Step 2: After the probe reaches a system, it scans multiple dimensions such as configuration files, software packages, passwords, and plug-ins based on the knowledge base provided in the first step.
[0067] Step 3: Record the items that do not exist in this system but exist in the knowledge base and feed them back to the centralized management center.
[0068] Step 4: Based on the information from step 3, it is not necessary to scan every system. Systems with the same business and configuration can be treated as the same category. Customized migration tools can be used to simplify the evaluation steps of the traditional migration process, delete unnecessary links, and conduct accurate and efficient system evaluation.
[0069] In this application example, a probe can be used to sort out configuration files, software packages, commands, services, and other information on the operating system and feed it back to the centralized management end, so that the migration process of the operating system can be customized, simplifying the evaluation process.
[0070] S3: Determine the operating system category to which the operating system of each server belongs according to the migration difference information corresponding to the operating system of each server in the server cluster, and generate a classification migration template for the operating system category, wherein the classification migration template is obtained based on the optimization of the migration knowledge base.
[0071] In this embodiment, in a server cluster, multiple server groups can be divided according to the sameness or similarity of the operating system and the running business. The operating system in each server group can belong to a type of operating system. Each type of operating system can use the same template to perform batch and customized system migration processes.
[0072] In some implementations, the operating services and system configurations of each operating system can be determined based on the migration difference information corresponding to the operating system of each server in the server cluster. Operating systems with the same operating services and the same system configuration can be assigned to the same operating system classification. In this way, a generated classification migration template can be applied to each operating system in the same operating system classification. This simplifies the determination process of the migration template and greatly improves the migration efficiency of the operating system.
[0073] In some implementations, for a target operating system category within an operating system category, the migration knowledge base can be optimized based on the migration difference information of any operating system in the target operating system category to generate a target classification migration template. For example, the inspection process included in the migration knowledge base can be deleted, weakened, or modified.
[0074] It should be noted that, in order to improve the migration efficiency, the migration template can not only indicate the evaluation and inspection process before migrating the operating system, but also be used to trigger the migration process of executing the operating system.
[0075] For a practical example, see Figure 2In a data center, the operating systems and running services on many servers are similar. According to the different running services, the operating systems in the data center can be divided into many categories. By traversing these operating systems, the system data collected in all operating systems can be fed back to the centralized management end. According to the feedback information, the centralized management end can read the total knowledge base and perform comparative analysis. For each category of operating system, the centralized management end can customize the migration process. For example, according to the feedback software list, the centralized management end can delete, weaken, and modify part of the migration process. In this way, for this type of operating system to be migrated, a customized migration template can be used. By analogy, all types of operating systems use the optimal migration process. In this way, for the operating system migration work of the entire data center, the migration efficiency is improved, many unnecessary links are omitted, and time costs are saved.
[0076] S4: For a target server in the server cluster, according to a migration priority matching the current operating system of the target server and a classified migration template matching the current operating system, the current operating system is migrated to the desired operating system.
[0077] In this implementation, for each operating system to be migrated, the migration order can be determined based on the migration priority, and the migration process can be simplified based on the classified migration template, thereby achieving bidirectional parallel customized migration.
[0078] In some implementations, the migration task can be waited for execution according to the migration priority matching the current operating system. During the execution phase of the migration task, a classified migration template matching the current operating system is retrieved, and the system migration is completed according to the classified migration template.
[0079] In some implementations, a classified migration template matching the current operating system may be preloaded. Subsequently, according to the migration priority matching the current operating system, execution of the migration task is waited for, and when the migration task is executed, the preloaded migration template is directly started.
[0080] For a practical example, see Figure 3 , through the priority probe, you can traverse the server cluster and determine the operating systems that need to be migrated first. After the priority probe traverses a round of server clusters, the migration optimization probe can determine the classification optimization migration tool for each operating system. According to the determined migration priority, a batch of operating systems can be efficiently migrated using the classification optimization migration tool. These two processes can be kept running in a loop until all operating systems in the server cluster have been migrated.
[0081] The technical solution provided by one or more embodiments of the present disclosure uses a traversal probe to sort out the priority of system migration, which can reduce the adverse impact of the migration process of the operating system on user services; and uses another traversal probe to sort out the difference information between each operating system and a preset knowledge base, so that the operating systems in the server cluster can be classified. On this basis, the migration process can be customized for each type of operating system, reducing some unnecessary evaluation processes and reducing time costs.
[0082] The technical solution provided by one or more embodiments of the present disclosure optimizes the migration process of the operating system from two dimensions, greatly improving the migration efficiency of the operating system, and is particularly suitable for data centers with a large number of servers.
[0083] See also Figure 4 An embodiment of the present disclosure further provides an operating system migration device, the device comprising:
[0084] The first scanning unit 100 is used to traverse the server cluster using a first probe, obtain the working status of the operating system of the first current server traversed by the first probe, and determine the migration priority of the operating system of the first current server according to the working status;
[0085] A second scanning unit 200 is used to traverse the server cluster using a second probe, obtain system data of the operating system of the second current server traversed by the second probe, and compare the system data with the migration knowledge base to determine the migration difference information of the operating system of the second current server, wherein the migration knowledge base includes information of detection operations performed before migrating to the desired operating system;
[0086] The template generating unit 300 is used to determine the operating system category to which the operating system of each server belongs according to the migration difference information corresponding to the operating system of each server in the server cluster, and generate a classified migration template for the operating system category, wherein the classified migration template is obtained based on the optimization of the migration knowledge base;
[0087] The migration unit 400 is used to migrate the current operating system of the target server in the server cluster to the desired operating system according to the migration priority matching the current operating system of the target server and the classification migration template matching the current operating system.
[0088] In one embodiment, the working status of the operating system of the first current server includes at least one of the following sub-working statuses: whether the business run by the operating system of the first current server is an online business; the central processing unit occupancy of the operating system of the first current server; the memory occupancy of the operating system of the first current server; whether the operating system of the first current server allows shutdown; the functional role of the operating system of the first current server is the host or the backup machine; whether the operating system of the first current server is supported by the service provider.
[0089] In one embodiment, the first scanning unit 100 is specifically used to calculate an entropy index according to a plurality of sub-working states included in the working state of the operating system of the first current server; and determine the migration priority of the operating system of the first current server according to the value of the entropy index.
[0090] In one embodiment, the first scanning unit 100 is specifically used to determine, for any sub-working state included in the working state, a scoring value corresponding to the sub-working state using a scoring module; obtain a weight value corresponding to the sub-working state; and perform weighted statistics on the scoring values corresponding to each sub-working state and the weight values corresponding to each sub-working state to obtain the entropy index.
[0091] In one embodiment, the first scanning unit 100 is further used to use the first probe to traverse the server cluster once, and then, after a preset period, use the first probe to traverse the server cluster again; in each round of traversal of the server cluster, skip the servers that have successfully migrated the operating system and the servers that are migrating the operating system.
[0092] In one embodiment, the second scanning unit 200 is specifically configured to determine the full software package involved in the migration knowledge base; determine the system software package involved in the system data; and determine the migration difference information based on a comparison result between the full software package and the system software package.
[0093] In one embodiment, the second scanning unit 200 is specifically used to determine the full configuration file involved in the migration knowledge base; determine the system configuration file involved in the system data; and determine the migration difference information based on the comparison result between the full configuration file and the system configuration file.
[0094] In one embodiment, the second scanning unit 200 is specifically used to determine the full business software involved in the migration knowledge base; determine the system business software involved in the system data; and determine the migration difference information based on the comparison result between the full business software and the system business software.
[0095] In one embodiment, the second scanning unit 200 is specifically used to determine the full hardware list involved in the migration knowledge base; determine the system hardware list involved in the system data; and determine the migration difference information based on the comparison result between the full hardware list and the system hardware list.
[0096] In one embodiment, the template generation unit 300 is specifically used to determine the operating services and system configurations of each operating system based on the migration difference information corresponding to the operating systems of each server in the server cluster; and to assign operating systems with the same operating services and the same system configurations to the same operating system category.
[0097] In one embodiment, the template generation unit 300 is specifically used to optimize the migration knowledge base and generate a target classification migration template for a target operating system category within the operating system category based on the migration difference information of any operating system in the target operating system category; the optimization of the migration knowledge base includes deleting, weakening, and modifying the inspection process included in the migration knowledge base.
[0098] In one embodiment, the migration unit 400 is specifically used to wait for the execution of the migration task according to the migration priority that matches the current operating system, and to call the classified migration template that matches the current operating system during the execution phase of the migration task; or, after pre-loading the classified migration template that matches the current operating system, wait for the execution of the migration task according to the migration priority that matches the current operating system.
[0099] Each unit described in the above embodiments may be implemented by a computer chip or a product having a certain function. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0100] For the convenience of description, the above devices are described in terms of functions and are described separately in various units. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0101] The present disclosure also provides a computer device having the above Figure 4 The operating system migration device shown.
[0102] See also Figure 5 , Figure 5 is a schematic diagram of a computer device provided by an optional embodiment of the present disclosure, such as Figure 5As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 5 A processor 10 is taken as an example.
[0103] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0104] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.
[0105] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0106] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0107] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.
[0108] The embodiments of the present disclosure also provide a computer-readable storage medium. The above-mentioned method according to the embodiments of the present disclosure can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium and downloaded through a network, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0109] A part of the present disclosure may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of computer program instructions in computer-readable media includes, but is not limited to, source files, executable files, installation package files, etc., and accordingly, the way in which computer program instructions are executed by a computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to the computer.
[0110] Although the embodiments of the present disclosure have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present disclosure, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A method for migrating an operating system, characterized in that: The method comprises: Using a first probe to traverse a server cluster, obtaining a working state of an operating system of a first current server traversed by the first probe, and determining a migration priority of the operating system of the first current server according to the working state; Using a second probe to traverse the server cluster, obtaining system data of the operating system of the second current server traversed by the second probe, and comparing the system data with a migration knowledge base to determine migration difference information of the operating system of the second current server, wherein the migration knowledge base includes information on detection operations performed before migrating to the desired operating system; Determine the operating system category to which the operating system of each server belongs according to the migration difference information corresponding to the operating system of each server in the server cluster, and generate a classification migration template for the operating system category, wherein the classification migration template is obtained based on the optimization of the migration knowledge base; For a target server in the server cluster, the current operating system is migrated to the desired operating system according to a migration priority matching the current operating system of the target server and a classified migration template matching the current operating system.
2. The method according to claim 1, characterized in that The working state of the operating system of the first current server includes at least one of the following sub-working states: Whether the service run by the operating system of the first current server is an online service; CPU occupancy of the operating system of the first current server; Memory usage of the operating system of the first current server; Whether the operating system of the first current server allows shutdown; The functional role of the operating system of the first current server is a master or a standby; Whether the operating system of the first current server is supported by the service provider.
3. The method according to claim 1 or 2, characterized in that: The step of determining the migration priority of the operating system of the first current server according to the working status includes: Calculating an entropy index according to a plurality of sub-working states included in the working state of the operating system of the first current server; The migration priority of the operating system of the first current server is determined according to the value of the entropy indicator.
4. The method according to claim 3, characterized in that The calculating the entropy index according to the multiple sub-working states included in the working state of the operating system of the first current server includes: For any sub-working state included in the working state, a scoring module is used to determine a scoring value corresponding to the sub-working state; Obtaining a weight value corresponding to the sub-working state; The score values corresponding to each sub-working state and the weight values corresponding to each sub-working state are weightedly counted to obtain the entropy index.
5. The method according to claim 1, characterized in that The step of traversing the server cluster using the first probe to obtain the working status of the operating system of the first current server traversed by the first probe includes: After using the first probe to traverse the server cluster once, after a preset period, using the first probe to traverse the server cluster again; In each round of traversing the server cluster, servers whose operating systems have been successfully migrated and servers whose operating systems are being migrated are skipped.
6. The method according to claim 1, characterized in that The comparing the system data with the migration knowledge base to determine the migration difference information of the operating system of the second current server includes: Determining all software packages involved in the migration knowledge base; Determining the system software package involved in the system data; The migration difference information is determined based on a comparison result between the full software package and the system software package.
7. The method according to claim 1, characterized in that Comparing the system data with the migration knowledge base to determine migration difference information of the operating system of the second current server includes: Determining all configuration files involved in the migration knowledge base; Determine a system configuration file related to the system data; The migration difference information is determined based on a comparison result between the full configuration file and the system configuration file.
8. The method according to claim 1, characterized in that: Comparing the system data with the migration knowledge base to determine migration difference information of the operating system of the second current server includes: Determine the full amount of business software involved in the migration knowledge base; Determine the system business software involved in the system data; The migration difference information is determined based on the comparison result between the full business software and the system business software.
9. The method according to claim 1, characterized in that: Comparing the system data with the migration knowledge base to determine migration difference information of the operating system of the second current server includes: Determine a complete hardware list involved in the migration knowledge base; Determine a list of system hardware involved in the system data; The migration difference information is determined based on a comparison result between the full hardware list and the system hardware list.
10. The method according to claim 1, characterized in that The step of determining the operating system category to which the operating system of each server belongs according to the migration difference information corresponding to the operating system of each server in the server cluster includes: Determining the running business and system configuration of each operating system according to the migration difference information corresponding to the operating system of each server in the server cluster; Assign operating systems with the same running business and the same system configuration to the same operating system category.
11. The method according to claim 1, characterized in that: The step of generating a classification migration template for the operating system category includes: For a target operating system category within the operating system category, based on migration difference information of any operating system in the target operating system category, optimizing the migration knowledge base, and generating a target classification migration template; The optimizing the migration knowledge base includes deleting, weakening, and modifying the inspection process included in the migration knowledge base.
12. The method according to claim 1, characterized in that The step of migrating the current operating system to the desired operating system according to the migration priority matching the current operating system of the target server and the classified migration template matching the current operating system includes: According to the migration priority matching the current operating system, waiting for the execution of the migration task, and in the execution phase of the migration task, calling the classified migration template matching the current operating system; Alternatively, after preloading a classified migration template that matches the current operating system, the execution of the migration task is waited for according to a migration priority that matches the current operating system.
13. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the operating system migration method according to any one of claims 1 to 12 by executing the computer instructions.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the operating system migration method according to any one of claims 1 to 12.
15. A computer program product, characterized in that The method comprises computer instructions, wherein the computer instructions are used to cause a computer to execute the operating system migration method according to any one of claims 1 to 12.
