A method for obtaining an OS image and related device

By dynamically allocating image addresses through device registration, the bandwidth limitation problem when deploying an OS on multiple servers in parallel is solved, improving OS image download efficiency and reducing resource consumption and waste.

CN116405471BActive Publication Date: 2026-03-20XFUSION DIGITAL TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-02
Publication Date
2026-03-20

AI Technical Summary

Technical Problem

When deploying an operating system on multiple servers in parallel, existing technologies suffer from low OS image download efficiency due to bandwidth limitations of the Ironic service device.

Method used

By registering the device, different mirror addresses are dynamically allocated to multiple servers for downloading based on the current download status of multiple stored mirror addresses, thereby reducing the bandwidth consumption of a particular mirror address.

Benefits of technology

It improves the efficiency of downloading OS images from multiple servers, avoids excessive consumption of bandwidth resources for a single image address, and reduces the waste of storage resources on registered devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116405471B_ABST
    Figure CN116405471B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a method for obtaining an OS image and related equipment, which relates to the technical field of computer science, and can improve the efficiency of obtaining the OS image. The method comprises the following steps: a registration device receives request information for obtaining an OS image address sent by a first server; a plurality of image addresses of the OS are stored in the registration device; any two image addresses in the plurality of image addresses are different; the registration device determines a first image address from the plurality of image addresses based on current download conditions corresponding to the plurality of image addresses respectively; and the registration device sends the first image address to the first server; the first image address is used for the first server to obtain the OS image from the first image address.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to the technical field of computer science, and particularly relate to a method for obtaining an OS image and related equipment. BACKGROUND

[0002] With the continuous development of computer technology, there are more and more application scenarios for deploying an operating system (OS) on a computing device (such as a server).

[0003] One method for deploying an OS based on an Ironic component in an OpenStack cloud computing management platform is to provide an OS image to a first server that needs to obtain an OS by an Ironic service device, so that the first server downloads the OS image from the Ironic service device and installs and deploys the obtained OS image.

[0004] However, based on the above method for deploying an OS, when multiple servers need to deploy an OS in parallel, the multiple servers simultaneously download the OS image from the Ironic service device. At this time, the efficiency of the multiple servers in downloading the OS image is affected by the bandwidth of the Ironic service device, that is, when the number of servers is large, the bandwidth of the Ironic service device is small, resulting in low efficiency of the servers in obtaining the OS image. SUMMARY

[0005] Embodiments of the present application provide a method for obtaining an OS image and related equipment, which can improve the efficiency of servers in obtaining the OS image.

[0006] To achieve the above object, embodiments of the present application adopt the following technical solutions:

[0007] In a first aspect, a method for obtaining an operating system (OS) image is provided, and the method includes: a registration device receiving request information for obtaining an image address of an OS sent by a first server; wherein the registration device stores a plurality of image addresses of the OS; any two image addresses in the plurality of image addresses are different; the registration device determines a first image address from the plurality of image addresses based on current download conditions corresponding to each of the plurality of image addresses; and the registration device sends the first image address to the first server; wherein the first image address is used by the first server to obtain an OS image from the first image address.

[0008] In this embodiment, the registration device responds to a request from a first server by determining a first mirror address from among multiple mirror addresses based on the current download status of each of the multiple mirror addresses stored locally. This allows the first server to download the OS image from the first mirror address. Compared to the method where all servers download the OS image from the Ironic service device, when multiple servers obtain the OS image using the method provided in this embodiment, the registration device determines different mirror addresses for each server based on the current download status of each of the multiple mirror addresses. This allows the multiple servers to download the OS image from different mirror addresses, thereby reducing the bandwidth resource usage of multiple servers on the server indicated by a single mirror address and thus improving the efficiency of downloading the OS image.

[0009] In one possible implementation, the first mirror address is the mirror address with the smallest current download volume among the plurality of mirror addresses; or the first mirror address is the mirror address with a current download volume less than a first threshold among the plurality of mirror addresses; wherein, the current download volume is used to characterize the current download status.

[0010] The aforementioned registration device determines the image address with the smallest current download volume among the multiple image addresses as the first image address; or, the registration device determines the image address with the current download volume less than a first threshold among the multiple image addresses as the first image address, thereby enabling the first server to download the OS image from the image address with the smaller download volume. Since the bandwidth resource utilization of the first image address is low, the efficiency of the first server in downloading the OS image is improved.

[0011] In one possible implementation, after the registration device sends the first image address to the first server, the method further includes: the registration device receiving a second image address sent by the first server, the second image address being the address where the first server stores the OS image after downloading it from the first image address; and the registration device storing the second image address.

[0012] The method provided in this application embodiment, after the first server downloads the OS image, involves the registration device storing the second image address sent by the first server locally. After the first server downloads the OS image from the first image address, the address of the OS image is stored in the first server. This ensures that the second image address is included among the multiple image addresses stored by the registration device. Subsequent servers seeking to obtain the OS image can then download it from the second image address. In other words, after the first server downloads the OS image, the registration device uses the first server as a new image source for servers to obtain the OS image from. This allows multiple servers to download the OS image from multiple image sources, thus improving the efficiency of downloading the OS image.

[0013] In a possible implementation, the registration device stores the second mirror address, including: when the number of mirror addresses with zero current download amount in the plurality of mirror addresses is less than or equal to the second threshold, the registration device stores the second mirror address.

[0014] The registration device stores the second mirror address only when the number of mirror addresses with zero current download amount (referred to as idle mirror addresses) in the plurality of mirror addresses is less than or equal to the second threshold; that is, only when the number of idle mirror addresses in the plurality of mirror addresses stored by the registration device is small, the registration device takes the second mirror address as a new mirror source for other servers to download the OS mirror from the mirror source, thereby reducing the number of idle mirror addresses in the plurality of mirror addresses, and further solving the problem of waste of storage resources in the registration device caused by too many idle mirror addresses in the plurality of mirror addresses.

[0015] In a possible implementation, the method further includes: the registration device receiving request information for obtaining a mirror address of an OS sent by a second server; and the registration device sending the second mirror address to the second server; wherein the second mirror address is used to instruct the second server to obtain the OS mirror from the first server, and the second mirror address is a mirror address with the smallest current download amount in the plurality of mirror addresses stored by the registration device.

[0016] In a second aspect, an embodiment of the present application provides a method for obtaining an operating system (OS) mirror, including: a first server sending request information for obtaining a mirror address of an OS to a registration device, wherein the registration device stores a plurality of mirror addresses of the OS; any two mirror addresses in the plurality of mirror addresses are different; the request information is used to instruct the registration device to determine a first mirror address from the plurality of mirror addresses based on current download conditions of the plurality of mirror addresses respectively, and send the first mirror address to the first server; and the first server obtains an OS mirror from the first mirror address.

