CN107995319B - Virtual device configuration method and network device - Google Patents

Virtual device configuration method and network device Download PDF

Info

Publication number
CN107995319B
CN107995319B CN201810016563.8A CN201810016563A CN107995319B CN 107995319 B CN107995319 B CN 107995319B CN 201810016563 A CN201810016563 A CN 201810016563A CN 107995319 B CN107995319 B CN 107995319B
Authority
CN
China
Prior art keywords
configuration
control card
master
virtual
virtual device
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
CN201810016563.8A
Other languages
Chinese (zh)
Other versions
CN107995319A (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.)
Maipu Communication Technology Co Ltd
Original Assignee
Maipu Communication 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 Maipu Communication Technology Co Ltd filed Critical Maipu Communication Technology Co Ltd
Priority to CN201810016563.8A priority Critical patent/CN107995319B/en
Publication of CN107995319A publication Critical patent/CN107995319A/en
Application granted granted Critical
Publication of CN107995319B publication Critical patent/CN107995319B/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
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles

Abstract

The invention provides a virtual device configuration method and network equipment. The method is applied to a network device comprising at least two master control cards, and comprises the following steps: the first master control card acquires a configuration command request for performing virtual device configuration. And the first main control card performs virtual equipment configuration on the first main control card according to the configuration command request, and sends the configuration command request to the second main control card when the configuration is completed. And the second main control card carries out virtual equipment configuration of the second main control card according to the configuration command request, and sends a feedback message of completed configuration to the first main control card when the configuration is completed. Therefore, the first main control card can manage and control the configuration operation of the second main control card, so that when the virtual equipment of the first main control card is abnormal, the virtual equipment of the second main control card can take over the work in time, and the backup is achieved in time.

Description

