CN117130723A - Determination method and device of allocation information, computer equipment and storage medium - Google Patents

Determination method and device of allocation information, computer equipment and storage medium Download PDF

Info

Publication number
CN117130723A
CN117130723A CN202310996709.0A CN202310996709A CN117130723A CN 117130723 A CN117130723 A CN 117130723A CN 202310996709 A CN202310996709 A CN 202310996709A CN 117130723 A CN117130723 A CN 117130723A
Authority
CN
China
Prior art keywords
virtual
container
physical network
available
functions
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.)
Pending
Application number
CN202310996709.0A
Other languages
Chinese (zh)
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.)
China Telecom Technology Innovation Center
China Telecom Corp Ltd
Original Assignee
China Telecom Technology Innovation Center
China Telecom Corp 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 China Telecom Technology Innovation Center, China Telecom Corp Ltd filed Critical China Telecom Technology Innovation Center
Priority to CN202310996709.0A priority Critical patent/CN117130723A/en
Publication of CN117130723A publication Critical patent/CN117130723A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0895Configuration of virtualised networks or elements, e.g. virtualised network function or OpenFlow elements
    • 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/40Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks using virtualisation of network functions or resources, e.g. SDN or NFV entities
    • 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/45562Creating, deleting, cloning virtual machine instances

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)

Abstract

The application relates to a method, a device, a computer device and a storage medium for determining allocation information. The method comprises the following steps: grouping each virtual function of the virtual machine according to the corresponding relation between the virtual function and the physical network card, and determining each virtual function group; determining available physical network cards according to the load states of the physical network cards; and distributing virtual functions to the containers according to the available physical network cards and the virtual function groups. The application distributes virtual functions for the container according to the grouping of the physical network cards based on the available physical network cards and the virtual functions, so that the container can also define the physical network cards corresponding to the virtual functions on the basis of defining the availability of the virtual functions on the container, and when a plurality of virtual functions are distributed for the container, the affinity of each network port in the container, the grouping of the virtual functions, the port binding and other network functions can be determined according to the relation between the virtual functions and the physical network cards.

Description

