WO2015027771A1 - 一种虚拟机的资源配置方法和通信设备 - Google Patents

一种虚拟机的资源配置方法和通信设备 Download PDF

Info

Publication number
WO2015027771A1
WO2015027771A1 PCT/CN2014/082319 CN2014082319W WO2015027771A1 WO 2015027771 A1 WO2015027771 A1 WO 2015027771A1 CN 2014082319 W CN2014082319 W CN 2014082319W WO 2015027771 A1 WO2015027771 A1 WO 2015027771A1
Authority
WO
WIPO (PCT)
Prior art keywords
virtual machine
indication information
pass
physical network
preset
Prior art date
Application number
PCT/CN2014/082319
Other languages
English (en)
French (fr)
Inventor
丁天虹
林洋
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2015027771A1 publication Critical patent/WO2015027771A1/zh
Priority to US15/058,829 priority Critical patent/US9983899B2/en

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
    • 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5077Logical partitioning of resources; Management or configuration of virtualized resources
    • 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/4557Distribution of virtual machine instances; Migration and load balancing
    • 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
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/06Optimizing the usage of the radio link, e.g. header compression, information sizing, discarding information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W72/00Local resource management
    • H04W72/04Wireless resource allocation

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a resource configuration method and a communication device for a virtual machine. Background technique
  • Virtualization is a hotspot technology in the data center.
  • the virtualization technology of central processing unit (CPU) and content is developing rapidly, but the input/output (10) virtualization is relatively backward, which has become a rapid development of virtualization technology.
  • Some new virtualization technologies are now being applied to the physical NICs of communication devices, such as Single-Root I/O Virtualization (SR-IOV) and Virtual Machine Device Queue (VMDQ).
  • SR-IOV Single-Root I/O Virtualization
  • VMDQ Virtual Machine Device Queue
  • the physical network card is directly mapped to the virtual machine, the virtual machine loads the physical network card driver, but after a physical network card is used by the virtual machine in this way, it loses its sharing ability and becomes virtual. Exclusive equipment for the machine. If the number of virtual machines is less than the number of physical NICs, the network performance of the communication device can be maximized. If the number of virtual machines is greater than the number of physical NICs, the virtual machines that cannot correspond to the physical NICs need to use traditional open virtual switching.
  • the standard (OVS) or bridged mode shares the physical NICs, and the physical NICs corresponding to these virtual machines are configured during the virtual machine creation process.
  • the virtual machine needs to dynamically change the network resources in the actual application, when the virtual machine is configured in the initial configuration mode, some virtual machines may have insufficient network resources, and some virtual machines have excessive network resources. Unreasonable resource allocation.
  • the embodiments of the present invention provide a resource configuration method and a communication device for a virtual machine, which avoids the problem that the network resources of some virtual machines are insufficient, and the network resources of some virtual machines are excessive.
  • a first aspect of the embodiments of the present invention provides a resource configuration method for a virtual machine, including: acquiring requirement indication information of a virtual machine of a communication device for network resources;
  • Configuring a virtual machine whose indication information meets the preset through condition is configured as a virtual machine using the through technology;
  • the virtual machine whose requirement indication information does not satisfy the preset through condition is configured as a virtual machine sharing a physical network card.
  • the obtaining the indication information of the requirement for the network resource of the virtual device of the communication device includes: acquiring network traffic or load of each virtual machine in the plurality of virtual machines, and increasing network traffic or load of each virtual machine from large to large If the sorting is small, the preset pass-through condition includes: in the plurality of virtual machines, the network traffic or the load is ranked in the first N virtual machines using the through-through technology; or
  • the obtaining the indication information of the requirement for the network resource of the virtual device of the communication device specifically: acquiring network traffic or load of the virtual machine, and calculating a hash value corresponding to the network traffic or load of the virtual machine, where
  • the preset pass-through condition includes: the network traffic of the virtual machine or the hash value corresponding to the load is greater than the second threshold.
  • the virtual machine configured to meet the preset pass-through condition is configured as a virtual machine that uses the pass-through technology, and specifically includes:
  • a third possible implementation manner of the first aspect of the embodiment of the present invention if it is determined that the requirement indication information of the virtual machine is not satisfied And configuring the virtual machine that does not meet the preset pass-through condition to be a virtual machine that shares the physical network card, and specifically includes:
  • the method for determining whether the current communication mode of the virtual machine is a shared physical network card if not, modifying the hardware network resource in the configuration file of the virtual machine as a resource of the shared physical network card.
  • the hardware network in the configuration file of the virtual machine is modified.
  • the resource is a shared physical NIC resource, it also includes:
  • the network traffic of the physical network card or the physical network card whose load is less than or equal to the preset value is used for sharing, and the preset policy includes:
  • modifying the hardware network resource in the configuration file of the virtual machine as the resource of the shared physical network card specifically: modifying the hardware network resource in the configuration file of the virtual machine as the resource of the selected shared physical network card.
  • the method Before the obtaining the indication information of the network resources of the communication device, the method further includes: setting an initial value of the requirement indication information corresponding to the virtual machine;
  • the virtual machine that satisfies the preset through condition of the initial value of the requirement indication information is configured as a virtual machine using the through technology
  • the virtual machine whose initial value of the demand indication information does not satisfy the preset through condition is configured as a virtual machine sharing a physical network card.
  • a second aspect of the embodiments of the present invention provides a communication device, where the communication device further includes an indication information acquiring unit, a first configuration unit, and a second configuration unit, where:
  • the indication information acquiring unit is configured to acquire the requirement indication information of the virtual machine for network resources
  • the first configuration unit is configured to configure, by the virtual machine that meets the direct-through condition, the requirement indication information acquired by the indication information acquiring unit to a virtual machine that uses the through-through technology;
  • the second configuration unit is configured to configure a virtual machine that does not satisfy the preset pass-through condition by the requirement indication information acquired by the indication information acquiring unit to be a virtual machine that shares a physical network card.
  • the indication information obtaining unit is specifically configured to acquire network traffic or load of the virtual machine, where the preset pass-through condition includes: the network traffic or load of the virtual machine is greater than the first threshold; or
  • the indication information obtaining unit is specifically configured to acquire network traffic or load of each virtual machine, and sort network traffic or load of each virtual machine from large to small, and the preset through-conditions include: In multiple virtual machines, network traffic or load is ranked in front of N virtual machines.
  • the indication information obtaining unit is specifically configured to acquire network traffic or load of the virtual machine, and calculate a hash value corresponding to the network traffic or the load of the virtual machine, where the preset pass-through condition includes: The hash value corresponding to the network traffic or load is greater than the second threshold.
  • the first configuration unit specifically includes: a unit, configured to determine whether the requirement indication information of the virtual machine meets the preset through condition;
  • a straight-through communication mode determining unit configured to determine, when the through-condition determination unit determines that the demand indication information of the virtual machine meets the preset through-pass condition, whether the current communication mode of the virtual machine is a through mode
  • the second configuration unit specifically includes: a shared communication mode determining unit, configured to When the through condition determination unit determines that the requirement indication information of the virtual machine does not satisfy the preset through condition, further determines whether the current communication mode of the virtual machine is a mode of sharing a physical network card;
  • a shared configuration unit configured to: when the shared communication mode determining unit determines that the current communication mode of the virtual machine is not a mode of sharing a physical network card, modify the hardware network resource in the configuration file of the virtual machine to be a shared physical network card. resource of.
  • the sharing configuration unit is specifically configured to: when the shared communication mode determining unit determines that the current communication mode of the virtual machine is not a mode of sharing a physical network card, select a network traffic or a load that is less than or equal to a preset for the virtual machine.
  • the value of the physical network card is shared, and the preset policy includes: the network traffic or load of the physical network card is less than or equal to a preset value; and modifying the hardware network resource in the configuration file of the virtual machine to be the selected shared physical network card resource of.
  • the communications device further includes:
  • An initial value setting unit configured to set an initial value of the demand indication information corresponding to the virtual machine; a first initial configuration unit, configured to satisfy an initial value of the requirement indication information set by the initial value setting unit
  • the virtual machine with the pass-through condition is configured as a virtual machine using the through-through technology;
  • a second initial configuration unit configured to configure the virtual machine whose initial value of the requirement indication information set by the initial value setting unit does not satisfy the preset through condition as a virtual machine sharing a physical network card.
  • the communication device configures the virtual machine to communicate with other devices through the physical network card according to the actual indication information of the network resources. Ways or ways of sharing physical NICs. In this way, if the virtual machine actually needs to dynamically change the network resource, the communication device can dynamically configure the communication mode that is compatible with the virtual machine, so that the virtual machine that needs less network resources can use the shared physical network card, but A virtual machine with a large network resource requirement can use the pass-through mode, which does not cause waste of network resources of some virtual machines, and some network resources of the virtual machine are insufficient, thereby rationalizing the network resource allocation of the virtual machine.
  • FIG. 1 is a schematic structural diagram of a communication device according to an embodiment of the present invention.
  • FIG. 2 is a flowchart of a resource configuration method of a virtual machine according to an embodiment of the present invention
  • FIG. 3 is a flowchart of another virtual machine resource configuration method according to an embodiment of the present invention
  • FIG. 5 is a schematic structural diagram of a communication mode switching of a virtual machine according to an embodiment of the present invention
  • FIG. 6 is a schematic structural diagram of a communication device according to an embodiment of the present invention.
  • FIG. 7 is a schematic structural diagram of another communication device according to an embodiment of the present invention.
  • FIG. 8 is a schematic structural diagram of another communication device according to an embodiment of the present disclosure.
  • FIG. 9 is a schematic structural diagram of another communication device according to an embodiment of the present invention. detailed description
  • the embodiment of the present invention provides a resource configuration method for a virtual machine, which can be mainly used in the communication device as shown in FIG. 1 , where the hardware device includes a hardware layer, a virtual machine monitor (VMM), and a virtual device.
  • the hardware device includes a hardware layer, a virtual machine monitor (VMM), and a virtual device.
  • VMM virtual machine monitor
  • the hardware layer may include multiple (such as M) physical network cards; the VMM may coordinate management of the relationship between the hardware included in the hardware layer and the virtual machine, specifically, the relationship between the physical network card and the virtual machine may be managed, and the virtual machine passes The way the physical network card communicates with other devices (is the direct virtual function mode or the physical function mode of the shared physical network card); multiple (such as L, where L is greater than the number of physical network cards).
  • Some virtual machines in the virtual machine such as virtual Machine 0 can be used to manage other virtual machines, and other virtual machines (such as virtual machines 1 to 5) can communicate with other devices by directly communicating or sharing physical network cards.
  • the virtual 0 of the above-mentioned management may include a virtual function system (VFS) and a shared module of the physical network card.
  • VFS virtual function system
  • the VFS can issue execution commands to other virtual machines to manage other virtual machines, and the shared module can use the traditional The OVS or bridged mode shares the physical network card.
  • the shared module shown in FIG. 1 enables the virtual machines (such as virtual machines 1 and 2 shown in FIG. 1) to share the resources of the physical network card by means of OVS.
  • the VFS included in the virtual machine 0 managed by the communication device in this embodiment can configure the resources of the virtual machine according to the following method.
  • the flowchart is as shown in FIG. 2, and includes:
  • Step 101 In a process in which the communication device communicates by using the virtual machine, obtain indication indication information of the virtual device of the communication device that actually needs the network resource.
  • the requirement indication information is used to indicate the actual requirement of the virtual machine for the network resource.
  • the VFS can be obtained according to the service type of the data transmitted by the virtual machine. For example, if the service type of the data transmitted by the virtual machine is video data, the specific The value indicates the requirement indication information of the virtual machine, for example, 500 megabytes (M); the VFS can also determine the virtual machine's demand indication information by default, or according to the actual network traffic or load of the virtual machine, such as the actual load comparison of the virtual machine. If the demand indication information is large, the virtual network bandwidth value may be used to indicate the actual demand of the virtual machine for the network resource.
  • the VFS can obtain network traffic or load of each virtual machine in multiple virtual machines. For statistical convenience, the VFS can further calculate the hash value corresponding to the network traffic or load of each virtual machine, and the VFS can also The network traffic or load of each virtual machine is sorted from large to small.
  • Step 102 Configure the virtual machine whose requirement indication information meets the preset through condition as a virtual machine adopting the through technology.
  • the preset pass-through condition refers to the condition that the virtual machine communicates with other devices through the physical network card in the through mode, and may specifically include: the actual network traffic or load of the virtual machine is greater than the first threshold; or according to the actual network traffic of the virtual machine (or The value obtained by the load) and a certain functional relationship is greater than the second threshold; or in multiple virtual machines (such as L virtual machines), the actual network traffic (or load) is sorted from the largest to the smallest, and the network is ranked in the front. Multiple virtual machines corresponding to traffic (or load), such as network traffic (or load) are listed in the first N virtual machines, configured as virtual machines with pass-through technology, where N is smaller than the number of physical NICs M.
  • the VFS sets an initial value of the demand indication information for the network resource for the virtual machine, and the initial value can be specified according to the initial requirement of the user, and
  • the virtual machine whose initial value of the requirement indication information meets the preset pass-through condition is configured as a virtual machine that uses the pass-through technology.
  • the VFS allocates a corresponding physical network card to the virtual machine, and maps the physical network card to the corresponding virtual machine, that is,
  • the VFS stores the information of the physical network card (including the driver information and the attribute information) in the corresponding virtual machine, and the VFS can also manage the correspondence between the virtual machine and the physical network card.
  • the virtual machines 3, 4, and 5 in the communication device described in FIG. 1 are all communicated by using a pass-through technology. These virtual machines can load the corresponding physical network card and directly use the port information and other devices using the corresponding physical network card. Communication.
  • the VFS also configures a virtual machine shared physical network card whose initial value of the demand indication information does not satisfy the preset pass-through condition. Specifically, the VFS may send an instruction to the virtual machine sharing the physical network card, indicating that the virtual machine shares the resources of the physical network card through the shared module in the managed virtual machine 0, and the VFS may also configure the time period for each virtual machine to be used. Which network resources of the physical network card, etc. For example, the virtual machines 1 and 2 in the communication device described in FIG. 1 communicate by means of a shared physical network card, and these virtual machines can communicate with other devices through the port information of the physical network card.
  • Steps 101 through 103 in the embodiment dynamically configure the manner in which each virtual machine communicates with other devices. Specifically, after the VFS is executed in step 101, when the configuration of the step 102 is performed, the following steps may be implemented.
  • the flowchart is as shown in FIG. 3, and includes:
  • step A1 It is determined whether the requirement indication information of the virtual machine obtained in step 101 satisfies the preset through condition. If yes, step B is performed. If not, the configuration in step 103 is performed.
  • step Cl Determine whether the current communication mode of the virtual machine is the through mode. If not, execute step Cl. If yes, there is no need to change the communication mode of the virtual machine.
  • the communication mode of the virtual machine needs to be switched to the direct mode.
  • the VFS can send a command to the virtual machine first, indicating that the virtual machine is suspended to stop communication, and the virsh (virtual) interface can be invoked to send a command to the virtual machine. And then assigning a corresponding physical network card to the virtual machine, and tampering with the hardware network resource in the configuration file of the virtual machine as the resource of the allocated physical network card.
  • the VFS also needs to create a virtual function for the virtual machine to map the physical network card to be allocated to the virtual machine, and specifically store the information of the allocated physical network card into the virtual machine, so that the virtual machine is automatically loaded. drive.
  • the VFS can store the virtual machine's communication status and related information when the virtual machine is suspended, so that the virtual machine can still remain connected after switching the communication mode and starting communication.
  • Step 103 Configure a virtual machine whose requirement indication information does not satisfy the preset through condition as a virtual machine sharing a physical network card.
  • the VFS may implement the configuration in this step according to the following steps. Show, including:
  • step B2 Determine whether the current communication mode of the virtual machine is a shared physical network card. If not, execute step C2. If yes, do not need to change the communication mode of the virtual machine.
  • the mode of communication of the virtual machine needs to be switched to a manner of sharing a physical network card. Specifically,
  • the VFS may send a command to the virtual machine first, indicating that the virtual machine is suspended, stopping communication, and then modifying the hardware network resource in the configuration file of the virtual machine to be a resource of a physical network card shared by the communication device.
  • the VFS also needs to delete the information of the previously mapped physical network card in the virtual machine. If there are multiple shared physical network cards that already exist in the communication device, the VFS cuts the communication mode of the virtual machine. When switching to a physical NIC, you need to select a shared physical NIC for the virtual machine, and then switch the communication mode of the virtual machine to share the selected shared physical NIC.
  • the VFS may select a physical network card whose network traffic or load is less than or equal to a preset value for the virtual machine to share.
  • the communication mode of the network card is modified to the direct communication mode (the connection mode indicated by the dotted arrow in FIG. 5); when the actual indication information of the virtual machine 3 for the network resource does not satisfy the preset through condition, the virtual machine 3 needs to be directly connected.
  • the communication mode is modified to the communication mode of the shared physical network card (the connection method indicated by the dotted arrow in Fig. 5;).
  • the method in this embodiment is performed by using a virtual machine that performs a management operation in a virtual machine.
  • a function module independent of the virtual machine in the communication device may be used. Configure the resources of the virtual machine according to the above steps 101 to 103.
  • a resource configuration method when the number of virtual machines in the communication device is greater than the number of physical network cards is described, and for the case where the number of virtual machines is smaller than the number of physical network cards, the VFS may directly be used for each virtual machine. Assign the corresponding physical NIC without considering the case of sharing the physical NIC.
  • the communication device configures the virtual machine to actually use the virtual machine to physically access the network resource according to the actual indication information of the network resource.
  • the communication device can dynamically configure the communication mode that is compatible with the virtual machine, so that the virtual machine that needs less network resources can use the way of sharing the physical network card, and the virtual machine that needs more network resources can In the pass-through mode, the network resources of some virtual machines are not wasted, and the network resources of some virtual machines are insufficient, so that the network resource allocation of virtual machines is rationalized.
  • the embodiment of the present invention provides a communication device, and each unit in the communication device can perform resource configuration on the virtual machine in the communication device according to the method shown in FIG. 2, and the structure diagram is as shown in FIG. 6, including M devices.
  • the indication information obtaining unit 120 is configured to acquire a virtual machine's demand for network resources of the communication device. Show information.
  • the first configuration unit 110 is configured to configure the virtual machine whose requirement indication information acquired by the indication information acquiring unit 120 meets the preset through condition as a virtual machine using the through technology.
  • the indication information obtaining unit 120 may be specifically configured to acquire network traffic or load of the virtual machine.
  • the preset through-pass condition includes that the network traffic or load of the virtual machine is greater than the first threshold; or refers to the virtual machine.
  • the network traffic or the load is sorted from large to small.
  • the preset pass-through condition is included in the plurality of virtual machines, and the network traffic or the load is ranked in the front N virtual machines using the through-through technology, where N is smaller than the number M of the physical network cards; or the indication information obtaining unit 120 is specifically configured to acquire network traffic or load of the virtual machines, and calculate a hash value corresponding to the network traffic or the load of the virtual machine.
  • the preset pass-through condition includes that the virtual machine's network traffic or the load corresponding to the hash value is greater than the second threshold.
  • the second configuration unit 130 is configured to configure the virtual machine that the requirement indication information acquired by the indication information acquiring unit 120 does not satisfy the preset through condition as a virtual machine that shares a physical network card.
  • the first configuration unit 110 and the second configuration unit 130 may actually access the network according to the virtual machines acquired by the indication information acquiring unit 120.
  • the requirement indication information of the resource, and the manner in which the virtual machine communicates with other devices through the physical network card is a direct mode or a shared physical network card.
  • the communication device can dynamically configure the communication mode that is compatible with the virtual machine, so that the virtual machine that needs less network resources can use the shared physical network card, but A virtual machine with a large network resource requirement can adopt the straight-through mode, which does not cause waste of network resources of some virtual machines, and some network resources of the virtual machine are insufficient, thereby rationalizing the network resource allocation of the virtual machine.
  • the communication device includes, in addition to the structure shown in FIG. 6, the first configuration unit 110, specifically, the through-pass condition determining unit 111, the through-communication mode determining unit 112, and The pass-through configuration unit 113 is implemented, and the second configuration unit 130 can be implemented by the shared configuration unit 131 and the shared communication determining unit 132, where:
  • the pass-through condition determining unit 111 is configured to determine whether the demand indication information of the virtual machine acquired by the indication information acquiring unit 120 meets the preset through-condition;
  • the through communication mode determining unit 112 is configured to further determine whether the current communication mode of the virtual machine is a through mode when the through condition determination unit 111 determines that the requirement indication information of the virtual machine satisfies the preset through condition;
  • the direct configuration unit 113 may first send a command to the virtual machine, indicating that the virtual machine is suspended to stop communication; After assigning a physical network card to the virtual machine and modifying the configuration file, the direct configuration unit drama 113 also needs to create a virtual function for the virtual machine to map the physical network card to be allocated to the virtual network, specifically the allocated physical The information of the network card is stored in the virtual machine, so that the virtual machine will automatically load the driver.
  • the pass-through configuration unit 113 may store the communication state and related information of the virtual machine when the virtual machine is suspended, so that the virtual machine can still maintain the connected state after switching the communication mode and starting the communication. .
  • the shared communication mode determining unit 132 is configured to further determine whether the current communication mode of the virtual machine is shared when the through condition determination unit 111 determines that the demand indication information of the virtual machine does not satisfy the preset through condition. The way the physical NIC is.
  • the sharing configuration unit 131 is configured to: when the shared communication mode determining unit 132 determines that the current communication mode of the virtual machine is not a mode of sharing a physical network card, modify the hardware network resource in the configuration file of the virtual machine to be shared. Physical NIC resources. Specifically, the sharing configuration unit 131 may first send a command to the virtual machine, instruct the virtual machine to hang, and then modify the configuration file, and the sharing configuration unit 131 may also delete the information of the previously mapped physical network card in the virtual machine. .
  • the sharing configuration unit 131 is specifically configured to: when the shared communication mode determining unit determines that the current communication mode of the virtual machine is not a shared physical network card, if the shared physical network card currently exists in the communication device.
  • the physical network card whose physical network card is selected or whose load is less than or equal to the preset value is shared by the virtual machine, and the hardware network resource in the configuration file of the virtual machine is modified to be the resource of the selected shared physical network card.
  • the communication mode is a shared physical network card by using the pass-through configuration unit 113 in the first configuration unit 110 during the communication process between the communication device and the other device.
  • the mode of the virtual machine is switched to the direct mode.
  • the shared configuration unit 131 in the second configuration unit 130 can switch the virtual machine in the direct mode to the shared physical network card mode.
  • the communication device may include an initial value setting unit 150, a first initial configuration unit 140, and a second initial configuration unit, in addition to the structure shown in FIG. 160, where:
  • the initial value setting unit 150 is configured to set an initial value of the demand indication information corresponding to the virtual machine; the first initial configuration unit 140 is configured to satisfy an initial value of the demand indication information set by the initial value setting unit 150.
  • the virtual machine configured with the pass-through condition is configured as a virtual machine using the through-through technology, and the physical network card is mapped to the corresponding virtual machine, and the information of the physical network card (including the driving information and the attribute information, etc.) is stored in the corresponding virtual machine. It also manages the correspondence between each virtual machine and the physical network card.
  • the second initial configuration unit 160 is configured to configure the virtual machine shared physical network card whose initial value of the requirement indication information set by the initial value setting unit 150 does not satisfy the preset through condition. Specifically, the second initial configuration unit 160 may send an instruction to the virtual machine sharing the physical network card, indicating that the virtual machine can share the resources of the physical network card, and the second initial configuration unit 160 may also configure the virtual machine to use the physical network card during which time period. Which network resources are etc.
  • the initial value setting unit 150, the first initial configuration unit 140, and the second initial configuration unit 160 may be configured to communicate with other devices for the created multiple virtual machine at the beginning of the creation of the virtual machine.
  • the embodiment of the present invention further provides a communication device, wherein each unit in the communication device can perform resource configuration on the virtual machine in the communication device according to the method shown in FIG. 2, and the structure diagram is as shown in FIG. Connected to the memory 20 on the bus, the processor 21, the input device 23 and the output device 24, wherein:
  • the memory 20 is used to store data input from the input device 23, and may also store information such as necessary files for the processor 21 to process data.
  • the input device 23 and the output device 24 are ports that the communication device communicates with other devices, and may also include devices external to the communication device, such as a display, a keyboard, a mouse, and a printer. In this embodiment, the input device 23 and the output device 24 include M devices. Physical NIC.
  • the processor 21 in this embodiment may be used to create multiple (such as L) virtual machines, where L is greater than M, and obtain the network in the virtual machine during the communication process between the virtual machine and the other device through the physical network card.
  • the demand indication information of the resource; the virtual machine that meets the preset direct-through condition is configured as a virtual machine adopting the through-through technology; and the virtual machine whose requirement indication information does not satisfy the preset through-condition is configured to be shared Virtual machine for physical NIC.
  • the processor 21 may obtain network traffic or load of each virtual machine when acquiring the requirement indication information corresponding to the virtual machine.
  • the preset pass-through condition includes that the network traffic or load of the virtual machine is greater than the first threshold.
  • the processor 21 may specifically obtain the network traffic or load of each virtual machine, and sort the network traffic or load of each virtual machine from large to small, in this case, the preset pass-through condition includes In the plurality of virtual machines, network traffic or load is ranked in the first N virtual machines using the pass-through technology, where N is less than M; or the processor 21 specifically acquires the network traffic or load of the virtual machine, and calculates the virtual machine's The hash value corresponding to the network traffic or load, in this case, the preset pass-through condition includes that the virtual machine's network traffic or the load corresponding to the hash value is greater than the second threshold.
  • the processor 21 can configure the virtual machine to communicate with other devices at the beginning of the creation of the virtual machine. Specifically, the processor may first set the initial indication of the requirement indication information corresponding to the virtual machine. And the virtual machine configured to meet the preset pass-through condition of the virtual machine is configured to use a virtual machine of the pass-through technology. Specifically, the processor 21 may allocate a corresponding physical network card to the virtual machine. The physical network card is mapped to the corresponding virtual machine, and the information of the physical network card (including the driving information and the attribute information) is stored in the corresponding virtual machine, and the correspondence between the virtual machine and the physical network card can also be managed. And configuring the virtual machine sharing the physical network card with the initial value of the requirement indication information not satisfying the preset through condition. Specifically, the processor 21 may send an instruction to the virtual machine sharing the physical network card to indicate that the virtual machine can share the physical network card. Resources, and processor 21 can also configure which time period each virtual machine is used What network management card and other resources.
  • the processor 21 is further configured to: when the virtual machine communicates with the other device through the physical network card, continuously obtain the indication indication information of the virtual machine for the network resource, and determine whether the requirement indication information of the virtual machine meets the requirement. The preset pass-through condition is performed. If yes, the processor 21 further determines whether the current communication mode of the virtual machine is a through mode. If yes, the communication mode does not need to be switched. If not, the communication of the virtual machine needs to be switched. In a specific manner, the processor 21 can send a command first.
  • Deleting the virtual machine indicating that the virtual machine is suspended, stopping communication; then assigning the corresponding physical network card to the virtual machine, and modifying the hardware network resource in the configuration file of the virtual machine as the allocated physical network card Resource, and the processor 21 also needs to create a virtual function for the virtual machine to map the physical network card to be allocated to the virtual network card, specifically store the information of the allocated physical network card into the virtual machine, so that the virtual The machine will automatically load the driver.
  • the processor 21 can store the communication state and related information of the virtual machine when the virtual machine is suspended, so that the virtual machine can still maintain the connected state after switching the communication mode and starting the communication.
  • the processor 21 determines that the requirement indication information of the virtual machine does not meet the preset pass-through condition, it is further required to determine whether the current communication mode of the virtual machine is a mode of sharing a physical network card, and if so, The communication mode is not required to be switched. If not, the processor 21 needs to switch the communication mode. Specifically, the command may be sent to the virtual machine to indicate that the virtual machine is suspended. Then, the hardware network in the configuration file of the virtual machine is modified. Resources are resources of a shared physical NIC. In this case, the processor 21 can also delete the information of the previously mapped physical network card in the virtual machine.
  • the processor 21 is configured to be the same as the shared physical network card.
  • the virtual machine selects a physical network card that meets the preset policy for sharing, and the preset policy includes, but is not limited to, the following information: the network traffic or load of the physical network card is less than or equal to a preset value, and the virtual machine corresponding to the physical network card The quantity is less than or equal to the preset value, etc.; and the hardware network resource in the configuration file of the virtual machine is modified to be the resource of the selected shared physical network card.
  • the program may be stored in a computer readable storage medium, and the storage medium may include: Read only memory (ROM), random access memory (RAM), magnetic or optical disk, and the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Computer And Data Communications (AREA)

Abstract

本发明实施例公开了虚拟机的资源配置方法和通信设备,应用于通信技术领域。在通信设备利用虚拟机通信的过程中,该通信设备会根据各个虚拟机实际对网络资源的需求指示信息,配置虚拟机通过物理网卡与其它设备进行通信的方式为直通的方式或共享物理网卡的方式。这样如果虚拟机实际对网络资源的需求动态变化时,通信设备可以动态地配置与虚拟机相适应的通信方式,使得对于网络资源需求较小的虚拟机可以采用共享物理网卡的方式,而对网络资源需求较大的虚拟机可以采用直通方式,不会造成有些虚拟机的网络资源浪费,有些虚拟机的网络资源不足的情况,从而使得虚拟机的网络资源分配合理化。

Description

一种虛拟机的资源配置方法和通信设备
本申请要求于 2013 年 9 月 2 日提交中国专利局、 申请号为 201310392994.1 , 发明名称为 "一种虚拟机的资源配置方法和通信设备" 的中 国专利申请优先权, 其全部内容通过引用结合在本申请中。
技术领域
本发明涉及通信技术领域, 特别涉及虚拟机的资源配置方法和通信设备。 背景技术
虚拟化是现在数据中心的一个热点技术, 中央处理器(CPU )和内容的虚 拟化技术飞速发展, 但是输入输出 ( Input/Output, 10 )虚拟化却相对落后, 成为了虚拟化技术快速发展的性能瓶颈,许多硬件厂家都针对 10虚拟化技术提 出和使用了不同的解决方案。
现在一些新的虚拟化技术不断应用到通信设备的物理网卡中,例如独立权 限的输入输出虚拟化技术( Single-Root I/O Virtualization, SR-IOV )和虚拟设 备队列 (Virtual Machine Device Queue, VMDQ )等使用了直通的技术, 即将 物理网卡直接映射到虚拟机中, 由虚拟机加载物理网卡驱动,但是一个物理网 卡釆用这样的方式被虚拟机使用后, 就丧失了其共享能力, 成为虚拟机的独享 设备。如果虚拟机的数量小于物理网卡的数量, 则可以最大化的提高通信设备 的网络性能; 如果虚拟机的数量大于物理网卡数量时, 不能与物理网卡对应的 虚拟机就需要使用传统的开放虚拟交换标准( OVS )或者桥接的方式共享物理 网卡, 且这些虚拟机对应的物理网卡在虚拟机创建过程中就会配置好。
由于实际应用中虚拟机对于网络资源的需求是动态变化的,因此在釆用虚 拟机创建之初配置的方式时, 可能会造成有些虚拟机的网络资源不足,有些虚 拟机的网络资源过剩, 使得资源分配不合理。
发明内容
本发明实施例提供虚拟机的资源配置方法和通信设备,避免有些虚拟机的 网络资源不足, 有些虚拟机的网络资源过剩的问题。
本发明实施例第一方面提供一种虚拟机的资源配置方法, 包括: 获取通信设备的虚拟机对网络资源的需求指示信息;
将求指示信息满足预置直通条件的虚拟机配置为釆用直通技术的虚拟机; 将需求指示信息不满足所述预置直通条件的虚拟机配置为共享物理网卡 的虚拟机。
本发明第一方面的第一种可能的实现方式中:
所述获取通信设备的虚拟机对网络资源的需求指示信息, 具体包括: 获取 所述虚拟机的网络流量或负载, 则所述预置直通条件包括: 虚拟机的网络流量 或负载大于第一门限; 或,
所述获取所述通信设备的虚拟机对网络资源的需求指示信息, 具体包括: 获取多个虚拟机中各个虚拟机的网络流量或负载,将所述各个虚拟机的网络流 量或负载从大到小进行排序,则所述预置直通条件包括:在所述多个虚拟机中, 网络流量或负载排在前面 N个虚拟机釆用直通技术; 或,
所述获取所述通信设备的虚拟机对网络资源的需求指示信息, 具体包括: 获取所述虚拟机的网络流量或负载,计算所述虚拟机的网络流量或负载对应的 哈希值, 则所述预置直通条件包括: 虚拟机的网络流量或负载对应的哈希值大 于第二门限。
结合本发明实施例第一方面或第一方面的第一种可能实现方式,在本发明 实施例第一方面的第二种可能的实现方式中,若判断所述虚拟机的需求指示信 息满足所述预置直通条件,则所述将所述需求指示信息满足预置直通条件的虚 拟机配置为釆用直通技术的虚拟机, 具体包括:
判断所述虚拟机当前的通信方式是否为直通方式, 如果不是, 则为所述虚 拟机分配对应的物理网卡,并修改所述虚拟机的配置文件中的硬件网络资源为 所述分配的物理网卡的资源。
结合本发明实施例第一方面或第一方面的第一种可能实现方式,在本发明 实施例第一方面的第三种可能的实现方式中,若判断所述虚拟机的需求指示信 息不满足所述预置直通条件,则所述将所述需求指示信息不满足所述预置直通 条件的虚拟机配置为共享物理网卡的虚拟机, 具体包括:
判断所述虚拟机当前的通信方式是否为共享物理网卡的方式, 如果不是, 则修改所述虚拟机的配置文件中的硬件网络资源为共享的物理网卡的资源。
结合本发明实施例第一方面的第三种可能实现方式,在本发明实施例第一 方面的第四种可能实现方式中,所述修改所述虚拟机的配置文件中的硬件网络 资源为共享的物理网卡的资源之前, 还包括:
为所述虚拟机选择物理网卡的网络流量或负载小于或等于预置的值的物 理网卡进行共享, 所述预置策略中包括:
则所述修改所述虚拟机的配置文件中的硬件网络资源为共享的物理网卡 的资源, 具体包括: 修改所述虚拟机的配置文件中的硬件网络资源为选择的共 享物理网卡的资源。
结合本发明实施例第一方面,或第一方面的第一种到第四种可能实现方式 中任一种可能实现方式, 在本发明实施例第一方面的第五种可能的实现方式 中, 所述获取通信设备的虚拟机对网络资源的需求指示信息之前, 还包括: 设置所述虚拟机对应的需求指示信息的初始值;
将所述需求指示信息的初始值满足所述预置的直通条件的虚拟机配置为 釆用直通技术的虚拟机;
将所述需求指示信息的初始值不满足所述预置直通条件的虚拟机配置为 共享物理网卡的虚拟机。
本发明实施例第二方面提供一种通信设备,所述通信设备还包括指示信息 获取单元、 第一配置单元和第二配置单元, 其中:
所述指示信息获取单元, 用于获取所述虚拟机对网络资源的需求指示信 息;
所述第一配置单元,用于将所述指示信息获取单元获取的需求指示信息满 足预置直通条件的虚拟机配置为釆用直通技术的虚拟机;
所述第二配置单元,用于将所述指示信息获取单元获取的需求指示信息不 满足所述预置直通条件的虚拟机配置为共享物理网卡的虚拟机。
在本发明实施例第二方面的第一种可能的实现方式中:
所述指示信息获取单元, 具体用于获取所述虚拟机的网络流量或负载, 则 所述预置直通条件包括: 虚拟机的网络流量或负载大于第一门限; 或,
所述指示信息获取单元, 具体用于获取所述各个虚拟机的网络流量或负 载,将各个虚拟机的网络流量或负载从大到小进行排序, 则所述预置直通条件 包括: 在所述多个虚拟机中, 网络流量或负载排在前面 N个虚拟机釆用直通技 所述指示信息获取单元, 具体用于获取所述虚拟机的网络流量或负载,计 算所述各个虚拟机的网络流量或负载对应的哈希值, 则所述预置直通条件包 括: 虚拟机的网络流量或负载对应的哈希值大于第二门限。
结合本发明实施例第二方面或第二方面的第一种可能实现方式,在本发明 实施例第二方面的第二种可能的实现方式中, 所述第一配置单元具体包括: 直通条件判断单元,用于判断所述虚拟机的需求指示信息是否满足所述预 置直通条件;
直通通信方式判断单元,用于当所述直通条件判断单元判断所述虚拟机的 需求指示信息满足所述预置直通条件时,判断所述虚拟机当前的通信方式是否 为直通方式;
直通配置单元,用于当所述直通通信方式判断单元判断所述虚拟机当前的 通信方式不是直通方式时, 为所述虚拟机分配对应的物理网卡, 并修改所述虚 结合本发明实施例第二方面或第二方面的第一种可能实现方式,在本发明 实施例第二方面的第三种可能的实现方式中, 所述第二配置单元具体包括: 共享通信方式判断单元,用于当所述直通条件判断单元判断所述虚拟机的 需求指示信息不满足所述预置直通条件时,进一步地判断所述虚拟机当前的通 信方式是否为共享物理网卡的方式;
共享配置单元,用于当所述共享通信方式判断单元判断所述虚拟机当前的 通信方式不是共享物理网卡的方式时,则修改所述虚拟机的配置文件中的硬件 网络资源为共享的物理网卡的资源。
结合本发明实施例第二方面的第三种可能实现方式,在本发明实施例的第 四种可能的实现方式中:
所述共享配置单元,具体用于当所述共享通信方式判断单元判断所述虚拟 机当前的通信方式不是共享物理网卡的方式时,为所述虚拟机选择网络流量或 负载小于或等于预置的值的物理网卡进行共享, 所述预置策略中包括: 物理网 卡的网络流量或负载小于或等于预置的值;并修改所述虚拟机的配置文件中的 硬件网络资源为选择的共享物理网卡的资源。
结合本发明实施例第二方面,或第二方面的第一种到第三种可能实现方式 中任一种可能实现方式, 在本发明实施例第二方面的第五种可能的实现方式 中, 所述通信设备还包括:
初始值设置单元, 用于设置所述虚拟机对应的需求指示信息的初始值; 第一初始配置单元,用于将所述初始值设置单元设置的需求指示信息的初 始值满足所述预置的直通条件的虚拟机配置为釆用直通技术的虚拟机;
第二初始配置单元,用于将所述初始值设置单元设置的需求指示信息的初 始值不满足所述预置直通条件的虚拟机配置为共享物理网卡的虚拟机。
在本发明实施例中,在通信设备利用虚拟机通信的过程中, 该通信设备会 根据各个虚拟机实际对网络资源的需求指示信息,配置虚拟机通过物理网卡与 其它设备进行通信的方式为直通的方式或共享物理网卡的方式。这样如果虚拟 机实际对网络资源的需求动态变化时,通信设备可以动态地配置与虚拟机相适 应的通信方式,使得对于网络资源需求较小的虚拟机可以釆用共享物理网卡的 方式, 而对网络资源需求较大的虚拟机可以釆用直通方式, 不会造成有些虚拟 机的网络资源浪费,有些虚拟机的网络资源不足的情况,从而使得虚拟机的网 络资源分配合理化。
附图说明
为了更清楚地说明本发明实施例的技术方案,下面将对实施例描述中所需 要使用的附图作简单地介绍, 显而易见地, 下面描述中的附图仅仅是本发明的 一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下, 还可以根据这些附图获得其他的附图。
图 1是本发明实施例提供的一种通信设备的结构示意图;
图 2是本发明实施例提供的一种虚拟机的资源配置方法的流程图; 图 3是本发明实施例提供的另一种虚拟机的资源配置方法的流程图; 图 4是本发明实施例提供的另一种虚拟机的资源配置方法的流程图; 图 5是本发明实施例中虚拟机的通信方式切换的结构示意图;
图 6是本发明实施例提供的一种通信设备的结构示意图;
图 7是本发明实施例提供的另一种通信设备的结构示意图;
图 8是本发明实施例提供的另一种通信设备的结构示意图;
图 9是本发明实施例提供的另一种通信设备的结构示意图。 具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清 楚、 完整地描述, 显然, 所描述的实施例仅仅是本发明一部分实施例, 而不是 全部的实施例。基于本发明中的实施例, 本领域普通技术人员在没有作出创造 性劳动前提下所获得的所有其他实施例, 都属于本发明保护的范围。
本发明实施例提供一种虚拟机的资源配置方法, 主要可以用于如图 1所述 的通信设备中, 在该通信设备中包括硬件层、 虚拟机管理器(Virtual Machine Monitor, VMM )和虚拟机, 其中:
硬件层可以包括多个(比如 M个)物理网卡; VMM可以协调管理硬件层 中包括的硬件与虚拟机之间的关系, 具体地, 可以管理物理网卡与虚拟机之间 的关系,虚拟机通过物理网卡与其它设备通信的方式(是直通的虚拟功能方式 还是共享物理网卡的物理功能方式)等; 多个(比如 L个, 这里 L大于物理网 卡的数量 M )虚拟机中有些虚拟机比如虚拟机 0可以用来管理其它虚拟机, 另 一些虚拟机 (比如虚拟机 1到 5 )可以通过直通或共享物理网卡的方式与其它设 备进行通信。上述进行管理的虚拟 0中可以包括虚拟功能***( Virtual Function System, VFS )和物理网卡的共享模块, VFS能下发执行命令给其它虚拟机来 管理其它虚拟机,而共享模块中可以釆用传统的 OVS或桥接的方式共享物理网 卡, 图 1中所示的共享模块是通过 OVS的方式使得多个虚拟机(如图 1中所示的 虚拟机 1和 2 ) 能共享物理网卡的资源。
本实施例的通信设备中进行管理的虚拟机 0所包括的 VFS可以按照如下方 法对虚拟机的资源进行配置, 流程图如图 2所示, 包括:
步骤 101, 在通信设备利用虚拟机通信的的过程中, 获取通信设备的虚拟 机实际对网络资源的需求指示信息。
这里需求指示信息用于指示虚拟机对网络资源的实际需求, VFS具体可以 根据虚拟机所传输数据的业务类型来获取,例如虚拟机传输数据的业务类型为 视频数据,则可以具体通过一个较大的数值来表示该虚拟机的需求指示信息比 如 500兆(M ); VFS还可以默认确定虚拟机的需求指示信息, 或根据虚拟机实 际的网络流量或负载来确定, 比如虚拟机的实际负载比较大, 则该需求指示信 息可以通过一个较大的网络带宽值来指示该虚拟机对网络资源的实际需求。 具体地, VFS可以获取多个虚拟机中各个虚拟机的网络流量或负载, 为了 统计的方便, VFS还可以进一步地计算各个虚拟机的网络流量或负载对应的哈 希值, 且 VFS还可以将各个虚拟机的网络流量或负载从大到小进行排序。
步骤 102, 将需求指示信息满足预置直通条件的虚拟机配置为釆用直通技 术的虚拟机。
这里预置直通条件是指虚拟机釆用直通方式通过物理网卡与其它设备通 信的条件, 具体可以包括: 虚拟机实际的网络流量或负载大于第一门限; 或根 据虚拟机实际的网络流量(或负载)及一定的函数关系得到的值大于第二门限; 或在多个虚拟机中(比如 L个虚拟机 ), 实际的网络流量(或负载)从大到小排 序后, 排在前面的网络流量(或负载)对应的多个虚拟机, 比如网络流量(或 负载)排在前面 N个虚拟机, 配置为釆用直通技术的虚拟机, 这里 N小于物理 网卡数量M。
可以理解, 通信设备在创建了虚拟机之初, 即在上述步骤 101之前, VFS 会为虚拟机设置对网络资源的需求指示信息的初始值,该初始值可以根据用户 的初始需求指定,并将需求指示信息的初始值满足预置直通条件的虚拟机配置 为釆用直通技术的虚拟机, 具体地, VFS为虚拟机分配对应的物理网卡, 并将 物理网卡映射到对应的虚拟机中, 即 VFS将物理网卡的信息(包括驱动信息和 属性信息等)储存到对应的虚拟机中, 且 VFS还可以管理虚拟机与物理网卡的 对应关系等信息。例如图 1中所述的通信设备中的虚拟机 3、 4和 5都釆用直通技 术进行通信, 这些虚拟机可以加载对应物理网卡的驱动后, 直接与利用对应物 理网卡的端口信息与其它设备通信。
VFS还配置需求指示信息的初始值不满足所述预置直通条件的虚拟机共 享物理网卡。 具体地, VFS可以向共享物理网卡的虚拟机发送指令, 指示这些 虚拟机通过进行管理的虚拟机 0中的共享模块共享物理网卡的资源, 且 VFS还 可以为每个虚拟机配置在哪些时段使用物理网卡的哪些网络资源等。 例如图 1 中所述的通信设备中的虚拟机 1和 2釆用共享物理网卡的方式进行通信,这些虚 拟机可以通过该物理网卡的端口信息与其它设备通信。
在通信设备利用各个虚拟机按照一定的通信方式与其它设备通信的过程 中, 各个虚拟机实际对网络资源的需求是动态变化的, 则 VFS会不断按照本发 明实施例中步骤 101到 103动态地配置各个虚拟机与其它设备通信的方式。具体 地, 当 VFS执行步骤 101后, 在执行本步骤 102的配置时, 可以按照如下步骤来 实现, 流程图如图 3所示, 包括:
A1 : 判断步骤 101中获取的虚拟机的需求指示信息是否满足预置直通条 件, 如果满足, 执行步骤 Bl, 如果不满足, 则会执行步骤 103中的配置。
B1 : 判断虚拟机当前的通信方式是否为直通方式, 如果不是, 则执行步 骤 Cl, 如果是, 则不需要改变该虚拟机的通信方式。
C1 : 需要将该虚拟机的通信方式切换为直通方式, 具体地, VFS可以先发 送命令给该虚拟机, 指示该虚拟机挂起即停止通信, 可以调用 virsh (虚拟)接 口来发送命令给虚拟机; 然后为该虚拟机分配一个对应的物理网卡, 并爹改该 虚拟机的配置文件中的硬件网络资源为该分配的物理网卡的资源。且 VFS还需 要为该虚拟机创建一个虚拟功能的网卡即将分配的物理网卡映射到该虚拟机 中, 具体地将分配的物理网卡的信息储存到该虚拟机中, 这样该虚拟机就会自 动加载驱动。
需要说明的是, VFS可以在将该虚拟机挂起时, 将该虚拟机的通信状态和 相关信息储存,这样该虚拟机在切换了通信方式并启动通信后仍然可以保留连 接的状态。
步骤 103, 将需求指示信息不满足预置直通条件的虚拟机配置为共享物理 网卡的虚拟机。
当 VFS按照图 3中所示的方法执行步骤 102的过程中,如果判断虚拟机的需 求指示信息不满足直通条件时, VFS可以按照如下步骤来实现本步骤中的配 置, 流程图如图 4所示, 包括:
B2: 判断虚拟机当前的通信方式是否为共享物理网卡的方式, 如果不是, 则执行步骤 C2, 如果是, 则不需要改变该虚拟机的通信方式。
C2: 需要将该虚拟机的通信方式切换为共享物理网卡的方式, 具体地,
VFS可以先发送命令给该虚拟机, 指示该虚拟机挂起即停止通信, 然后修改该 虚拟机的配置文件中的硬件网络资源为通信设备中共享的物理网卡的资源。且 VFS还需要将该虚拟机中之前映射的物理网卡的信息删除。 其中, 如果通信设 备中当前已经存在的共享物理网卡有多个, 则 VFS在将该虚拟机的通信方式切 换为共享物理网卡的方式时, 需要先为该虚拟机选择一个共享物理网卡, 然后 将该虚拟机的通信方式切换为共享该选择的共享物理网卡的方式。 具体地, VFS可以为该虚拟机选择一个网络流量或负载小于或等于预置的值的物理网 卡进行共享。
例如, 参考图 5所示, 在通信设备利用虚拟机与其它设备进行通信的过程 中, 当虚拟机 2实际对网络资源的需求指示信息满足预置直通条件, 则需要将 虚拟机 2从共享物理网卡的通信方式修改为直通的通信方式(图 5中虚线箭头所 指连接方式 ); 当虚拟机 3实际对网络资源的需求指示信息不满足预置直通条 件, 则需要将虚拟机 3从直通的通信方式修改为共享物理网卡的通信方式(图 5 中虚线箭头所指连接方式;)。
需要说明的是,本实施例中是通过虚拟机中执行管理操作的虚拟机来执行 本实施例的方法,在其它具体的实施例中, 可以通过通信设备中独立于虚拟机 的一个功能模块来按照上述步骤 101到 103来配置虚拟机的资源。另外本发明实 施例中说明了当通信设备中的虚拟机的数量大于物理网卡的数量时的资源配 置方法, 而对于虚拟机的数量小于物理网卡的数量的情况, VFS可以直接为每 个虚拟机分配对应的物理网卡, 而不需要考虑共享物理网卡的情况。
可见, 在本发明实施例中, 在通信设备利用虚拟机通信的过程中, 该通信 设备会根据各个虚拟机实际对网络资源的需求指示信息,配置虚拟机通过物理 果虚拟机实际对网络资源的需求动态变化时,通信设备可以动态地配置与虚拟 机相适应的通信方式,使得对于网络资源需求较小的虚拟机可以釆用共享物理 网卡的方式, 而对网络资源需求较大的虚拟机可以釆用直通方式, 不会造成有 些虚拟机的网络资源浪费,有些虚拟机的网络资源不足的情况,从而使得虚拟 机的网络资源分配合理化。 本发明实施例提供一种通信设备,该通信设备中的各个单元之间可以按照 图 2所示的方法对该通信设备中的虚拟机进行资源配置, 结构示意图如图 6所 示,包括 M个物理网卡 20和 L个虚拟机 10,所述 L大于 M,指示信息获取单元 120、 第一配置单元 110和第二配置单元 130, 其中:
指示信息获取单元 120, 用于获取通信设备的虚拟机对网络资源的需求指 示信息。
第一配置单元 110,用于将所述指示信息获取单元 120获取的需求指示信息 满足预置直通条件的虚拟机配置为釆用直通技术的虚拟机。
上述指示信息获取单元 120具体可以用于获取虚拟机的网络流量或负载, 这种情况下,预置直通条件包括虚拟机的网络流量或负载大于第一门限; 或指 将所述各个虚拟机的网络流量或负载从大到小进行排序, 则在这种情况下,预 置直通条件包括在所述多个虚拟机中, 网络流量或负载排在前面 N个虚拟机釆 用直通技术, 其中, N小于物理网卡的数量 M; 或指示信息获取单元 120具体用 于获取所述各个虚拟机的网络流量或负载,计算所述虚拟机的网络流量或负载 对应的哈希值, 则在这种情况下,预置直通条件包括虚拟机的网络流量或负载 对应的哈希值大于第二门限。
第二配置单元 130,用于将所述指示信息获取单元 120获取的需求指示信息 不满足所述预置直通条件的虚拟机配置为共享物理网卡的虚拟机。
可见, 在本发明实施例的通信设备中, 在利用虚拟机 10通信的的过程中, 该第一配置单元 110和第二配置单元 130会根据指示信息获取单元 120获取的各 个虚拟机实际对网络资源的需求指示信息,配置虚拟机通过物理网卡与其它设 备进行通信的方式为直通的方式或共享物理网卡的方式。这样如果虚拟机实际 对网络资源的需求动态变化时,通信设备可以动态地配置与虚拟机相适应的通 信方式, 使得对于网络资源需求较小的虚拟机可以釆用共享物理网卡的方式, 而对网络资源需求较大的虚拟机可以釆用直通方式,不会造成有些虚拟机的网 络资源浪费,有些虚拟机的网络资源不足的情况,从而使得虚拟机的网络资源 分配合理化。
参考图 7所示,在一个具体的实施例中,通信设备除了包括如图 6所示的结 构外, 其中的第一配置单元 110具体可以通过直通条件判断单元 111、 直通通信 方式判断单元 112和直通配置单元 113来实现, 而第二配置单元 130可以通过共 享配置单元 131和共享通信判断单元 132来实现, 其中:
直通条件判断单元 111,用于判断所述指示信息获取单元 120获取的虚拟机 的需求指示信息是否满足所述预置直通条件; 直通通信方式判断单元 112,用于当所述直通条件判断单元 111判断所述虚 拟机的需求指示信息满足所述预置直通条件时,进一步判断所述虚拟机当前的 通信方式是否为直通方式; 当前的通信方式不是直通方式时, 为所述虚拟机分配对应的物理网卡, 并修改 地, 该直通配置单元 113可以先发送命令给该虚拟机, 指示该虚拟机挂起即停 止通信; 然后再为该虚拟机分配一个物理网卡并修改配置文件后, 该直通配置 单元剧 113还需要为该虚拟机创建一个虚拟功能的网卡即将分配的物理网卡映 射到该虚拟机中, 具体地将分配的物理网卡的信息储存到该虚拟机中, 这样该 虚拟机就会自动加载驱动。
需要说明的是, 直通配置单元 113可以在将该虚拟机挂起时, 将该虚拟机 的通信状态和相关信息储存,这样该虚拟机在切换了通信方式并启动通信后仍 然可以保留连接的状态。
共享通信方式判断单元 132,用于当所述直通条件判断单元 111判断所述虚 拟机的需求指示信息不满足所述预置直通条件时,进一步地判断所述虚拟机当 前的通信方式是否为共享物理网卡的方式。
共享配置单元 131,用于当所述共享通信方式判断单元 132判断所述虚拟机 当前的通信方式不是共享物理网卡的方式时,则修改所述虚拟机的配置文件中 的硬件网络资源为共享的物理网卡的资源。 具体地, 该共享配置单元 131可以 先发送命令给该虚拟机, 指示该虚拟机挂起, 然后修改配置文件, 且该共享配 置单元 131还可以将该虚拟机中之前映射的物理网卡的信息删除。
其中,如果通信设备中当前已经存在的共享物理网卡有多个, 则该共享配 置单元 131具体用于当所述共享通信方式判断单元判断所述虚拟机当前的通信 方式不是共享物理网卡的方式时,为所述虚拟机选择物理网卡的网络流量或负 载小于或等于预置的值的物理网卡进行共享,并修改所述虚拟机的配置文件中 的硬件网络资源为选择的共享物理网卡的资源。
本发明实施例中,在通信设备利用虚拟机与其它设备的通信过程中, 通过 第一配置单元 110中的直通配置单元 113可以完成将通信方式为共享物理网卡 方式的虚拟机切换为直通方式,且通过第二配置单元 130中的共享配置单元 131 可以完成将通信方式为直通方式的虚拟机切换为共享物理网卡方式。
参开图 8所示,在一个具体的实施例中,通信设备除了可以包括如图 6所示 的结构外,还可以包括初始值设置单元 150、第一初始配置单元 140和第二初始 配置单元 160, 其中:
初始值设置单元 150,用于设置所述虚拟机对应的需求指示信息的初始值; 第一初始配置单元 140,用于将所述初始值设置单元 150设置的需求指示信 息的初始值满足所述预置的直通条件的虚拟机配置为釆用直通技术的虚拟机, 物理网卡映射到对应的虚拟机中, 即将物理网卡的信息(包括驱动信息和属性 信息等)储存到对应的虚拟机中,且还可以管理各个虚拟机与物理网卡的对应 关系等信息。
第二初始配置单元 160,用于配置所述初始值设置单元 150设置的需求指示 信息的初始值不满足所述预置直通条件的虚拟机共享物理网卡。具体地, 第二 初始配置单元 160可以向共享物理网卡的虚拟机发送指令, 指示这些虚拟机能 共享物理网卡的资源, 且第二初始配置单元 160还可以为虚拟机配置在哪些时 段使用物理网卡的哪些网络资源等。
在本实施例的通信设备中, 在创建虚拟机之初可以通过初始值设置单元 150、 第一初始配置单元 140和第二初始配置单元 160, 为创建的多个虚拟机配 置与其它设备进行通信的方式。 本发明实施例还提供一种通信设备,该通信设备中的各个单元之间可以按 照图 2所示的方法对该通信设备中的虚拟机进行资源配置, 结构示意图如图 9 所示, 包括分别连接到总线上的存储器 20、 处理器 21、 输入装置 23和输出装置 24, 其中:
存储器 20中用来储存从输入装置 23输入的数据, 且还可以储存处理器 21 处理数据的必要文件等信息。
输入装置 23和输出装置 24是通信设备与其它设备通信的端口,还可以包括 通信设备外接的设备比如显示器、键盘、 鼠标和打印机等, 本实施例中输入装 置 23和输出装置 24包括了 M个物理网卡。 本实施例中的处理器 21可以用于创建多个(比如 L个)虚拟机, 这里 L大 于M, 且在虚拟机通过物理网卡与其它设备的通信过程中, 获取所述虚拟机中 对网络资源的需求指示信息;将所述需求指示信息满足预置直通条件的虚拟机 配置为釆用直通技术的虚拟机;将所述需求指示信息不满足所述预置直通条件 的虚拟机配置为共享物理网卡的虚拟机。
具体地, 处理器 21在获取虚拟机对应的需求指示信息时, 具体可以获取各 个虚拟机的网络流量或负载, 这种情况下,预置直通条件包括虚拟机的网络流 量或负载大于第一门限;或处理器 21具体可以获取所述各个虚拟机的网络流量 或负载, 并将所述各个虚拟机的网络流量或负载从大到小进行排序, 则在这种 情况下, 预置直通条件包括在所述多个虚拟机中, 网络流量或负载排在前面 N 个虚拟机釆用直通技术, 其中 N小于 M; 或处理器 21具体获取所述虚拟机的网 络流量或负载,计算虚拟机的网络流量或负载对应的哈希值,则在这种情况下, 预置直通条件包括虚拟机的网络流量或负载对应的哈希值大于第二门限。
在一个具体的实施例中, 处理器 21在创建虚拟机之初, 可以为创建的虚拟 机配置与其它设备进行通信的方式, 具体地, 可以先设置所述虚拟机对应的需 求指示信息的初始值;然后将所述需求指示信息的初始值满足所述预置的直通 条件的虚拟机配置为釆用直通技术的虚拟机, 具体地, 处理器 21可以为这些虚 拟机分配对应的物理网卡, 并将物理网卡映射到对应的虚拟机中, 即将物理网 卡的信息(包括驱动信息和属性信息等)储存到对应的虚拟机中, 且还可以管 理各个虚拟机与物理网卡的对应关系等信息;并配置所述需求指示信息的初始 值不满足所述预置直通条件的虚拟机共享物理网卡, 具体地, 处理器 21可以向 共享物理网卡的虚拟机发送指令,指示这些虚拟机能共享物理网卡的资源, 且 处理器 21还可以为每个虚拟机配置在哪些时段使用物理网卡的哪些网络资源 等。
进一步地, 处理器 21,还用于在虚拟机通过物理网卡与其它设备通信的过 程中, 不断地获取虚拟机对网络资源的需求指示信息, 并判断所述虚拟机的需 求指示信息是否满足所述预置直通条件,如果满足, 则处理器 21进一步地判断 所述虚拟机当前的通信方式是否为直通方式,如果是,则不需要切换通信方式, 如果不是, 则需要切换该虚拟机的通信方式, 具体地, 处理器 21可以先发送命 令给该虚拟机,指示该虚拟机挂起即停止通信; 然后再为所述虚拟机分配对应 的物理网卡,并修改所述虚拟机的配置文件中的硬件网络资源为所述分配的物 理网卡的资源,且处理器 21还需要为该虚拟机创建一个虚拟功能的网卡即将分 配的物理网卡映射到该虚拟机中,具体地将分配的物理网卡的信息储存到该虚 拟机中, 这样该虚拟机就会自动加载驱动。
需要说明的是, 处理器 21可以在将该虚拟机挂起时,将该虚拟机的通信状 态和相关信息储存,这样该虚拟机在切换了通信方式并启动通信后仍然可以保 留连接的状态。
另一方面,如果处理器 21判断所述虚拟机的需求指示信息不满足所述预置 直通条件,还需要进一步地判断所述虚拟机当前的通信方式是否为共享物理网 卡的方式, 如果是, 在不需要切换通信方式, 如果不是, 则处理器 21需要切换 通信方式, 具体地可以先发送命令给该虚拟机, 指示该虚拟机挂起; 然后修改 所述虚拟机的配置文件中的硬件网络资源为共享的物理网卡的资源。这种情况 下, 处理器 21还可以将该虚拟机中之前映射的物理网卡的信息删除。 其中, 如 果通信设备中当前已经存在的共享物理网卡有多个,则处理器 21具体当所述共 享通信方式判断单元判断所述虚拟机当前的通信方式不是共享物理网卡的方 式时, 为所述虚拟机选择满足预置策略的物理网卡进行共享, 所述预置策略中 包括但不限于如下的信息: 物理网卡的网络流量或负载小于或等于预置的值, 和物理网卡对应的虚拟机的数量小于或等于预置的值等;并修改所述虚拟机的 配置文件中的硬件网络资源为选择的共享物理网卡的资源。
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步 骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读 存储介质中,存储介质可以包括:只读存储器( ROM )、随机存取存储器( RAM )、 磁盘或光盘等。
以上对本发明实施例所提供的虚拟机的资源配置方法和通信设备进行了 上实施例的说明只是用于帮助理解本发明的方法及其核心思想; 同时,对于本 领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会 有改变之处, 综上所述, 本说明书内容不应理解为对本发明的限制。

Claims

权 利 要 求
1、 一种虚拟机的资源配置方法, 其特征在于, 包括:
获取通信设备的虚拟机对网络资源的需求指示信息;
将需求指示信息满足预置直通条件的虚拟机配置为釆用直通技术的虚拟 机;
将需求指示信息不满足所述预置直通条件的虚拟机配置为共享物理网卡 的虚拟机。
2、 如权利要求 1所述的方法, 其特征在于,
所述获取通信设备的虚拟机对网络资源的需求指示信息, 具体包括: 获取 所述虚拟机的网络流量或负载, 则所述预置直通条件包括: 虚拟机的网络流量 或负载大于第一门限; 或,
所述获取通信设备的虚拟机对网络资源的需求指示信息, 具体包括: 获取 多个虚拟机中各个虚拟机的网络流量或负载,将所述各个虚拟机的网络流量或 负载从大到小进行排序, 则所述预置直通条件包括: 在所述多个虚拟机中, 网 络流量或负载排在前面 N个虚拟机釆用直通技术,其中 N小于物理网卡的数量; 或,
所述获取通信设备的虚拟机对网络资源的需求指示信息, 具体包括: 获取 所述虚拟机的网络流量或负载,计算所述虚拟机的网络流量或负载对应的哈希 值, 则所述预置直通条件包括: 虚拟机的网络流量或负载对应的哈希值大于第 二门限。
3、 如权利要求 1或 2所述的方法, 其特征在于, 若所述虚拟机的需求指示 信息满足所述预置直通条件,则所述将所述需求指示信息满足预置直通条件的 虚拟机配置为釆用直通技术的虚拟机, 具体包括:
判断所述虚拟机当前的通信方式是否为直通方式, 如果不是, 则为所述虚 拟机分配对应的物理网卡,并修改所述虚拟机的配置文件中的硬件网络资源为 所述分配的物理网卡的资源。
4、 如权利要求 1至 3中任一项所述的方法, 其特征在于, 若所述虚拟机的 需求指示信息不满足所述预置直通条件,则所述将所述需求指示信息不满足所 述预置直通条件的虚拟机配置为共享物理网卡的虚拟机, 具体包括: 判断所述虚拟机当前的通信方式是否为共享物理网卡的方式, 如果不是, 则修改所述虚拟机的配置文件中的硬件网络资源为共享的物理网卡的资源。
5、 如权利要求 4所述的方法, 其特征在于, 所述修改所述虚拟机的配置文 件中的硬件网络资源为共享的物理网卡的资源之前, 还包括:
为所述虚拟机选择网络流量或负载小于或等于预置的值的物理网卡进行 共享;
则所述修改所述虚拟机的配置文件中的硬件网络资源为共享的物理网卡 的资源, 具体包括: 修改所述虚拟机的配置文件中的硬件网络资源为选择的共 享物理网卡的资源。
6、 如权利要求 1至 5任一项所述的方法, 其特征在于, 所述获取通信设备 的虚拟机对网络资源的需求指示信息之前, 还包括:
设置所述虚拟机对应的需求指示信息的初始值;
将所述需求指示信息的初始值满足所述预置的直通条件的虚拟机配置为 釆用直通技术的虚拟机;
将所述需求指示信息的初始值不满足所述预置直通条件的虚拟机配置为 共享物理网卡的虚拟机。
7、 一种通信设备, 其特征在于, 包括多个物理网卡和多个虚拟机, 所述 通信设备还包括指示信息获取单元、 第一配置单元和第二配置单元, 其中: 所述指示信息获取单元, 用于获取所述虚拟机对网络资源的需求指示信 息;
所述第一配置单元,用于将所述指示信息获取单元获取的需求指示信息满 足预置直通条件的虚拟机配置为釆用直通技术的虚拟机;
所述第二配置单元,用于将所述指示信息获取单元获取的需求指示信息不 满足所述预置直通条件的虚拟机配置为共享物理网卡的虚拟机。
8、 如权利要求 7所述的通信设备, 其特征在于,
所述指示信息获取单元, 具体用于获取所述虚拟机的网络流量或负载, 则 所述预置直通条件包括: 虚拟机的网络流量或负载大于第一门限; 或,
所述指示信息获取单元, 具体用于获取所述各个虚拟机的网络流量或负 载,将各个虚拟机的网络流量或负载从大到小进行排序, 则所述预置直通条件 包括: 在所述多个虚拟机中, 网络流量或负载排在前面 N个虚拟机釆用直通技 术, 其中 N小于物理网卡的数量; 或,
所述指示信息获取单元, 具体用于获取所述虚拟机的网络流量或负载,计 算所述虚拟机的网络流量或负载对应的哈希值, 则所述预置直通条件包括: 虚 拟机的网络流量或负载对应的哈希值大于第二门限。
9、 如权利要求 7或 8所述的通信设备, 其特征在于, 所述第一配置单元具 体包括:
直通条件判断单元,用于判断所述虚拟机的需求指示信息是否满足所述预 置直通条件;
直通通信方式判断单元,用于当所述直通条件判断单元判断所述虚拟机的 需求指示信息满足所述预置直通条件时,判断所述虚拟机当前的通信方式是否 为直通方式;
直通配置单元,用于当所述直通通信方式判断单元判断所述虚拟机当前的 通信方式不是直通方式时, 为所述虚拟机分配对应的物理网卡, 并修改所述虚
10、 如权利要求 7至 9中任一项所述的通信设备, 其特征在于, 所述第二配 置单元具体包括:
共享通信方式判断单元,用于当所述直通条件判断单元判断所述虚拟机的 需求指示信息不满足所述预置直通条件时,进一步地判断所述虚拟机当前的通 信方式是否为共享物理网卡的方式;
共享配置单元,用于当所述共享通信方式判断单元判断所述虚拟机当前的 通信方式不是共享物理网卡的方式时,则修改所述虚拟机的配置文件中的硬件 网络资源为共享的物理网卡的资源。
11、 如权利要求 10所述的通信设备, 其特征在于, 所述共享配置单元, 具 体用于当所述共享通信方式判断单元判断所述虚拟机当前的通信方式不是共 享物理网卡的方式时,为所述虚拟机选择网络流量或负载小于或等于预置的值 的物理网卡进行共享, 所述预置策略中包括: 物理网卡的网络流量或负载小于 或等于预置的值;并修改所述虚拟机的配置文件中的硬件网络资源为选择的共 享物理网卡的资源。
12、 如权利要求 7至 11任一项所述的通信设备, 其特征在于, 所述通信设 备还包括:
初始值设置单元, 用于设置所述虚拟机对应的需求指示信息的初始值; 第一初始配置单元,用于将所述初始值设置单元设置的需求指示信息的初 始值满足所述预置的直通条件的虚拟机配置为釆用直通技术的虚拟机;
第二初始配置单元,用于将所述初始值设置单元设置的需求指示信息的初 始值不满足所述预置直通条件的虚拟机配置为共享物理网卡的虚拟机。
PCT/CN2014/082319 2013-09-02 2014-07-16 一种虚拟机的资源配置方法和通信设备 WO2015027771A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US15/058,829 US9983899B2 (en) 2013-09-02 2016-03-02 Network resource configuration for a virtual machine

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310392994.1A CN103473136B (zh) 2013-09-02 2013-09-02 一种虚拟机的资源配置方法和通信设备
CN201310392994.1 2013-09-02

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US15/058,829 Continuation US9983899B2 (en) 2013-09-02 2016-03-02 Network resource configuration for a virtual machine

Publications (1)

Publication Number Publication Date
WO2015027771A1 true WO2015027771A1 (zh) 2015-03-05

Family

ID=49798004

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/082319 WO2015027771A1 (zh) 2013-09-02 2014-07-16 一种虚拟机的资源配置方法和通信设备

Country Status (3)

Country Link
US (1) US9983899B2 (zh)
CN (1) CN103473136B (zh)
WO (1) WO2015027771A1 (zh)

Families Citing this family (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103473136B (zh) 2013-09-02 2017-06-13 华为技术有限公司 一种虚拟机的资源配置方法和通信设备
US10261813B2 (en) * 2013-09-25 2019-04-16 Arm Limited Data processing system for dispatching tasks from a plurality of applications to a shared resource provided by an accelerator
EP3066567A1 (en) * 2013-11-07 2016-09-14 Telefonaktiebolaget LM Ericsson (publ) Setting up a virtual machine for an ip device
US9535735B2 (en) * 2014-06-09 2017-01-03 International Business Machines Corporation Adaptive virtual machine request approver
CN105656795A (zh) * 2014-11-14 2016-06-08 腾讯科技(深圳)有限公司 虚拟机的流量控制方法及物理机
CN104598316B (zh) * 2014-12-25 2018-06-05 华为技术有限公司 一种存储资源分配方法及装置
CN105991440B (zh) * 2015-02-12 2019-03-15 新华三技术有限公司 防止虚拟机vm迁移引起的流量中断的方法和设备
EP3253027B1 (en) * 2015-03-03 2020-04-29 Huawei Technologies Co., Ltd. Resource allocation method and apparatus for virtual machines
JP2017108231A (ja) * 2015-12-08 2017-06-15 富士通株式会社 通信制御プログラム、通信制御方法及び情報処理装置
CN108228309B (zh) * 2016-12-21 2021-11-23 腾讯科技(深圳)有限公司 基于虚拟机的数据包发送和接收方法及装置
CN106803794B (zh) * 2017-01-22 2020-02-07 郑州云海信息技术有限公司 一种用于主机的kvm虚拟机网卡直通方法及其装置
US11409569B2 (en) * 2018-03-29 2022-08-09 Xilinx, Inc. Data processing system
US10944633B2 (en) 2018-06-15 2021-03-09 Vmware, Inc. Methods and apparatus to configure virtual and physical networks for hosts in a physical rack
CN109165083A (zh) * 2018-09-14 2019-01-08 郑州云海信息技术有限公司 一种虚拟机配置方法和装置
CN110198243B (zh) * 2019-06-11 2021-11-19 深信服科技股份有限公司 一种虚拟机的网络接入方法及相关设备
CN113132200B (zh) * 2019-12-30 2024-01-19 中兴通讯股份有限公司 数据转发方法、转发器、***、服务器和存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012151392A1 (en) * 2011-05-04 2012-11-08 Citrix Systems, Inc. Systems and methods for sr-iov pass-thru via an intermediary device
CN102790777A (zh) * 2012-08-07 2012-11-21 华为技术有限公司 网络接口适配器注册方法及驱动设备、服务器
CN102932174A (zh) * 2012-10-25 2013-02-13 华为技术有限公司 一种物理网卡管理方法、装置及物理主机
CN103473136A (zh) * 2013-09-02 2013-12-25 华为技术有限公司 一种虚拟机的资源配置方法和通信设备

Family Cites Families (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7792140B2 (en) * 2006-06-30 2010-09-07 Oracle America Inc. Reflecting the bandwidth assigned to a virtual network interface card through its link speed
US20110035494A1 (en) 2008-04-15 2011-02-10 Blade Network Technologies Network virtualization for a virtualized server data center environment
US9817695B2 (en) * 2009-04-01 2017-11-14 Vmware, Inc. Method and system for migrating processes between virtual machines
US8261266B2 (en) 2009-04-30 2012-09-04 Microsoft Corporation Deploying a virtual machine having a virtual hardware configuration matching an improved hardware profile with respect to execution of an application
US8208396B2 (en) 2009-05-12 2012-06-26 International Business Machines Corporation Discovery and capability exchange management in a virtualized computing platform utilizing a SR-IOV adapter
US8140668B2 (en) 2009-06-24 2012-03-20 Red Hat Israel, Ltd. Pre-scheduling the timelines of virtual machines
US8477610B2 (en) 2010-05-31 2013-07-02 Microsoft Corporation Applying policies to schedule network bandwidth among virtual machines
US9489224B2 (en) * 2010-12-28 2016-11-08 Nec Corporation Network virtualization system, physical node, and virtual interface identification method in virtual machine
JP5585844B2 (ja) * 2011-03-25 2014-09-10 株式会社日立製作所 仮想計算機の制御方法及び計算機
US8533713B2 (en) * 2011-03-29 2013-09-10 Intel Corporation Efficent migration of virtual functions to enable high availability and resource rebalance
JP5871233B2 (ja) * 2012-03-22 2016-03-01 株式会社日立製作所 計算機及び帯域制御方法
US9008085B2 (en) * 2012-08-15 2015-04-14 International Business Machines Corporation Network interface card having overlay gateway functionality
CN103049331B (zh) * 2012-12-06 2015-09-23 华中科技大学 一种虚拟功能的动态调度方法
US10341263B2 (en) * 2012-12-10 2019-07-02 University Of Central Florida Research Foundation, Inc. System and method for routing network frames between virtual machines
CN103139039B (zh) * 2013-02-25 2016-07-13 汉柏科技有限公司 一种实现流量隔离控制的虚拟网络及构建方法
CN103621026B (zh) * 2013-04-01 2017-06-13 华为技术有限公司 虚拟机的数据交换方法、装置和***
US9781041B2 (en) * 2013-07-24 2017-10-03 Dell Products Lp Systems and methods for native network interface controller (NIC) teaming load balancing
US9262198B2 (en) * 2013-08-26 2016-02-16 Vmware, Inc. CPU scheduler configured to support latency sensitive virtual machines

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012151392A1 (en) * 2011-05-04 2012-11-08 Citrix Systems, Inc. Systems and methods for sr-iov pass-thru via an intermediary device
CN102790777A (zh) * 2012-08-07 2012-11-21 华为技术有限公司 网络接口适配器注册方法及驱动设备、服务器
CN102932174A (zh) * 2012-10-25 2013-02-13 华为技术有限公司 一种物理网卡管理方法、装置及物理主机
CN103473136A (zh) * 2013-09-02 2013-12-25 华为技术有限公司 一种虚拟机的资源配置方法和通信设备

Also Published As

Publication number Publication date
CN103473136A (zh) 2013-12-25
US20160179567A1 (en) 2016-06-23
US9983899B2 (en) 2018-05-29
CN103473136B (zh) 2017-06-13

Similar Documents

Publication Publication Date Title
WO2015027771A1 (zh) 一种虚拟机的资源配置方法和通信设备
JP5510556B2 (ja) 仮想マシンのストレージスペースおよび物理ホストを管理するための方法およびシステム
US10810045B2 (en) Method and apparatus for allocating central processing unit (CPU) resources in a default resource pool
US11379265B2 (en) Resource management method, host, and endpoint based on performance specification
WO2016091127A1 (zh) 一种存储管理方法,存储管理装置及存储设备
WO2021121115A1 (zh) 一种虚拟机的numa节点调度方法、装置、设备及介质
US20180004452A1 (en) Technologies for providing dynamically managed quality of service in a distributed storage system
US10481932B2 (en) Auto-scaling virtual switches
US20120072627A1 (en) Dynamic creation and destruction of io resources based on actual load and resource availability
CN109522090B (zh) 资源调度方法及装置
WO2013029487A1 (zh) 一种资源分配方法及资源管理平台
JP2015528231A (ja) 仮想マシンのフローの物理的なキューへのオフロード
CN108132827B (zh) 一种网络切片资源映射方法、相关设备及***
WO2014089976A1 (zh) 虚拟机分配方法及装置
EP3506575B1 (en) Method and device for data transmission
WO2013139037A1 (zh) 用于调度资源的方法及装置
EP3358795B1 (en) Method and apparatus for allocating a virtual resource in network functions virtualization (nfv) network
US11360824B2 (en) Customized partitioning of compute instances
WO2015070364A1 (zh) 策略与计费规则功能虚拟化方法、装置及***
WO2017070963A1 (zh) 一种虚拟资源的部署方法、装置及***
JP2015103094A (ja) 仮想リソース管理装置、選択方法及び選択プログラム
US11693703B2 (en) Monitoring resource utilization via intercepting bare metal communications between resources
WO2016192011A1 (zh) 一种拥塞控制的方法及网元设备
CN110209499B (zh) 一种云平台资源动态配置方法、装置及云平台

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14839267

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14839267

Country of ref document: EP

Kind code of ref document: A1