[0017] In a possible implementation, the first mirror address is a mirror address with the smallest current download amount in the plurality of mirror addresses; or the first mirror address is a mirror address with a current download amount less than a first threshold in the plurality of mirror addresses; wherein the current download amount is used to represent the current download condition.

[0018] In a possible implementation, the request information for obtaining a mirror address of an OS sent by the first server to the registration device includes: when the first server determines that a startup item of the first server is a pre-execution environment (PXE) startup, the first server sends the request information to the registration device.

[0019] In a possible implementation, after the first server downloads the OS image from the first mirror address, the method further includes: the first server sending a second mirror address to the registration device, wherein the second mirror address is stored in the registration device, and the second mirror address is an address of the first server storing the OS image after the first server downloads the OS image from the first mirror address.

[0020] In a possible implementation, the plurality of mirror addresses include first-type mirror addresses and second-type mirror addresses, and the first server sending the second mirror address to the registration device includes: when the first mirror address is a first-type mirror address, the first server sends the second mirror address to the registration device.

[0021] Compared with the method in which each server after obtaining the OS image sends a second mirror address to the registration device, by dividing the plurality of mirror addresses of the OS stored in the registration device into first-type mirror addresses and second-type mirror addresses, only the server after downloading the OS image from the first-type mirror address sends the second mirror address to the registration device, thereby reducing the servers sending the second mirror address to the registration device, and further solving the problem that the registration device crashes due to too many servers simultaneously sending the second mirror address to the registration device.

[0022] In a possible implementation, the OS image stored in the first-type mirror address includes a target service, and the OS image stored in the second-type mirror address does not include the target service, and the first server sending the second mirror address to the registration device includes: the first server running the target service to send the second mirror address to the registration device.

[0023] In a possible implementation, after the first server obtains the OS image from the first mirror address, the method further includes: when the OS image is in an iso format, the first server installing the OS in the OS image.

[0024] In a third aspect, an embodiment of the present application provides a registration device, which includes: a transceiver and a processing unit; the transceiver is configured to receive request information for obtaining a mirror address of an OS sent by a first server; wherein the registration device stores a plurality of mirror addresses of the OS; any two mirror addresses in the plurality of mirror addresses are different; the processing unit is configured to determine a first mirror address from the plurality of mirror addresses based on current download situations corresponding to the plurality of mirror addresses respectively; the transceiver is further configured to send the first mirror address to the first server; wherein the first mirror address is used by the first server to obtain an OS image from the first mirror address.

[0025] In a possible implementation, the first mirror address is a mirror address with the smallest current download amount among the plurality of mirror addresses; or the first mirror address is a mirror address with a current download amount less than a first threshold among the plurality of mirror addresses; wherein the current download amount is used to represent a current download situation.

[0026] In a possible implementation, the device further includes a storage unit; the transceiver is configured to receive a second mirror address sent by the first server, the second mirror address being an address of the first server storing the OS image after the first server obtains the OS image from the first mirror address; and the storage unit is configured to store the second mirror address.

[0027] In a possible implementation, the storage unit is configured to store the second mirror address when a number of mirror addresses with a current download amount of zero among the plurality of mirror addresses is less than or equal to a second threshold.

[0028] In a possible implementation, the transceiver is configured to receive request information for obtaining a mirror address of an OS sent by a second server; and the transceiver is further configured to send the second mirror address to the second server; wherein the second mirror address is used to instruct the second server to obtain the OS image from the first server, and the second mirror address is a mirror address with the smallest current download amount among the plurality of mirror addresses stored by the device.

[0029] In a fourth aspect, an embodiment of the present application provides a first server, including a transceiver and a storage unit; the transceiver is configured to send request information for obtaining a mirror address of an OS to a device, wherein the device stores a plurality of mirror addresses of the OS; any two mirror addresses in the plurality of mirror addresses are different; the request information is used to instruct the device to determine a first mirror address from the plurality of mirror addresses based on current download situations of the plurality of mirror addresses respectively, and send the first mirror address to the first server; and the storage unit obtains an OS image from the first mirror address.

[0030] In a possible implementation, the first mirror address is a mirror address with the smallest current download amount among the plurality of mirror addresses; or the first mirror address is a mirror address with a current download amount less than a first threshold among the plurality of mirror addresses; wherein the current download amount is used to represent a current download situation.

[0031] In a possible implementation, the first server further includes a processing unit configured to determine that a start item of the first server is a pre-execution environment (PXE) start; and the transceiver is configured to send the request information to the device when the processing unit determines that the start item of the first server is the pre-execution environment (PXE) start.

[0032] In a possible implementation, the transceiver is further configured to send the second mirror address to the registration device, where the second mirror address is stored in the registration device, and the second mirror address is an address of the first server for storing the OS mirror after the first server downloads the OS mirror from the first mirror address.

[0033] In a possible implementation, the transceiver is configured to send the second mirror address to the registration device when the first mirror address is a first type of mirror address.

[0034] In a possible implementation, the processing unit is further configured to run the target service, so that the transceiver sends the second mirror address to the registration device.

[0035] In a possible implementation, the processing unit is further configured to install the OS in the OS mirror when the OS mirror format is an iso format of a disc mirror file.

[0036] In a fifth aspect, an embodiment of the present application provides a registration device, including a memory and a processor, the memory being coupled with the processor; the memory is configured to store computer program code, where the computer program code includes computer instructions; when the computer instructions are executed by the processor, the registration device performs the method in any one of the first aspect and possible implementation manners thereof.

[0037] In a sixth aspect, an embodiment of the present application provides a server, including a memory and a processor, the memory being coupled with the processor; the memory is configured to store computer program code, where the computer program code includes computer instructions; when the computer instructions are executed by the processor, the server performs the method in any one of the second aspect and possible implementation manners thereof.

[0038] In a seventh aspect, an embodiment of the present application provides a computer readable storage medium, which stores computer instructions, when the computer instructions are executed on a computing device, the computing device performs the method in any one of the first aspect or the second aspect and possible implementation manners thereof.

[0039] In an eighth aspect, an embodiment of the present application provides a computer program product, when the computer program product is executed on a computer, the computer performs the method in any one of the first aspect and possible implementation manners thereof.

[0040] In a ninth aspect, an embodiment of the present application provides a computer program product, including computer execution instructions, when the computer execution instructions are executed on a computer, the computer performs any one of the methods provided in the second aspect.

