CN113992515A - System configuration method, device, equipment and storage medium - Google Patents

System configuration method, device, equipment and storage medium Download PDF

Info

Publication number
CN113992515A
CN113992515A CN202111637090.1A CN202111637090A CN113992515A CN 113992515 A CN113992515 A CN 113992515A CN 202111637090 A CN202111637090 A CN 202111637090A CN 113992515 A CN113992515 A CN 113992515A
Authority
CN
China
Prior art keywords
current
target host
configuration information
network card
configuration
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202111637090.1A
Other languages
Chinese (zh)
Other versions
CN113992515B (en
Inventor
程方全
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Clerware Technology Co ltd
Original Assignee
Shenzhen Clerware Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Clerware Technology Co ltd filed Critical Shenzhen Clerware Technology Co ltd
Priority to CN202111637090.1A priority Critical patent/CN113992515B/en
Publication of CN113992515A publication Critical patent/CN113992515A/en
Application granted granted Critical
Publication of CN113992515B publication Critical patent/CN113992515B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting

Abstract

The invention belongs to the field of host migration, and discloses a system configuration method, a device, equipment and a storage medium. The method comprises the following steps: extracting configuration information from the media guidance system file; determining the current target host IP according to the configuration information; selecting a target network card according to the configuration information and the current target host IP; the method comprises the steps of configuring the current target host according to the target network card, the IP of the current target host and configuration information, and realizing automatic configuration of the target host.

Description

System configuration method, device, equipment and storage medium
Technical Field
The present invention relates to the field of host migration, and in particular, to a system configuration method, apparatus, device, and storage medium.
Background
When host migration is performed, the target host is often a bare computer, that is, no operating system is installed on the target host, and a media boot system needs to be downloaded from the migration server, and then the system is started on the target host, and the addresses of the network and the migration server are configured. And then, the migration agent program on the system is connected to the migration server through the network, reports the hardware information of the host, receives the operation instruction of the migration server and receives the system and service data transmitted by the source host. Since the network topology environments of the migration target host are various, the configuration information of the media guidance system (such as the IP address, subnet mask, gateway, and IP address … … of the migration server of the target host) needs to be set according to the migration environment of the target host, which is troublesome if all the configuration information needs to be manually set, and especially in the case of mass migration, the efficiency is very low.
The above is only for the purpose of assisting understanding of the technical aspects of the present invention, and does not represent an admission that the above is prior art.
Disclosure of Invention
The invention mainly aims to provide a system configuration method, a system configuration device, equipment and a storage medium, and aims to solve the technical problem of low efficiency of manually configuring a network in the prior art.
To achieve the above object, the present invention provides a system configuration method, comprising the steps of:
when a current target host starts a media guidance system, extracting configuration information from a media guidance system file;
determining the current target host IP according to the configuration information;
selecting a target network card according to the configuration information and the current target host IP;
and configuring the current target host according to the target network card, the IP of the current target host and the configuration information so as to realize the system configuration of the current target host.
Optionally, the selecting a target network card according to the configuration information and the current target host IP includes:
detecting a network card in the current target host, and taking the detected network card as the current network card;
testing the connection state of the current network card and the target migration server according to the configuration information and the current target host IP to obtain a test result;
and when the test result is normal connection, determining that the current network card is the target network card.
Optionally, the testing the connection state between the current network card and the target migration server according to the configuration information and the current target host IP to obtain a test result includes:
setting the IP address of the current network card according to the IP of the current target host;
acquiring a plurality of target migration server IPs according to the configuration information;
and testing the connection state according to the current network card and the IP of the target migration server to obtain a test result.
Optionally, the determining the current target host IP according to the configuration information includes:
determining an available IP range according to the configuration information, wherein the available IP range is generated by the migration server according to the number of the current target hosts;
selecting an IP address from an available IP range as a current IP according to a preset random algorithm;
performing repeatability verification according to the current IP;
and when the repeatability verification result is usable, judging that the current IP is the current target host IP.
Optionally, the performing repeatability verification according to the current IP includes:
generating a detection packet according to the current IP;
sending a detection packet to the intranet and detecting whether a target host feeds back response information or not;
and when the feedback response information is not received, judging that the repeatability verification result is usable.
Optionally, after sending the detection packet to the intranet and detecting whether the target host feeds back the response information, the method includes:
when feedback response information is received, deleting the current IP from the available IP range to obtain an updated available IP range;
and selecting an IP address from the updated available IP range according to a preset random algorithm as the current IP for repeated verification.
Optionally, when the current target host starts the media guidance system, extracting configuration information from the media guidance system file includes:
when a target host starts a medium guide system, mounting a medium guide system file to obtain a temporary file directory;
obtaining a configuration file according to the temporary file directory;
and obtaining configuration information according to the configuration file.
In addition, to achieve the above object, the present invention further provides a system configuration apparatus, including:
the control module is used for extracting configuration information from a medium guide system file when a current target host starts a medium guide system;
the processing module is used for determining the IP of the current target host according to the configuration information;
the processing module is also used for selecting a target network card according to the configuration information and the current target host IP;
and the control module is also used for configuring the current target host according to the target network card, the IP of the current target host and the configuration information so as to realize the system configuration of the current target host.
In addition, to achieve the above object, the present invention further provides a system configuration device, including: a memory, a processor and a system configuration program stored on the memory and executable on the processor, the system configuration program being configured to implement the steps of the system configuration method as described above.
Furthermore, to achieve the above object, the present invention further provides a storage medium, which stores a system configuration program, and the system configuration program implements the steps of the system configuration method as described above when executed by a processor.
When a current target host starts a medium guide system, configuration information is extracted from a medium guide system file; determining the current target host IP according to the configuration information; selecting a target network card according to the configuration information and the current target host IP; and configuring the current target host according to the target network card, the IP of the current target host and the configuration information so as to realize the system configuration of the current target host. According to the scheme, the target host and the corresponding migration server need to be subjected to network configuration before host migration so as to ensure normal communication during data migration, the set configuration information is put into the media guidance system file, and then the network is automatically configured in the target host according to the media guidance system file, so that the trouble of manual operation is reduced, and the host migration efficiency is improved.
Drawings
Fig. 1 is a schematic structural diagram of a system configuration device of a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a first embodiment of a system configuration method according to the present invention;
FIG. 3 is a flowchart illustrating a second embodiment of a system configuration method according to the present invention;
fig. 4 is a block diagram of a first embodiment of the system configuration apparatus according to the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a system configuration device of a hardware operating environment according to an embodiment of the present invention.
As shown in fig. 1, the system configuration apparatus may include: a processor 1001, such as a Central Processing Unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a Wireless interface (e.g., a Wireless-Fidelity (Wi-Fi) interface). The Memory 1005 may be a Random Access Memory (RAM) Memory, or may be a Non-Volatile Memory (NVM), such as a disk Memory. The memory 1005 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the configuration shown in fig. 1 does not constitute a limitation of the system configuration device, and may include more or fewer components than those shown, or some components in combination, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a storage medium, may include therein an operating system, a network communication module, a user interface module, and a system configuration program.
In the system configuration apparatus shown in fig. 1, the network interface 1004 is mainly used for data communication with a network server; the user interface 1003 is mainly used for data interaction with a user; the processor 1001 and the memory 1005 in the system configuration device of the present invention may be disposed in the system configuration device, and the system configuration device calls the system configuration program stored in the memory 1005 through the processor 1001 and executes the system configuration method provided by the embodiment of the present invention.
An embodiment of the present invention provides a system configuration method, and referring to fig. 2, fig. 2 is a schematic flow chart of a first embodiment of the system configuration method according to the present invention.
In this embodiment, the system configuration method includes the following steps:
step S10: when the current target host starts the media guidance system, configuration information is extracted from the media guidance system file.
It should be noted that, the execution subject of the embodiment is the current target host system, and the current target host system may be a computer host system, may also be a virtual host, and may even be other systems having the same or similar functions as the computer host system, which is not limited in this embodiment.
It should be noted that, before the data migration, in the configuration process of the current target host, when the host migration is performed, because the network topology environments of the target host are various, the configuration information of the media guidance system (such as the IP address, subnet mask, gateway of the target host, and the IP address … … of the migration server) needs to be set according to the migration environment of the target host, which is troublesome if all the configuration information needs to be manually set, and especially in the case of performing mass migration, the efficiency is very low. According to the technical scheme, when the mobile media guidance system is downloaded from the migration server, relevant configuration information can be preset and then stored in a specific position of the media guidance system, and after the media guidance system is started by the target host, the migration agent program on the system acquires the configuration information from the preset position, so that the automatic setting of the configuration information is realized, manual operation is omitted, and the efficiency is improved.
It is understood that, when the target host, i.e. the host, is migrated, the host receiving the migration data, for example: host migration is to migrate an operating system and services from one computer to another, where the computer of the migrated system is called a source host and the computer to which the system migrates is called a target host. The target host may be a physical computer or a virtual machine.
It should be noted that the migration server is a computer providing a migration operation interface, all the migration source hosts and the migration target hosts are connected to the migration server, and the migration server controls all data flow in the host migration process, and an administrator can control which source host data is migrated to which target host through which administrator controls. The administrator may also preset configuration information of the migration target host in the operation interface of the migration server, download the media guidance system file (the media guidance system file includes configuration information of all the migration target hosts), start the system in the media guidance system file at the target host, and implement automatic configuration of the network. The media guidance system file may be used by multiple migration target hosts, that is, all migration target hosts share the configuration information of the media guidance system file, and the migration agent program is responsible for ensuring that the same configuration information (such as IP address) of the migration is not reused.
It should be noted that the media guidance system file may be a CD-ROM file (ISO 9660 CD-ROM file, also called ISO file for short), and the file may be recorded on a u-disc or an optical disc to be made into a guidance medium, and the system is started on a physical computer; or the file is hung to the optical drive equipment of the virtual machine, and the system is started through the optical drive equipment. When downloading the file, an administrator can preset system configuration information for the system through an operation interface of the migration server, and store the system configuration information to a position preset by the ISO file, after the migration target host starts the system, a migration agent program on the system can read the system configuration information from the preset position and configure the system configuration information to the system, and network automatic configuration of the target machine is achieved. The preferred way of creating the media guidance system file may be: the migration agent is integrated into the mirror image file of the media guidance system, and the file can be a file in WIM Format (called Microsoft Windows Imaging Format) or a file in squashfs Format. The image file, the configuration information preset by the user and the system boot related file are then packaged into an ISO format file (i.e. the aforementioned ISO 9660 CD-ROM file system). The media boot system can be started on the target host through the iso file, and the migration agent program can be automatically run after the system is started to execute the required configuration operation.
The configuration information is the configuration information of the target host which is written in the media guidance system file when a request for downloading the media guidance system file is received, so that the configuration information can be acquired from the media guidance system file when configuration operation is performed.
In this embodiment, the configuration information includes relevant information for network configuration and each migration server, for example: the IP address of the migration server (if the administrator does not set it, then all IP addresses of the migration server itself are obtained and saved in the configuration file), the IP address of the target host, the subnet mask, the gateway, etc. may be set.
Step S20: and determining the current target host IP according to the configuration information.
The configuration information stores rules for IP selection, such as: the current target host can only select an IP address in a certain IP address range as the IP address of the current target host, or directly use the IP preset in the configuration information by the administrator as the own IP address.
It can be understood that the current target host is the host defined in the description of the embodiment, and since a plurality of target hosts are doing the same operation at the same time, one of the target hosts is selected as the current target host for the description.
Step S30: and selecting a target network card according to the configuration information and the current target host IP.
It should be noted that a plurality of network cards may exist in a target host, the working state of each network card and the connection relationship between the network card and other devices may be different, and the network card can be ensured to perform effective network communication with the migration service corresponding to the target host after configuration by performing a one-by-one test on each network card without considering the topology structure between the devices.
In this implementation, the step of selecting the target network card according to the configuration information and the current target host IP may be: acquiring network card state information, determining at least one network card to be selected according to the network card state information, and selecting a target network card according to the network card to be selected, the configuration information and the current target host IP.
It can be understood that the network card status information is the working information of the network card, for example: whether the network cards are communicated with the network or not, whether physical lines are unblocked or not and the like, when the step of selecting the network cards is carried out on equipment with more network cards, the network cards are screened through the network card state information to select a plurality of network cards which are available for the network or have better network states as the network cards to be selected for the configuration information and the current target host IP to select the target network cards.
In this embodiment, the network card in the current target host is detected, and the detected network card is used as the current network card; testing the connection state of the current network card and the target migration server according to the configuration information and the current target host IP to obtain a test result; and when the test result is normal connection, determining that the current network card is the target network card.
It should be noted that, it is necessary to enumerate that a plurality of network card devices are on the current target host, then perform one-to-one detection on the plurality of network card devices, and after determining the IP address of the current target host, verify the connectivity of the network card, so that a test of the connection state needs to be performed to ensure the efficiency of host migration.
In this embodiment, a preferred scheme for testing the connection state between the current network card and the target migration server is provided: setting an IP address, a gateway and a subnet mask of a current network card according to the configuration information; acquiring each IP address of the migration server according to the configuration information (the migration server may be configured with a plurality of IP addresses); and testing the connection state according to the current network card and the IP address of the target migration server to obtain a test result. For example: after the IP address of the current target host is determined, testing the current network card through the IP address of the migration server in the IP address and the configuration information, and when the current network card cannot communicate with all the IP addresses of the migration server, indicating that the network card is not communicated with the migration server on the physical layer, so that the network card can be switched to be tested until the network card which can be normally connected is selected, and then setting the network card as the target network card.
Step S40: and configuring the current target host according to the target network card, the IP of the current target host and the configuration information so as to realize the system configuration of the current target host.
It should be noted that, after the target network card and the current target host IP are both determined, the target network card of the current target host is configured according to the current target host IP and other information (gateway, subnet mask and migration server IP successfully tested) in the configuration information, so as to complete the system configuration of the current target host and ensure the smooth and stable network during subsequent data migration.
In a specific implementation, after obtaining the preset configuration information, the migration agent starts to enumerate all network card devices on the system and the connection states of the network cards (which may be known through system call query and will not be described in detail here). The following configuration operations are performed on all network cards in a connection state one by one (because a target host may have a plurality of network cards in a connection state, some network cards can access a migration server, and some network cards cannot access the migration server, so that one by one attempt is needed, as long as any one network card can successfully configure an IP address, a migration agent program can successfully connect the migration server, and the subsequent network cards do not need to perform the trial configuration operation any more), after the IP address, the subnet mask and the gateway are configured, whether the network cards can be connected to the migration server through the IP address needs to be checked, specifically, all IP addresses of the migration server are obtained from a predetermined configuration file config.ini, then the connection is attempted one by one, if any one of the IP addresses can be successfully connected, it is indicated that the current IP of the current network card is correctly configured, the host service migration can be performed by using the current IP (that is, it is not necessary to attempt to configure other IPs for the current network card, other network cards are not required to be configured); if all IP addresses of the migration server fail to be connected, the IP addresses of other network cards need to be configured in an attempt mode, and the migration server needs to be connected in an attempt mode. Through the method, the system configuration information preset by an administrator can be transmitted to the media guidance system, and the automatic configuration of the media guidance system is realized, and the method comprises the following steps: the network card in a connection state on the target host is automatically searched, the available ip address is automatically selected from a preset ip address range, and the ip address accessible by the migration service is automatically searched, so that the trouble of manual operation is saved, and the efficiency is improved.
In this embodiment, when the current target host starts the media guidance system, configuration information is extracted from the media guidance system file; determining the current target host IP according to the configuration information; selecting a target network card according to the configuration information and the current target host IP; and configuring the current target host according to the target network card, the IP of the current target host and the configuration information so as to realize the system configuration of the current target host. According to the scheme, the target host and the corresponding migration server need to be subjected to network configuration before host migration so as to ensure normal communication during data migration, the set configuration information is put into the media guidance system file, and then the network is automatically configured in the target host according to the media guidance system file, so that the trouble of manual operation is reduced, and the host migration efficiency is improved.
Referring to fig. 3, fig. 3 is a flowchart illustrating a system configuration method according to a second embodiment of the present invention.
Based on the first embodiment, before the step S10, the system configuration method of this embodiment further includes:
step S21: and determining an available IP range according to the configuration information, wherein the available IP range is generated by the migration server according to the number of the current target hosts.
It should be noted that the available IP range is an IP that can be set by specifying a plurality of IPs as the target host, for example: the available IP range is 172.16.1.1-172.16.1.200, and each target host selects one IP address from the available IP range as the IP of the target host to perform communication. The size of the available IP range needs to be determined according to the number of the target hosts, which may be how many IPs are included in how many available IP ranges of the target hosts, a constant ratio of the number of the target hosts to the number of the IPs, or a fixed difference between the number of the target hosts and the number of the IPs.
The reason why the range is required to be specified according to the number of the target hosts is that if a range is not set and the IP is set at will or the set range is too large, the IP may collide with the IP addresses of other non-target hosts in the network, and the IP addresses are occupied at will, which results in that the IP is not set well by other hosts. And if the available IP range is set too small, the requirements of each target host cannot be met.
Step S22: and selecting an IP address from the available IP range as the current IP according to a preset random algorithm.
In the specific implementation, the random algorithm is used for allocation as the preferred scheme of this embodiment, under normal conditions, selection from large to small and regular selection in the available IP range can be achieved, but there is a situation that if all target hosts are selected in the same order, if all target hosts are selected from small to large, when one target host selects the first IP in the available IP range, all other hosts set the first IP, IP collision is detected, and thus a great deal of time is wasted.
Specifically, the present embodiment does not limit the expression form of the preset random algorithm, and proposes a preferred scheme for selecting an IP address from an available IP range according to the preset random algorithm, for example: a segment of the range (e.g., 172.16.1.1-172.16.1.200) is broken down into multiple individual IPs. The IP addresses are stored in an array and arranged in a descending order (the IP addresses may be distributed randomly or from ascending to descending, which is not limited here). Then randomly selecting an IP attempt configuration operation from the array, before configuration, detecting whether a host in the intranet uses the IP address (a specific detection method is described later), and if so, selecting the next IP address until no IP address is available in the array; an attempt is then made to use the IP address for network configuration and connection to the migration server. The IP address is selected randomly. The reason for this is that when a large number of host migrations are performed, many media guidance systems are simultaneously started in the network of the target host, and IP addresses are configured, and if the IP addresses are selected according to a specific sequence, the previously configured and used IP addresses are repeatedly detected, which affects the efficiency. Therefore, the technical scheme adopts a random selection method to avoid repeatedly detecting the IP address which is used. The specific method comprises the steps of randomly generating an integer, then carrying out size complementation on an array, then taking the complemented value as an index of the array, obtaining a corresponding IP address from the array, and if the address is not empty, selecting the IP to carry out detection and configuration (if the existing IP is detected or the configuration is failed, the IP address needs to be deleted from the array); and if the address is empty, the random integer is regenerated, and the next round of selection is carried out until all the IP addresses in the array are checked.
Step S23: and performing repeatability verification according to the current IP.
It should be noted that the process of the repeatability verification is a detection process, whether a host responds in the intranet is detected according to the current IP, if so, the IP is set, and if the IP is reused, the IP address conflict is caused, so that the IP is selected as the current target host IP only when the IP is not repeated, otherwise, the next IP is continuously and randomly searched for detection.
In this implementation, a probe packet is generated according to the current IP; sending a detection packet to the intranet and detecting whether a target host feeds back response information or not; and when the feedback response information is not received, judging that the repeatability verification result is usable.
In the implementation, when feedback response information is received, deleting the current IP from the available IP range to obtain an updated available IP range; and selecting an IP address from the updated available IP range according to a preset random algorithm as the current IP for repeated verification.
In a specific implementation, the specific process of IP probing may be, for example: assuming that the currently selected ip address is 172.16.1.12, the mac address of the current network card is 00:55:66:99:41: fd, sending an arp detection packet to the intranet through the current network card (the operation code of the arp packet is 1, the source mac is 00:55:66:99:41: fd, the source ip address is 0.0.0.0, the target mac is 00:00:00:00:00, and the target ip address is 172.16.1.12), inquiring the number of mac addresses corresponding to 172.16.1.12 in the intranet, and returning the corresponding mac addresses if a host in the intranet responds, which indicates that the host in the intranet uses the ip address and needs to select the next ip address for detection; if no host in the intranet responds, which means that no host is using the ip address, 172.16.1.12 the ip and subnet mask, gateway can be configured to the current network card.
Step S24: and when the repeatability verification result is usable, judging that the current IP is the current target host IP.
It can be understood that when the repeatability verification result is usable, it indicates that no host in each target host uses the IP, and at this time, the current IP may be regarded as the current target host IP, and further, subsequent setting is performed.
Determining an available IP range according to the configuration information, wherein the available IP range is generated by the migration server according to the number of the current target hosts; selecting an IP address from an available IP range as a current IP according to a preset random algorithm; performing repeatability verification according to the current IP; and when the repeatability verification result is usable, judging that the current IP is the current target host IP. By the method, the automatic selection of the IP address is realized, the probability of IP repetition is reduced by the available IP range and the preset random algorithm, and the speed of IP address repeatability verification is increased.
Furthermore, an embodiment of the present invention further provides a storage medium, where a system configuration program is stored on the storage medium, and the system configuration program, when executed by a processor, implements the steps of the system configuration method described above.
Referring to fig. 4, fig. 4 is a block diagram of a first embodiment of the system configuration apparatus according to the present invention.
As shown in fig. 4, a system configuration apparatus according to an embodiment of the present invention includes:
the control module 10 is configured to extract configuration information from a media guidance system file when a current target host starts a media guidance system;
the processing module 20 is configured to determine a current target host IP according to the configuration information;
the processing module 20 is further configured to select a target network card according to the configuration information and the current target host IP;
the control module 10 is further configured to configure the current target host according to the target network card, the IP of the current target host, and the configuration information, so as to implement system configuration of the current target host.
It should be understood that the above is only an example, and the technical solution of the present invention is not limited in any way, and in a specific application, a person skilled in the art may set the technical solution as needed, and the present invention is not limited thereto.
The control module 10 of this embodiment extracts configuration information from a media guidance system file when the current target host starts the media guidance system; the processing module 20 determines the current target host IP according to the configuration information; the processing module 20 selects a target network card according to the configuration information and the current target host IP; the control module 10 configures the current target host according to the target network card, the IP of the current target host and the configuration information, so as to implement the system configuration of the current target host. According to the scheme, the set configuration information is put into the media guidance system file, and then the network is automatically configured in the target host according to the media guidance system file, so that the trouble of manual operation is reduced, and the host migration efficiency is improved.
In an embodiment, the processing module 20 is further configured to detect a network card in the current target host, and use the detected network card as the current network card;
testing the connection state of the current network card and the target migration server according to the configuration information and the current target host IP to obtain a test result;
and when the test result is normal connection, determining that the current network card is the target network card.
In an embodiment, the processing module 20 is further configured to set an IP address of a current network card according to the current target host IP;
acquiring a plurality of target migration server IPs according to the configuration information;
and testing the connection state according to the current network card and the IP of the target migration server to obtain a test result.
In an embodiment, the processing module 20 is further configured to determine an available IP range according to the configuration information, where the available IP range is generated by the migration server according to the current number of the target hosts;
selecting an IP address from an available IP range as a current IP according to a preset random algorithm;
performing repeatability verification according to the current IP;
and when the repeatability verification result is usable, judging that the current IP is the current target host IP.
In an embodiment, the processing module 20 is further configured to generate a probe packet according to the current IP;
sending a detection packet to the intranet and detecting whether a target host feeds back response information or not;
and when the feedback response information is not received, judging that the repeatability verification result is usable.
In an embodiment, the processing module 20 is further configured to delete the current IP from the available IP range when receiving the feedback response message, so as to obtain an updated available IP range;
and selecting an IP address from the updated available IP range according to a preset random algorithm as the current IP for repeated verification.
In an embodiment, the control module 10 is further configured to mount a file of a media guidance system when the target host starts the media guidance system, so as to obtain a temporary file directory;
obtaining a configuration file according to the temporary file directory;
and obtaining configuration information according to the configuration file.
It should be noted that the above-described work flows are only exemplary, and do not limit the scope of the present invention, and in practical applications, a person skilled in the art may select some or all of them to achieve the purpose of the solution of the embodiment according to actual needs, and the present invention is not limited herein.
In addition, the technical details that are not described in detail in this embodiment may refer to the system configuration method provided in any embodiment of the present invention, and are not described herein again.
Further, it is to be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention or portions thereof that contribute to the prior art may be embodied in the form of a software product, where the computer software product is stored in a storage medium (e.g. Read Only Memory (ROM)/RAM, magnetic disk, optical disk), and includes several instructions for enabling a terminal device (e.g. a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A system configuration method, the system configuration method comprising:
when a current target host starts a media guidance system, extracting configuration information from a media guidance system file;
determining the current target host IP according to the configuration information;
selecting a target network card according to the configuration information and the current target host IP;
and configuring the current target host according to the target network card, the IP of the current target host and the configuration information so as to realize the system configuration of the current target host.
2. The method of claim 1, wherein selecting the target network card based on the configuration information and the current target host IP comprises:
detecting a network card in the current target host, and taking the detected network card as the current network card;
testing the connection state of the current network card and the target migration server according to the configuration information and the current target host IP to obtain a test result;
and when the test result is normal connection, determining that the current network card is the target network card.
3. The method of claim 2, wherein the step of testing the connection state between the current network card and the target migration server according to the configuration information and the current target host IP to obtain a test result comprises:
setting the IP address of the current network card according to the IP of the current target host;
acquiring a plurality of target migration server IPs according to the configuration information;
and testing the connection state according to the current network card and the IP of the target migration server to obtain a test result.
4. The method of claim 1, wherein said determining a current target host IP from said configuration information comprises:
determining an available IP range according to the configuration information, wherein the available IP range is generated by the migration server according to the number of the current target hosts;
selecting an IP address from an available IP range as a current IP according to a preset random algorithm;
performing repeatability verification according to the current IP;
and when the repeatability verification result is usable, judging that the current IP is the current target host IP.
5. The method of claim 4, wherein the performing the repeatability verification based on the current IP comprises:
generating a detection packet according to the current IP;
sending a detection packet to the intranet and detecting whether a target host feeds back response information or not;
and when the feedback response information is not received, judging that the repeatability verification result is usable.
6. The method according to claim 5, wherein after sending the probe packet to the intranet and detecting whether the target host feeds back the response information, the method comprises:
when feedback response information is received, deleting the current IP from the available IP range to obtain an updated available IP range;
and selecting an IP address from the updated available IP range according to a preset random algorithm as the current IP for repeated verification.
7. The method of claim 1, wherein extracting configuration information from the media boot system file when the current target host starts the media boot system comprises:
when a target host starts a medium guide system, mounting a medium guide system file to obtain a temporary file directory;
obtaining a configuration file according to the temporary file directory;
and obtaining configuration information according to the configuration file.
8. A system configuration apparatus, the system configuration apparatus comprising:
the control module is used for extracting configuration information from a medium guide system file when a current target host starts a medium guide system;
the processing module is used for determining the IP of the current target host according to the configuration information;
the processing module is also used for selecting a target network card according to the configuration information and the current target host IP;
and the control module is also used for configuring the current target host according to the target network card, the IP of the current target host and the configuration information so as to realize the system configuration of the current target host.
9. A system configuration device, characterized in that the device comprises: a memory, a processor, and a system configuration program stored on the memory and executable on the processor, the system configuration program configured to implement the steps of the system configuration method of any of claims 1 to 7.
10. A storage medium having stored thereon a system configuration program which, when executed by a processor, carries out the steps of the system configuration method according to any one of claims 1 to 7.
CN202111637090.1A 2021-12-30 2021-12-30 System configuration method, device, equipment and storage medium Active CN113992515B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111637090.1A CN113992515B (en) 2021-12-30 2021-12-30 System configuration method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111637090.1A CN113992515B (en) 2021-12-30 2021-12-30 System configuration method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113992515A true CN113992515A (en) 2022-01-28
CN113992515B CN113992515B (en) 2022-05-03

Family

ID=79734919

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111637090.1A Active CN113992515B (en) 2021-12-30 2021-12-30 System configuration method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113992515B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115001958A (en) * 2022-05-31 2022-09-02 济南浪潮数据技术有限公司 Data transmission method, server in-band device and server management device

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103580908A (en) * 2012-08-10 2014-02-12 百度在线网络技术(北京)有限公司 Server configuration method and system
CN103744710A (en) * 2014-01-24 2014-04-23 中国联合网络通信集团有限公司 Installation method and system of operating systems
CN105635312A (en) * 2016-01-25 2016-06-01 株洲南车时代电气股份有限公司 Method for realizing communication of multiple local area networks based on WinCE system and single network card
CN107592209A (en) * 2016-07-08 2018-01-16 北京奇虎科技有限公司 A kind of multi-network card server automatically configures the method and system of IP address information
CN109445801A (en) * 2018-11-05 2019-03-08 郑州云海信息技术有限公司 A kind of method and apparatus detecting bare machine network interface card information
CN110636637A (en) * 2018-06-22 2019-12-31 视联动力信息技术股份有限公司 Network connection method and device of Linux equipment
CN113347274A (en) * 2021-07-02 2021-09-03 大象慧云信息技术有限公司 Data processing system and method for micro-service
CN113407202A (en) * 2021-06-29 2021-09-17 浪潮软件科技有限公司 PXE heterogeneous cluster installation method based on cloud computing platform
CN113590140A (en) * 2021-06-29 2021-11-02 济南浪潮数据技术有限公司 Manufacturing method and system of visual PXE system
CN113794587A (en) * 2021-08-31 2021-12-14 新华三云计算技术有限公司 Port configuration method and device

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103580908A (en) * 2012-08-10 2014-02-12 百度在线网络技术(北京)有限公司 Server configuration method and system
CN103744710A (en) * 2014-01-24 2014-04-23 中国联合网络通信集团有限公司 Installation method and system of operating systems
CN105635312A (en) * 2016-01-25 2016-06-01 株洲南车时代电气股份有限公司 Method for realizing communication of multiple local area networks based on WinCE system and single network card
CN107592209A (en) * 2016-07-08 2018-01-16 北京奇虎科技有限公司 A kind of multi-network card server automatically configures the method and system of IP address information
CN110636637A (en) * 2018-06-22 2019-12-31 视联动力信息技术股份有限公司 Network connection method and device of Linux equipment
CN109445801A (en) * 2018-11-05 2019-03-08 郑州云海信息技术有限公司 A kind of method and apparatus detecting bare machine network interface card information
CN113407202A (en) * 2021-06-29 2021-09-17 浪潮软件科技有限公司 PXE heterogeneous cluster installation method based on cloud computing platform
CN113590140A (en) * 2021-06-29 2021-11-02 济南浪潮数据技术有限公司 Manufacturing method and system of visual PXE system
CN113347274A (en) * 2021-07-02 2021-09-03 大象慧云信息技术有限公司 Data processing system and method for micro-service
CN113794587A (en) * 2021-08-31 2021-12-14 新华三云计算技术有限公司 Port configuration method and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115001958A (en) * 2022-05-31 2022-09-02 济南浪潮数据技术有限公司 Data transmission method, server in-band device and server management device

Also Published As

Publication number Publication date
CN113992515B (en) 2022-05-03

Similar Documents

Publication Publication Date Title
US7496739B1 (en) System and related methods for automatically configuring a computing system
CN111045952A (en) Software testing method, flow playback device, terminal equipment and readable storage medium
JP2003527654A (en) Method, system and computer readable storage medium for automatic device driver configuration
CN108235763B (en) Detection system, method and related device
CN113992515B (en) System configuration method, device, equipment and storage medium
CN111782547A (en) Equipment testing method, device, server and readable storage medium
CN109683997A (en) Pass through the method for sandbox access application interface, sandbox and sandbox equipment
CN113485755B (en) Device driver verification method, device and storage medium
CN106445541B (en) Software construction method, software construction device and software construction system
CN112214413A (en) Application program testing method, device, equipment and storage medium
CN110830492B (en) Method and system for mutually scheduling edge applications based on CoreDNS registration service
CN111367810A (en) Test environment generation method, device and system, electronic equipment and readable medium
CN112104513B (en) Visual software load method, device, equipment and storage medium
CN110727601B (en) Multi-platform program testing method and related device
CN107688479B (en) Android system network cluster, construction method thereof, and Android system network cluster data processing method and system
US10977146B2 (en) Application operation monitoring apparatus and application operation monitoring method
CN107220092B (en) Method for deploying software, control server, readable medium and storage controller
CN112272221B (en) Batch deployment method and system for server cluster and computer readable storage medium
CN111385304B (en) System deployment method, device, computer storage medium and fusion system
US20220318374A1 (en) Diagnosis apparatus, diagnosis method, and computer-readable recording medium
CN111343042B (en) DNS analysis test method and test system
CN115827429A (en) Software testing method, device and platform
CN114357441A (en) Distributed application detection method, device, apparatus, storage medium, and program
CN116820492A (en) Method and device for installing system on intelligent network card
CN113905020A (en) IP address dynamic switching method, device, host and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant