Virtual network card link state setting method and device and storage medium
A technology of link status and virtual network card, applied in the field of communication, can solve the problems of slow link status determination, slow link interruption response, etc.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0034] Embodiment 1 of the present invention provides a method for setting a link state of a virtual network card. figure 1 It is a flow chart of a method for setting the link state of a virtual network card according to Embodiment 1 of the present invention, as shown in figure 1 As shown, the method includes the following steps:
[0035] S102, monitor the link state of the physical network card through the kernel mode;
[0036] S104. Set the link status of the virtual network card corresponding to the physical network card according to the monitored link status of the physical network card.
[0037] Through the above method, the virtual network card can quickly and timely determine its own link status. Subsequent virtual machines can perform a series of actions such as virtual network card protection switching according to the set virtual network card link status, thereby improving the stability of the virtual machine network .
[0038] Further, setting the link status of ...
Embodiment 2
[0045] Embodiment 2 of the present invention provides a virtual network card link state setting device, figure 2 It is a block diagram of a virtual network card link state setting device according to Embodiment 2 of the present invention, such as figure 2 As shown, the virtual network card link state setting device includes the following modules:
[0046] The monitoring device 22 is configured to monitor the link status of the physical network card in a kernel mode;
[0047] The setting means 24 is configured to set the link status of the virtual network card corresponding to the physical network card according to the monitored link status of the physical network card.
[0048] Further, the setting device 24 is also used for setting the link status of the virtual network card corresponding to the physical network card to be disconnected when it is detected that the link status of the physical network card is disconnected.
[0049]Further, the setting device 24 is also used...
Embodiment 3
[0051] Embodiment 3 of the present invention will be described below in conjunction with specific scenarios.
[0052] The solution of the third embodiment of the present invention can be used in any virtualization environment of the most commonly used KVM cloud platform at present, and the host uses the KVM platform to provide the virtual network card service for the virtual machine. KVM (Kernel-based Virtual Machine) is one of the mainstream VMMs in the industry.
[0053] image 3 It is a virtual network card deployment diagram provided according to Embodiment 3 of the present invention, such as image 3 Shown:
[0054] Two hosts HOST1 and HOST2 provide two business virtual machines VM1 and VM2 through the KVM platform.
[0055] Physical NICs NIC1 and NIC2 provide vNIC1 and vNIC2 virtual NIC services for virtual machines VM1 and VM2.
[0056] HOST1 and HOST2 are connected to the P1 and P2 switching ports of the external switch Switch through NIC1 and NIC2. P1 and P2 run ...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