[0041] In a tenth aspect, an embodiment of the present application provides an OS image acquisition system, which comprises a registration device and a server. The registration device is configured to execute the method in any one of the first aspect and possible implementation manners thereof. The server is configured to execute the method in any one of the second aspect and possible implementation manners thereof.

[0042] In an eleventh aspect, an embodiment of the present application provides a computing device, which comprises a memory and a processor. The memory is coupled to the processor. The memory is configured to store computer program codes. The computer program codes comprise computer instructions. When the computer instructions are executed by the processor, the registration device is caused to execute the method in any one of the first aspect and possible implementation manners thereof.

[0043] It should be understood that the beneficial effects of the third aspect to the eleventh aspect and possible implementation manners thereof can refer to the technical effects of the first aspect and the second aspect and possible implementation manners thereof, which will not be described herein. BRIEF DESCRIPTION OF DRAWINGS

[0044] Figure 1 FIG. 1 is a schematic diagram of a system architecture for acquiring an OS image according to an embodiment of the present application;

[0045] Figure 2 FIG. 2 is a schematic diagram of an architecture of a computing device according to an embodiment of the present application;

[0046] Figure 3 FIG. 3 is a schematic diagram of a method flow for acquiring an OS image according to an embodiment of the present application; Figure 1

[0047] Figure 4 FIG. 4 is a schematic diagram of a method flow for registering an image address of an OS according to an embodiment of the present application;

[0048] Figure 5 FIG. 5 is a schematic diagram of a method flow for acquiring an OS image according to an embodiment of the present application; Figure 2

[0049] Figure 6 FIG. 6 is a schematic diagram of a structure of a registration device according to an embodiment of the present application;

[0050] Figure 7 FIG. 7 is a schematic diagram of a structure of a server according to an embodiment of the present application. DETAILED DESCRIPTION

[0051] The term “and / or” in the present document is merely used to describe an associated relationship between associated objects, which means that there can be three relationships, for example, A and / or B can mean that A exists alone, A and B exist together, and B exists alone. ​​

[0052] The terms "first" and "second" and the like in the description and claims of the present application are used for distinguishing between similar objects and are not necessarily used to describe a particular sequential or chronological order. For example, the first mirror address and the second mirror address are used for distinguishing between different mirror addresses, and are not used to describe a particular sequential or chronological order of the mirror addresses.

[0053] In the present application embodiments, the words "exemplary" and "for example" are used to mean serving as an example, instance, or illustration. Any implementation or design scheme described as "exemplary" or "for example" in the present application embodiments should not be construed as being preferred or advantageous over other implementations or design schemes. In fact, the use of the words "exemplary" or "for example" is intended to present concepts in a concrete manner.

[0054] In the description of the present application embodiments, the meaning of "a plurality of" is two or more, unless otherwise specified. For example, a plurality of mirror addresses means two or more mirror addresses.

[0055] First, some concepts involved in the method for obtaining an OS image and the related device provided by the present application embodiments are explained and described:

[0056] OpenStack: is an open source cloud computing management platform project, which is a combination of a series of open source software projects. The project is used to provide scalable and elastic cloud computing services for private clouds and public clouds.

[0057] Ironic component: a component in OpenStack, which is a sub-project for bare machine management, and can mainly provide functions such as redundant array of independent disks (RAID) of a hard disk, hard disk partition, hard disk formatting, installation of an operating system on a hard disk, installation of a driver on a hard disk, and installation of an application on a hard disk.

[0058] DHCP: dynamic host configuration protocol (DHCP), which is a network protocol for a local area network. It refers to that a server A (referred to as: DHCP device) controls an internet protocol (IP) address range, and when a server B logs in to the DHCP device, the DHCP device can automatically obtain an IP address and a subnet mask allocated for the server B.

[0059] Mirror: a file storage form, which is a type of redundancy. The data on one disk exists as a complete copy on another disk, which is a mirror.

[0060] With the continuous development of Internet technology, there are more and more application scenarios for deploying operating systems on servers.

[0061] A method for deploying an OS based on the Ironic component in OpenStack includes: the Ironic service device controlling a first server to reboot when the boot option is preboot execution environment (PXE); during the PXE reboot process, the first server obtains its own IP address from a DHCP device to enable data transmission with other remote devices. Then, the first server sends a request to the Ironic service device to obtain the OS image address; in response to this request, the Ironic service device sends the address of the locally stored OS image (hereinafter referred to as the target image address) to the first server, enabling the first server to download the OS image from the target image address and install and deploy it.

[0062] However, based on the above-described OS deployment method, when multiple servers need to deploy the OS in parallel, these servers simultaneously download the OS image from the Ironic service device indicated by the target image address. In this case, the efficiency of the servers downloading the OS image is affected by the bandwidth of the Ironic service device; that is, when there are many servers, the limited bandwidth of the Ironic service device leads to lower download efficiency.

[0063] The following is combined Figure 1 An exemplary system architecture for obtaining a mirrored OS is described, such as... Figure 1 The diagram shown is a schematic of a system architecture for obtaining an OS image according to an embodiment of this application. The system includes a registration device 101 and multiple servers 102.

[0064] The registration device 101 stores multiple image addresses of the OS, and any two of these image addresses are different. After receiving a request from the server 102 to obtain the image address of the OS, the registration device 101 determines the first image address from the multiple image addresses stored locally based on the current download status of each of the multiple image addresses, and sends the first image address to the server 102.

[0065] Server 102 is the server that needs to obtain the OS image. It obtains the first image address sent by registration device 104 by sending a request to registration device 101 to obtain the OS image address; and obtains the OS image from the first image address.

[0066] Optionally, the registration device 101 comprises an Ironic service unit 1011 and a DHCP service unit 1012.

[0067] The Ironic service device 101 is configured to set a startup item of the first server 102, and the implementation of the Ironic service device 101 is described in the following S110.

[0068] The DHCP service unit 1012 is configured to allocate an IP address for the server 102, and the implementation of the DHCP service unit 1012 comprises: after the DHCP service unit 1012 receives a request for obtaining an IP address sent by the server 102, the DHCP service unit 1012 allocates an IP address for the server 102, and sends the allocated IP address to the server 102.

[0069] It should be noted that the Ironic service unit 1011 and the DHCP service unit 1012 can also be independent devices other than the registration device 101, and the embodiment of the present application does not limit the form of the Ironic service unit 1011 and the DHCP service unit 1012.

[0070] Based on the system architecture for obtaining the OS image, the embodiment of the present application provides a method for obtaining the OS image, and in the method, the registration device determines a first image address from a plurality of image addresses according to current download conditions of the plurality of image addresses respectively corresponding to the plurality of image addresses, and sends the first image address to the first server, so that the first server obtains the OS image from the first image address. Compared with the method in which all servers download the OS image from the Ironic service device, when a plurality of servers obtain the OS image based on the method provided by the embodiment of the present application, the registration device determines different image addresses for the plurality of servers from the plurality of image addresses according to current download conditions of the plurality of image addresses respectively corresponding to the plurality of image addresses, so that the plurality of servers download the OS image from different image addresses, thereby reducing the occupation of bandwidth resources of a server indicated by one image address by the plurality of servers, and thus improving the efficiency of obtaining the OS image.

[0071] It should be noted that the registration device 101 and the server 102 can be a computer (such as a server) or other computing device with processing and transceiving functions. For example, Figure 2As shown in FIG. 1, a hardware structure schematic diagram of a computing device is provided in the embodiment of the present application, and the computing device can be the registration device 101 or the server 102. The hardware part of the computer device mainly includes an in-band controller, an out-of-band controller and a memory, and the software part mainly includes an out-of-band management module, a processor firmware and an operating system (OS) management unit. The out-of-band management module is located in the out-of-band controller, the OS management unit is located in the in-band controller, and the processor firmware can be located in the in-band controller (for example, as shown in FIG. 1) or in a firmware chip (not shown in FIG. 2) outside the in-band controller. The in-band controller can be a central processing unit (CPU). The out-of-band management module can be a management unit of a non-service module. For example, the out-of-band management module can perform remote maintenance and management on the computer device through a dedicated data channel. The out-of-band management module is completely independent of the operating system of the computer device, and can communicate with the BIOS and the OS (or the OS management unit) through the out-of-band management interface of the computer device. Figure 2 As shown in FIG. 1, the processor firmware can be a firmware, a BIOS, a management engine (ME) or microcode. It should be noted that the specific form of the processor firmware is not limited in the embodiment of the present application, and the above is only an exemplary description. In the following embodiments, only the processor firmware is taken as the BIOS for example. Figure 2

[0072] For example, the out-of-band management module can include a monitoring management unit outside the computer device, a management system in a management chip outside the in-band controller, a computer device BMC or an intelligent management unit (IMU), a system management module (SMM) and the like. It should be noted that the specific form of the out-of-band management module is not limited in the embodiment of the present application, and the above is only an exemplary description. In the following embodiments, only the out-of-band management module is taken as the BMC for example.

[0073] For example, the processor firmware (also referred to as processor firmware program) can be a firmware, a BIOS, a management engine (ME) or microcode. It should be noted that the specific form of the processor firmware is not limited in the embodiment of the present application, and the above is only an exemplary description. In the following embodiments, only the processor firmware is taken as the BIOS for example.

[0074] The memory, also referred to as internal memory or main memory, includes a volatile memory and a non-volatile memory installed in a memory slot on the mainboard of the computer device, and communicates with the memory controller through a memory channel.

[0075] ​It should be noted that the system architecture and application scenarios described in the embodiments of the present application are for more clearly illustrating the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. Those skilled in the art can know that, with the evolution of system architecture and the appearance of new business scenarios, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems.

[0076] The method for obtaining an OS image provided by the embodiments of the present application, as shown in the method comprises S110-S170. Figure 3

[0077] S110, the Ironic service device sets the startup item of the first server to PXE startup.

[0078] The first server is a server to be obtained OS image, such as any one of the plurality of servers 102 in the above Figure 1 .

[0079] The specific implementation of S110 comprises: the Ironic service device invokes the interface of the out-of-band controller (such as BMC) in the first server, powers off the in-band controller in the first server, and sets the startup item of the first server to pre-boot execution environment (PXE) startup; at this time, the first server will perform the following steps S120-S170 in the process of restarting. For the specific description of the out-of-band controller and the in-band controller in the first server, reference is made to the related description of the above Figure 2 , which will not be repeated here.

[0080] It should be noted that S110 can also set the startup item of the first server to PXE startup through other ways, for example: by manually modifying the configuration information of the first server; the specific implementation of setting the startup item of the first server to PXE startup is not limited in the embodiments of the present application.

[0081] S120, the first server obtains an IP address from the DHCP service device.

[0082] The specific implementation of S120 comprises: the first server sends request information for obtaining an IP address to the DHCP service device, and the DHCP service device sends an IP address allocated by the DHCP service device to the first server in response to the request information; so that the first server can perform data transmission with other remote devices.

[0083] S130, the first server sends request information for obtaining an OS image address to the registration device.

[0084] ​The first server mentioned above is the server from which the OS image is to be obtained; the request information sent by the first server includes the IP address of the first server.

[0085] It should be noted that the first server can send the request information to the registration device via a wired link or a wireless link. Specifically, this application does not limit the specific implementation method of the first server sending the request information to the registration device.

[0086] In one example, the above S130 can be implemented using a real-time operating system kernel and a virtual memory disk ramdisk, specifically including: the first server downloading the kernel and ramdisk from the Ironic service device; then running the kernel and ramdisk to mount the ramdisk under the system corresponding to the kernel; and then running the target service in the ramdisk to send the above request information to the registration.

[0087] It should be noted that the execution entity of S130 above is the in-band controller in the first server. For ease of description, the actions executed by the in-band controller in the first server will be referred to as the actions executed by the first server, and will not be described in detail hereafter.

[0088] Optionally, when the first server has an IP address that represents its own identity, and the first server obtains an OS image during operation, the Ironic service device and the first server do not need to execute S110-S120.

[0089] S140. The registered device receives a request to obtain the OS image address.

[0090] The aforementioned registered device stores multiple image addresses of the OS. Each OS image address refers to the address where the OS image is stored. Any two of these image addresses are different. The specific multiple image addresses of the OS stored in the aforementioned registered device are shown in Table 1 below. Specifically, the first image address of the OS is “192.168.2.12:8080 / root”, the second image address is “192.168.2.13:8080 / root”, and the third image address is “192.168.2.14:8080 / root”.

[0091] Table 1

[0092] Number Mirror address of OS 1 192.168.2.12:8080 / root 2 192.168.2.13:8080 / root 3 192.168.2.14:8080 / root

[0093] The source of the plurality of mirror addresses stored in the registration device can be that a part of the plurality of mirror addresses are preset by the user, and another part of the plurality of mirror addresses are registered in the registration device by other servers. The specific registration method is described below in S210-S230. The source of the plurality of mirror addresses stored in the registration device can also be that all of the plurality of mirror addresses are for presetting.