Virtual device configuration method and network device
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a virtual device configuration method and a network device.
Background
Virtualization technology is a technology for separating and decoupling a bottom hardware device from an upper operating system and an application program. The virtualization technology is one of the bottom important support technologies of the currently popular cloud computing platform, and can greatly improve the resource utilization efficiency of the equipment. Particularly, in the current middle-high end distributed network device, with the continuous increase of resources such as physical boards, memories, CPUs (Central Processing units), disks, and the like of the network device, the Processing performance is continuously improved, and the physical device of the entity can be virtualized into a plurality of virtual devices by using a virtualization technology, so that the resources are divided into different tenants for use, and the overall utilization rate of the network device is further improved.
However, the stability and the anti-interference performance of the virtual device are not as good as those of the physical device, and the virtual device is easy to be abnormal in the working process, thereby affecting the normal service processing. Therefore, how to ensure normal operation of the service when the virtual device is abnormal is one of the main problems to be solved in the field of virtualization technology.
Disclosure of Invention
The embodiment of the invention provides a virtual device configuration method and network equipment.
In a first aspect, an embodiment of the present invention provides a virtual device configuration method, where the method is applied to a network device including at least two master control cards, and the method includes:
a first master control card acquires a configuration command request for configuring virtual equipment;
the first main control card performs virtual equipment configuration on the first main control card according to the configuration command request, and sends the configuration command request to a second main control card when the configuration is completed;
and the second main control card carries out virtual equipment configuration of the second main control card according to the configuration command request, and sends a feedback message of completed configuration to the first main control card when the configuration is completed.
In the technical solution provided in the foregoing first aspect of the present application, the first main control card may manage and control configuration operations of the second main control card, so that when the virtual device of the first main control card is abnormal, the virtual device of the second main control card may timely take over work and backup in time.
Optionally, with reference to the technical solution provided by the first aspect, in a possible design, after the step of requesting, by the second master control card, configuration of virtual equipment of the second master control card according to the configuration command, and sending a feedback message that the configuration is completed to the first master control card when the configuration is completed, the method further includes:
and the first master control card sends a notification message of successful configuration to the client equipment.
As can be seen, in the embodiment of the present invention, the first master control card generates and sends a notification message of successful configuration to the user only after confirming that both the master virtual device and the slave virtual device are successfully configured. Therefore, the slave virtual device can be ensured to be in a ready state at any time, so that when the master virtual device is abnormal, the slave virtual device can take over the work of the master virtual device in time.
Optionally, with reference to the technical solution provided by the first aspect, in a possible design, a configuration client process and a master virtual device management process of the network device run in the first master control card, and the acquiring, by the first master control card, a configuration command request for performing virtual device configuration includes:
the configuration client process acquires a configuration command request for configuring the virtual equipment through a serial port;
and the configuration client process packages the configuration command request and sends the packaged configuration command request to the main virtual equipment management process.
Therefore, in the embodiment of the invention, the configuration client process on the first main control card is responsible for the butt joint with the client device uniformly, and the second main control card does not need to care about the butt joint problem with the client device, so that the operation complexity of data butt joint transmission can be reduced.
Optionally, with reference to the technical solution provided by the first aspect, in a possible design, the running of a slave virtual device management process of the network device in the second master control card is performed, and the first master control card performs virtual device configuration of the first master control card according to the configuration command request, and sends the configuration command request to the second master control card when the configuration is completed, where the method includes:
the main virtual equipment management process carries out first main control card virtual equipment configuration according to the configuration command request;
and when the configuration is completed, the master virtual equipment management process sends the configuration command request to the slave virtual equipment management process.
It can be seen that, in the embodiment of the present invention, the virtual device backup configuration operation of the second master control card as the slave master control card is triggered by the first master control card as the master control card, and the first master control card can manage and control the configuration operation of the second master control card, so that when the virtual device of the first master control card is abnormal, the virtual device of the second master control card can timely take over the work and perform backup in time.
Optionally, with reference to the technical solution provided by the first aspect, in a possible design, the requesting, by the second master control card, the configuration of the virtual device of the second master control card according to the configuration command, and sending a feedback message of the completion of the configuration to the first master control card when the configuration is completed includes:
the slave virtual equipment management process carries out second master card virtual equipment configuration according to the configuration command request;
when the configuration is completed, the slave virtual equipment management process generates a feedback message of the completion of the configuration;
and the slave virtual equipment management process sends the feedback message to the master virtual equipment management process.
It can be seen that, in the embodiment of the present invention, the master virtual device management process and the slave virtual device management processes both adopt an autonomous principle, and each virtual device management process autonomously controls the configuration operation of the virtual device on the belonging master control card. Therefore, the virtual device management process has simple and efficient management performance, the involvement relationship between the master virtual device management process and the slave virtual device management process is reduced, the complexity of service processing is reduced, and the problems of processing performance reduction, errors and the like caused by excessive involvement relationship are avoided.
Optionally, with reference to the technical solution provided by the first aspect, in a possible design, the sending, by the first master card, a notification message of successful configuration to the client device includes:
the main virtual equipment management process generates a notification message of successful configuration and sends the notification message to the configuration client process;
and the configuration client process sends the notification message to client equipment so as to inform a user of successful configuration through the client equipment.
It can be seen that, in the embodiment of the present invention, the master virtual device management process generates a notification message of successful configuration only after confirming that both the master virtual device management process and the slave virtual device management process operate successfully. Therefore, the slave virtual device configured by the slave virtual device management process can be ensured to be in a ready state at any time, so that when the master virtual device is abnormal, the slave virtual device can take over the work of the master virtual device in time.
Optionally, with reference to the technical solution provided by the first aspect, in a possible design, a main memory database management process is further run in the first main control card, and after the step of obtaining, by the first main control card, a configuration command request for performing virtual device configuration, the method further includes:
the main virtual equipment management process sends the configuration command request to the main memory database management process;
and the main memory database management process stores the configuration command request.
It can be seen that, in the embodiment of the present invention, the main memory database management process is responsible for performing storage processing, and the main memory database management process can store the configuration command request in a database, so that the network device can directly obtain the configuration command request from the database when being started next time, and automatically re-execute the configuration command request to complete the corresponding virtual device configuration operation. Therefore, the user does not need to input the configuration command request again, user operation is reduced, and user experience is improved.
Optionally, in combination with the technical solution provided by the first aspect, in a possible design, the method further includes:
when the network equipment detects abnormality, determining that a master virtual equipment management process of the first master control card is a new slave virtual equipment management process of the network equipment;
and determining that the slave virtual device management process of the second master control card is a new master virtual device management process of the network device.
Therefore, in the embodiment of the present invention, when the network device detects an abnormality (for example, an abnormality of a virtual device, an abnormality of a main control card, an abnormality of a key process of the main control card, or the like), master-slave switching processing is performed in time, so as to ensure normal operation of service processing.
In a second aspect, an embodiment of the present invention provides a network device, where the network device includes at least two master control cards, where:
the first master control card is used for acquiring a configuration command request for configuring the virtual equipment;
the first main control card is also used for carrying out virtual equipment configuration of the first main control card according to the configuration command request and sending the configuration command request to the second main control card when the configuration is finished;
and the second main control card is used for carrying out virtual equipment configuration of the second main control card according to the configuration command request and sending a feedback message of the completion of the configuration to the first main control card when the configuration is completed.
In the technical solution provided in the above second aspect of the present application, the first main control card may manage and control configuration operations of the second main control card, so that when the virtual device of the first main control card is abnormal, the virtual device of the second main control card may timely take over work and backup in time.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1 is a schematic block diagram of a master card virtual device management system in a network device according to an embodiment of the present invention.
Fig. 2 is a flowchart illustrating steps of a virtual device configuration method according to a first embodiment of the present invention.
Fig. 3 is a flowchart illustrating sub-steps of step S110 shown in fig. 2 according to a first embodiment of the present invention.
Fig. 4 is a flowchart illustrating sub-steps of step S120 shown in fig. 2 according to a first embodiment of the present invention.
Fig. 5 is a flowchart illustrating sub-steps of step S130 shown in fig. 2 according to a first embodiment of the present invention.
Fig. 6 is a second flowchart illustrating steps of a virtual device configuration method according to the first embodiment of the present invention.
Fig. 7 is a flowchart illustrating sub-steps of step S140 shown in fig. 6 according to a first embodiment of the present invention.
Fig. 8 is a third flowchart illustrating steps of a virtual device configuration method according to the first embodiment of the present invention.
Fig. 9 is a flowchart illustrating a fourth step of a virtual device configuration method according to the first embodiment of the present invention.
Fig. 10 is a functional block diagram of a network device according to a second embodiment of the present invention.
Icon: 10-a network device; 100-a first master control card; 110-configure client module; 120-a master virtual device management module; 130-main memory database management module; 200-a second master control card; 210-slave virtual device management module; 300-core processing module.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures. Furthermore, the terms "first," "second," and the like are used merely to distinguish one description from another, and are not to be construed as indicating or implying relative importance.
In the process of implementing the technical solution provided in the embodiment of the present application, the inventor of the present application finds that, in order to solve the technical problem of how to guarantee normal operation of a service when a virtual device is abnormal, in the prior art, a manner of performing synchronous backup between a plurality of virtual devices is generally adopted, and when one of the virtual devices is abnormal, performing virtual device switching is performed to guarantee normal operation of the service. For example, in one existing scheme, a slave physical device actively acquires virtual device configuration information from a master physical device at regular time to complete synchronous configuration of the virtual device. The disadvantages of this prior art solution are: the configuration information is actively acquired by the slave physical device, and the master physical device does not know the configuration condition of the slave physical device. When the virtual device of the master physical device is abnormal, the virtual device on the slave physical device may not be started or configured, and at this time, the virtual device on the slave physical device cannot timely take over the work of the abnormal virtual device on the master physical device, and cannot perform backup in time.
The above prior art solutions have shortcomings which are the results of practical and careful study of the inventor, and therefore, the discovery process of the above problems and the solutions proposed by the following embodiments of the present invention to the above problems should be the contribution of the inventor to the present invention in the course of the present invention.
In order to alleviate the above problem, embodiments of the present invention provide a virtual device configuration method and a network device. The following embodiments are provided to describe a virtual device configuration method and a network device according to the present invention.
Referring to fig. 1, fig. 1 is a block diagram illustrating a master card virtual device management system in a network device 10 according to an embodiment of the present invention. The network device 10 includes at least two master cards. Fig. 1 is a schematic diagram illustrating the network device 10 including two host cards (a first host card 100 and a second host card 200). The network device 10 may further include more master cards according to actual service requirements.
In this embodiment, the network device 10 further includes a plurality of service cards, where the master control card is used to construct a virtual device and is responsible for forwarding control of data; and the service card is responsible for the actual forwarding of the data message. The main control card and the service card can adopt physical board cards integrated by circuits, and the main control card and the service card can comprise resources such as a CPU, a memory, a magnetic disk and the like.
In this embodiment, the network device 10 may include, but is not limited to, a server, a router, a switch, a security gateway, a PC, and the like.
In this embodiment, the virtual device may be, but is not limited to, a network virtual device such as a virtual server, a virtual router, a virtual switch, a virtual security gateway, and a virtual PC, which are constructed by a virtualization technology; the virtual device may also be a distributed network virtual device constructed by a virtualization technology and composed of a virtual main control card, a virtual service card, a virtual CPU, a virtual memory, a virtual disk, and the like.
In this embodiment, the network device 10 may use, but is not limited to, a container technology, a hardware virtualization technology, a multi-process technology, and the like to construct a virtual device. Among them, the container technology is preferably adopted, and the container technology is a lightweight virtualization technology. The container technology can build the number of containers as required, and further can effectively improve the working efficiency. Compared with a hardware virtualization technology and a KVM (kernel virtual machine) technology, the container technology can share one operating system, and processing efficiency is higher. Among them, the Linux Container (Linux Container) based on the Linux system is one of the hottest Container technologies at present, which can provide isolation of name space and allocation of resources.
In the present embodiment, the following embodiments will explain the virtual device configuration method based on the Linux container technology. It should be noted that: the invention is not limited to the realization of the scheme based on the Linux container technology, and the scheme can also be realized based on a vxWorks operating system, a common multi-process technology or other lightweight container technologies.
In this embodiment, the following embodiments will be described in terms of a distributed network system based on a master control card and a standby control card, where: the present invention is not limited to the distributed network system, and a stackable network system and a centralized system are also applicable.
It will be appreciated that the architecture depicted in fig. 1 is merely illustrative and that network device 10 may include more or fewer components than shown in fig. 1 or may have a different configuration than shown in fig. 1. The components shown in fig. 1 may be implemented in hardware, software, or a combination thereof.
The present invention provides a readable storage medium including a computer program. The computer program controls the network device 10 on which the readable storage medium is executed to perform the following virtual device configuration method.
First embodiment
The embodiment of the invention provides a virtual device configuration method. Referring to fig. 2, fig. 2 is a flowchart illustrating a virtual device configuration method according to a first embodiment of the present invention. The method is applied to the network device 10 described above. The following describes the flow of the virtual device configuration method in detail. The method comprises the following steps: step S110, step S120, and step S130.
In step S110, the first main control card 100 obtains a configuration command request for performing virtual device configuration.
Referring to fig. 1 again, in this embodiment, a configuration client process, a master virtual device management process of the network device 10, and a core processing process for performing centralized management and control on processes running in the network device 10 run in the first master control card 100.
Referring to fig. 3, fig. 3 is a flowchart illustrating sub-steps of step S110 shown in fig. 2 according to a first embodiment of the present invention. The step S110 includes a substep S111 and a substep S112.
And a substep S111, wherein the configuration client process obtains a configuration command request for performing virtual device configuration through a serial port.
In this embodiment, the network device 10 is communicatively connected to a client device, and a user may log in to the network device 10 through a client interface (e.g., securect, a piece of secure terminal configuration software) provided by the client device. The user informs the network device 10 of the virtual device configuration by inputting a configuration command request for the virtual device configuration at the client interface.
The user may perform corresponding virtual device configuration operations on the network device 10 according to the configuration command, such as virtual device creation, virtual device startup, virtual device shutdown, virtual device deletion, and the like.
In this embodiment, the client device may pass a configuration command request (e.g., create a virtual device: create vdev1) input by a user to the configuration client process via a serial port (serial interface, commonly referred to as COM interface).
And a substep S112, the configuration client process packages the configuration command request and sends the packaged configuration command request to the master virtual device management process.
In this embodiment, the configuration client process performs necessary encapsulation on the configuration command request and then sends the encapsulated configuration command request to the host virtual device management process.
In this embodiment, in order to save system resources as much as possible, the virtual device management process may be dynamically started, that is, the default states of the master virtual device management process and the slave virtual device management process are not started, and are started to perform service processing when needed. Therefore, when the configuration client process transmits the configuration command request, the virtual device management process may be in an un-started state, at this time, the core processing process may start the master virtual device management process and the slave virtual device management process first, and then the configuration client process sends the configuration command request to the master virtual device management process.
Step S120, the first master control card 100 performs first master control card virtual device configuration according to the configuration command request, and sends the configuration command request to the second master control card 200 when configuration is completed.
Referring to fig. 1 again, in this embodiment, the second master card 200 runs a slave virtual device management process of the network device 10.
Referring to fig. 4, fig. 4 is a flowchart illustrating sub-steps of step S120 shown in fig. 2 according to a first embodiment of the present invention. The step S120 includes a substep S121 and a substep S122.
And a substep S121, where the primary virtual device management process performs the configuration of the virtual device of the first master control card according to the configuration command request.
In this embodiment, the primary virtual device management process requests to perform the first master card virtual device configuration in the first master card 100 according to the configuration command. For example, assuming that the configuration command request received by the primary virtual device management process is create vdev1, the primary virtual device management process may create a container vdev1 for carrying a virtual device in the first master card 100 through a container creation interface provided by a Linux system.
And a substep S122, when the configuration is completed, sending the configuration command request to the slave virtual device management process by the master virtual device management process.
In this embodiment, when the configuration is completed, the master virtual device management process may send the configuration command request to the slave virtual device management process running on the second master card 200, so that the second master card 200 performs virtual device backup configuration.
In this embodiment, the virtual device management process in this embodiment adopts a master-slave design structure, which can be set to, but not limited to, a master-slave mode, and the like. The first main control card 100 may serve as a main control card, the virtual device management process running in the first main control card 100 may serve as a main virtual device management process of the network device 10, the second main control card 200 may serve as a slave main control card, and the virtual device management process running in the second main control card 200 may serve as a slave virtual device management process of the network device 10.
In this embodiment, after the first master card 100 sends the configuration command request to the second master card 200, the second master card 200 will perform virtual device backup configuration. Therefore, the virtual device backup configuration operation of the second master control card 200 as the slave master control card is triggered by the first master control card 100 as the master control card, and the first master control card 100 can manage and control the configuration operation of the second master control card 200, so that when the virtual device of the first master control card 100 is abnormal, the virtual device of the second master control card 200 can timely take over the work and timely backup.
Step S130, the second master control card 200 performs second master control card virtual device configuration according to the configuration command request, and sends a feedback message of completing configuration to the first master control card 100 when configuration is completed.
Referring to fig. 5, fig. 5 is a flowchart illustrating sub-steps of step S130 shown in fig. 2 according to a first embodiment of the present invention. The step S130 includes a substep S131, a substep S132, and a substep S133.
And a substep S131, performing, by the slave virtual device management process, the configuration of the virtual device of the second master control card according to the configuration command request.
In this embodiment, after receiving the configuration command request transmitted by the master virtual device management process, the slave virtual device management process may perform second master card virtual device configuration in the second master card 200 according to the configuration command request. For example, assuming that the configuration command request is create vdev1, the slave virtual device management process may create a container vdev1 corresponding to the configured container vdev1 in the first master card 100 in the second master card 200 through a container creation interface provided by a Linux system, so as to carry the virtual device on the second master card 200 through the container vdev 1.
In this embodiment, when the containers in the first master control card 100 and the second master control card 200 are created completely, the master virtual device management process and the slave virtual device management process may negotiate according to a preset negotiation rule, and negotiate a master-slave relationship between the two containers to determine a master container providing services to the outside. For example, as shown in fig. 1, for a container 1, the container 1 in the first master card 100 may serve as a master container for providing services to the outside, and the container 1 in the second master card 200 serves as a slave container; and the opposite for container 2. Wherein, by default, the container (vdev1) in the first master control card 100 is usually used as the master container for providing services to the outside.
In this embodiment, based on the same configuration command request, the second host card virtual device configuration operation performed on the second host card 200 needs to correspond to the first host card virtual device configuration operation performed on the first host card 100.
In this embodiment, a plurality of containers for carrying different types of virtual devices may be created in each of the first master card 100 and/or the second master card 200. The containers in the first master card 100 and the second master card 200 need to correspond to each other. For example, as shown in fig. 1, the master container 1 of the first master card 100 corresponds to the slave container 1 of the second master card 200, and the slave container 2 of the first master card 100 corresponds to the master container 2 of the second master card 200.
And a substep S132, when the configuration is completed, generating a feedback message of the completion of the configuration from the virtual device management process.
Substep S133, the slave virtual device management process sends the feedback message to the master virtual device management process.
In this embodiment, when the slave virtual device management process succeeds in configuration operation, the slave virtual device management process may generate a feedback message of completion of configuration, and send the feedback message to the master virtual device management process. And when the master virtual equipment management process receives the feedback message, the master virtual equipment management process can know that the slave virtual equipment management process is configured and ready and can take over the work at any time.
In this embodiment, the master virtual device management process and the slave virtual device management processes both adopt an autonomous principle, and each virtual device management process autonomously controls configuration operations (for example, creation, start, shutdown, deletion, and the like) of a virtual device on the master control card to which the virtual device management process belongs. Therefore, the virtual device management process has simple and efficient management performance, the involvement relationship between the master virtual device management process and the slave virtual device management process is reduced, the complexity of service processing is reduced, and the problems of processing performance reduction, errors and the like caused by excessive involvement relationship are avoided.
Referring to fig. 6, fig. 6 is a second flowchart illustrating a virtual device configuration method according to a first embodiment of the present invention. The method further comprises the following steps: step S140.
In step S140, the first master card 100 sends a notification message that the configuration is successful to the client device.
Referring to fig. 7, fig. 7 is a flowchart illustrating sub-steps of step S140 shown in fig. 6 according to a first embodiment of the present invention. The step S140 includes a substep S141 and a substep S142.
And a substep S141, generating a notification message of successful configuration by the master virtual device management process, and sending the notification message to the configuration client process.
In this embodiment, when the primary virtual device management process receives a feedback message sent from the secondary virtual device management process, the primary virtual device management process may generate a notification message that the configuration is successful, and send the notification message to the configuration client process.
And a substep S142, sending the notification message to the client device by the client configuration process, so as to inform the user of successful configuration through the client device.
In this embodiment, the configuration client process may send a notification message of successful configuration to the client device through the serial port, and the client device prompts the user that the operation is successful through the SecureCRT interface.
In this embodiment, the master virtual device management process generates a notification message of successful configuration only after confirming that both the master virtual device management process and the slave virtual device management process operate successfully. Therefore, the slave virtual device configured by the slave virtual device management process can be ensured to be in a ready state at any time, so that when the master virtual device is abnormal, the slave virtual device can take over the work of the master virtual device in time.
In this embodiment, if the configuration fails, the host virtual device management process may perform the configuration again, or generate and send a notification message of the failure of the configuration to notify the user, and wait for a further indication from the user.
Referring to fig. 8, fig. 8 is a third flowchart illustrating a virtual device configuration method according to a first embodiment of the present invention. After the step S110, the method further includes: step S150 and step S155. Step S150 and step S155 only need to be executed after step S110, for example, step S150 and step S155 may also be executed after step S140.
Referring to fig. 1 again, in the present embodiment, a main memory database management process is further executed in the first main control card 100.
Step S150, the primary virtual device management process sends the configuration command request to the primary memory database management process.
In this embodiment, after obtaining the configuration command request, the primary virtual device management process may send the configuration command request to the primary memory database management process.
Step S155, the main memory database management process saves the configuration command request.
In this embodiment, the main memory database management process is responsible for performing configuration serialization storage processing, and the main memory database management process may store the configuration command request in a database, so that the network device 10 can directly obtain the configuration command request from the database when being started next time, and automatically re-execute the configuration command request to complete the corresponding virtual device configuration operation. Therefore, the user does not need to input the configuration command request again, user operation is reduced, and user experience is improved.
Referring to fig. 9, fig. 9 is a fourth flowchart illustrating a virtual device configuration method according to a first embodiment of the present invention. The method further comprises the following steps: step S160 and step S165.
Step S160, when the network device 10 detects an abnormality, determining that the master virtual device management process of the first master control card 100 is a new slave virtual device management process of the network device 10.
Step S165, determining that the slave virtual device management process of the second master card 200 is the new master virtual device management process of the network device 10.
In this embodiment, the master-slave relationship between the master and slave virtual device management processes is not constant. When the network device 10 detects an abnormality (for example, a virtual device abnormality, a master control card abnormality, a key process abnormality of the master control card, or the like), master-slave switching processing is required. At this time, the network device 10 determines that the master virtual device management process of the first master control card 100 is a new slave virtual device management process of the network device 10. Determining that the slave virtual device management process of the second master card 200 is a new master virtual device management process of the network device 10. That is, the running virtual device management process in the second main control card 200 is upgraded to a new main virtual device management process, and the distributed communication line identity becomes the master and is responsible for monitoring the configuration command request transmitted by the configuration client process. The virtual device management process running in the first master control card 100 is downgraded to a new slave virtual device management process, and the identity of the distributed communication line becomes slave, and does not monitor the configuration command request transmitted by the configuration client process. Meanwhile, the memory database management process of the second main control card 200 is upgraded to a main memory database management process, and is responsible for maintaining the database configuration. The in-memory database management process of the first master control card 100 is downgraded to an in-memory database management process, and the database configuration is not maintained.
In this embodiment, it should be noted that, when a process (for example, a non-critical process such as a virtual device management process, a memory database management process, and the like) in the main control card is abnormal, the master-slave relationship of the main control card is not switched. Avoiding frequent switching and increasing system overhead. When the process is abnormal, the process can be restored to normal again through measures such as debugging or restarting and the like.
Second embodiment
Referring to fig. 10, fig. 10 is a functional block diagram of a network device 10 according to a second embodiment of the present invention. The network device 10 includes a first master card 100 and a second master card 200.
In this embodiment, the first main control card 100 includes: the client module 110 and the master virtual device management module 120 of the network device 10 are configured. The second master card 200 includes: a slave virtual device management module 210 of the network device 10.
The configuration client module 110 is configured to obtain a configuration command request for performing virtual device configuration through a serial port.
The configuration client module 110 is further configured to encapsulate the configuration command request, and send the encapsulated configuration command request to the primary virtual device management module 120.
The primary virtual device management module 120 is configured to perform virtual device configuration for the first host card according to the configuration command request.
When the configuration is completed, the master virtual device management module 120 is further configured to send the configuration command request to the slave virtual device management module 210.
The slave virtual device management module 210 is configured to perform virtual device configuration for the second master card according to the configuration command request.
When the configuration is completed, the slave virtual device management module 210 is further configured to generate a feedback message that the configuration is completed.
The slave virtual device management module 210 is further configured to send the feedback message to the master virtual device management module 120.
The primary virtual device management module 120 is further configured to generate a notification message that the configuration is successful, and send the notification message to the configuration client module 110.
The configuration client module 110 is further configured to send the notification message to a client device, so as to inform a user of successful configuration through the client device.
Referring to fig. 10 again, the first main control card 100 further includes: a main memory database management module 130.
The primary virtual device management module 120 is further configured to send the configuration command request to the primary in-memory database management module 130.
The main memory database management module 130 is configured to store the configuration command request.
Referring to fig. 10 again, the network device 10 further includes: a core processing module 300.
When the network device 10 detects an abnormality, the core processing module 300 is configured to determine that the master virtual device management module 120 of the first main control card 100 is a new slave virtual device management module of the network device 10.
The core processing module 300 is further configured to determine that the slave virtual device management module 210 of the second master card 200 is a new master virtual device management module of the network device 10.
In the present embodiment, the configuration client module 110 is configured to perform the substeps S111 and the substep S112 in fig. 3, and the substep S142 in fig. 7. The primary virtual device management module 120 is configured to perform sub-steps S121 and S122 in fig. 4, sub-step S141 in fig. 7, and step S150 in fig. 8. The slave virtual device management module 210 is configured to perform substep S131, substep S132, and substep S133 of fig. 5. The main memory database management module 130 is configured to execute step S155 in fig. 8. The core processing module 300 is used for executing step S160 and step S165 in fig. 9.
In summary, embodiments of the present invention provide a virtual device configuration method and a network device. The method is applied to a network device comprising at least two master control cards, and comprises the following steps: the first master control card acquires a configuration command request for performing virtual device configuration. And the first main control card performs virtual equipment configuration on the first main control card according to the configuration command request, and sends the configuration command request to the second main control card when the configuration is completed. And the second main control card carries out virtual equipment configuration of the second main control card according to the configuration command request, and sends a feedback message of completed configuration to the first main control card when the configuration is completed.
Therefore, the first main control card can manage and control the configuration operation of the second main control card, so that when the virtual equipment of the first main control card is abnormal, the virtual equipment of the second main control card can take over the work in time and backup in time.
And the first main control card and the second main control card adopt an autonomous principle, and each main control card autonomously controls the configuration operation of the virtual equipment on each main control card. The configuration management can be simply and efficiently carried out, the involvement relationship among the master control cards is reduced, and the complexity of service processing is reduced.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (16)

