CN108880864B - Automatic recovery method and device for service network, disaster recovery platform and storage medium - Google Patents

Automatic recovery method and device for service network, disaster recovery platform and storage medium Download PDF

Info

Publication number
CN108880864B
CN108880864B CN201810528734.5A CN201810528734A CN108880864B CN 108880864 B CN108880864 B CN 108880864B CN 201810528734 A CN201810528734 A CN 201810528734A CN 108880864 B CN108880864 B CN 108880864B
Authority
CN
China
Prior art keywords
network
network card
service
virtual machine
information
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.)
Active
Application number
CN201810528734.5A
Other languages
Chinese (zh)
Other versions
CN108880864A (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.)
Sangfor Technologies Co Ltd
Original Assignee
Sangfor Technologies 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 Sangfor Technologies Co Ltd filed Critical Sangfor Technologies Co Ltd
Priority to CN201810528734.5A priority Critical patent/CN108880864B/en
Publication of CN108880864A publication Critical patent/CN108880864A/en
Application granted granted Critical
Publication of CN108880864B publication Critical patent/CN108880864B/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/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0663Performing the actions predefined by failover planning, e.g. switching to standby network elements
    • 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/0876Aspects of the degree of configuration automation
    • H04L41/0886Fully automatic configuration

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Automation & Control Theory (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a method and a device for automatically recovering a service network, a disaster recovery platform and a storage medium. The method comprises the steps of firstly obtaining the equipment instance ID of each network card in the registry of the service virtual machine, then obtaining corresponding network information through each equipment instance ID, then filtering the network information meeting the preset rule, taking the rest network information after filtering as the configuration parameters of the network cards, and finally respectively setting each network card according to the configuration parameters of the network cards, so that the network configuration is not required to be manually carried out by a user, and the normal operation of the network can be ensured.

Description

Automatic recovery method and device for service network, disaster recovery platform and storage medium
Technical Field
The present invention relates to the field of disaster recovery technologies, and in particular, to a method and an apparatus for automatically recovering a service network, a disaster recovery platform, and a storage medium.
Background
The automatic recovery of the cross-platform disaster recovery service network is a scheme that a user migrates service to another platform (platform for disaster recovery) when a problem occurs in a virtualization platform, and can automatically configure the service network and quickly recover the service. The method has important significance for reducing the network configuration time of the user and reducing the influence caused by service interruption.
Currently, mainstream virtualization manufacturers such as vmware deploy veeam, which is known as cloud platform application service, with high availability. Under the condition of providing a user disaster recovery solution, the problem of service network recovery is not solved. It is usually necessary for the user to manually configure the network, which is very disadvantageous for the user with a large service network.
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 an automatic recovery method of a service network, a disaster recovery platform and a storage medium, and aims to solve the technical problem that network configuration needs to be manually performed in the prior art.
In order to achieve the above object, the present invention provides an automatic recovery method for a service network, which comprises the following steps:
acquiring equipment instance IDs of network cards in a registry of a service virtual machine;
acquiring corresponding network information through each equipment instance ID;
filtering the network information meeting the preset rules, and taking the residual network information after filtering as a network card configuration parameter;
and respectively setting each network card according to the network card configuration parameters.
Preferably, the setting of each network card according to the network card configuration parameters specifically includes:
and calling a preset interface, and setting each network card by the preset interface according to the network card configuration parameters.
Preferably, the setting of each network card according to the network card configuration parameters specifically includes:
displaying the network card configuration parameters;
responding to a selection instruction input by a user based on the displayed network card configuration parameters, and determining the network card configuration parameters corresponding to the network cards according to the selection instruction;
and setting the network cards by adopting corresponding network card configuration parameters.
Preferably, the obtaining the device instance ID of each network card in the registry of the service virtual machine specifically includes:
and traversing each network card in the registry according to the sequence of the network cards in the registry of the service virtual machine, and acquiring the device instance ID of the traversed network card.
Preferably, the network information includes: network card name, PCI slot, IP address, gateway, subnet mask and IP address acquisition mode;
correspondingly, the filtering the network information meeting the preset rule, and taking the remaining network information after filtering as a network card configuration parameter specifically includes:
filtering network information which meets the condition that the IP address acquisition mode is automatic acquisition or the IP address is an invalid address to acquire undetermined network information;
grouping the network information to be determined according to the PCI slot;
and respectively filtering the network information which is not nearest to the current time in each group of the network information to be determined, and taking the rest network information in each group of the network information to be determined as network configuration parameters.
Preferably, the obtaining the device instance ID of each network card in the registry of the service virtual machine specifically includes:
when the service virtual machine is started in the windows preinstallation environment Winpe of the disaster recovery platform, the device instance ID of each network card in the registry of the service virtual machine is obtained.
Preferably, when the service virtual machine is started in the windows preinstalled environment Winpe of the disaster recovery platform, acquiring the device instance ID of each network card in the registry of the service virtual machine specifically includes:
after cross-platform disaster recovery is carried out on a disaster recovery platform, when a service virtual machine is started in a windows preinstalled environment Winpe of the disaster recovery platform, the device instance ID of each network card in a registry of the service virtual machine is obtained.
In addition, to achieve the above object, the present invention further provides an automatic service network recovery apparatus, including:
the data acquisition module is used for acquiring the equipment instance ID of each network card in the registry of the service virtual machine;
the information acquisition module is used for acquiring corresponding network information through each equipment instance ID;
the information filtering module is used for filtering the network information meeting the preset rule and taking the residual network information after filtering as the network card configuration parameter;
and the parameter equipment module is used for respectively setting each network card according to the network card configuration parameters.
Preferably, the parameter device module is further configured to call a preset interface, and the preset interface sets each network card according to the network card configuration parameters.
Preferably, the parameter device module is further configured to display the network card configuration parameters, respond to a selection instruction input by a user based on the displayed network card configuration parameters, determine the network card configuration parameters corresponding to each network card according to the selection instruction, and set the network card configuration parameters corresponding to each network card.
Preferably, the data obtaining module is further configured to traverse each network card in the registry according to the sequence of the network cards in the registry of the service virtual machine, and obtain the device instance ID of the traversed network card.
Preferably, the network information includes: network card name, PCI slot, IP address, gateway, subnet mask and IP address acquisition mode;
correspondingly, the information filtering module is further configured to filter network information that satisfies that the IP address acquisition mode is automatic acquisition or the IP address is an invalid address, and acquire network information to be determined; grouping the network information to be determined according to the PCI slot; and respectively filtering the network information which is not nearest to the current time in each group of the network information to be determined, and taking the rest network information in each group of the network information to be determined as network configuration parameters.
Preferably, the data obtaining module is further configured to obtain a device instance ID of each network card in a registry of the service virtual machine when the service virtual machine is started in the windows preinstalled environment wind of the disaster recovery platform.
Preferably, the data obtaining module is further configured to obtain a device instance ID of each network card in a registry of the service virtual machine when the service virtual machine is started in a windows preinstalled environment Winpe of the disaster recovery platform after the cross-platform disaster recovery is performed on the disaster recovery platform.
In addition, to achieve the above object, the present invention further provides a disaster recovery platform, including: the system comprises a memory, a processor and a service network automatic recovery program stored on the memory and capable of running on the processor, wherein the service network automatic recovery program is configured to realize the steps of the service network automatic recovery method.
In addition, to achieve the above object, the present invention also provides a computer readable storage medium, having a service network automatic recovery program stored thereon, which, when executed by a processor, implements the steps of the service network automatic recovery method as described above.
The method comprises the steps of firstly obtaining the equipment instance ID of each network card in the registry of the service virtual machine, then obtaining corresponding network information through each equipment instance ID, then filtering the network information meeting the preset rule, taking the rest network information after filtering as the configuration parameters of the network cards, and finally respectively setting each network card according to the configuration parameters of the network cards, so that the network configuration is not required to be manually carried out by a user, and the normal operation of the network can be ensured.
Drawings
Fig. 1 is a schematic structural diagram of a disaster recovery platform of a hardware operating environment according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating a first embodiment of a method for automatically restoring a service network according to the present invention;
FIG. 3 is a schematic diagram illustrating an automatic setting of a network card according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of network card selection settings according to an embodiment of the present invention;
fig. 5 is a flowchart illustrating a second embodiment of a method for automatically restoring a service network according to the present invention;
fig. 6 is a block diagram of a first embodiment of an automatic recovery apparatus for a service network 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 disaster recovery platform in a hardware operating environment according to an embodiment of the present invention.
As shown in fig. 1, the disaster recovery platform may include: a processor 1001, such as a 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 comprise a Display screen (Display), an input unit such as keys, etc., and the optional user interface 1003 may also comprise a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic 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 is not intended to be limiting of the disaster recovery platform and may include more or fewer components than shown, or some components in combination, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and a service network automatic recovery program.
In the disaster recovery platform shown in fig. 1, the network interface 1004 is mainly used for network communication with external devices; the user interface 1003 is mainly used for receiving input instructions of a user; the disaster recovery platform calls the service network automatic recovery program stored in the memory 1005 through the processor 1001, and executes the following operations:
acquiring equipment instance IDs of network cards in a registry of a service virtual machine;
acquiring corresponding network information through each equipment instance ID;
filtering the network information meeting the preset rules, and taking the residual network information after filtering as a network card configuration parameter;
and respectively setting each network card according to the network card configuration parameters.
Further, the processor 1001 may call the service network automatic recovery program stored in the memory 1005, and further perform the following operations:
and calling a preset interface, and setting each network card by the preset interface according to the network card configuration parameters.
Further, the processor 1001 may call the service network automatic recovery program stored in the memory 1005, and further perform the following operations:
displaying the network card configuration parameters;
responding to a selection instruction input by a user based on the displayed network card configuration parameters, and determining the network card configuration parameters corresponding to the network cards according to the selection instruction;
and setting the network cards by adopting corresponding network card configuration parameters.
Further, the processor 1001 may call the service network automatic recovery program stored in the memory 1005, and further perform the following operations:
and traversing each network card in the registry according to the sequence of the network cards in the registry of the service virtual machine, and acquiring the device instance ID of the traversed network card.
Further, the network information includes: network card name, PCI slot, IP address, gateway, subnet mask and IP address acquisition mode; the processor 1001 may call the service network automatic recovery program stored in the memory 1005, and further perform the following operations:
filtering network information which meets the condition that the IP address acquisition mode is automatic acquisition or the IP address is an invalid address to acquire undetermined network information;
grouping the network information to be determined according to the PCI slot;
and respectively filtering the network information which is not nearest to the current time in each group of the network information to be determined, and taking the rest network information in each group of the network information to be determined as network configuration parameters.
Further, the processor 1001 may call the service network automatic recovery program stored in the memory 1005, and further perform the following operations:
when the service virtual machine is started in the windows preinstallation environment Winpe of the disaster recovery platform, the device instance ID of each network card in the registry of the service virtual machine is obtained.
Further, the processor 1001 may call the service network automatic recovery program stored in the memory 1005, and further perform the following operations:
after cross-platform disaster recovery is carried out on a disaster recovery platform, when a service virtual machine is started in a windows preinstalled environment Winpe of the disaster recovery platform, the device instance ID of each network card in a registry of the service virtual machine is obtained.
According to the scheme, the device instance IDs of the network cards in the registry of the service virtual machine are firstly obtained, the corresponding network information is then obtained through the device instance IDs, the network information meeting the preset rules is filtered, the rest network information after filtering is used as the network card configuration parameters, and finally the network cards are respectively set according to the network card configuration parameters, so that the network configuration is not required to be manually performed by a user, and the normal operation of the network can be ensured.
Based on the hardware structure, the embodiment of the method for automatically recovering the service network is provided.
Referring to fig. 2, fig. 2 is a flowchart illustrating a first embodiment of a method for automatically restoring a service network according to the present invention.
In a first embodiment, the method for automatically restoring a service network includes the following steps:
s10: acquiring equipment instance IDs of network cards in a registry of a service virtual machine;
it should be noted that, the network cards are usually enumerated in the registry, and therefore, the device instance IDs of the network cards in the registry of the service virtual machine can be obtained.
It can be understood that, in order to prevent the situation of missing the device instance ID for obtaining the network card, in this embodiment, each network card in the registry of the service virtual machine may be traversed according to the sequence of the network cards in the registry, and the device instance ID of the traversed network card is obtained.
S20: acquiring corresponding network information through each equipment instance ID;
it can be understood that the network information is information for reflecting detailed network parameters, and in this embodiment, the network information may include: the network interface card name, a Peripheral Component Interconnect (PCI) slot, an Internet Protocol (IP) address of interconnection between networks, a gateway, a subnet mask, and an IP address obtaining method may also include other information, which is not limited in this embodiment.
S30: filtering the network information meeting the preset rules, and taking the residual network information after filtering as a network card configuration parameter;
because some network information belongs to information that does not help the setting of the network card, if the network information is not clear, the normal requirement of the network card is affected, in this embodiment, the network information that meets the preset rule may be filtered, that is, the network information that meets the preset rule is excluded, and the remaining network information after filtering is the network information that does not meet the preset rule.
In a specific implementation, step S30 may specifically include: filtering network information which meets the condition that the IP address acquisition mode is automatic acquisition or the IP address is an invalid address to acquire undetermined network information; grouping the network information to be determined according to the PCI slot; and respectively filtering the network information which is not nearest to the current time in each group of the network information to be determined, and taking the rest network information in each group of the network information to be determined as network configuration parameters.
It should be noted that, each piece of network information to be determined is grouped according to the PCI slots, that is, each set of network information to be determined has the same PCI slot, and it is assumed that there are four PCI slots, at this time, the PCI slots may be respectively identified as 11, 12, 13, and 14, when the network information to be determined is grouped, the network information to be determined having the PCI slot 11 may be divided into a first group, the network information to be determined having the PCI slot 12 may be divided into a second group, the network information to be determined having the PCI slot 13 may be divided into a third group, and the network information to be determined having the PCI slot 14 may be divided into a fourth group.
It can be understood that an invalid address is an IP address that cannot be validated, and is usually an IP address at the beginning of 169 (e.g., 169.254.1.3), and there are two cases in general, where the first case is that the IP address acquisition mode is a Dynamic Host Configuration Protocol (DHCP) acquisition mode, that is, an automatic acquisition mode, and the IP address usually needs to be allocated by a DHCP server, but may not be connected to the DHCP server due to network connection or the like, and at this time, the IP address at the beginning of 169 is allocated by the system; the second case is that the IP address acquisition method is static configuration, that is, a fixed IP address (e.g., 192.168.1.3) is set, and when the fixed IP address is allocated to another device, the fixed IP address cannot be set again, and the system allocates 169 the first IP address.
In a specific implementation, when a network card is inserted into a PCI slot, a network message is generated for the network card, and at the same time, a sequence number (e.g., 0480) is also generated for the network card, and if another network card is inserted into the PCI slot, a network message is generated for the network card, and at the same time, a larger sequence number (e.g., 0481) is also generated for the network card, so that when it is specifically determined whether the network message is the closest network message to the current time, the network message corresponding to the largest sequence number is the closest network message to the current time, and otherwise, the network message not corresponding to the largest sequence number is not the closest network message to the current time.
S40: and respectively setting each network card according to the network card configuration parameters.
It should be noted that, when each network card is set, an automatic setting mode may be adopted, referring to fig. 3, that is, each network card may be set by a preset interface according to the network card configuration parameters through the preset interface (that is, an API in an operating system is called, the operating system may be a win32 operating system, or may be other operating systems).
Of course, a user selection mode may also be adopted, that is, a user interface (GUI) may be provided for the user to selectively recover, referring to fig. 4, specifically, the network card configuration parameters may be displayed (that is, displayed in the user interface), and then, in response to a selection instruction input by the user based on the displayed network card configuration parameters, the network card configuration parameters corresponding to each network card may be determined according to the selection instruction, and the network card configuration parameters corresponding to each network card may be set.
It can be understood that after each network card is set, the network card can be enabled and disabled once, so that the network card configuration parameters of the network card take effect.
In this embodiment, the device instance IDs of the network cards in the registry of the service virtual machine are first obtained, then the corresponding network information is obtained through the device instance IDs, the network information meeting the preset rules is filtered, the remaining network information after filtering is used as the network card configuration parameters, and finally the network cards are respectively set according to the network card configuration parameters, so that the network configuration is not required to be manually performed by a user, and the normal operation of the network can be ensured.
Further, as shown in fig. 5, a second embodiment of the method for automatically restoring a service network according to the present invention is provided based on the first embodiment.
In this embodiment, step S10 specifically includes:
s10': when the service virtual machine is started in the windows preinstallation environment Winpe of the disaster recovery platform, the device instance ID of each network card in the registry of the service virtual machine is obtained.
It should be noted that the Winpe is the smallest Win32 subsystem with limited services, and is based on the Windows XP Professional and above kernel running in protected mode. It includes running Windows installation programs and scripts, connecting network sharing, automating basic processes, and performing the minimal functions required for hardware validation.
In a specific implementation, in order to facilitate obtaining the device instance ID of each network card in the registry of the service virtual machine when the service virtual machine is started in the wipe of the disaster recovery platform, in this embodiment, before the service virtual machine is started, the registry of the service virtual machine is mounted in the wipe, then information of the service network automatic recovery program is written in the registry of the service virtual machine, and the service network automatic recovery program is injected into the disk, so that it is ensured that the service virtual machine can call the service network automatic recovery program to perform a service by initial start, and thus step S10' is started.
Of course, after the service virtual machine in the disaster recovery platform is started, the service network automatic recovery program may be installed according to a user instruction, and then step S10' is executed.
It should be noted that, usually, after the disaster recovery platform performs cross-platform disaster recovery, the service virtual machine is started in the windows preinstalled environment wind of the disaster recovery platform, and therefore, the step S10' may specifically include:
after cross-platform disaster recovery is carried out on a disaster recovery platform, when a service virtual machine is started in a windows preinstalled environment Winpe of the disaster recovery platform, the device instance ID of each network card in a registry of the service virtual machine is obtained.
It can be understood that the disaster recovery platform usually mounts the disk through Winpe after the data is backed up across platforms (where the data is generally stored in a disk format).
In addition, referring to fig. 6, an embodiment of the present invention further provides an automatic service network recovery apparatus, where the automatic service network recovery apparatus includes:
the data acquisition module 10 is configured to acquire device instance IDs of network cards in a registry of the service virtual machine;
it should be noted that, the network cards are usually enumerated in the registry, and therefore, the device instance IDs of the network cards in the registry of the service virtual machine can be obtained.
It can be understood that, in order to prevent the situation of missing the device instance ID for obtaining the network card, in this embodiment, each network card in the registry of the service virtual machine may be traversed according to the sequence of the network cards in the registry, and the device instance ID of the traversed network card is obtained.
An information obtaining module 20, configured to obtain corresponding network information through each device instance ID;
it can be understood that the network information is information for reflecting detailed network parameters, and in this embodiment, the network information may include: the network interface card name, a Peripheral Component Interconnect (PCI) slot, an Internet Protocol (IP) address of interconnection between networks, a gateway, a subnet mask, and an IP address obtaining method may also include other information, which is not limited in this embodiment.
The information filtering module 30 is configured to filter the network information meeting the preset rule, and use the remaining network information after filtering as a network card configuration parameter;
because some network information belongs to information that does not help the setting of the network card, if the network information is not clear, the normal requirement of the network card is affected, in this embodiment, the network information that meets the preset rule may be filtered, that is, the network information that meets the preset rule is excluded, and the remaining network information after filtering is the network information that does not meet the preset rule.
In a specific implementation, the information filtering module 30 is further configured to filter network information that satisfies that the IP address acquisition mode is automatic acquisition or the IP address is an invalid address, and acquire network information to be determined; grouping the network information to be determined according to the PCI slot; and respectively filtering the network information which is not nearest to the current time in each group of the network information to be determined, and taking the rest network information in each group of the network information to be determined as network configuration parameters.
It should be noted that, each piece of network information to be determined is grouped according to the PCI slots, that is, each set of network information to be determined has the same PCI slot, and it is assumed that there are four PCI slots, at this time, the PCI slots may be respectively identified as 11, 12, 13, and 14, when the network information to be determined is grouped, the network information to be determined having the PCI slot 11 may be divided into a first group, the network information to be determined having the PCI slot 12 may be divided into a second group, the network information to be determined having the PCI slot 13 may be divided into a third group, and the network information to be determined having the PCI slot 14 may be divided into a fourth group.
It can be understood that an invalid address is an IP address that cannot be validated, and is usually an IP address at the beginning of 169 (e.g., 169.254.1.3), and there are two cases in general, where the first case is that the IP address acquisition mode is a Dynamic Host Configuration Protocol (DHCP) acquisition mode, that is, an automatic acquisition mode, and the IP address usually needs to be allocated by a DHCP server, but may not be connected to the DHCP server due to network connection or the like, and at this time, the IP address at the beginning of 169 is allocated by the system; the second case is that the IP address acquisition method is static configuration, that is, a fixed IP address (e.g., 192.168.1.3) is set, and when the fixed IP address is allocated to another device, the fixed IP address cannot be set again, and the system allocates 169 the first IP address.
In a specific implementation, when a network card is inserted into a PCI slot, a network message is generated for the network card, and at the same time, a sequence number (e.g., 0480) is also generated for the network card, and if another network card is inserted into the PCI slot, a network message is generated for the network card, and at the same time, a larger sequence number (e.g., 0481) is also generated for the network card, so that when it is specifically determined whether the network message is the closest network message to the current time, the network message corresponding to the largest sequence number is the closest network message to the current time, and otherwise, the network message not corresponding to the largest sequence number is not the closest network message to the current time.
And the parameter device module 40 is configured to set each network card according to the network card configuration parameters.
It should be noted that, when each network card is set, an automatic setting mode may be adopted, referring to fig. 3, that is, each network card may be set by a preset interface according to the network card configuration parameters through the preset interface (that is, an API in an operating system is called, the operating system may be a win32 operating system, or may be other operating systems).
Of course, a user selection mode may also be adopted, that is, a user interface (GUI) may be provided for the user to selectively recover, referring to fig. 4, specifically, the network card configuration parameters may be displayed (that is, displayed in the user interface), and then, in response to a selection instruction input by the user based on the displayed network card configuration parameters, the network card configuration parameters corresponding to each network card may be determined according to the selection instruction, and the network card configuration parameters corresponding to each network card may be set.
It can be understood that after each network card is set, the network card can be enabled and disabled once, so that the network card configuration parameters of the network card take effect.
In this embodiment, the device instance IDs of the network cards in the registry of the service virtual machine are first obtained, then the corresponding network information is obtained through the device instance IDs, the network information meeting the preset rules is filtered, the remaining network information after filtering is used as the network card configuration parameters, and finally the network cards are respectively set according to the network card configuration parameters, so that the network configuration is not required to be manually performed by a user, and the normal operation of the network can be ensured.
Further, with continued reference to fig. 6, a second embodiment of the automatic recovery apparatus for a service network according to the present invention is proposed based on the first embodiment.
In this embodiment, the data obtaining module 10 is further configured to obtain the device instance ID of each network card in the registry of the service virtual machine when the service virtual machine is started in the windows preinstalled environment wind of the disaster recovery platform.
It should be noted that the Winpe is the smallest Win32 subsystem with limited services, and is based on the Windows XP Professional and above kernel running in protected mode. It includes running Windows installation programs and scripts, connecting network sharing, automating basic processes, and performing the minimal functions required for hardware validation.
In a specific implementation, in order to facilitate obtaining the device instance ID of each network card in the registry of the service virtual machine when the service virtual machine is started in the wipe of the disaster recovery platform, in this embodiment, before the service virtual machine is started, the registry of the service virtual machine is mounted in the wipe, then information of the service network automatic recovery program is written in the registry of the service virtual machine, and the service network automatic recovery program is injected into the disk, so that it is ensured that the service virtual machine can call the service network automatic recovery program to perform a service by initial start, and thus the data acquisition module 10 is started to be called.
Of course, after the service virtual machine in the disaster recovery platform is started, the service network automatic recovery program may be installed according to a user instruction, and then the data acquisition module 10 may be called.
It should be noted that, usually, after the cross-platform disaster recovery is performed on the disaster recovery platform, the service virtual machine is started in the windows preinstalled environment Winpe of the disaster recovery platform, and therefore, the data acquisition module 10 may be further configured to acquire the device instance ID of each network card in the registry of the service virtual machine when the service virtual machine is started in the windows preinstalled environment Winpe of the disaster recovery platform after the cross-platform disaster recovery is performed on the disaster recovery platform.
It can be understood that the disaster recovery platform usually mounts the disk through Winpe after the data is backed up across platforms (where the data is generally stored in a disk format).
In addition, an embodiment of the present invention further provides a computer-readable storage medium, where a service network automatic recovery program is stored on the computer-readable storage medium, and when executed by a processor, the service network automatic recovery program implements the following operations:
acquiring equipment instance IDs of network cards in a registry of a service virtual machine;
acquiring corresponding network information through each equipment instance ID;
filtering the network information meeting the preset rules, and taking the residual network information after filtering as a network card configuration parameter;
and respectively setting each network card according to the network card configuration parameters.
Further, the service network automatic recovery program when executed by the processor further implements the following operations:
and calling a preset interface, and setting each network card by the preset interface according to the network card configuration parameters.
Further, the service network automatic recovery program when executed by the processor further implements the following operations:
displaying the network card configuration parameters;
responding to a selection instruction input by a user based on the displayed network card configuration parameters, and determining the network card configuration parameters corresponding to the network cards according to the selection instruction;
and setting the network cards by adopting corresponding network card configuration parameters.
Further, the service network automatic recovery program when executed by the processor further implements the following operations:
and traversing each network card in the registry according to the sequence of the network cards in the registry of the service virtual machine, and acquiring the device instance ID of the traversed network card.
Further, the service network automatic recovery program when executed by the processor further implements the following operations:
when the service virtual machine is started in the windows preinstallation environment Winpe of the disaster recovery platform, the device instance ID of each network card in the registry of the service virtual machine is obtained.
Further, the service network automatic recovery program when executed by the processor further implements the following operations:
after cross-platform disaster recovery is carried out on a disaster recovery platform, when a service virtual machine is started in a windows preinstalled environment Winpe of the disaster recovery platform, the device instance ID of each network card in a registry of the service virtual machine is obtained.
According to the scheme, the device instance IDs of the network cards in the registry of the service virtual machine are firstly obtained, the corresponding network information is then obtained through the device instance IDs, the network information meeting the preset rules is filtered, the rest network information after filtering is used as the network card configuration parameters, and finally the network cards are respectively set according to the network card configuration parameters, so that the network configuration is not required to be manually performed by a user, and the normal operation of the network can be ensured.
It should 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 may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, an air conditioner, 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 (14)

1. An automatic recovery method for a service network, characterized in that the automatic recovery method for the service network comprises the following steps:
acquiring equipment instance IDs of network cards in a registry of a service virtual machine;
acquiring corresponding network information through each equipment instance ID;
filtering the network information meeting the preset rules, and taking the residual network information after filtering as a network card configuration parameter;
setting each network card according to the network card configuration parameters;
wherein the network information comprises: network card name, PCI slot, IP address, gateway, subnet mask and IP address acquisition mode;
correspondingly, the filtering the network information meeting the preset rule, and taking the remaining network information after filtering as a network card configuration parameter specifically includes:
filtering network information which meets the condition that the IP address acquisition mode is automatic acquisition or the IP address is an invalid address to acquire undetermined network information;
grouping the network information to be determined according to the PCI slot;
and respectively filtering the network information which is not nearest to the current time in each group of network information to be determined, and taking the rest network information in each group of network information to be determined as the configuration parameters of the network card.
2. The method for automatically restoring a service network according to claim 1, wherein the setting of each network card according to the network card configuration parameters respectively comprises:
and calling a preset interface, and setting each network card by the preset interface according to the network card configuration parameters.
3. The method for automatically restoring a service network according to claim 1, wherein the setting of each network card according to the network card configuration parameters respectively comprises:
displaying the network card configuration parameters;
responding to a selection instruction input by a user based on the displayed network card configuration parameters, and determining the network card configuration parameters corresponding to the network cards according to the selection instruction;
and setting the network cards by adopting corresponding network card configuration parameters.
4. The method for automatically restoring a service network according to claim 1, wherein the obtaining of the device instance ID of each network card in the registry of the service virtual machine specifically includes:
and traversing each network card in the registry according to the sequence of the network cards in the registry of the service virtual machine, and acquiring the device instance ID of the traversed network card.
5. The method for automatically restoring a service network according to any one of claims 1 to 4, wherein the obtaining of the device instance ID of each network card in the registry of the service virtual machine specifically includes:
when the service virtual machine is started in the windows preinstallation environment Winpe of the disaster recovery platform, the device instance ID of each network card in the registry of the service virtual machine is obtained.
6. The method for automatically restoring a service network according to claim 5, wherein the obtaining of the device instance ID of each network card in the registry of the service virtual machine when the service virtual machine is started in the windows preinstalled environment wind of the disaster recovery platform specifically comprises:
after cross-platform disaster recovery is carried out on a disaster recovery platform, when a service virtual machine is started in a windows preinstalled environment Winpe of the disaster recovery platform, the device instance ID of each network card in a registry of the service virtual machine is obtained.
7. An automatic recovery device for a service network, comprising:
the data acquisition module is used for acquiring the equipment instance ID of each network card in the registry of the service virtual machine;
the information acquisition module is used for acquiring corresponding network information through each equipment instance ID;
the information filtering module is used for filtering the network information meeting the preset rule and taking the residual network information after filtering as the network card configuration parameter;
the parameter equipment module is used for respectively setting each network card according to the network card configuration parameters;
the network information includes: network card name, PCI slot, IP address, gateway, subnet mask and IP address acquisition mode;
correspondingly, the information filtering module is further configured to filter network information that satisfies that the IP address acquisition mode is automatic acquisition or the IP address is an invalid address, and acquire network information to be determined; grouping the network information to be determined according to the PCI slot; and respectively filtering the network information which is not nearest to the current time in each group of network information to be determined, and taking the rest network information in each group of network information to be determined as the configuration parameters of the network card.
8. The apparatus according to claim 7, wherein the parameter device module is further configured to invoke a preset interface, and the preset interface sets each network card according to the network card configuration parameters.
9. The apparatus according to claim 7, wherein the parameter device module is further configured to display the network card configuration parameters, determine, according to a selection instruction input by a user based on the displayed network card configuration parameters, the network card configuration parameters corresponding to the network cards according to the selection instruction, and set the network cards with the corresponding network card configuration parameters.
10. The apparatus for automatically restoring a service network according to claim 7, wherein the data obtaining module is further configured to traverse the network cards in the registry of the service virtual machine according to the sequence of the network cards in the registry, and obtain the device instance IDs of the traversed network cards.
11. The apparatus for automatically restoring a service network according to any one of claims 8 to 10, wherein the data obtaining module is further configured to obtain a device instance ID of each network card in a registry of the service virtual machine when the service virtual machine is started in a windows preinstalled environment wind of the disaster recovery platform.
12. The apparatus for automatically restoring a service network according to claim 11, wherein the data obtaining module is further configured to obtain, after a cross-platform disaster recovery is performed on a disaster recovery platform, a device instance ID of each network card in a registry of a service virtual machine when the service virtual machine is started in a windows preinstalled environment wind of the disaster recovery platform.
13. A disaster recovery platform, comprising: memory, a processor and a service network automatic recovery program stored on the memory and executable on the processor, the service network automatic recovery program being configured to implement the steps of the service network automatic recovery method according to any one of claims 1 to 6.
14. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a service network automatic recovery program, which when executed by a processor implements the steps of the service network automatic recovery method according to any one of claims 1 to 6.
CN201810528734.5A 2018-05-29 2018-05-29 Automatic recovery method and device for service network, disaster recovery platform and storage medium Active CN108880864B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810528734.5A CN108880864B (en) 2018-05-29 2018-05-29 Automatic recovery method and device for service network, disaster recovery platform and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810528734.5A CN108880864B (en) 2018-05-29 2018-05-29 Automatic recovery method and device for service network, disaster recovery platform and storage medium

Publications (2)

Publication Number Publication Date
CN108880864A CN108880864A (en) 2018-11-23
CN108880864B true CN108880864B (en) 2021-04-09

Family

ID=64335377

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810528734.5A Active CN108880864B (en) 2018-05-29 2018-05-29 Automatic recovery method and device for service network, disaster recovery platform and storage medium

Country Status (1)

Country Link
CN (1) CN108880864B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114363334B (en) * 2021-12-30 2024-04-02 阿里巴巴(中国)有限公司 Cloud system, network configuration method, device and equipment of cloud desktop virtual machine
CN114978953B (en) * 2022-07-27 2022-10-21 北京立华莱康平台科技有限公司 Network card identification method and device and computer readable medium
CN115996150B (en) * 2023-03-22 2023-05-23 成都云祺科技有限公司 Virtual studio creation method and system storage medium and data verification method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106557386A (en) * 2015-09-28 2017-04-05 中兴通讯股份有限公司 Method, the apparatus and system of standby virtual network interface card virtual machine are disposed based on KVM
CN107040427A (en) * 2017-06-09 2017-08-11 上海联影医疗科技有限公司 A kind of method and device of network card configuration

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100339848C (en) * 2002-12-26 2007-09-26 联想(北京)有限公司 Method for automatic configuration or restoring of computer system network configuration
CN102118280A (en) * 2011-03-02 2011-07-06 浪潮(北京)电子信息产业有限公司 Method and device for starting web services in server
US10505806B2 (en) * 2016-08-29 2019-12-10 Vmware, Inc. Learning and deploying datacenter landscapes
CN108039969B (en) * 2017-12-13 2021-08-03 深圳市科力锐科技有限公司 Network automatic configuration method, device, system, storage medium and target computer

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106557386A (en) * 2015-09-28 2017-04-05 中兴通讯股份有限公司 Method, the apparatus and system of standby virtual network interface card virtual machine are disposed based on KVM
CN107040427A (en) * 2017-06-09 2017-08-11 上海联影医疗科技有限公司 A kind of method and device of network card configuration

Also Published As

Publication number Publication date
CN108880864A (en) 2018-11-23

Similar Documents

Publication Publication Date Title
CN108039969B (en) Network automatic configuration method, device, system, storage medium and target computer
CN109547570B (en) Service registration method, device, registration center management equipment and storage medium
CN108880864B (en) Automatic recovery method and device for service network, disaster recovery platform and storage medium
CN109067877B (en) Control method for cloud computing platform deployment, server and storage medium
CN107229492A (en) Installation method, device, system, storage medium and the equipment of server system
CN103595801B (en) Cloud computing system and real-time monitoring method for virtual machine in cloud computing system
CN110808897A (en) Proxy access method, user equipment, storage medium, device and system
JP2015525931A (en) Method, device, and mobile terminal for API intercept related applications
US20210359908A1 (en) Linking multiple enrollments on a client device
CN111669284B (en) OpenStack automatic deployment method, electronic device, storage medium and system
CN109391514B (en) High-availability-based equipment deployment method, server, storage medium and device
CN110971689B (en) System installation method, device, system, equipment and storage medium
CN106874214B (en) Cloud hard disk resource recovery method and related device
CN112214351A (en) Backup data recovery method and device, electronic equipment and storage medium
US9628939B2 (en) Data calling method and device
CN105701409B (en) A kind of method and device for realizing file virtualization
CN113098722A (en) Multi-network card management method, device and computer readable storage medium
CN111061448A (en) Log information display method and device, electronic equipment and storage medium
CN104572179A (en) IAAS (infrastructure as a service) software upgrading method and device
CN110912725A (en) Configuration method and configuration device of OpenFlow virtual switch
CN114625575B (en) Business system synchronization method, device, equipment and storage medium
CN109981365B (en) Data monitoring method and device, user equipment and storage medium
CN115208671B (en) Firewall configuration method, device, electronic equipment and storage medium
CN106484460A (en) The installation method of large-scale storage cluster system in a kind of
CN107885574B (en) Deployment method of virtual machine, service node, control device and control node

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