[0094] It should be noted that the request information received by the registration device is only used to indicate that a mirror address of an OS needs to be obtained from the registration device, and does not specify a specific mirror address of the OS to be obtained from the registration device. That is, the first server only obtains a mirror address of an OS from the registration device, and specifies a specific address of the OS mirror to be obtained from the registration device. The registration device determines which mirror address of the plurality of mirror addresses to send to the first server through S150 described below, which will not be described again.

[0095] It should be noted that the execution subject of S140 is the in-band controller in the registration device. For the convenience of description, the action performed by the in-band controller in the registration device is referred to as the action performed by the registration device, which will not be described again.

[0096] S150, the registration device determines a first mirror address from the plurality of mirror addresses of the OS based on the current download situation of each of the plurality of mirror addresses of the OS.

[0097] The current download situation of one of the plurality of mirror addresses of the OS (for example, mirror address A) is related to the current download amount of the mirror address A, wherein the current download amount of the mirror address A is the number of servers currently downloading the OS mirror from the mirror address A.

[0098] It should be noted that the registration device will update the current download amount of each mirror address in real time. For example, when server A downloads the OS mirror from the mirror address A, the registration device increases the current download amount of the mirror address A by 1. When server A finishes downloading the OS mirror from the mirror address A, the registration device decreases the current download amount of the mirror address A by 1.

[0099] In the first example, the relationship between the current download situation corresponding to the mirror address of the OS and the current download amount of the mirror address is shown in Table 2. The current download situation corresponding to the mirror address includes low level, medium level and high level, wherein the current download amount of the mirror address corresponding to the low level, medium level and high level increases in turn. When the current download amount of the mirror address is less than or equal to a first preset value, the current download situation corresponding to the mirror address is low level; when the current download amount of the mirror address is greater than the first preset value and less than or equal to a second preset value, the current download situation corresponding to the mirror address is medium level; when the current download amount of the mirror address is greater than the second preset value, the current download situation corresponding to the mirror address is high level; wherein the first preset value is less than the second preset value.

[0100] Table 2

[0101] Current download situation of mirror address Current download count of mirror address Low level count≤first preset value Medium level the first preset value <count < the second preset value High level count>second preset value

[0102] It should be noted that based on the relationship between the current download situation corresponding to the mirror address and the current download amount of the mirror address, at this time, the registration device can determine the mirror address with low level current download situation as the first mirror address, or the registration device can determine the mirror address with medium level current download situation as the first mirror address. Which level of mirror address is determined as the first mirror address can be determined according to the user's pre-setting.

[0103] The above level is only an example, and the specific division of the above level is not limited by the embodiments of the application.

[0104] In the second example, the relationship between the current download situation corresponding to the mirror address and the current download amount of the mirror address can be that the current download amount of the mirror address is used to represent the current download situation of the mirror address; that is, the current download amount of the mirror address is the current download situation of the mirror address. Specifically, as shown in Table 3, the current download amount of the mirror address "192.168.2.12:8080 / root" is 0; the current download amount of the mirror address "192.168.2.13:8080 / root" is 1; and the current download amount of the mirror address "192.168.2.14:8080 / root" is 2.

[0105] Table 3

[0106] Number Mirror address of OS Current download count 1 192.168.2.12:8080 / root 0 2 192.168.2.13:8080 / root 1 3 192.168.2.14:8080 / root 2

[0107] It should be noted that, based on the above relationship between the current download situation of the mirror address corresponding to the second example and the current download amount of the mirror address; at this time, the registration device determines the mirror address 192.168.2.12:8080 / root with the smallest current download amount in the above plurality of mirror addresses as the first mirror address; or the registration device determines the mirror address with a current download amount less than a first threshold (such as a first threshold of 2) in the above plurality of mirror addresses as the first mirror address, so that the first server downloads the OS image from the mirror address with a smaller download amount. Since the occupation rate of the bandwidth resource of the device indicated by the first mirror address is lower, the efficiency of the first server downloading the OS image is improved.

[0108] For example, assuming that the plurality of mirror addresses stored by the registration device are as shown in Table 3 above, the registration device determines the mirror address with the smallest current download amount in the plurality of mirror addresses as the first mirror address; at this time, the current download amount of “192.168.2.12:8080 / root” is 0, which is less than the current download amount 1 of “192.168.2.13:8080 / root” and the current download amount 2 of “192.168.2.14:8080 / root”; therefore, “192.168.2.12:8080 / root” is determined as the first mirror address.

[0109] It should be noted that, in the above first example or second example, when the mirror addresses meeting the first mirror address condition include a plurality of mirror addresses, the registration device can determine any one of the plurality of mirror addresses meeting the first mirror address condition as the first mirror address in a random manner. For example: assuming that there are 3 low-level mirror addresses, when the first mirror address is a low-level mirror address, the registration device determines any one of the 3 low-level mirror addresses as the first mirror address. The registration device can also determine one of the plurality of mirror addresses meeting the first mirror address condition as the first mirror address in a polling manner. The specific method of how the present application embodiment determines the first mirror address from the plurality of mirror addresses meeting the first mirror address condition is not limited.

[0110] In the third example, the current download situation of the mirror address corresponds to the current bandwidth resource of the mirror address; the registration device selects the mirror address with more current bandwidth resource as the first mirror address.

[0111] S160, the registration device sends the first mirror address to the first server.

[0112] It should be noted that the implementation of S160 is similar to the implementation of S130, and the specific description of S160 can refer to the related description of S130 above, which will not be repeated here.

[0113] S170, the first server acquires the OS image from the first mirror address.

[0114] The specific implementation method of S170 includes that the first server downloads the OS image from the first mirror address based on a trivial file transfer protocol (TFTP).

[0115] It should be noted that the format of the OS image can be an iso format of a disc image file or a qcow2 format of a disk image file; when the format of the OS image is the iso format, after S170, the first server installs an OS in the OS image, so that the first server runs the OS; when the format of the OS image is the qcow2 format, the first server does not need to install the OS image, and can directly run the OS in the OS image.

[0116] The registration device determines the first mirror address from the plurality of mirror addresses according to the current download situation of each of the plurality of mirror addresses in response to the request information of the first server, so that the first server downloads the OS image from the first mirror address; compared with the method that all servers download the OS image from the Ironic service device, when a plurality of servers acquire the OS image based on the method provided in the embodiments of the present application, the registration device determines different mirror addresses for the plurality of servers from the plurality of mirror addresses according to the current download situation of each of the plurality of mirror addresses, so that the plurality of servers download the OS image from different mirror addresses, thereby reducing the occupation of bandwidth resources of the server indicated by one mirror address by the plurality of servers, and thus improving the efficiency of downloading the OS image.

[0117] It should be noted that after S170, the first server can register the address of the OS image stored thereon as a new mirror address, so as to enable other servers to download the OS image from the first server.

[0118] Based on this, the embodiments of the present application further provide a method for registering a mirror address of an OS, as shown in Figure 4 The method specifically includes S210-S230.

[0119] S210, the first server sends a second mirror address to a registration device.

[0120] The second mirror address is an address of the OS image stored in the first server after the first server acquires the OS image from the first mirror address in S170.

[0121] For example, assume that the IP address and port number of the first server are "192.168.2.18:8081", and the first mirror address is "192.168.2.12:8080 / root". After the first server downloads the OS mirror from "192.168.2.12:8080 / root", the first server stores the OS mirror in the data folder of the first server. At this time, the second mirror address is "192.168.2.18:8081 / data".

[0122] The method of S210 is that the server after downloading the OS mirror sends the second mirror address to the registered device, so that the registered device stores the second mirror address, and the server to be subsequently used to obtain the OS mirror downloads the OS mirror from the second mirror address. However, when the number of servers that simultaneously send the second mirror address to the registered device is large, the efficiency of the registered device in receiving the second mirror address is reduced due to the limitation of the local bandwidth, and the registered device may even be shut down.

[0123] Based on this, in an example, the plurality of mirror addresses of the OS stored in the registered device includes a first type of mirror address and a second type of mirror address. When the first mirror address is the first type of mirror address, the first server performs S210 to send the second mirror address to the registered device. When the first mirror address is the second type of mirror address, the first server performs an ending action. That is, when the first mirror address is the second type of mirror address, the first server does not perform the action of sending the second mirror address to the registered device in S210.

[0124] Compared with the method in which each server after obtaining the OS mirror sends the second mirror address to the registered device, by dividing the plurality of mirror addresses of the OS stored in the registered device into the first type of mirror address and the second type of mirror address, only the server after downloading the OS mirror from the first type of mirror address sends the second mirror address to the registered device, thereby reducing the number of servers that send the second mirror address to the registered device, and thereby solving the problem that the registered device is shut down due to the excessive number of servers that simultaneously send the second mirror address to the registered device.

[0125] It should be noted that the method of dividing the plurality of mirror addresses of the OS stored in the registered device into the first type of mirror address and the second type of mirror address includes various implementation manners, and the specific implementation manners are as follows:

[0126] In an example, the plurality of mirror addresses of the OS are sequentially numbered with Arabic numerals, wherein any two mirror addresses correspond to different numbers. Then, the mirror addresses numbered with odd numbers are determined as the first type of mirror address, and the mirror addresses numbered with even numbers are determined as the second type of mirror address.

[0127] In another example, the preset mirror address among the above multiple mirror addresses is determined as the first type of mirror address, and the mirror address added through S210-S230 among the above multiple mirror addresses is determined as the second type of mirror address.

[0128] It should be understood that, during initialization, the aforementioned registered device includes at least one preset image address as the original image address for the server seeking to obtain the OS image to download the OS image from the original image address.

[0129] It should be noted that the OS images stored in the first type of image address and the second image address can be completely the same or different. When the OS images stored in the first type of image address and the second image address are different, it is specifically manifested as follows: the OS image stored in the first type of image address includes the target service, while the OS image stored in the second type of image address does not include the target service. Specifically, S210 can be that the first server runs the target service, and after running it, the first server actively sends the second image address to the registered device. In other words, the target service is a service used to actively send the second image address to the registered device.

[0130] S220, The registered device receives the second mirror address sent by the first server.

[0131] S230, Register the device storage second mirror address.

[0132] The aforementioned registration device stores a second image address so that the updated set of image addresses (i.e., multiple image addresses of the OS stored in the registration device) includes this second image address. In other words, after the second image address is stored on the registration device, it serves as a new image address, which servers subsequently seeking to obtain the OS image can use to download the OS image.

[0133] For example, assuming the set of mirror addresses on the registered device is as shown in Table 3 above, and the second mirror address is "192.168.2.18:8081 / data"; after storing the second mirror address on the registered device, the set of mirror addresses on the registered device is as shown in Table 4 below, including the current download volume of "192.168.2.18:8081 / data" and "192.168.2.18:8081 / data".

[0134] Table 4

[0135] Number Mirror address of OS Current download count 1 192.168.2.12:8080 / root 0 2 192.168.2.13:8080 / root 1 3 192.168.2.14:8080 / root 2 4 192.168.2.18:8081 / data 0

[0136] The S220-S230 is that the registration device stores all the received second mirror addresses as new mirror addresses. However, when the number of the mirror addresses stored in the registration device is too large, there are a plurality of idle mirror addresses with a current download amount of 0 in the mirror addresses stored in the registration device, thereby causing a waste of storage resources in the registration device.

[0137] Based on this, in an example, the registration device includes the following when storing the second mirror address: the registration device determines the number of idle mirror addresses in the plurality of mirror addresses stored locally, and when the number is less than or equal to a second threshold value, it indicates that the number of idle mirror addresses in the plurality of mirror addresses stored in the registration device is small, so the registration device stores the second mirror address. When the number of idle mirror addresses is greater than the second threshold value, it indicates that the number of idle mirror addresses in the plurality of mirror addresses stored in the registration device is large, and the registration device does not store the second mirror address, thereby reducing the number of idle mirror addresses in the plurality of mirror addresses, and further solving the problem of waste of storage resources in the registration device caused by too many idle mirror addresses in the plurality of mirror addresses.

[0138] The method provided by the embodiment of the application stores the second mirror address sent by the first server in the registration device after the first server obtains the OS mirror image, the second mirror address being an address of the first server storing the OS mirror image after the first server obtains the OS mirror image from the first mirror address; so that the second mirror address is included in the plurality of mirror addresses stored by the registration device, and a server to be subsequently obtained OS mirror image can obtain the OS mirror image from the second mirror address, that is, the registration device takes the first server as a new mirror source after the first server obtains the OS mirror image, so as to obtain the OS mirror image from the mirror source by the subsequent server, thereby enabling the plurality of servers to obtain the OS mirror image from the plurality of mirror sources, and thus improving the efficiency of downloading the OS mirror image.

[0139] Optionally, in combination with Figure 4 As Figure 5 indicated, when the second server obtains the OS mirror image, the method further includes S310-S330.

[0140] S310, the second server sends request information for obtaining the mirror address of the OS to the registration device.