1. A virtual device configuration method is applied to a network device comprising at least two master control cards, and comprises the following steps:
a first master control card acquires a configuration command request for configuring virtual equipment;
the first main control card performs virtual equipment configuration on the first main control card according to the configuration command request, and sends the configuration command request to a second main control card when the configuration is completed;
and the second main control card carries out backup configuration on the virtual equipment of the second main control card according to the configuration command request, and sends a feedback message of the completed configuration to the first main control card when the configuration is completed, so that the virtual equipment of the second main control card can take over the work of the virtual equipment of the first main control card when the virtual equipment of the first main control card is abnormal.
2. The method according to claim 1, wherein after the steps of the second master control card requesting a second master control card virtual device backup configuration according to the configuration command and sending a feedback message of configuration completion to the first master control card when configuration is completed, the method further comprises:
and the first master control card sends a notification message of successful configuration to the client equipment.
3. The method according to claim 2, wherein a primary virtual device management process for configuring a client process and the network device runs in the first master control card, and the obtaining, by the first master control card, a configuration command request for performing virtual device configuration includes:
the configuration client process acquires a configuration command request for configuring the virtual equipment through a serial port;
and the configuration client process packages the configuration command request and sends the packaged configuration command request to the main virtual equipment management process.
4. The method according to claim 3, wherein a slave virtual device management process of the network device runs in the second master card, and the first master card performs virtual device configuration of the first master card according to the configuration command request and sends the configuration command request to the second master card when configuration is completed, including:
the main virtual equipment management process carries out first main control card virtual equipment configuration according to the configuration command request;
and when the configuration is completed, the master virtual equipment management process sends the configuration command request to the slave virtual equipment management process.
5. The method according to claim 4, wherein the second master control card requests a second master control card virtual device backup configuration according to the configuration command, and sends a feedback message of the configuration completion to the first master control card when the configuration is completed, including:
the slave virtual equipment management process requests to perform backup configuration on the virtual equipment of the second master control card according to the configuration command;
when the configuration is completed, the slave virtual equipment management process generates a feedback message of the completion of the configuration;
and the slave virtual equipment management process sends the feedback message to the master virtual equipment management process.
6. The method of claim 5, wherein sending, by the first master card, a notification message of successful configuration to the client device comprises:
the main virtual equipment management process generates a notification message of successful configuration and sends the notification message to the configuration client process;
and the configuration client process sends the notification message to client equipment so as to inform a user of successful configuration through the client equipment.
7. The method according to any one of claims 3 to 6, wherein a main memory database management process is further run in the first master card, and after the step of obtaining, by the first master card, the configuration command request for performing virtual device configuration, the method further comprises:
the main virtual equipment management process sends the configuration command request to the main memory database management process;
and the main memory database management process stores the configuration command request.
8. The method according to any one of claims 4-6, further comprising:
when the network equipment detects abnormality, determining that a master virtual equipment management process of the first master control card is a new slave virtual equipment management process of the network equipment;
and determining that the slave virtual device management process of the second master control card is a new master virtual device management process of the network device.
9. A network device, comprising at least two master cards, wherein:
the first master control card is used for acquiring a configuration command request for configuring the virtual equipment;
the first main control card is also used for carrying out virtual equipment configuration of the first main control card according to the configuration command request and sending the configuration command request to the second main control card when the configuration is finished;
and the second main control card is used for requesting to perform backup configuration on the virtual equipment of the second main control card according to the configuration command and sending a feedback message of the completed configuration to the first main control card when the configuration is completed, so that the virtual equipment of the second main control card can take over the work of the virtual equipment of the first main control card when the virtual equipment of the first main control card is abnormal.
10. The network device of claim 9, wherein:
the first master control card is further configured to send a notification message that the configuration is successful to the client device.
11. The network device of claim 10, wherein the first master card comprises: configuring a client module and a master virtual device management module of the network device, where the first master control card obtains a configuration command request for configuring a virtual device, and includes:
the configuration client module is used for acquiring a configuration command request for virtual equipment configuration through a serial port;
the configuration client module is further configured to encapsulate the configuration command request, and send the encapsulated configuration command request to the master virtual device management module.
12. The network device of claim 11, wherein the second master card comprises: the slave virtual device management module of the network device, where the first master control card performs virtual device configuration of the first master control card according to the configuration command request, and sends the configuration command request to the second master control card when configuration is completed, includes:
the main virtual device management module is used for carrying out virtual device configuration of a first main control card according to the configuration command request;
when the configuration is completed, the master virtual device management module is further configured to send the configuration command request to the slave virtual device management module.
13. The network device according to claim 12, wherein the second master card requests a second master card virtual device backup configuration according to the configuration command, and sends a feedback message of the configuration completion to the first master card when the configuration is completed, including:
the slave virtual device management module is used for carrying out backup configuration on the virtual device of the second main control card according to the configuration command request;
when the configuration is completed, the slave virtual device management module is further configured to generate a feedback message of the completion of the configuration;
the slave virtual device management module is further configured to send the feedback message to the master virtual device management module.
14. The network device of claim 13, wherein the first master card sends a notification message of successful configuration to the client device, and wherein the notification message comprises:
the main virtual equipment management module is further configured to generate a notification message of successful configuration, and send the notification message to the configuration client module;
the configuration client module is further configured to send the notification message to a client device, so as to inform a user of successful configuration through the client device.
15. The network device of any of claims 11-14, wherein the first master card further comprises: a main memory database management module;
the main virtual device management module is further configured to send the configuration command request to the main memory database management module;
and the main memory database management module is used for storing the configuration command request.
16. The network device of any one of claims 12-14, wherein the network device further comprises: a core processing module;
when the network device detects an abnormality, the core processing module is configured to determine that a master virtual device management module of the first master control card is a new slave virtual device management module of the network device;
the core processing module is further configured to determine that the slave virtual device management module of the second master control card is a new master virtual device management module of the network device.
CN201810016563.8A 2018-01-08 2018-01-08 Virtual device configuration method and network device Active CN107995319B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810016563.8A CN107995319B (en) 2018-01-08 2018-01-08 Virtual device configuration method and network device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810016563.8A CN107995319B (en) 2018-01-08 2018-01-08 Virtual device configuration method and network device

