CN110198243A - A kind of method for network access and relevant device of virtual machine - Google Patents

A kind of method for network access and relevant device of virtual machine Download PDF

Info

Publication number
CN110198243A
CN110198243A CN201910500661.3A CN201910500661A CN110198243A CN 110198243 A CN110198243 A CN 110198243A CN 201910500661 A CN201910500661 A CN 201910500661A CN 110198243 A CN110198243 A CN 110198243A
Authority
CN
China
Prior art keywords
virtual machine
network
interface card
network interface
target virtual
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910500661.3A
Other languages
Chinese (zh)
Other versions
CN110198243B (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 CN201910500661.3A priority Critical patent/CN110198243B/en
Publication of CN110198243A publication Critical patent/CN110198243A/en
Application granted granted Critical
Publication of CN110198243B publication Critical patent/CN110198243B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45595Network integration; Enabling network access in virtual machine instances
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/02Network architectures or network communication protocols for network security for separating internal from external traffic, e.g. firewalls
    • H04L63/0272Virtual private networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/02Network architectures or network communication protocols for network security for separating internal from external traffic, e.g. firewalls
    • H04L63/029Firewall traversal, e.g. tunnelling or, creating pinholes

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

This application discloses a kind of method for network access of virtual machine, comprising: in target virtual machine creation, according to the corresponding relationship of preset virtual machine traffic demand characteristics and network interface card type, determines network interface card type corresponding to target virtual machine;The network interface card type configuration information of target virtual machine is written in the configuration file of target virtual machine;In target virtual machine starting, the network interface card type configuration information in configuration file is read;According to network interface card type configuration information, the network interface card of corresponding types is created to complete network insertion for target virtual machine.The application introduces network interface card type configuration mechanism, network insertion is carried out according to the network interface card that virtual machine traffic demand characteristics creates suitable type, the flexible mixed of Microsoft Loopback Adapter and physical network card in secure resources pond is realized, hardware resource and software resource are rationally taken full advantage of.Disclosed herein as well is a kind of network access device of virtual machine, electronic equipment and computer readable storage mediums, equally have above-mentioned beneficial effect.

Description

A kind of method for network access and relevant device of virtual machine
Technical field
This application involves technical field of virtualization, in particular to the method for network access and relevant device of a kind of virtual machine.
Background technique
Network function virtualization (Network Functions Virtualization, NFV) is a kind of based on virtualization The IT such as technology and hardware management technology and the network technology framework realized, the function of network node stratum is divided into multiple function by it Energy block, and realized in secure resources pond with software mode, reduce the hardware device cost in network system.Network function In each security service network security maintenance function is mostly provided a user in the form of security component, security component is to operate in The virtual machine (Virtual Machine, VM) of particular safety service is provided in secure resources pond, as firewall (vAF), load are equal Weighing apparatus (vAD), fort machine etc..
In traditional network function virtualization, security component virtual machine is with the realization of software analog form.It is with Fig. 1 Example is based on virtual switch software OVS, and virtual machine VM1 and VM2 carry out network using the Microsoft Loopback Adapter generated with software mode Access and security function are realized, so that the load of system and software calculation amount expense are excessive, and then can be led sometimes System performance deficiency or performance is caused seriously to shake.In consideration of it, the scheme for providing a kind of solution above-mentioned technical problem is this field What technical staff urgently paid close attention to.
Summary of the invention
The method for network access and relevant device for being designed to provide a kind of virtual machine of the application, to be effectively reduced The software computing cost of system, and improve the process performance with systems stabilisation.
In order to solve the above technical problems, in a first aspect, being wrapped this application discloses a kind of method for network access of virtual machine It includes:
In target virtual machine creation, according to the corresponding relationship of preset virtual machine traffic demand characteristics and network interface card type, Determine network interface card type corresponding to the target virtual machine;
The network interface card type configuration information of the target virtual machine is written in the configuration file of the target virtual machine;
In target virtual machine starting, the network interface card type configuration information in the configuration file is read;
According to the network interface card type configuration information, the network interface card of corresponding types is created to complete network for the target virtual machine Access.
Optionally, if the network interface card type of the target virtual machine includes Microsoft Loopback Adapter type, for the target virtual machine Creation corresponding types network interface card include: to complete network insertion
Execute Microsoft Loopback Adapter creation instruction corresponding with the target virtual machine;
The Microsoft Loopback Adapter of creation is connect equipment with virtual network and establishes network connection to complete network insertion.
Optionally, if the network interface card type of the target virtual machine includes physical network card type, for the target virtual machine Creation corresponding types network interface card include: to complete network insertion
Execute the driving Uninstaller that host is directed to physical network card;
Transparent transmission is carried out to generate the first transparent transmission physical network card to the physical network card;
The drive load program that the target virtual machine is executed for the first transparent transmission physical network card is connect with completing network Enter.
Optionally, after carrying out transparent transmission to the physical network card to generate the first transparent transmission physical network card, further includes:
Transparent transmission is carried out to generate the second transparent transmission physical network card to the physical network card;
Execute the drive load program that the host is directed to the second transparent transmission physical network card.
Optionally, further includes:
The network interface card type for the target virtual machine for receiving input modifies instruction;
According to the network interface card type configuration information in configuration file described in network interface card type modification instruction modification.
Optionally, further includes:
Obtain the record information of the traffic throughput of the target virtual machine;
Judge whether the traffic throughput is less than preset threshold;
If so, the network interface card type of the target virtual machine is revised as Microsoft Loopback Adapter type;
If it is not, the network interface card type of the target virtual machine is then revised as physical network card type.
Second aspect, present invention also provides a kind of network access devices of virtual machine, comprising:
Determining module is used in target virtual machine creation, according to preset virtual machine traffic demand characteristics and network interface card class The corresponding relationship of type determines network interface card type corresponding to the target virtual machine;
Writing module, for the network interface card type of the target virtual machine to be written in the configuration file of the target virtual machine Configuration information;
Read module, for reading the network interface card type in the configuration file in target virtual machine starting Configuration information;
Creation module, for creating corresponding types for the target virtual machine according to the network interface card type configuration information Network interface card is to complete network insertion.
Optionally, further includes:
Monitoring modular, the record information of the traffic throughput for obtaining the target virtual machine;
Judgment module, for judging whether the traffic throughput is less than preset threshold;
Correction module is used for after the judgment module determines that the traffic throughput is less than the preset threshold, by institute The network interface card type for stating target virtual machine is revised as Microsoft Loopback Adapter type;And the traffic throughput is determined not in the judgment module After the preset threshold, the network interface card type of the target virtual machine is revised as physical network card type.
The third aspect, present invention also provides a kind of electronic equipment, comprising:
Memory, for storing computer program;
Processor realizes the network access side of any virtual machine as described above for executing the computer program The step of method.
Fourth aspect, present invention also provides a kind of computer readable storage medium, the computer readable storage medium In be stored with computer program, to realize any virtual machine as described above when the computer program is executed by processor Method for network access the step of.
The method for network access of virtual machine provided herein includes: the configuration file for obtaining target virtual machine, described Configuration file inputs information based on the received when the target virtual machine creates and generates, and the input information includes network interface card class Type configuration information;According to the network interface card type configuration information, the network interface card of corresponding types is created to complete for the target virtual machine Network insertion.
As it can be seen that compared with the prior art, the method for network access of virtual machine provided herein is directed to flow and handles up The different inhomogeneity virtual machine of performance introduces network interface card type configuration mechanism, and is respectively created for virtual machine and matches with network interface card type The network interface card that confidence ceases corresponding suitable type carries out network insertion, realizes Microsoft Loopback Adapter and physical network card in secure resources pond It is flexibly mixed, the software computing cost of system is effectively reduced, hardware resource and software resource, Jin Erti are rationally taken full advantage of Process performance that is high and stabilizing system.Network access device, electronic equipment and the computer of virtual machine provided herein Readable storage medium storing program for executing equally has above-mentioned beneficial effect.
Detailed description of the invention
In order to illustrate more clearly of the technical solution in the prior art and the embodiment of the present application, below will to the prior art and Attached drawing to be used is needed to make brief introduction in the embodiment of the present application description.Certainly, in relation to the attached drawing of the embodiment of the present application below A part of the embodiment in only the application of description is not paying creativeness to those skilled in the art Under the premise of labour, other attached drawings can also be obtained according to the attached drawing of offer, other accompanying drawings obtained also belong to the application Protection scope.
Fig. 1 is the application exemplary diagram of the method for network access of virtual machine in the prior art;
Fig. 2 is a kind of flow chart of the method for network access of virtual machine provided by the embodiment of the present application;
Fig. 3 is a kind of application exemplary diagram of the method for network access of virtual machine provided by the embodiment of the present application;
Fig. 4 is a kind of process of the method for network access of specific virtual machine provided by the embodiment of the present application on startup Figure;
Fig. 5 is a kind of structural block diagram of the network access device of virtual machine provided by the embodiment of the present application;
Fig. 6 is the structural block diagram of the network access device of another kind virtual machine provided by the embodiment of the present application;
Fig. 7 is the structural block diagram of a kind of electronic equipment provided by the embodiment of the present application.
Specific embodiment
The core of the application is to provide the method for network access and relevant device of a kind of virtual machine, to be effectively reduced The software computing cost of system, and improve the process performance with systems stabilisation.
In order to which technical solutions in the embodiments of the present application is more clearly and completely described, below in conjunction with this Shen Please attached drawing in embodiment, technical solutions in the embodiments of the present application is introduced.Obviously, described embodiment is only Some embodiments of the present application, instead of all the embodiments.Based on the embodiment in the application, those of ordinary skill in the art Every other embodiment obtained without making creative work, shall fall in the protection scope of this application.
In view of in network function virtualization architecture in the prior art, each virtual machine is defaulted with software mode generation Microsoft Loopback Adapter is realized to complete network insertion and function, significantly limits individual virtual machine (especially to flow bandwidth demand Measure biggish Security functional component) performance play and stable operation, the embodiment of the present application disclose a kind of network of virtual machine Cut-in method, referring to shown in Fig. 2, this method is mainly comprised the steps that
S101: corresponding with network interface card type according to preset virtual machine traffic demand characteristics in target virtual machine creation Relationship determines network interface card type corresponding to target virtual machine.
S102: the network interface card type configuration information of target virtual machine is written in the configuration file of target virtual machine.
S103: in target virtual machine starting, the network interface card type configuration information in configuration file is read.
S104: according to network interface card type configuration information, the network interface card for creating corresponding types for target virtual machine is connect with completing network Enter.
Specifically, the demand that different type or the different virtual machine of security function handle up to network flow is not identical, For example, larger for realizing not needed the virtual machine (common such as ssl vpn, fort machine etc.) of access-in management class function Flow handle up support, and the virtual machine for realizing flow cleaning protection class function is (common such as firewall, load balancing Deng) generally require larger flow and handle up support (such as 10G, 20G).Therefore, if by the unified use of all types of virtual machines Software virtual mode carries out network connection and function is realized, the performance of serious limitation virtual machine is played, and lead to entire safety The performance of resource pool is insufficient or performance is seriously shaken.
For this purpose, the method for network access of virtual machine provided herein, gulps down according to the flow of different types of virtual machine Performance requirement is spat, introduces network interface card type configuration mechanism, and is respectively created for virtual machine corresponding with network interface card type configuration information The network interface card of suitable type carries out network insertion, realizes the flexible mixed of Microsoft Loopback Adapter and physical network card in secure resources pond.
Specifically, there is different flow demand characteristics in view of different types of virtual machine, therefore in this application, target Virtual machine can select suitable network interface card type according to the flow demand characteristic of the virtual machine when being created, and then can be by the void The network interface card type configuration information of quasi- machine is stored in the configuration file of generation.Wherein, preset virtual machine traffic demand characteristics with The corresponding relationship of network interface card type specifically voluntarily can be selected and be arranged according to practical situations by those skilled in the art, but is easy Understand, generally, physical network card can be used in the big virtual machine of flow demand, and the small virtual machine of flow demand can be used virtually Network interface card, that is, the virtual machine for using Microsoft Loopback Adapter is generally greater than using the flow demand characteristic of the virtual machine of physical network card.In addition, Match confidence just like other routines such as CPU configuration information, memory configurations information it is easily understood that can also store in configuration file Breath, the application are not limited thereto.
The Microsoft Loopback Adapter uniformly used in the prior art is created with software mode using virtualization software and is generated, it Need to occupy certain software calculated performance, processing speed and network flow throughput performance are poor.And physical network card consumption is The hardware resource of true network interface card device, processing speed and network flow throughput performance are better than Microsoft Loopback Adapter.As a result, in the application In the method for network access of provided virtual machine, need big flow handle up support virtual machine can based on physical network card realize, Without big flow handle up support virtual machine can based on Microsoft Loopback Adapter realize.
Method for network access according to virtual machine provided herein includes: in target virtual machine creation, according to pre- If virtual machine traffic demand characteristics and network interface card type corresponding relationship, determine network interface card type corresponding to target virtual machine;? The network interface card type configuration information of target virtual machine is written in the configuration file of target virtual machine;In target virtual machine starting, read The network interface card type configuration information in configuration file is taken, and mesh is completed according to the network interface card of network interface card type configuration information creating corresponding types Mark the network insertion of virtual machine.As it can be seen that the application is directed to the different inhomogeneity virtual machine of flow throughput performance, network interface card is introduced Type configuration mechanism, and network is carried out for the network interface card that suitable type corresponding with network interface card type configuration information is respectively created in virtual machine Access realizes the flexible mixed of Microsoft Loopback Adapter and physical network card in secure resources pond, effectively reduces the software calculating of system Expense rationally takes full advantage of hardware resource and software resource, and then improves and stabilize the process performance of system.
It should be added that certain form of virtual machine may be may require that using multiple network interface cards, thus can Further enable its mixed Microsoft Loopback Adapter and physical network card.Those skilled in the art can be single according to practical situations designed, designed The configuration mechanism of a a variety of network interface card types of virtual machine configuration.
The method for network access of virtual machine provided herein, on the basis of the above, as a kind of specific reality Example is applied, if the network interface card type of target virtual machine includes Microsoft Loopback Adapter type, the network interface card of corresponding types is created for target virtual machine Include: to complete network insertion
Execute Microsoft Loopback Adapter creation instruction corresponding with target virtual machine;The Microsoft Loopback Adapter of creation is connect with virtual network Equipment establishes network connection to complete network insertion.
Specifically, function is created using the Microsoft Loopback Adapter that software virtual machine (such as qemu) is provided, it can be in secure resources pond It is created that Microsoft Loopback Adapter corresponding with target virtual machine;Recycle virtual network connection equipment, that is, virtual switch (vswitch) Or virtual router (vrouter), target virtual machine can be accessed network.
The method for network access of virtual machine provided herein, on the basis of the above, as a kind of specific reality Example is applied, if the network interface card type of target virtual machine includes physical network card type, the network interface card of corresponding types is created for target virtual machine Include: to complete network insertion
Execute the driving Uninstaller that host is directed to physical network card;Transparent transmission is carried out to generate the first transparent transmission to physical network card Physical network card;Performance objective virtual machine is directed to the drive load program of the first transparent transmission physical network card to complete network insertion.
Specifically, the secure resources pond based on virtualization technology operates in physical host i.e. host, therefore, this Application can be by target virtual machine of the physical network card in host after transparent transmission (Pass-through) in supply security resource pool It uses.It, can be by the first of transparent transmission generation after completing host and unbinding operation to the driving unloading operation of physical network card Transparent transmission physical network card and target virtual machine establish binding relationship, so that target virtual machine is connect by the first transparent transmission physical network card Enter network.
It is carried out below by method for network access of the specific application example to virtual machine provided herein further It illustrates, specifically can refer to Fig. 3, Fig. 3 is the application exemplary diagram of the method for network access of virtual machine provided by the embodiment of the present application.
Three virtual machines are shown in secure resources pond shown in Fig. 3 altogether, are ssl vpn, fort machine and firewall respectively, And network automatically management is uniformly carried out by virtual switch software OVS.According to the network insertion of virtual machine provided herein Method, the network interface card type configuration information in configuration file of the application based on each virtual machine, specially ssl vpn and fort machine wound Microsoft Loopback Adapter has been built, and has created the first transparent transmission physical network card for firewall.
The method for network access of virtual machine provided herein, on the basis of the above, as a kind of specific reality Example is applied, after carrying out transparent transmission to physical network card to generate the first transparent transmission physical network card, further includes:
Transparent transmission is carried out to generate the second transparent transmission physical network card to physical network card;It executes host and is directed to the second transparent transmission Physical Network The drive load program of card.
It specifically,, can in order to ensure the proper network operating of host after being unbinded physical network card and host Transparent transmission physical network card to be again to create the second transparent transmission physical network card, and by drive load program by the second transparent transmission physical network card with Host binding.
Above content can start referring in particular to Fig. 4, Fig. 4 for a kind of specific virtual machine provided by the embodiment of the present application When method for network access, mainly comprise the steps that
S201: the network interface card type configuration information in the configuration file of target virtual machine is read;Network interface card type configuration information exists When target virtual machine creates according to preset virtual machine traffic demand characteristics and network interface card type corresponding relationship and determine.
S202: whether the network interface card type for judging target virtual machine includes Microsoft Loopback Adapter type, if so, into S203;If It is no, then enter S205.
S203: Microsoft Loopback Adapter creation instruction corresponding with target virtual machine is executed.
S204: the Microsoft Loopback Adapter of creation is connect equipment with virtual network and establishes network connection to complete network insertion.
S205: whether the network interface card type for judging target virtual machine includes physical network card type, if so, into S206.
S206: the driving Uninstaller that host is directed to physical network card is executed.
S207: transparent transmission is carried out to generate the first transparent transmission physical network card to physical network card.
S208: performance objective virtual machine is directed to the drive load program of the first transparent transmission physical network card to complete network insertion.
S209: transparent transmission is carried out to generate the second transparent transmission physical network card to physical network card.
S210: the drive load program that host is directed to the second transparent transmission physical network card is executed.
The method for network access of virtual machine provided herein, on the basis of the above, as a kind of specific reality Apply example, further includes:
The network interface card type for target virtual machine for receiving input modifies instruction;Instruction modification is modified according to network interface card type to match Set the network interface card type configuration information in file.
Specifically, the modification of the network interface card type configuration information for target virtual machine can be also provided a user in the present embodiment Service.If user needs to be adjusted to the network interface card type that target virtual machine is configured in target virtual machine after a period of use, Then the present embodiment is dynamically modified the network interface card type in configuration file and is matched according to the network interface card type modification instruction of user's input Confidence breath.For example, if initially when target virtual machine creates, the network interface card type configuration information of write-in configuration file specifies target The corresponding network interface card type of virtual machine is Microsoft Loopback Adapter, and with the transformation of practical business, target virtual machine flow demand characteristic becomes Change, the network interface card type of the target virtual machine can be revised as physical network card using the modification instruction of network interface card type by user, in this way, under When subsystem booting, target virtual machine starting, the network insertion of target virtual machine can be updated according to modified configuration file Mode.
The method for network access of virtual machine provided herein, on the basis of the above, as a kind of specific reality Apply example, further includes:
Obtain the record information of the traffic throughput of target virtual machine;Judge whether the traffic throughput of target virtual machine is small In preset threshold;If so, the network interface card type of target virtual machine is revised as Microsoft Loopback Adapter type;If it is not, then by destination virtual The network interface card type of machine is revised as physical network card type.
Specifically, configuration text can also be modified in the present embodiment according to the actual use situation of target virtual machine and voluntarily Part, it is improper to network interface card type configuration when creating virtual machine to solve the problems, such as in time.Wherein, described traffic throughput tool Body refers to traffic throughput of the target virtual machine within the unit time, and described preset threshold is for assessing the target virtual machine pair The demand size of handling up of network flow, those skilled in the art can select and be arranged according to practical situations and voluntarily, this Shen It please be not limited thereto.
Wherein, so it is easy to understand that if the traffic throughput of target virtual machine is less than preset threshold, and target virtual machine is most When first network interface card type is exactly Microsoft Loopback Adapter type, then without modifying, otherwise just need accordingly to be modified;It is similar Ground, if the traffic throughput of target virtual machine is not less than preset threshold, and the initial network interface card type of target virtual machine is exactly object When managing network interface card type, then without modifying, otherwise just need accordingly to be modified.
In addition it is also necessary to which explanation, the flow that target virtual machine specifically can be regularly obtained after system boot are handled up Record, to be regularly updated amendment to configuration file.
The network access device of virtual machine provided herein is introduced below.
Referring to Fig. 5, Fig. 5 is a kind of structural block diagram of the network access device of virtual machine provided herein;Include:
Determining module 1 is used in target virtual machine creation, according to preset virtual machine traffic demand characteristics and network interface card class The corresponding relationship of type determines network interface card type corresponding to target virtual machine;
Writing module 2, for the network interface card type configuration letter of target virtual machine to be written in the configuration file of target virtual machine Breath;
Read module 3, for reading the network interface card type configuration information in configuration file in target virtual machine starting;
Creation module 4, for creating the network interface card of corresponding types for target virtual machine with complete according to network interface card type configuration information At network insertion.
As it can be seen that the network access device of virtual machine provided herein, is directed to the different difference of flow throughput performance Class virtual machine introduces network interface card type configuration mechanism, and conjunction corresponding with network interface card type configuration information is respectively created for virtual machine The network interface card of suitable type carries out network insertion, realizes the flexible mixed of Microsoft Loopback Adapter and physical network card in secure resources pond, effectively The software computing cost for reducing system rationally takes full advantage of hardware resource and software resource, and then improves and stabilize and be The process performance of system.
On the basis of above content, as a kind of preferred embodiment, the network insertion of virtual machine provided herein is filled In setting, if the network interface card type of target virtual machine includes Microsoft Loopback Adapter type, creation module 3 is specifically used for:
Execute Microsoft Loopback Adapter creation instruction corresponding with target virtual machine;The Microsoft Loopback Adapter of creation is connect with virtual network Equipment establishes network connection to complete network insertion.
On the basis of above content, as a kind of preferred embodiment, the network insertion of virtual machine provided herein is filled In setting, if the network interface card type of target virtual machine includes physical network card type, creation module 3 is specifically used for:
Execute the driving Uninstaller that host is directed to physical network card;Transparent transmission is carried out to generate the first transparent transmission to physical network card Physical network card;Performance objective virtual machine is directed to the drive load program of the first transparent transmission physical network card to complete network insertion.
On the basis of above content, as a kind of preferred embodiment, the network insertion of virtual machine provided herein is filled In setting, creation module 3 is also used to:
After carrying out transparent transmission to physical network card to generate the first transparent transmission physical network card, transparent transmission is carried out with life to physical network card At the second transparent transmission physical network card;Execute the drive load program that host is directed to the second transparent transmission physical network card.
Referring to Fig. 6, Fig. 6 is another structural block diagram of the network access device of virtual machine provided herein.
On the basis of above content, as a kind of preferred embodiment, as shown in fig. 6, void provided by the embodiment of the present application The network access device of quasi- machine further include:
Receiving module 5, the network interface card type for receiving input for target virtual machine modify instruction;
File modification module 6: for modifying the configuration file of instruction modification target virtual machine according to network interface card type.
On the basis of above content, as a kind of preferred embodiment, as shown in fig. 6, void provided by the embodiment of the present application The network access device of quasi- machine further include:
Monitoring modular 7, the record information of the traffic throughput for obtaining target virtual machine;
Judgment module 8, for judging whether the traffic throughput of target virtual machine is less than preset threshold;
Automatic correction module 9, for determining that the traffic throughput of target virtual machine is less than preset threshold in judgment module 8 Afterwards, the network interface card type of target virtual machine is revised as Microsoft Loopback Adapter type;And the flow of target virtual machine is determined in judgment module 8 After handling capacity is not less than preset threshold, the network interface card type of target virtual machine is revised as physical network card type.
Further, present invention also provides a kind of electronic equipment, structural block diagram is as shown in fig. 7, specifically include that
Memory 71, for storing computer program;
Processor 72 realizes the network insertion of any virtual machine as described above for executing the computer program The step of method.
Further, present invention also provides a kind of computer readable storage medium, the computer readable storage mediums In be stored with computer program, to realize any virtual machine as described above when the computer program is executed by processor Method for network access the step of.
The network access device of virtual machine provided herein, electronic equipment and computer readable storage medium it is specific Embodiment can correspond to each other reference with the method for network access of virtual machine as described above, just repeat no more here.
Each embodiment is described in a progressive manner in the application, the highlights of each of the examples are with other realities The difference of example is applied, the same or similar parts in each embodiment may refer to each other.For device disclosed in embodiment Speech, since it is corresponded to the methods disclosed in the examples, so being described relatively simple, related place is referring to method part illustration ?.
It should be noted that in present specification, the relational terms of such as " first " and " second " etc are used merely to One entity or operation and another entity or operate is distinguished, without necessarily requiring or implying these entities or There are any actual relationship or orders between person's operation.In addition, the terms "include", "comprise" or its any other Variant is intended to non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only It including those elements, but also including other elements that are not explicitly listed, or further include for this process, method, object Product or the intrinsic element of equipment.In the absence of more restrictions, the element limited by sentence "including a ...", It is not precluded in the process, method, article or apparatus that includes the element that there is also other identical elements.
Technical solution provided herein is described in detail above.Specific case used herein is to this Shen Principle and embodiment please is expounded, the present processes that the above embodiments are only used to help understand and its Core concept.It should be pointed out that for those skilled in the art, in the premise for not departing from the application principle Under, can also to the application, some improvement and modification can also be carried out, these improvement and modification are also fallen into the protection scope of the application.

Claims (10)

1. a kind of method for network access of virtual machine characterized by comprising
In target virtual machine creation, according to the corresponding relationship of preset virtual machine traffic demand characteristics and network interface card type, determine Network interface card type corresponding to the target virtual machine;
The network interface card type configuration information of the target virtual machine is written in the configuration file of the target virtual machine;
In target virtual machine starting, the network interface card type configuration information in the configuration file is read;
According to the network interface card type configuration information, the network interface card for creating corresponding types for the target virtual machine is connect with completing network Enter.
2. method for network access according to claim 1, which is characterized in that if the network interface card type packet of the target virtual machine Microsoft Loopback Adapter type is included, then the network interface card for creating corresponding types for the target virtual machine includes: to complete network insertion
Execute Microsoft Loopback Adapter creation instruction corresponding with the target virtual machine;
The Microsoft Loopback Adapter of creation is connect equipment with virtual network and establishes network connection to complete network insertion.
3. method for network access according to claim 1, which is characterized in that if the network interface card type packet of the target virtual machine Physical network card type is included, then the network interface card for creating corresponding types for the target virtual machine includes: to complete network insertion
Execute the driving Uninstaller that host is directed to physical network card;
Transparent transmission is carried out to generate the first transparent transmission physical network card to the physical network card;
The target virtual machine is executed for the drive load program of the first transparent transmission physical network card to complete network insertion.
4. method for network access according to claim 3, which is characterized in that carrying out transparent transmission to the physical network card with life After the first transparent transmission physical network card, further includes:
Transparent transmission is carried out to generate the second transparent transmission physical network card to the physical network card;
Execute the drive load program that the host is directed to the second transparent transmission physical network card.
5. method for network access according to any one of claims 1 to 4, which is characterized in that further include:
The network interface card type for the target virtual machine for receiving input modifies instruction;
According to the network interface card type configuration information in configuration file described in network interface card type modification instruction modification.
6. method for network access according to claim 5, which is characterized in that further include:
Obtain the record information of the traffic throughput of the target virtual machine;
Judge whether the traffic throughput is less than preset threshold;
If so, the network interface card type of the target virtual machine is revised as Microsoft Loopback Adapter type;
If it is not, the network interface card type of the target virtual machine is then revised as physical network card type.
7. a kind of network access device of virtual machine characterized by comprising
Determining module is used in target virtual machine creation, according to preset virtual machine traffic demand characteristics and network interface card type Corresponding relationship determines network interface card type corresponding to the target virtual machine;
Writing module, for the network interface card type configuration of the target virtual machine to be written in the configuration file of the target virtual machine Information;
Read module, for reading the network interface card type configuration in the configuration file in target virtual machine starting Information;
Creation module, for creating the network interface card of corresponding types for the target virtual machine according to the network interface card type configuration information To complete network insertion.
8. network access device according to claim 7, which is characterized in that further include:
Monitoring modular, the record information of the traffic throughput for obtaining the target virtual machine;
Judgment module, for judging whether the traffic throughput is less than preset threshold;
Correction module is used for after the judgment module determines that the traffic throughput is less than the preset threshold, by the mesh The network interface card type of mark virtual machine is revised as Microsoft Loopback Adapter type;And determine that the traffic throughput is not less than in the judgment module After the preset threshold, the network interface card type of the target virtual machine is revised as physical network card type.
9. a kind of electronic equipment characterized by comprising
Memory, for storing computer program;
Processor, for executing the computer program to realize the network such as virtual machine as claimed in any one of claims 1 to 6 The step of cut-in method.
10. a kind of computer readable storage medium, which is characterized in that be stored with computer in the computer readable storage medium Program, to realize the net such as virtual machine as claimed in any one of claims 1 to 6 when the computer program is executed by processor The step of network cut-in method.
CN201910500661.3A 2019-06-11 2019-06-11 Network access method of virtual machine and related equipment Active CN110198243B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910500661.3A CN110198243B (en) 2019-06-11 2019-06-11 Network access method of virtual machine and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910500661.3A CN110198243B (en) 2019-06-11 2019-06-11 Network access method of virtual machine and related equipment

Publications (2)

Publication Number Publication Date
CN110198243A true CN110198243A (en) 2019-09-03
CN110198243B CN110198243B (en) 2021-11-19

Family

ID=67754280

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910500661.3A Active CN110198243B (en) 2019-06-11 2019-06-11 Network access method of virtual machine and related equipment

Country Status (1)

Country Link
CN (1) CN110198243B (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111063387A (en) * 2019-12-29 2020-04-24 苏州浪潮智能科技有限公司 Method, device and equipment for testing performance of solid state disk and storage medium
CN111580935A (en) * 2020-05-13 2020-08-25 深信服科技股份有限公司 Network communication method, device, equipment and storage medium
CN111586196A (en) * 2020-04-07 2020-08-25 无锡华云数据技术服务有限公司 Method, device and system for realizing network double stacks of virtual machine
CN111880901A (en) * 2020-07-29 2020-11-03 北京浪潮数据技术有限公司 Network configuration method, device, equipment and readable storage medium
CN112330229A (en) * 2020-12-02 2021-02-05 北京元心科技有限公司 Resource scheduling method and device, electronic equipment and computer readable storage medium
CN112350866A (en) * 2020-11-06 2021-02-09 北京首都在线科技股份有限公司 Method, device and storage medium for processing virtual machine network card configuration information
CN112367267A (en) * 2020-09-30 2021-02-12 新华三大数据技术有限公司 Virtual machine management method and device
CN113590262A (en) * 2021-06-30 2021-11-02 郑州云海信息技术有限公司 High-availability method, system and related device for virtual machine
CN113645057A (en) * 2021-06-25 2021-11-12 济南浪潮数据技术有限公司 Method and device for supporting addition of network card model by cloud platform
CN113722000A (en) * 2021-11-03 2021-11-30 苏州浪潮智能科技有限公司 Intelligent network card configuration method and device, electronic equipment and readable storage medium
CN114070755A (en) * 2020-07-29 2022-02-18 中移(苏州)软件技术有限公司 Virtual machine network flow determining method and device, electronic equipment and storage medium
CN115242688A (en) * 2022-07-27 2022-10-25 济南浪潮数据技术有限公司 Network fault detection method, device and medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103473136A (en) * 2013-09-02 2013-12-25 华为技术有限公司 Resource allocation method of virtual machines, and communication equipment
CN104168135A (en) * 2014-08-06 2014-11-26 中国船舶重工集团公司第七0九研究所 Network card resource pooling management method and system
US20170279713A1 (en) * 2015-05-19 2017-09-28 Tencent Technology (Shenzhen) Company Limited Virtual machine data flow management method and system
CN109768871A (en) * 2017-11-09 2019-05-17 阿里巴巴集团控股有限公司 Configure method, host and the storage medium of multiple Microsoft Loopback Adapters

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103473136A (en) * 2013-09-02 2013-12-25 华为技术有限公司 Resource allocation method of virtual machines, and communication equipment
CN104168135A (en) * 2014-08-06 2014-11-26 中国船舶重工集团公司第七0九研究所 Network card resource pooling management method and system
US20170279713A1 (en) * 2015-05-19 2017-09-28 Tencent Technology (Shenzhen) Company Limited Virtual machine data flow management method and system
CN109768871A (en) * 2017-11-09 2019-05-17 阿里巴巴集团控股有限公司 Configure method, host and the storage medium of multiple Microsoft Loopback Adapters

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
欧阳艳 等: "基于虚拟化技术的省级政务数据中心的设计与实现", 《信息系统工程》 *

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111063387A (en) * 2019-12-29 2020-04-24 苏州浪潮智能科技有限公司 Method, device and equipment for testing performance of solid state disk and storage medium
CN111586196A (en) * 2020-04-07 2020-08-25 无锡华云数据技术服务有限公司 Method, device and system for realizing network double stacks of virtual machine
CN111586196B (en) * 2020-04-07 2022-09-06 华云数据控股集团有限公司 Method, device and system for realizing network double stacks of virtual machine
CN111580935A (en) * 2020-05-13 2020-08-25 深信服科技股份有限公司 Network communication method, device, equipment and storage medium
CN114070755B (en) * 2020-07-29 2023-08-01 中移(苏州)软件技术有限公司 Virtual machine network flow determination method and device, electronic equipment and storage medium
CN114070755A (en) * 2020-07-29 2022-02-18 中移(苏州)软件技术有限公司 Virtual machine network flow determining method and device, electronic equipment and storage medium
CN111880901A (en) * 2020-07-29 2020-11-03 北京浪潮数据技术有限公司 Network configuration method, device, equipment and readable storage medium
CN112367267A (en) * 2020-09-30 2021-02-12 新华三大数据技术有限公司 Virtual machine management method and device
CN112367267B (en) * 2020-09-30 2022-03-29 新华三大数据技术有限公司 Virtual machine management method and device
CN112350866A (en) * 2020-11-06 2021-02-09 北京首都在线科技股份有限公司 Method, device and storage medium for processing virtual machine network card configuration information
CN112350866B (en) * 2020-11-06 2021-12-21 北京首都在线科技股份有限公司 Method, device and storage medium for processing virtual machine network card configuration information
CN112330229B (en) * 2020-12-02 2023-09-22 北京元心科技有限公司 Resource scheduling method, device, electronic equipment and computer readable storage medium
CN112330229A (en) * 2020-12-02 2021-02-05 北京元心科技有限公司 Resource scheduling method and device, electronic equipment and computer readable storage medium
CN113645057A (en) * 2021-06-25 2021-11-12 济南浪潮数据技术有限公司 Method and device for supporting addition of network card model by cloud platform
CN113590262A (en) * 2021-06-30 2021-11-02 郑州云海信息技术有限公司 High-availability method, system and related device for virtual machine
CN113590262B (en) * 2021-06-30 2023-11-03 郑州云海信息技术有限公司 High availability method, system and related device of virtual machine
CN113722000B (en) * 2021-11-03 2022-02-18 苏州浪潮智能科技有限公司 Intelligent network card configuration method and device, electronic equipment and readable storage medium
CN113722000A (en) * 2021-11-03 2021-11-30 苏州浪潮智能科技有限公司 Intelligent network card configuration method and device, electronic equipment and readable storage medium
CN115242688A (en) * 2022-07-27 2022-10-25 济南浪潮数据技术有限公司 Network fault detection method, device and medium

Also Published As

Publication number Publication date
CN110198243B (en) 2021-11-19

Similar Documents

Publication Publication Date Title
CN110198243A (en) A kind of method for network access and relevant device of virtual machine
CN104424013B (en) The method and apparatus for disposing virtual machine in a computing environment
CN104516773B (en) Data distributing method and data distribution device for physical machine
CN106385329B (en) Processing method, device and the equipment of resource pool
CN106648826B (en) For the method and apparatus of thermophoresis virtual machine
CN110325968A (en) System upgrade management in distributed computing system
CN103238138A (en) Network interface for partition deployment/re-deployment in a cloud environment
US20120297099A1 (en) Control over loading of device drivers for an individual instance of a pci device
WO2012094757A1 (en) Determining an optimal computing environment for running an image
US8266419B2 (en) Fast restart on a virtual machine
US9720824B2 (en) Garbage collection handler to update object pointers
CN110908707B (en) Resource packaging method, device, server and storage medium
CN109726076B (en) Applet life cycle management method and system
CN108549583A (en) Big data processing method, device, server and readable storage medium storing program for executing
CN110908697A (en) Resource packaging method, device, server and storage medium
CN107220125A (en) A kind of cloud resource dispatching method and device
US20130138854A1 (en) Automated network configuration in a dynamic virtual environment
US20160077854A1 (en) Expediting host maintenance mode in cloud computing environments
US20150172128A1 (en) Stateless Flexible Boot Control
CN111176790A (en) Active maintenance method and device of cloud platform physical host and readable storage medium
CN104391736B (en) The park mode method to set up and device of virtual machine
US20190391818A1 (en) Resource-based boot sequence
CN108459906A (en) A kind of dispatching method and device of VCPU threads
CN105607869A (en) Method for quickly formatting and using virtual machine disk
CN104424012A (en) Method and equipment used for providing user-defined virtual 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