[0141] The second server and the first server are different servers in the plurality of servers 102 as shown in Figure 1 .

[0142] It should be noted that the implementation mode of S310 is the same as that of S130, and the specific description of S310 can refer to the related description of S130, which will not be repeated here.

[0143] S320, the registration device sends a second image address with the least current download amount among the plurality of image addresses of the OS stored locally to the second server.

[0144] It should be noted that after S230, the plurality of image addresses of the OS stored by the registration device includes the second image address; since the second image address is stored into the registration device by the first server just now, the current download amount of the second image address is 0. Therefore, the second image address is sent to the second server.

[0145] S330, the second server acquires the OS image from the first server indicated by the second image address.

[0146] It should be noted that the implementation manner of S330 is the same as that of S170, and the specific description of S330 can refer to the related description of S170, which will not be repeated here.

[0147] The above mainly introduces the scheme provided by the embodiments of the present application from the perspective of the method. In order to realize the above functions, the registration device and the first server contain the corresponding hardware structure and / or software module for executing each function. Those skilled in the art should easily realize that the units and algorithm steps of each example described in combination with the embodiments disclosed in the present application can be realized in the form of hardware or a combination of hardware and computer software. Whether a certain function is realized in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0148] The embodiments of the present application can divide the functional modules of the registration device and the first server according to the above method, for example, the registration device and the first server can respectively include each functional module corresponding to each function division, or two or more functions can be integrated in one processing module. The integrated module can be realized in the form of hardware or software functional module. It should be noted that the division of modules in the embodiments of the present application is illustrative, and is only a logical function division. Actual implementation can have another division manner.

[0149] As Figure 6 A structural schematic diagram of a registration device is shown, which includes a transceiver unit 110 and a processing unit 120, wherein the transceiver unit 110 can be a transceiver (not shown) in the computing device; the processing unit 120 can be a processor (not shown) in the computing device. Figure 2 As Figure 2 A structural schematic diagram of a registration device is shown, which includes a transceiver unit 110 and a processing unit 120, wherein the transceiver unit 110 can be a transceiver (not shown) in the computing device; the processing unit 120 can be a processor (not shown) in the computing device. Figure 2a CPU in a computing device.

[0150] The transceiver 110 is configured to receive the request information for obtaining the first mirror address of the OS sent by the first server; for example, step S140 in the foregoing method embodiment is performed.

[0151] The processing unit 120 is configured to determine the first mirror address from the plurality of mirror addresses based on current download statuses of the plurality of mirror addresses respectively; for example, step S150 in the foregoing method embodiment is performed.

[0152] The transceiver 110 is further configured to send the first mirror address to the first server; for example, step S160 in the foregoing method embodiment is performed.

[0153] Optionally, the foregoing registered device further includes a storage unit 130, where the storage unit 130 can be a memory in a computing device. Figure 2 a memory in a computing device.

[0154] The transceiver 110 is configured to receive the second mirror address sent by the first server; for example, step S220 in the foregoing method embodiment is performed.

[0155] The storage unit 130 is configured to store the second mirror address; for example, step S230 in the foregoing method embodiment is performed.

[0156] Optionally, the storage unit 130 is further configured to store the second mirror address when the number of mirror addresses with zero current download amount in the plurality of mirror addresses is less than or equal to the second threshold.

[0157] Optionally, the transceiver 110 is configured to receive the request information for obtaining the mirror address of the OS sent by the second server; for example, step S310 in the foregoing method embodiment is performed.

[0158] The transceiver 110 is further configured to send the second mirror address with the minimum current download amount in the plurality of mirror addresses of the OS stored locally to the second server; for example, step S320 in the foregoing method embodiment is performed.

[0159] For specific descriptions of the foregoing optional manners, refer to the foregoing method embodiments, which will not be described herein again. In addition, the foregoing explanations and beneficial effect descriptions of any registered device provided herein can refer to the corresponding method embodiments described above, which will not be described herein again.

[0160] The embodiment of the present application further provides a structural diagram of a first server, for example, the server can be an in-band controller, such as Figure 7 as shown in the figure, the server includes a transceiver 210 and a storage unit 220; where the transceiver 210 can be a CPU in a computing device. Figure 2The transceiver in the computing device shown Figure 2 (Not shown); the storage unit 220 may be Figure 2 The memory in a computing device.

[0161] The transceiver unit 210 is used to send a request to the registered device to obtain the image address of the OS; for example, to execute step S130 in the above method embodiment.

[0162] Storage unit 220 is used to obtain the OS image from the first image address; for example, by performing step S170 in the above method embodiment.

[0163] Optionally, the first server further includes a processing unit 230; wherein, the processing unit 230 may be... Figure 2 The CPU in a computing device.

[0164] Processing unit 230 is used to determine that the startup item of the first server is the pre-execution environment PXE startup.

[0165] The transceiver unit 210 is also used to send request information to the registration device when the processing unit 230 determines that the startup item of the first server is the pre-execution environment PXE startup.

[0166] Optionally, the transceiver unit 210 is also used to send a second mirror address to the registered device; for example, by performing step S210 in the above method embodiment.

[0167] Optionally, the transceiver unit 210 is used to send a second mirror address to the registered device when the first mirror address is a first type of mirror address.

[0168] Optionally, the processing unit 230 is also used to run a target service so that the transceiver unit 210 sends a second mirror address to the registered device.

[0169] Optionally, the processing unit 230 is also used to install the OS in the OS image when the OS image format is an optical disc image file (iso).

[0170] For a detailed description of the above-mentioned optional methods, please refer to the foregoing method embodiments, which will not be repeated here. Furthermore, the explanation of any of the first servers provided above and the description of their beneficial effects can be found in the corresponding method embodiments described above, and will not be repeated here.

[0171] This application embodiment also provides a registration device, including a memory and a processor, wherein the memory is coupled to the processor; the memory is used to store computer program code, wherein the computer program code includes computer instructions; when the computer instructions are executed by the processor, the registration device performs the above-mentioned actions. Figure 3-Figure 5 Any method executed by the registered device.

[0172] The embodiment of the present application further provides a server, comprising a memory and a processor, the memory is coupled with the processor; the memory is used for storing computer program codes, wherein the computer program codes comprise computer instructions; when the computer instructions are executed by the processor, the server executes any one of the methods executed by the first server. Figure 3-Figure 5 The embodiment of the present application further provides a server, comprising a memory and a processor, the memory is coupled with the processor; the memory is used for storing computer program codes, wherein the computer program codes comprise computer instructions; when the computer instructions are executed by the processor, the server executes any one of the methods executed by the first server.