Publications (2)

Publication Number Publication Date
CN107995319A CN107995319A (en) 2018-05-04
CN107995319B true CN107995319B (en) 2021-05-18

Family

ID=62039593

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810016563.8A Active CN107995319B (en) 2018-01-08 2018-01-08 Virtual device configuration method and network device

Country Status (1)

Country Link
CN (1) CN107995319B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108833177B (en) * 2018-06-22 2021-08-03 迈普通信技术股份有限公司 Virtual switch management method and master control card
CN110795212B (en) * 2019-10-29 2022-05-31 杭州迪普科技股份有限公司 Main/standby main control configuration synchronization method and device based on frame type equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102523257A (en) * 2011-11-30 2012-06-27 广东电子工业研究院有限公司 Infrastructure as a service (IAAS)-cloud-platform-based virtual machine fault-tolerance method
CN102917064A (en) * 2012-10-23 2013-02-06 广州杰赛科技股份有限公司 Double-machine hot-standby method based on private cloud computing platform
CN103581177A (en) * 2013-10-24 2014-02-12 华为技术有限公司 Method and device for managing virtual machine
CN105630571A (en) * 2014-10-31 2016-06-01 中兴通讯股份有限公司 Virtual machine creating method and device
CN106874150A (en) * 2017-02-28 2017-06-20 郑州云海信息技术有限公司 A kind of virtual machine High Availabitity disaster recovery method and its system

Family Cites Families (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8321377B2 (en) * 2006-04-17 2012-11-27 Microsoft Corporation Creating host-level application-consistent backups of virtual machines
US9098347B2 (en) * 2006-12-21 2015-08-04 Vmware Implementation of virtual machine operations using storage system functionality
CN101106443A (en) * 2007-08-10 2008-01-16 中兴通讯股份有限公司 A system and method for controlling switch of primary and backup board
US8369211B2 (en) * 2009-12-17 2013-02-05 Juniper Networks, Inc. Network distribution prevention when virtual chassis system undergoes splits and merges
CN102594849B (en) * 2011-01-06 2015-05-20 阿里巴巴集团控股有限公司 Data backup and recovery method and device, virtual machine snapshot deleting and rollback method and device
US9176766B2 (en) * 2011-07-06 2015-11-03 Microsoft Technology Licensing, Llc Configurable planned virtual machines
CN102708027B (en) * 2012-05-11 2015-08-12 中兴通讯股份有限公司 A kind of method and system avoiding outage of communication device
CN102799464B (en) * 2012-06-25 2015-11-11 北京奇虎科技有限公司 Virtual machine creation method and system, virtual machine reloading method and system
JP6366694B2 (en) * 2013-10-23 2018-08-01 華為技術有限公司Huawei Technologies Co.,Ltd. Method, system and apparatus for cloud application redundancy
CN103647849B (en) * 2013-12-24 2017-02-08 华为技术有限公司 Method and device for migrating businesses and disaster recovery system
CN104268001B (en) * 2014-09-24 2017-09-05 华为技术有限公司 A kind of method for creating virtual machine and the device for creating virtual machine
JP2016212548A (en) * 2015-05-01 2016-12-15 富士通株式会社 Storage control device, storage control method, and storage control program
CN105468372B (en) * 2015-11-20 2019-03-05 深信服科技股份有限公司 Virtual machine template mirror image management method and system, virtual machine migration method and system
CN106598789B (en) * 2016-11-30 2020-02-21 成都华为技术有限公司 Container service disaster tolerance method and device, production site and disaster recovery site
CN107038096B (en) * 2016-12-30 2018-01-19 平安科技(深圳)有限公司 Virtual disk standby system, method and apparatus
CN107220104A (en) * 2017-05-27 2017-09-29 郑州云海信息技术有限公司 A kind of virtual machine preparedness method and apparatus
CN107171870A (en) * 2017-07-17 2017-09-15 郑州云海信息技术有限公司 A kind of two-node cluster hot backup method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102523257A (en) * 2011-11-30 2012-06-27 广东电子工业研究院有限公司 Infrastructure as a service (IAAS)-cloud-platform-based virtual machine fault-tolerance method
CN102917064A (en) * 2012-10-23 2013-02-06 广州杰赛科技股份有限公司 Double-machine hot-standby method based on private cloud computing platform
CN103581177A (en) * 2013-10-24 2014-02-12 华为技术有限公司 Method and device for managing virtual machine
CN105630571A (en) * 2014-10-31 2016-06-01 中兴通讯股份有限公司 Virtual machine creating method and device
CN106874150A (en) * 2017-02-28 2017-06-20 郑州云海信息技术有限公司 A kind of virtual machine High Availabitity disaster recovery method and its system

Also Published As

Publication number Publication date
CN107995319A (en) 2018-05-04

Similar Documents

Publication Publication Date Title
JP5427574B2 (en) Virtual computer migration management method, computer using the migration management method, virtualization mechanism using the migration management method, and computer system using the migration management method
CN108270726B (en) Application instance deployment method and device
CN112104723B (en) Multi-cluster data processing system and method
US8612973B2 (en) Method and system for handling interrupts within computer system during hardware resource migration
CN108347339B (en) Service recovery method and device
EP4013015A1 (en) Detection and remediation of virtual environment performance issues
EP3834088B1 (en) One-sided reliable remote direct memory operations
US11507479B2 (en) High availability for a relational database management system as a service in a cloud platform
EP3806395B1 (en) Virtual network function (vnf) deployment method and apparatus
CN113886089A (en) Task processing method, device, system, equipment and medium
CN112948063A (en) Cloud platform creation method and device, cloud platform and cloud platform implementation system
CN107995319B (en) Virtual device configuration method and network device
US20060010133A1 (en) Management of a scalable computer system
CN108200151B (en) ISCSI Target load balancing method and device in distributed storage system
JP5285045B2 (en) Failure recovery method, server and program in virtual environment
WO2024017274A1 (en) Virtual machine cloning method and apparatus, and storage medium
EP3316518A1 (en) Method and device for upgrading virtual network element, and computer storage medium
CN109284169B (en) Big data platform process management method based on process virtualization and computer equipment
US20230058193A1 (en) Computer system and storage medium
WO2018196651A1 (en) Resource management method and device
CN116166413A (en) Lifecycle management for workloads on heterogeneous infrastructure
JP5391152B2 (en) Server system and method for selecting virtual server migration method
CN114691304A (en) Method, device, equipment and medium for realizing high availability of cluster virtual machine
CN114328434A (en) Data processing system, method, device and storage medium
CN112889247B (en) VNF service instantiation method and device

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