Determination method and device of allocation information, computer equipment and storage medium
Technical Field
The present application relates to the field of virtual machine container cloud computing technologies, and in particular, to a method and apparatus for determining allocation information, a computer device, and a storage medium.
Background
The container technology has slowly replaced the virtualization technology to become the basis of cloud computing by the advantages of light weight, quick start, less occupied resources, high safety and the like. However, in view of the issues of data compatibility, security, and isolation between servers-virtual machines-containers, in network cloud scenarios, the industry is currently inclined to use a "virtual machine container" scheme in which servers carry virtual machines, virtual machines carry containers.
Single root input/output virtualization (Single Root Input/Output Virtualization, SR-IOV) network card acceleration techniques are capable of significantly improving network performance of various virtual bridge schemes and are therefore commonly used in "virtual machine container" schemes. Currently, in the "virtual machine container" scenario using an OPENSTACK virtual machine to carry a containerized application (Kubernetes, k8 s), the existing configuration scheme is to allocate virtual functions (Virtualization Function, VF) of a server SR-IOV network card to a virtual machine first, and then allocate the VF on the virtual machine to a container group POD through a Kubernetes network plug-in installed in the virtual machine.
However, the above approach easily results in the unavailability of part of the network functions of Kubernetes.
Disclosure of Invention
Based on this, it is necessary to provide a method, an apparatus, a computer device, and a storage medium for determining allocation information capable of making more network functions of Kubernetes available in view of the above-described technical problems.
In a first aspect, the present application provides a method for determining allocation information. The method comprises the following steps:
grouping each virtual function of the virtual machine according to the corresponding relation between the virtual function and the physical network card, and determining each virtual function group;
determining available physical network cards according to the load states of the physical network cards;
and distributing virtual functions to the containers according to the available physical network cards and the virtual function groups.
In one embodiment, assigning virtual functions to containers based on available physical network cards and respective virtual function groupings comprises:
determining available virtual function groups from the virtual function groups according to the available physical network cards;
and distributing virtual functions to the containers according to the demand information of the containers and the available virtual function groups.
In one embodiment, assigning virtual functions to containers based on demand information of the containers and available virtual function groupings comprises:
judging whether the virtual functions in the available virtual function groups of the virtual machine meet the network requirements of the container according to the requirement information of the container;
if the virtual functions in the available virtual function groups of the virtual machine meet the network requirements of the container, the virtual functions in the available virtual function groups are allocated to the container.
In one embodiment, the method further comprises: and if the virtual functions in the available virtual function groups of the virtual machine do not meet the network requirements of the container, outputting a distribution failure result.
In one embodiment, assigning virtual functions in the available virtual function groups to containers includes:
determining the network affinity of the container according to the demand information of the container;
virtual functions in the available virtual function groupings are assigned to containers based on their network affinities.
In one embodiment, assigning virtual functions in the available virtual function groups to containers according to their network affinities comprises:
if the network affinity is affinity, virtual functions belonging to the same physical network card in the available virtual function groups are distributed to the container;
if the network affinity is anti-affinity, distributing the virtual functions which do not belong to the same physical network card in the available virtual function groups to the container;
if the network affinity is no affinity, virtual functions in the available virtual function groups are randomly assigned to the container.
In one embodiment, the method further comprises: port binding is carried out on the virtual functions allocated to the container, and a scheduling mode is configured for each virtual function; the scheduling mode comprises a master-slave mode and a load balancing mode.
In one embodiment, determining the available physical network card according to the load status of each physical network card includes:
judging whether the load value of the load state of each physical network card is smaller than a preset load threshold value or not;
and determining the physical network card smaller than the preset load threshold as an available physical network card.
In a second aspect, the present application further provides a device for determining allocation information. The device comprises:
the grouping module is used for grouping the virtual functions of the virtual machine according to the corresponding relation between the virtual functions and the physical network card and determining the grouping of the virtual functions according to the physical network card;
the determining module is used for determining available physical network cards according to the load states of the physical network cards;
and the distribution module is used for distributing virtual functions for the container according to the available physical network cards and the virtual function groups.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor which when executing the computer program performs the steps of:
grouping each virtual function of the virtual machine according to the corresponding relation between the virtual function and the physical network card, and determining each virtual function group;
Determining available physical network cards according to the load states of the physical network cards;
and distributing virtual functions to the containers according to the available physical network cards and the virtual function groups.
In a fourth aspect, the present application also provides a computer-readable storage medium. The computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
grouping each virtual function of the virtual machine according to the corresponding relation between the virtual function and the physical network card, and determining each virtual function group;
determining available physical network cards according to the load states of the physical network cards;
and distributing virtual functions to the containers according to the available physical network cards and the virtual function groups.
In a fifth aspect, the present application also provides a computer program product. The computer program product comprises a computer program which, when executed by a processor, implements the steps of:
grouping each virtual function of the virtual machine according to the corresponding relation between the virtual function and the physical network card, and determining each virtual function group;
determining available physical network cards according to the load states of the physical network cards;
And distributing virtual functions to the containers according to the available physical network cards and the virtual function groups.
The method, the device, the computer equipment and the storage medium for determining the allocation information are used for grouping all virtual functions of the virtual machine according to the corresponding relation between the virtual functions and the physical network card and determining all virtual function groups according to the physical network card; determining available physical network cards according to the load states of the physical network cards; and distributing virtual functions to the containers according to the available physical network cards and the virtual function groups. The application distributes virtual functions for the container according to the grouping of the physical network cards based on the available physical network cards and the virtual functions, so that the container can also define the physical network cards corresponding to the virtual functions on the basis of defining the availability of the virtual functions, which can define which virtual functions belong to the same physical network card when distributing a plurality of virtual functions for the container, which virtual functions do not belong to the same physical network card, and further, under the 'virtual machine container' scene using an OPENSTACK virtual machine to bear containerized application (Kubernetes, k8 s), more network functions of the Kubernetes are available, for example, the network functions such as the affinity of each network port, the grouping of the virtual functions, the port binding and the like in the container can be determined according to the relation between the virtual functions and the physical network cards.
Drawings
FIG. 1 is an application environment diagram of a method of determining assignment information in one embodiment;
FIG. 2 is an application environment diagram of a method of determining assignment information in one embodiment;
FIG. 3 is a flow diagram of a method for determining assignment information in one embodiment;
FIG. 4 is a flowchart illustrating a method for determining assignment information in one embodiment;
FIG. 5 is a flow chart illustrating a method for determining allocation information according to another embodiment;
FIG. 6 is a flow chart illustrating a method for determining allocation information according to another embodiment;
FIG. 7 is a flow chart illustrating a method for determining allocation information according to another embodiment;
FIG. 8 is a flow chart of a method for determining allocation information according to another embodiment;
FIG. 9 is a flow chart of a method for determining allocation information according to another embodiment;
FIG. 10 is a flow chart of a method for determining allocation information according to another embodiment;
FIG. 11 is a flow chart illustrating a method for determining assignment information in another embodiment;
FIG. 12 is a block diagram showing the construction of a device for determining allocation information in one embodiment;
FIG. 13 is a block diagram showing the construction of a device for determining allocation information in one embodiment;
FIG. 14 is a block diagram showing the construction of a device for determining allocation information in one embodiment;
Fig. 15 is a block diagram showing the configuration of a device for determining allocation information in one embodiment.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
The container technology has been gradually replaced with virtualization to become the basis of cloud computing due to the characteristics of light weight, quick start, less occupied resources, high safety and the like. In the context of cloud convergence, however, virtualized network elements (Virtual Network Function, VNF) are also evolving rapidly towards containerized network elements (Container Network Function, CNF). However, in view of compatibility, security, isolation, and other requirements, in a network cloud scenario, the industry is still prone to use a server to carry virtual machines, and a "virtual machine container" scheme of a virtual machine carrying container is still preferred over a bare metal carrying container.
Meanwhile, the acceleration technology of the single root input/output virtualization (Single Root Input/Output Virtualization, SR-IOV) network card can significantly improve the network performance of various virtual bridge schemes, so that the acceleration technology is commonly used in the 'virtual machine container' scheme. Currently, in the "virtual machine container" scenario using an OPENSTACK virtual machine to carry containerized applications (Kubernetes, k8 s), as shown in fig. 1, the configuration scheme in the related art is to allocate virtual functions (Virtualization Function, VF) of a network card in SR-IOV mode of a server (physical host) to a virtual machine, and then allocate VF on the virtual machine to a container group POD through Kubernetes network plug-in installed on the virtual machine. In the above configuration scheme, the virtual machine layer separates the SR-IOV network card body and the VF in the container, although the SR-IOV container network interface (Container Network Interface, CNI) and host-device CNI exist in the network plug-in module native to Kubernetes, however, the SR-IOV CNI cannot operate normally under the condition that the SR-IOV network card body is not reachable, and the host-device CNI has the most basic function of "allocating VF to POD", but does not have any configuration function except for allocating network protocol (Internet Protocol, IP), which obviously cannot meet the requirement of the application such as the containerized network element for allocating a plurality of VF, VF packet, port affinity, port binding function at a time, and thus, some network functions of Kubernetes are not available. The present application aims to solve this problem.
After the background technology of the method for determining allocation information provided by the embodiment of the present application is described, an implementation environment related to the method for determining allocation information provided by the embodiment of the present application will be briefly described below. The method for determining the allocation information provided by the embodiment of the application can be applied to the computer equipment shown in fig. 2. The computer device comprises a processor, a memory, and a computer program stored in the memory, wherein the processor is connected through a system bus, and when executing the computer program, the processor can execute the steps of the method embodiments described below. Optionally, the computer device may further comprise an input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium having stored therein an operating system, computer programs, and a database, an internal memory. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input/output interface of the computer device is used for communicating with an external terminal through a network connection. Optionally, the computer device may be a server, a personal computer, a personal digital assistant, other terminal devices, such as a tablet computer, a mobile phone, etc., or a cloud or remote server, and the embodiment of the present application does not limit a specific form of the computer device.
It will be appreciated by those skilled in the art that the architecture shown in fig. 2 is merely a block diagram of some of the architecture associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements are applied, and that a particular terminal may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
After the application scenario of the method for determining allocation information provided by the embodiment of the present application is described above, the method for determining allocation information described in the present application is mainly described below.
In one embodiment, as shown in fig. 3, a method for determining allocation information is provided, and the method is applied to the computer device in fig. 2 for illustration, and includes the following steps:
s201, grouping the virtual functions of the virtual machine according to the corresponding relation between the virtual functions and the physical network card, and determining the grouping of the virtual functions.
The Virtual Function (VF) is a channel Function of the peripheral component interconnect express (Peripheral Component Interconnect Express, PCIe) device at a Virtual layer, that is, includes an Input/Output (I/O) Function, and physical resources may be shared between the VFs.
The physical network card is a hardware device, and the hardware device needs to work on an operating system and needs to have a corresponding driver; for example, the physical network card may be an SR-IOV network card or the like. It should be noted that, one SR-IOV network card may include a plurality of VFs, that is, the correspondence between the virtual function and the physical network card may be the correspondence between one SR-IOV network card and a plurality of VFs.
Wherein each virtual function of the virtual machine is a plurality of virtual functions on the current virtual machine.
In the embodiment of the application, before determining which physical network card each virtual function of the virtual machine belongs to, an SR-IOV network card running state monitoring plug-in can be installed on the computer equipment, the corresponding relation between the virtual function and the physical network card is continuously and periodically obtained from a physical server (physical host), and each virtual function on the current virtual machine is obtained at the same time, and then each virtual function on the virtual machine is grouped according to the physical network card according to the corresponding relation between the virtual function and the physical network card, so that each virtual function on the virtual machine is grouped according to the physical network card. For example, as shown in fig. 4, if NIC1 is any one of the SR-IOV modes in the network interface card (Network Interface Card, NIC); VF1-1, VF1-2, VF2-1, VF2-2, are respectively different virtual functions, and assuming that the corresponding relation between the virtual functions and the physical network card is NIC1: { VF1-1, VF1-2 … }, NIC2: { VF2-1, VF2-2 … }, and that each virtual function on the current virtual machine is VF1-1, VF1-2, VF2-3, then each virtual function on the virtual machine is grouped according to the physical network card as follows:
VF_GROUP1:{
NIC_NAME:NIC1,
VF_LIST:{VF1-1,VF1-2}
},
VF_GROUP2:{
NIC_NAME:NIC2,
VF_LIST:{VF2-2,VF2-3}
}. Wherein VF_GROUP1 is virtual function GROUP one, physical network card NAME (NIC_NAME) is NIC1, virtual function in NIC1 includes VF1-1 and VF1-2; VF_GROUP2 is the virtual function packet two, the physical network card NAME (NIC_NAME) is NIC2, and the virtual functions in NIC2 include VF2-2 and VF2-3.
S202, determining available physical network cards according to the load states of the physical network cards.
The load state of the physical network card is the ratio between the used bandwidth of the network card and the upper limit of the physical bandwidth of the network card, wherein the used bandwidth of the network card can be an average value in a historical time period, for example, the average value of the bandwidths in the past 10 minutes is determined as the used bandwidth of the network card; it should be noted that, the load state of the physical network card in this embodiment may be the current network load state of the SR-IOV physical network card.
In the embodiment of the application, before the available physical network cards are determined from the plurality of physical network cards, the SR-IOV network card running state monitoring plug-in unit can be installed on the computer equipment, the load states of the physical network cards are continuously and periodically obtained from the physical server, and the load states of the physical network cards meeting the preset requirements are screened out from the load states of the physical network cards, so that the physical network cards meeting the preset requirements are determined according to the load states of the physical network cards meeting the preset requirements, and the available physical network cards are obtained. Optionally, a load value greater than a first preset load threshold value may be selected from load values corresponding to the load states of the physical network cards, the corresponding load state may be determined according to the load value greater than the first preset load threshold value, and the available physical network card may be determined according to the corresponding load state; or the load value smaller than the second preset load threshold value can be screened out from the load values corresponding to the load states of the physical network cards, the corresponding load states are determined according to the load values smaller than the second preset load threshold value, and the available physical network cards are determined according to the corresponding load states.
S203, distributing virtual functions for the container according to the available physical network card and each virtual function group.
In the embodiment of the application, after the available physical network card and each virtual function group are obtained, determining available virtual functions from each virtual function group according to the available physical network card, and distributing virtual functions for the container according to the available virtual functions; one or more physical functions are allocated at a time when the container is created, and the number of allocated physical functions is determined according to the number of virtual functions actually available on the container node. For example, determining a plurality of available virtual functions from each virtual function group according to available physical network cards, and equally distributing the available virtual functions to preset containers; or determining a plurality of available virtual functions from each virtual function group according to the available physical network card, and distributing the available virtual functions to each container according to the relation between the preset virtual functions and the containers.
According to the method for determining the allocation information, provided by the embodiment of the application, according to the corresponding relation between the virtual functions and the physical network card, each virtual function of the virtual machine is grouped according to the physical network card, and each virtual function group is determined; determining available physical network cards according to the load states of the physical network cards; and distributing virtual functions to the containers according to the available physical network cards and the virtual function groups. The application distributes virtual functions for the container based on the available physical network cards and the virtual functions according to the grouping of the physical network cards, so that the container can also define the physical network cards corresponding to the virtual functions on the basis of defining the availability of the virtual functions on the container, which can define which virtual functions belong to the same physical network card when a plurality of virtual functions are distributed for the container, which virtual functions do not belong to the same physical network card, and further, under the 'virtual machine container' scene of using an OPENSTACK virtual machine to bear containerized application (Kubernetes, k8 s), more network functions of the Kubernetes are available, for example, the network functions such as the affinity of each network port in the container, the grouping of the virtual functions, the port binding and the like can be determined according to the relation between the virtual functions and the physical network cards, so that the container can be scheduled and optimized for use, and the requirements of the actual service scene such as containerized network elements are further met.
In one embodiment, a process of assigning virtual functions to containers according to the available physical network cards and the virtual functions groups may be described based on the embodiment shown in fig. 3, and as shown in fig. 5, the step of S203 "assigning virtual functions to containers according to the available physical network cards and the virtual functions groups" includes:
s301, determining available virtual function groups from the virtual function groups according to the available physical network cards.
In the embodiment of the application, after the available physical network card and the grouping of the virtual functions according to the physical network card are determined, the grouping of the available virtual functions is determined from the grouping of the virtual functions according to the physical network card according to the available physical network card. For example, as shown in fig. 4, assuming that the available physical network card is NIC2, each virtual function is as follows in terms of the grouping of physical network cards:
VF_GROUP1:{
NIC_NAME:NIC1,
VF_LIST:{VF1-1,VF1-2}
},
VF_GROUP2:{
NIC_NAME:NIC2,
VF_LIST:{VF2-2,VF2-3}
};
the available virtual function groups are determined from the virtual functions according to the groups of the physical network cards according to the available physical network cards as follows:
VF_GROUP2:{
NIC_NAME:NIC2,
VF_LIST:{VF2-2,VF2-3}
}。
s302, distributing virtual functions for the container according to the demand information of the container and the available virtual function groups.
The requirement information of the container is requirement declaration information of the container, for example, the requirement information of the container is that the number of virtual functions is 6, and each virtual function belongs to the same physical network card.
In the embodiment of the application, after the available virtual function groups are determined, virtual functions meeting the demand information are distributed to the containers according to the demand information of the containers and the available virtual function groups. For example, if the requirement information of the first container is that the first container includes 3 virtual functions and each virtual function belongs to the same physical network card, the available virtual function group includes three virtual functions and is allocated to the second container; for another example, if the requirement information of the second container includes 3 virtual functions, two of the two virtual functions belong to the same physical network card, and the other one belongs to different physical network cards, the available virtual function groups include three virtual functions, and the two virtual functions belong to the same physical network card, and the other one belongs to the virtual function groups of different physical network cards are allocated to the second container.
The method for determining the allocation information provided by the application determines the available virtual function groups from the virtual function groups according to the available physical network cards, and determines the virtual functions required by the container from the available virtual function groups according to the demand information of the container, so that when a plurality of virtual functions are allocated to the container, the physical network cards respectively belonging to the virtual functions can be determined, and further, the network functions such as the affinity of each network port in the container, the virtual function groups, the port binding and the like can be determined according to the relation between the virtual functions and the physical network cards.
In one embodiment, a process of assigning virtual functions to containers according to the requirement information and the available virtual functions of the containers may be described based on the embodiment shown in fig. 5, and as shown in fig. 6, S302 "assign virtual functions to containers according to the requirement information and the available virtual functions of the containers", which includes:
s401, judging whether the virtual functions in the available virtual function groups of the virtual machine meet the network requirements of the container according to the requirement information of the container.
In the embodiment of the application, after the available virtual function groups are determined, whether the virtual functions in the available virtual function groups of the virtual machine meet the network requirements of the container is judged according to the requirement information of the container and the available virtual function groups. For example, if the requirement information of the first container is that the first container includes 3 virtual functions, each virtual function belongs to the same physical network card, and the virtual functions in the available virtual function group of the virtual machine include 4 virtual functions belonging to the same physical network card, the virtual functions in the available virtual function group of the virtual machine do not meet the network requirement of the container; for another example, if the requirement information of the second container includes 3 virtual functions, two of the two virtual functions belong to the same physical network card, the other one belongs to different physical network cards, and the available virtual function group includes three virtual functions, two of the two virtual functions belong to the same physical network card, and the other one of the two virtual functions belongs to different physical network cards, then the virtual functions in the available virtual function group of the virtual machine satisfy the network requirement of the container.
S402, if the virtual functions in the available virtual function groups of the virtual machine meet the network requirements of the container, the virtual functions in the available virtual function groups are distributed to the container.
In the embodiment of the application, if the virtual functions in the available virtual function groups of the virtual machine meet the network requirements of the container, the virtual functions in the available virtual function groups are distributed to the container.
Optionally, a method of assigning virtual functions in a group of available virtual functions to a container is provided below:
illustratively, as shown in fig. 7, the step S402 of "assigning virtual functions in the available virtual function group to containers" includes:
s501, determining the network affinity of the container according to the demand information of the container.
Wherein network affinity includes affinity, anti-affinity, and no affinity.
In the embodiment of the application, after the requirement information of the container is obtained, the network affinity of each virtual function required by the container is determined according to the requirement information of the container. For example, if the requirement information of the container is five virtual functions belonging to the same physical network card, the network affinity of the container is affinity; for another example, if the demand information of the container is two virtual functions and the two virtual functions belong to different physical network cards, the network affinity of the container is anti-affinity; for another example, the requirement information of the container is any two virtual functions, and the two virtual functions may be virtual functions belonging to different physical network cards or virtual functions belonging to the same physical network card, so that the network affinity of the container is no affinity.
S502, distributing virtual functions in the available virtual function groups to the containers according to the network affinities of the containers.
In the embodiment of the application, after the network affinity of the container is determined, the virtual functions in the available virtual function groups meeting the network affinity requirement of the container can be allocated to the container according to the network affinity of the container. For example, if the network affinity of the container is affinity, then assigning virtual functions belonging to the same physical network card to the container from the virtual functions in the available virtual function group; for another example, if the network affinity of the container is no affinity, the virtual functions belonging to any physical network card in the available virtual function group are allocated to the container.
Optionally, the following provides a method for assigning virtual functions in a group of available virtual functions to a container according to the network affinity of the container:
illustratively, the step S502 "assigns virtual functions in the available virtual function group to containers according to network affinities of the containers", including:
if the network affinity is affinity, virtual functions belonging to the same physical network card in the available virtual function group are allocated to the container.
In the embodiment of the application, if the network affinity of the container is affinity, the virtual functions belonging to the same physical network card in the virtual function group are allocated to the container. For example, the virtual functions belonging to the same physical network card in the virtual function packet may be virtual functions VF2-2 and VF2-3 belonging to the NIC2 network card, and if the network affinity of the container is affinity, the virtual functions VF2-2 and VF2-3 of the NIC2 network card may be allocated to the container.
And if the network affinity is anti-affinity, distributing the virtual functions which do not belong to the same physical network card in the available virtual function groups to the container.
In the embodiment of the application, if the network affinity of the container is anti-affinity, the virtual functions in the available virtual function group are distributed to the container, wherein the virtual functions do not belong to the same physical network card. For example, the virtual functions belonging to the same physical network card in the virtual function packet may be virtual functions VF1-2 belonging to the NIC1 network card and virtual functions VF2-2 belonging to the NIC2 network card, and if the network affinity of the container is anti-affinity, the virtual functions VF1-2 of the NIC1 network card and the virtual functions VF2-2 of the NIC2 network card may be allocated to the container.
If the network affinity is no affinity, virtual functions in the available virtual function groups are randomly assigned to the container.
In the embodiment of the application, if the network affinity of the container is no affinity, the virtual functions belonging to any physical network card in the virtual function group are distributed to the container. For example, the virtual functions belonging to the same physical network card in the virtual function packet may be virtual functions VF1-2 and VF1-1 belonging to the NIC1 network card and virtual functions VF2-2 and VF2-1 belonging to the NIC2 network card, and if the network affinity of the container is not affinity and the demand information of the container includes 2 virtual functions, then the virtual functions of any two physical network cards in the virtual function packet (for example, virtual functions VF1-2 and VF1 of the NIC1 network card, virtual functions VF2-2 and VF2-1 of the NIC2 network card, virtual functions VF1-2 of the NIC1 network card, and virtual functions VF2-2 of the NIC2 network card, or virtual functions VF1-1 of the NIC1 network card and virtual functions VF2-1 of the NIC2 network card) may be allocated to the container.
In one embodiment, based on the embodiment shown in fig. 6, as shown in fig. 8, the method further includes:
s403, if the virtual functions in the available virtual function groups of the virtual machine do not meet the network requirements of the container, outputting a distribution failure result.
In the embodiment of the application, if the virtual functions in the available virtual function groups of the virtual machine do not meet the network requirements of the container, a distribution failure result is output. For example, if the virtual functions in the available virtual function group of the virtual machine do not meet the network requirements of the container, a "fail to meet the requirements" result is returned.
The method for determining the allocation information provided by the application judges whether the virtual functions in the available virtual function groups of the virtual machine meet the network requirements of the container according to the requirement information of the container, and allocates the virtual functions in the available virtual function groups for the container if the virtual functions meet the network requirements of the container, so that when a plurality of virtual functions are allocated for the container, the physical network cards to which the virtual functions belong respectively can be determined, and further, the network functions such as the affinity of each network port in the container, the virtual function groups, the port binding and the like can be determined according to the relation between the virtual functions and the physical network cards. In addition, if the virtual functions in the available virtual function groups of the virtual machine do not meet the network requirements of the container, the user may also adjust the configuration parameters of the server (physical host) or the requirement information of the container according to the allocation failure result, so as to provide an adjustment direction for the virtual functions in the available virtual function groups of the next virtual machine to meet the network requirements of the container.
In one embodiment, based on the embodiment shown in fig. 3-8, as shown in fig. 9, the method further includes:
s204, port binding is carried out on the virtual functions allocated to the container, and a scheduling mode is configured for each virtual function.
The scheduling mode comprises a main and standby mode and a load balancing mode.
In the embodiment of the application, after the virtual functions are allocated to the container, port binding can be performed on each virtual function of the container according to the physical network card corresponding to each virtual function of the container, and after each virtual function of the container is bound, a scheduling mode is configured for each virtual function. For example, if the virtual function 1 and the virtual function 2 of the container correspond to the physical network card 1 and the virtual function 3 corresponds to the physical network card 2, the virtual function 1 and the virtual function 2 may be port-bound, and the virtual function 1 may be set as a primary virtual function, and the virtual function 2 may be set as a primary/standby mode of a standby virtual function; or the virtual function 1 and the virtual function 2 of the container correspond to the physical network card 1, the virtual function 3 corresponds to the physical network card 2, the virtual function 1 and the virtual function 2 can be subjected to port binding, and the virtual function 1 and the virtual function 2 are set to be in a load balancing mode for simultaneously providing services to the outside; alternatively, port binding is not performed for each virtual function assigned to the container.
The method for determining the allocation information provided by the application carries out port binding according to the virtual function of the container, thereby realizing the network function of port binding of each network port in the container.
In one embodiment, a process of determining the available physical network card according to the load status of each physical network card may be described based on the embodiments shown in fig. 2 to 8, as shown in fig. 10, S202 "determine the available physical network card according to the load status of each physical network card", including:
s501, judging whether the load value of the load state of each physical network card is smaller than a preset load threshold value.
For example, the preset load threshold may be 85%, 90%, 95%, etc.
In the embodiment of the application, before the available physical network cards are determined from the plurality of physical network cards, an SR-IOV network card running state monitoring plug-in can be installed on the computer equipment, the load values of the load states of the physical network cards are continuously and periodically obtained from the physical server, and whether the load values of the obtained load states of the physical network cards are smaller than a preset load threshold value is respectively judged.
S502, determining the physical network card smaller than a preset load threshold as an available physical network card.
In the embodiment of the application, if the load value of the obtained load state of the physical network card is not smaller than the preset load threshold, the physical network card which is not smaller than the preset load threshold is deleted from the original physical network card list.
As shown in fig. 4, if the load states of the physical network cards (NIC 1 and NIC 2) are respectively:
{
NIC_NAME:NIC1,
load state: 95% of
},
{
NIC_NAME:NIC2,
Load state: 70 percent of
At this time, each physical network card (i.e., NIC 1) that is not smaller than the preset load threshold (90%) is deleted from the physical network card list.
Further, if the load value of the obtained load state of each physical network card is smaller than the preset load threshold, determining the physical network card smaller than the preset load threshold as an available physical network card.
In the embodiment of the application, if the load value of the obtained load state of the physical network card is smaller than the preset load threshold, the physical network card smaller than the preset load threshold is determined as the available physical network card. As shown in fig. 4, each physical network card (i.e., NIC 2) that is smaller than the preset load threshold (90%) is determined as an available physical network card.
According to the method for determining the allocation information, the physical network cards which are not smaller than the preset load threshold are deleted from the original physical network card group, and then the available physical network cards are screened out, so that the virtual functions allocated to the containers according to the available physical network cards and the virtual function groups are more accurately available.
In one embodiment, as shown in fig. 11, a complete method for determining allocation information is provided, including:
S10, grouping all virtual functions of the virtual machine according to the corresponding relation between the virtual functions and the physical network card, and determining all virtual function groups;
s11, judging whether the load value of the load state of each physical network card is smaller than a preset load threshold value;
s12, determining a physical network card smaller than a preset load threshold as an available physical network card;
s13, determining available virtual function groups from the virtual function groups according to the available physical network cards;
s14, judging whether the virtual functions in the available virtual function groups of the virtual machine meet the network requirements of the container according to the requirement information of the container;
s15, if the virtual functions in the available virtual function groups of the virtual machine meet the network requirements of the container, determining the network affinity of the container according to the requirement information of the container;
s16, if the network affinity is affinity, distributing the virtual functions belonging to the same physical network card in the available virtual function groups to the container;
s17, if the network affinity is anti-affinity, distributing the virtual functions which do not belong to the same physical network card in the available virtual function groups to the container;
s18, if the network affinity is no affinity, randomly distributing virtual functions in the available virtual function groups to the containers;
And S19, if the virtual functions in the available virtual function groups of the virtual machine do not meet the network requirements of the container, outputting a distribution failure result.
According to the method for determining the allocation information, provided by the embodiment of the application, according to the corresponding relation between the virtual functions and the physical network card, each virtual function of the virtual machine is grouped according to the physical network card, and each virtual function group is determined; determining available physical network cards according to the load states of the physical network cards; and distributing virtual functions to the containers according to the available physical network cards and the virtual function groups. The application distributes virtual functions for the container according to the grouping of the physical network cards based on the available physical network cards and the virtual functions, so that the container can also define the physical network cards corresponding to the virtual functions on the basis of defining the availability of the virtual functions on the container, which can define which virtual functions belong to the same physical network card when a plurality of virtual functions are distributed for the container, which virtual functions do not belong to the same physical network card, and further, under the 'virtual machine container' scene of using an OPENSTACK virtual machine to bear containerized application (Kubernetes, k8 s), more network functions of the Kubernetes are available, for example, the network functions such as the affinity of each network port in the container, the grouping of the virtual functions, the port binding and the like can be determined according to the relation between the virtual functions and the physical network cards.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a device for determining the allocation information for realizing the above-mentioned method for determining the allocation information. The implementation of the solution provided by the apparatus is similar to the implementation described in the above method, so the specific limitation in the embodiments of the determining apparatus for one or more allocation information provided below may refer to the limitation of the determining method for allocation information hereinabove, and will not be described herein.
In one embodiment, as shown in fig. 12, there is provided a determining apparatus of allocation information, including: a grouping module 10, a determining module 11 and an assigning module 12, wherein:
the grouping module 10 is configured to group each virtual function of the virtual machine according to the corresponding relationship between the virtual function and the physical network card, and determine each virtual function group.
And the determining module 11 is configured to determine an available physical network card according to the load status of each physical network card.
And the allocation module 12 is used for allocating virtual functions to the containers according to the available physical network cards and the virtual function groups.
In one embodiment, as shown in fig. 13, the distribution module 12 includes: a determination unit 120 and an allocation unit 121, wherein:
a determining unit 120, specifically configured to determine, according to the available physical network card, an available virtual function packet from the virtual function packets;
the allocation unit 121 is specifically configured to allocate virtual functions to the containers according to the demand information of the containers and the available virtual function groups.
In one embodiment, the allocation unit 121 is specifically configured to determine, according to the requirement information of the container, whether the virtual functions in the available virtual function group of the virtual machine meet the network requirement of the container; if the virtual functions in the available virtual function groups of the virtual machine meet the network requirements of the container, the virtual functions in the available virtual function groups are allocated to the container.
In one embodiment, the allocation unit 121 is specifically further configured to output an allocation failure result if the virtual functions in the available virtual function group of the virtual machine do not meet the network requirement of the container.
In one embodiment, the allocation unit 121 is specifically configured to determine the network affinity of the container according to the requirement information of the container; virtual functions in the available virtual function groupings are assigned to containers based on their network affinities.
In one embodiment, the allocation unit 121 is specifically configured to allocate, if the network affinity is affinity, virtual functions belonging to the same physical network card in the available virtual function group to the container;
if the network affinity is anti-affinity, distributing the virtual functions which do not belong to the same physical network card in the available virtual function groups to the container;
if the network affinity is no affinity, virtual functions in the available virtual function groups are randomly assigned to the container.
In one embodiment, as shown in fig. 14, the apparatus further includes:
a binding module 13, configured to bind ports to virtual functions allocated to the container, and configure a scheduling mode for each virtual function; the scheduling mode comprises a master-slave mode and a load balancing mode.
In one embodiment, as shown in fig. 15, the determining module 11 includes: a judging unit 110 and a determining unit 111, wherein:
the judging unit 110 is specifically configured to judge whether a load value of a load state of each physical network card is smaller than a preset load threshold;
the determining unit 111 is specifically configured to determine a physical network card smaller than a preset load threshold as an available physical network card.
The respective modules in the above-described determination means of allocation information may be implemented in whole or in part by software, hardware, and a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in FIG. 2. The computer device includes a processor, a memory, an Input/Output interface (I/O) and a communication interface. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface is connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is used for storing the load data of the physical network card. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a method of determining allocation information.
It will be appreciated by persons skilled in the art that the architecture shown in fig. 2 is merely a block diagram of some of the architecture relevant to the present inventive arrangements and is not limiting as to the computer device to which the present inventive arrangements are applicable, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In one embodiment, a computer device is provided comprising a memory and a processor, the memory having stored therein a computer program, the processor when executing the computer program performing the steps of:
grouping each virtual function of the virtual machine according to the corresponding relation between the virtual function and the physical network card, and determining each virtual function group;
determining available physical network cards according to the load states of the physical network cards;
and distributing virtual functions to the containers according to the available physical network cards and the virtual function groups.
In one embodiment, the processor when executing the computer program further performs the steps of:
determining available virtual function groups from the virtual function groups according to the available physical network cards;
and distributing virtual functions to the containers according to the demand information of the containers and the available virtual function groups.
In one embodiment, the processor when executing the computer program further performs the steps of:
judging whether the virtual functions in the available virtual function groups of the virtual machine meet the network requirements of the container according to the requirement information of the container;
if the virtual functions in the available virtual function groups of the virtual machine meet the network requirements of the container, the virtual functions in the available virtual function groups are allocated to the container.
In one embodiment, the processor when executing the computer program further performs the steps of:
and if the virtual functions in the available virtual function groups of the virtual machine do not meet the network requirements of the container, outputting a distribution failure result.
In one embodiment, the processor when executing the computer program further performs the steps of:
determining the network affinity of the container according to the demand information of the container;
virtual functions in the available virtual function groupings are assigned to containers based on their network affinities.
In one embodiment, the processor when executing the computer program further performs the steps of:
if the network affinity is affinity, virtual functions belonging to the same physical network card in the available virtual function groups are distributed to the container;
if the network affinity is anti-affinity, distributing the virtual functions which do not belong to the same physical network card in the available virtual function groups to the container;
If the network affinity is no affinity, virtual functions in the available virtual function groups are randomly assigned to the container.
In one embodiment, the processor when executing the computer program further performs the steps of:
port binding is carried out on the virtual functions allocated to the container, and a scheduling mode is configured for each virtual function; the scheduling mode comprises a master-slave mode and a load balancing mode.
In one embodiment, the processor when executing the computer program further performs the steps of:
judging whether the load value of the load state of each physical network card is smaller than a preset load threshold value or not;
determining a physical network card smaller than a preset load threshold as an available physical network card
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, performs the steps of:
grouping each virtual function of the virtual machine according to the corresponding relation between the virtual function and the physical network card, and determining each virtual function group;
determining available physical network cards according to the load states of the physical network cards;
and distributing virtual functions to the containers according to the available physical network cards and the virtual function groups.
In one embodiment, the computer program when executed by the processor further performs the steps of:
determining available virtual function groups from the virtual function groups according to the available physical network cards;
and distributing virtual functions to the containers according to the demand information of the containers and the available virtual function groups.
In one embodiment, the computer program when executed by the processor further performs the steps of:
judging whether the virtual functions in the available virtual function groups of the virtual machine meet the network requirements of the container according to the requirement information of the container;
if the virtual functions in the available virtual function groups of the virtual machine meet the network requirements of the container, the virtual functions in the available virtual function groups are allocated to the container.
In one embodiment, the computer program when executed by the processor further performs the steps of:
and if the virtual functions in the available virtual function groups of the virtual machine do not meet the network requirements of the container, outputting a distribution failure result.
In one embodiment, the computer program when executed by the processor further performs the steps of:
determining the network affinity of the container according to the demand information of the container;
virtual functions in the available virtual function groupings are assigned to containers based on their network affinities.
In one embodiment, the computer program when executed by the processor further performs the steps of:
if the network affinity is affinity, virtual functions belonging to the same physical network card in the available virtual function groups are distributed to the container;
if the network affinity is anti-affinity, distributing the virtual functions which do not belong to the same physical network card in the available virtual function groups to the container;
if the network affinity is no affinity, virtual functions in the available virtual function groups are randomly assigned to the container.
In one embodiment, the computer program when executed by the processor further performs the steps of:
port binding is carried out on the virtual functions allocated to the container, and a scheduling mode is configured for each virtual function; the scheduling mode comprises a master-slave mode and a load balancing mode.
In one embodiment, the computer program when executed by the processor further performs the steps of:
judging whether the load value of the load state of each physical network card is smaller than a preset load threshold value or not;
and determining the physical network card smaller than the preset load threshold as an available physical network card.
In one embodiment, a computer program product is provided comprising a computer program which, when executed by a processor, performs the steps of:
Grouping each virtual function of the virtual machine according to the corresponding relation between the virtual function and the physical network card, and determining each virtual function group;
determining available physical network cards according to the load states of the physical network cards;
and distributing virtual functions to the containers according to the available physical network cards and the virtual function groups.
In one embodiment, the computer program when executed by the processor further performs the steps of:
determining available virtual function groups from the virtual function groups according to the available physical network cards;
and distributing virtual functions to the containers according to the demand information of the containers and the available virtual function groups.
In one embodiment, the computer program when executed by the processor further performs the steps of:
judging whether the virtual functions in the available virtual function groups of the virtual machine meet the network requirements of the container according to the requirement information of the container;
if the virtual functions in the available virtual function groups of the virtual machine meet the network requirements of the container, the virtual functions in the available virtual function groups are allocated to the container.
In one embodiment, the computer program when executed by the processor further performs the steps of:
and if the virtual functions in the available virtual function groups of the virtual machine do not meet the network requirements of the container, outputting a distribution failure result.
In one embodiment, the computer program when executed by the processor further performs the steps of:
determining the network affinity of the container according to the demand information of the container;
virtual functions in the available virtual function groupings are assigned to containers based on their network affinities.
In one embodiment, the computer program when executed by the processor further performs the steps of:
if the network affinity is affinity, virtual functions belonging to the same physical network card in the available virtual function groups are distributed to the container;
if the network affinity is anti-affinity, distributing the virtual functions which do not belong to the same physical network card in the available virtual function groups to the container;
if the network affinity is no affinity, virtual functions in the available virtual function groups are randomly assigned to the container.
In one embodiment, the computer program when executed by the processor further performs the steps of:
port binding is carried out on the virtual functions allocated to the container, and a scheduling mode is configured for each virtual function; the scheduling mode comprises a master-slave mode and a load balancing mode.
In one embodiment, the computer program when executed by the processor further performs the steps of:
judging whether the load value of the load state of each physical network card is smaller than a preset load threshold value or not;
And determining the physical network card smaller than the preset load threshold as an available physical network card.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the embodiments provided herein may include at least one of a relational database and a non-relational database. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processor referred to in the embodiments provided in the present application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, or the like, but is not limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples illustrate only a few embodiments of the application and are described in detail herein without thereby limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of the application should be assessed as that of the appended claims.

Claims (11)

1. A method of determining allocation information, the method comprising:
grouping each virtual function of the virtual machine according to the corresponding relation between the virtual function and the physical network card, and determining each virtual function group;
determining available physical network cards according to the load states of the physical network cards;
and distributing virtual functions for the container according to the available physical network card and the virtual function groups.
2. The method of claim 1, wherein assigning virtual functions to containers based on the available physical network cards and the respective virtual function groupings comprises:
determining available virtual function groups from the virtual function groups according to the available physical network cards;
and distributing virtual functions to the containers according to the demand information of the containers and the available virtual function groups.
3. The method of claim 2, wherein the assigning virtual functions to the containers based on the demand information of the containers and the grouping of available virtual functions comprises:
judging whether the virtual functions in the available virtual function groups of the virtual machine meet the network requirements of the container according to the requirement information of the container;
and if the virtual functions in the available virtual function groups of the virtual machine meet the network requirements of the container, distributing the virtual functions in the available virtual function groups to the container.
4. A method according to claim 3, characterized in that the method further comprises:
and if the virtual functions in the available virtual function groups of the virtual machine do not meet the network requirements of the container, outputting a distribution failure result.
5. A method according to claim 3, wherein said assigning virtual functions in said available virtual function group to said container comprises:
determining the network affinity of the container according to the demand information of the container;
virtual functions in the available virtual function group are assigned to the container according to the network affinity of the container.
6. The method of claim 5, wherein assigning virtual functions in the available virtual function group to the container according to network affinity of the container comprises:
if the network affinity is affinity, distributing the virtual functions belonging to the same physical network card in the available virtual function group to the container;
if the network affinity is anti-affinity, distributing the virtual functions which do not belong to the same physical network card in the available virtual function group to the container;
and if the network affinity is no affinity, randomly distributing virtual functions in the available virtual function groups to the container.
7. The method according to any one of claims 1-6, further comprising:
Port binding is carried out on the virtual functions allocated to the container, and a scheduling mode is configured for each virtual function; the scheduling modes comprise a main and standby mode and a load balancing mode.
8. The method according to any one of claims 1-6, wherein determining the available physical network card according to the load status of each physical network card comprises:
judging whether the load value of the load state of each physical network card is smaller than a preset load threshold value or not;
and determining the physical network card smaller than a preset load threshold as the available physical network card.
9. An apparatus for determining allocation information, the apparatus comprising:
the grouping module is used for grouping the virtual functions of the virtual machine according to the corresponding relation between the virtual functions and the physical network card and determining the grouping of the virtual functions according to the physical network card;
the determining module is used for determining available physical network cards according to the load states of the physical network cards;
and the distribution module is used for distributing virtual functions for the container according to the available physical network card and the virtual function groups.
10. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any one of claims 1 to 8 when the computer program is executed.
11. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 8.
CN202310996709.0A 2023-08-08 2023-08-08 Determination method and device of allocation information, computer equipment and storage medium Pending CN117130723A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310996709.0A CN117130723A (en) 2023-08-08 2023-08-08 Determination method and device of allocation information, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310996709.0A CN117130723A (en) 2023-08-08 2023-08-08 Determination method and device of allocation information, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117130723A true CN117130723A (en) 2023-11-28

Family

ID=88853749

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310996709.0A Pending CN117130723A (en) 2023-08-08 2023-08-08 Determination method and device of allocation information, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117130723A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117499318A (en) * 2024-01-02 2024-02-02 中移(苏州)软件技术有限公司 Cloud computing virtual network system, and use method, device, equipment and medium thereof

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117499318A (en) * 2024-01-02 2024-02-02 中移(苏州)软件技术有限公司 Cloud computing virtual network system, and use method, device, equipment and medium thereof
CN117499318B (en) * 2024-01-02 2024-04-09 中移(苏州)软件技术有限公司 Cloud computing virtual network system, and use method, device, equipment and medium thereof

Similar Documents

Publication Publication Date Title
US11960915B2 (en) Method and apparatus for creating virtual machine based on parameter information of a virtual network interface card
CN103797462B (en) A kind of method and apparatus creating virtual machine
CN108337109B (en) Resource allocation method and device and resource allocation system
US7945913B2 (en) Method, system and computer program product for optimizing allocation of resources on partitions of a data processing system
JP5510556B2 (en) Method and system for managing virtual machine storage space and physical hosts
KR102290540B1 (en) Namespace/Stream Management
CN108268317B (en) Resource allocation method and device
US9998532B2 (en) Computer-based, balanced provisioning and optimization of data transfer resources for products and services
CN110096220B (en) Distributed storage system, data processing method and storage node
CN110098946B (en) Method and device for deploying virtualized network element equipment
CN108881512B (en) CTDB virtual IP balance distribution method, device, equipment and medium
US10313431B2 (en) Storage system and method for connection-based load balancing
US20060212871A1 (en) Resource allocation in computing systems
CN115408100A (en) Container cluster scheduling method, device, equipment and storage medium
CN117130723A (en) Determination method and device of allocation information, computer equipment and storage medium
CN109873714B (en) Cloud computing node configuration updating method and terminal equipment
US11360824B2 (en) Customized partitioning of compute instances
US20170195261A1 (en) Apparatus and method for virtual switching
CN109298949B (en) Resource scheduling system of distributed file system
CN112631766B (en) Dynamic adjustment method and device for project environment resources
CN117056023A (en) Distributed system storage resource scheduling method and device
CN116680078A (en) Cloud computing resource scheduling method, device, equipment and computer storage medium
CN110704182A (en) Deep learning resource scheduling method and device and terminal equipment
WO2020024207A1 (en) Service request processing method, device and storage system
CN112468458B (en) Scheduling method based on neutron layering mechanism

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