[0173] The embodiment of the present application further provides a computer readable storage medium, which stores computer instructions, when the computer instructions are run on a computing device, the computing device executes any one of the methods executed by the registration device or the first server.

[0174] The explanation and beneficial effects of the related content in any one of the computer readable storage media provided above can refer to the corresponding embodiments described above, and will not be repeated here.

[0175] The embodiment of the present application provides a computer program product, when it is run on a computer, the computer executes any one of the methods executed by the registration device.

[0176] The embodiment of the present application provides another computer program product, when it is run on a computer, the computer executes any one of the methods executed by the first server.

[0177] The embodiment of the present application provides an OS image system, which comprises a registration device and a server, the registration device is used for executing any one of the methods executed by the registration device; the server is used for executing any one of the methods executed by the first server.

[0178] The embodiments of the present application further provide a computer program product containing instructions, which, when executed on a computer, cause the computer to perform any of the methods described above. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on the computer, the processes or functions according to the embodiments of the present application are wholly or partially generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transferred from one website, computer, server or data center to another website, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) mode. The computer-readable storage medium can be any available medium that can be accessed by a computer or include one or more data storage devices that can be integrated with the medium, such as servers, data centers, etc. The available medium can be a magnetic medium (such as a floppy disk, a hard disk, a magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as an SSD), etc.

[0179] It should be noted that the above devices for storing computer instructions or computer programs provided by the embodiments of the present application, such as but not limited to the above memory, computer-readable storage medium and communication chip, etc., are all non-volatile (non-transitory).

[0180] In the above embodiments, all or part can be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, all or part generates the processes or functions in the embodiments of the present application. The computer can be a general purpose computer, a special purpose computer, a computer network or other programmable apparatus. The computer instructions can be stored in a computer readable storage medium or transferred from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions can be transferred from one website, computer, server or data center to another website, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.) mode. The computer readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. integrated with one or more available media. The available media can be magnetic media (such as floppy disk, magnetic disk, magnetic tape), optical media (such as digital video disc (DVD)), or semiconductor media (such as solid state drive (SSD)) and the like.

[0181] Through the description of the above embodiments, those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above division of functional modules is taken as an example, and in actual application, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, device and unit described above can refer to the corresponding process in the foregoing method embodiments, which will not be repeated here.

[0182] In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the modules or units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the shown or discussed each other can be indirect coupling or communication connection through some interfaces, devices or units, and can be electrical, mechanical or other forms.

[0183] The units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.

[0184] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present alone, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.

[0185] The integrated unit, if realized in the form of a software functional unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the part of the prior art that contributes to the technical solutions or all or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: a flash memory, a mobile hard disk, a read-only memory, a random access memory, a magnetic disk or an optical disk, and various program code storage media.

[0186] The above is only a specific embodiment of the present application, but the protection scope of the present application is not limited thereto. Any change or replacement within the technical scope disclosed in the present application should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A method for obtaining an operating system (OS) image, characterized in that, include: The registration device receives a request from the first server to obtain the image address of the OS; wherein, the registration device stores multiple image addresses of the OS; any two of the multiple image addresses are different; The registration device determines the first mirror address from the multiple mirror addresses based on the current download status corresponding to each of the multiple mirror addresses; The registration device sends the first image address to the first server; wherein, the first image address is used by the first server to obtain the OS image from the first image address; After the registered device sends the first mirror address to the first server, the method further includes: The registration device receives a second image address sent by the first server. The second image address is the address where the first server stores the OS image after obtaining the OS image from the first image address. The registered device stores the second mirror address.

2. The method according to claim 1, characterized in that, The first mirror address is the mirror address with the smallest current download volume among the plurality of mirror addresses; or the first mirror address is the mirror address with a current download volume less than a first threshold among the plurality of mirror addresses; wherein, the current download volume is used to characterize the current download status.

3. The method according to claim 1, characterized in that, The registered device stores the second mirror address, including: When the number of mirror addresses with zero current downloads is less than or equal to the second threshold, the registered device stores the second mirror address.

4. The method according to claim 1, characterized in that, The method further includes: The registration device receives a request from the second server to obtain the image address of the OS; The registration device sends the second image address to the second server; wherein, the second image address is used to instruct the second server to obtain the OS image from the first server, and the second image address is the image address with the smallest current download volume among the multiple image addresses stored by the registration device.

5. A method for obtaining an operating system (OS) image, characterized in that, include: The first server sends a request to the registration device to obtain the image address of the OS. The registration device stores multiple image addresses of the OS. Any two of the multiple image addresses are different. The request is used by the registration device to determine a first image address from the multiple image addresses based on the current download status corresponding to each of the multiple image addresses, and then send the first image address to the first server. The first server obtains the OS image from the first image address; After the first server obtains the OS image from the first image address, the method further includes: The first server sends a second image address to the registered device, wherein the second image address is used to store the OS image in the registered device, and the second image address is the address in the first server where the OS image is stored after the first server downloads the OS image from the first image address.

6. The method according to claim 5, characterized in that, The first mirror address is the mirror address with the smallest current download volume among the plurality of mirror addresses; or the first mirror address is the mirror address with a current download volume less than a first threshold among the plurality of mirror addresses; wherein, the current download volume is used to characterize the current download status.

7. The method according to claim 5 or 6, characterized in that, The first server sends a request to the registered device to obtain the OS image address, including: When the first server determines that its startup item is PXE pre-execution environment startup, the first server sends the request information to the registered device.

8. The method according to claim 5, characterized in that, The plurality of mirror addresses includes a first type of mirror address and a second type of mirror address. The first server sends the second mirror address to the registered device, including: When the first mirror address is the first type of mirror address, the first server sends the second mirror address to the registered device.

9. The method according to claim 8, characterized in that, The OS image stored in the first type of image address includes the target service, while the OS image stored in the second type of image address does not include the target service. The first server sends the second image address to the registered device, including: The first server runs the target service to send the second mirror address to the registered device.

10. The method according to claim 5 or 6, characterized in that, After the first server obtains the OS image from the first image address, the method further includes: When the OS image format is an ISO image file, the first server installs the OS from the OS image.

11. A computing device, characterized in that, The device includes a memory and a processor, the memory being coupled to the processor; the memory is used to store computer program code, the computer program code including computer instructions; when the computer instructions are executed by the processor, the processor causes the processor to perform the method as described in any one of claims 1 to 10.

Citation Information

Patent Citations

  • Multi-address downloading method, device and terminal

    CN106210029A

  • Operating system installation method and device, medium and computing equipment

    CN115469889A