CN107800814B - Virtual machine deployment method and device - Google Patents

Virtual machine deployment method and device Download PDF

Info

Publication number
CN107800814B
CN107800814B CN201610802132.5A CN201610802132A CN107800814B CN 107800814 B CN107800814 B CN 107800814B CN 201610802132 A CN201610802132 A CN 201610802132A CN 107800814 B CN107800814 B CN 107800814B
Authority
CN
China
Prior art keywords
address
network
floating
virtual machine
physical network
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.)
Expired - Fee Related
Application number
CN201610802132.5A
Other languages
Chinese (zh)
Other versions
CN107800814A (en
Inventor
黄高攀
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jiangsu Fangtian Power Technology Co Ltd
Information and Telecommunication Branch of State Grid Jiangsu Electric Power Co Ltd
Original Assignee
Jiangsu Fangtian Power Technology Co Ltd
Information and Telecommunication Branch of State Grid Jiangsu Electric Power Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jiangsu Fangtian Power Technology Co Ltd, Information and Telecommunication Branch of State Grid Jiangsu Electric Power Co Ltd filed Critical Jiangsu Fangtian Power Technology Co Ltd
Priority to CN201610802132.5A priority Critical patent/CN107800814B/en
Publication of CN107800814A publication Critical patent/CN107800814A/en
Application granted granted Critical
Publication of CN107800814B publication Critical patent/CN107800814B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment discloses a virtual machine deployment method and a virtual machine deployment device, wherein the method comprises the following steps: responding to request information created by a request virtual machine, and determining a currently available floating network protocol IP address; when more than one physical network corresponding to the currently available floating IP address is available, acquiring a network state parameter of the physical network corresponding to the currently available floating IP address; selecting a current available floating IP corresponding to the physical network which is most suitable for configuring the virtual machine at present as a target IP address according to the network state parameter; and binding the target IP address and the created virtual machine.

Description

Virtual machine deployment method and device
Technical Field
The present invention relates to the field of internet, and in particular, to a method and an apparatus for deploying a virtual machine.
Background
With the rapid development of internet technologies and information technology internet of things technologies, cloud computing is continuously mature and is gradually deployed in enterprise production environments. Cloud computing (cloud computing) is an internet-based mode of addition, use, and delivery of related services, typically involving the provision of dynamically scalable and often virtual networks over the internet, implemented with the resources of the virtual networks. However, in the prior art, the deployment of the virtual network has various problems, for example, the deployed virtual network has the problem of slow network response rate.
Disclosure of Invention
In view of the above, embodiments of the present invention are directed to a method and apparatus for deploying a virtual machine, which at least partially solve the above problems.
In order to achieve the purpose, the technical scheme of the invention is realized as follows:
a first aspect of an embodiment of the present invention provides a virtual machine deployment method, including:
responding to request information created by a request virtual machine, and determining a currently available floating network protocol IP address;
when more than one physical network corresponding to the currently available floating IP address is available, acquiring a network state parameter of the physical network corresponding to the currently available floating IP address;
selecting a current available floating IP corresponding to the physical network which is most suitable for configuring the virtual machine at present as a target IP address according to the network state parameter;
and binding the target IP address and the created virtual machine.
Based on the above scheme, when there is more than one physical network corresponding to the currently available floating IP address, acquiring the network state parameter of the physical network corresponding to the currently available floating IP address includes:
acquiring at least one of a network load rate, an available transmission rate and a ratio of the number of configured virtual machines to the number of configurable virtual machines of the physical network corresponding to the current available floating IP address;
the selecting, according to the network state parameters, a currently available floating IP corresponding to the physical network most suitable for configuring the virtual machine at present as a target IP address comprises:
and selecting the target IP address according to at least one of network load rate, available transmission rate, ratio of the number of configured virtual machines to the number of configurable virtual machines and application service attribute.
Based on the above scheme, the selecting the target IP address according to at least one of a network load rate, an available transmission rate, a ratio of the number of configured virtual machines to the number of configurable virtual machines, and an application service attribute includes:
calculating a deployment proper value S of the physical network corresponding to the currently available floating IP address according to the following functional relationship;
s ═ T × N + P × m + N × i; wherein T represents the ratio of the number of configured virtual machines to the number of configurable virtual machines; the n is the weight corresponding to the T, and the value is positive; the P represents the network load rate; m is the weight of P, and the value is an integer; the N represents the available transmission rate; the i is the weight of the N and takes a negative value;
and selecting the currently available floating IP corresponding to the physical network with the minimum S as the target IP address.
Based on the above solution, the selecting, according to the network status parameter, a currently available floating IP corresponding to the physical network most suitable for configuring a virtual machine at present as a target IP address further includes:
acquiring network attribute parameters which can be provided by the physical network and correspond to the current floating IP address; wherein the network attribute parameters include application services provided by the physical network;
and taking the current floating IP address corresponding to the physical network matched with the application service type required by the virtual machine according to the network attribute parameter as the target IP address.
Based on the above scheme, the determining the currently available IP address of the floating network protocol in response to the request information created by the request virtual machine includes:
responding to the virtual, namely creating request information, and inquiring a floating IP address list;
selecting a currently available floating IP address with an unused use state from the floating IP address list;
the method further comprises the following steps:
changing the usage status of the target IP address in the floating IP address to used after the binding of the target IP address with the created virtual machine.
A second aspect of an embodiment of the present invention provides a virtual machine deployment apparatus, including:
the determining unit is used for responding to request information for requesting the virtual machine to establish and determining a currently available floating network protocol IP address;
the acquiring unit is used for acquiring the network state parameters of the physical network corresponding to the currently available floating IP address when more than one physical network corresponding to the currently available floating IP address is available;
the selection unit is used for selecting the currently available floating IP corresponding to the physical network which is most suitable for configuring the virtual machine at present as a target IP address according to the network state parameter;
and the binding unit is used for binding the target IP address and the created virtual machine.
Based on the above scheme, the obtaining unit is configured to obtain at least one of a network load rate, an available transmission rate, and a ratio of the number of configured virtual machines to the number of configurable virtual machines of the physical network corresponding to the current available floating IP address;
the selection unit is configured to select the target IP address according to at least one of a network load rate, an available transmission rate, a ratio of the number of configured virtual machines to the number of configurable virtual machines, and an application service attribute.
Based on the above scheme, the selecting unit is specifically configured to calculate a deployment suitability value S of the physical network corresponding to the currently available floating IP address according to the following functional relationship; s ═ T × N + P × m + N × i; wherein T represents the ratio of the number of configured virtual machines to the number of configurable virtual machines; the n is the weight corresponding to the T, and the value is positive; the P represents the network load rate; m is the weight of P, and the value is an integer; the N represents the available transmission rate; the i is the weight of the N and takes a negative value; and selecting the currently available floating IP corresponding to the physical network with the minimum S as the target IP address.
Based on the above scheme, the selecting unit is specifically configured to acquire a network attribute parameter that can be provided by the physical network and corresponds to the currently floating IP address; wherein the network attribute parameters include application services provided by the physical network; and taking the current floating IP address corresponding to the physical network matched with the application service type required by the virtual machine according to the network attribute parameter as the target IP address.
Based on the above scheme, the determining unit is configured to query a floating IP address list in response to the virtual creation request information;
selecting a currently available floating IP address with an unused use state from the floating IP address list;
the device further comprises:
and an updating unit, configured to change, after the target IP address is bound to the created virtual machine, a use state of the target IP address in the floating IP address to be used.
According to the virtual machine deployment method and device provided by the embodiment of the invention, when the virtual machine is deployed, the network state parameters of the physical network where the currently available floating IP address is located are obtained, the physical network which is most suitable for deploying the virtual machine is selected according to the network state parameters, and then the currently available floating IP address is selected from the physical network which is most suitable for deploying the virtual machine as the target IP address to be bound to the virtual machine, so that the virtual machine is deployed in the physical network which is most suitable for deploying the virtual machine.
Drawings
Fig. 1 is a flowchart illustrating a first method for deploying a virtual machine according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a virtual machine deployment apparatus according to an embodiment of the present invention;
fig. 3 is a flowchart illustrating a second method for deploying a virtual machine according to an embodiment of the present invention.
Detailed Description
The technical solution of the present invention is further described in detail with reference to the drawings and the specific embodiments of the specification.
As shown in fig. 1, the present embodiment provides a virtual machine deployment method, including:
step S110: responding to request information created by a request virtual machine, and determining a currently available floating network protocol IP address;
step S120: when more than one physical network corresponding to the currently available floating IP address is available, acquiring a network state parameter of the physical network corresponding to the currently available floating IP address;
step S130: selecting a current available floating IP corresponding to the physical network which is most suitable for configuring the virtual machine at present as a target IP address according to the network state parameter;
step S140: and binding the target IP address and the created virtual machine.
The embodiment provides a virtual machine deployment method, which is applied to the deployment process of a virtual machine.
The floating IP address is a dynamically allocated IP address. The IP address where the floating IP address is located can realize the establishment of a corresponding relation with a physical network, or a plurality of floating IP addresses form a floating IP address section which establishes a corresponding relation with the physical network. For example, a floating IP address segment is assigned to a physical network.
The currently available floating IP address is a floating IP address that is currently in an unused state. In this embodiment, the network state parameter of the physical network corresponding to the currently available floating IP address is obtained, where the network state parameter is information reflecting the network state of the corresponding physical network. The network state may include a current load rate of the physical network, an available transfer rate, an available transfer bandwidth, and a configured number of virtual machines, a configurable maximum number of virtual machines. These network state parameters may be used to characterize whether the current physical network is suitable for configuring the virtual machine.
In step S130, a physical network meeting a preset condition is selected as the binding IP address of the virtual machine according to the network state parameter. The binding IP address is the target IP address. If the virtual machine binds the target address, the virtual machine is configured in the physical network of the target IP address. In step S140, binding the target IP address with the virtual machine is equivalent to deploying the virtual machine in the currently most suitable physical network, so as to implement optimal deployment of the virtual machine, and reduce the problems of slow transmission of the virtual machine, unbalanced loads of different physical networks, excessive load of some physical networks, idle resources of some physical networks, and the like caused by randomly deploying the virtual machine.
In some cases, there may be currently available floating IP addresses that all belong to the same physical network, and at this time, one currently available floating IP address may be randomly selected as the target address. In some cases, there may not be a floating IP address currently available, and a new floating IP address needs to be created at this time as the target IP address. When creating the virtual IP address, the network state parameters can be obtained, the physical network which is most suitable for deployment is selected, and the newly created floating IP address is allocated to the physical network of the virtual machine which is most suitable for deployment.
In some embodiments, the step S120 may include:
acquiring at least one of a network load rate, an available transmission rate and a ratio of the number of configured virtual machines to the number of configurable virtual machines of the physical network corresponding to the current available floating IP address;
the step S130 may include:
and selecting the target IP address according to at least one of network load rate, available transmission rate, ratio of the number of configured virtual machines to the number of configurable virtual machines and application service attribute.
At least one of the following may be included in step S130:
and selecting the currently available floating IP address in the physical network with the lowest network load rate as the target IP address. The network load rate is a ratio of the current load capacity of the physical network to the maximum load capacity that can be provided, and the lower the network load rate is, the larger the data of the virtual machine that can be deployed by the physical network is, which is suitable for the deployment of the virtual machine.
Selecting a currently available floating IP address in the physical network of available transmission rates as the target IP address. Here, the available transmission rate is a remaining network transmission rate obtained by subtracting a currently occupied network transmission rate from a maximum transmission rate of the physical network. The larger the available transmission rate is, the more the virtual machine is deployed in the physical network, and the higher transmission rate can be obtained.
And selecting the currently available floating IP address corresponding to the physical network with the lowest ratio of the number of the configured virtual machines to the number of the configurable virtual machines as the target IP address.
The number of connectable virtual machines here represents the maximum number of virtual machines that can be configured in the physical network, and the number of configured virtual machines is the number of virtual machines that have been configured in the corresponding physical network. If the ratio is larger, it indicates that there are many virtual machines configured in the physical network, and continuing to configure may cause a problem of excessive configuration. The currently available floating IP address of the physical network with the lowest ratio is selected to be the most suitable physical network for configuring the virtual machine in terms of the dimension of the number of configurations.
In particular implementations, any of the above dimensions may be combined to select the physical network of the most optimally configured virtual machine at the present time.
For example, the step S130 may specifically include:
and calculating a deployment appropriateness value S of the physical network corresponding to the currently available floating IP address according to the following functional relation. The deployment suitability value S represents the suitability of the corresponding physical network for deploying the virtual machine.
S ═ T × N + P × m + N × i; wherein T represents the ratio of the number of configured virtual machines to the number of configurable virtual machines; the n is the weight corresponding to the T, and the value is positive; the P represents the network load rate; m is the weight of P, and the value is an integer; the N represents the available transmission rate; the i is the weight of the N and takes a negative value;
and selecting the currently available floating IP corresponding to the physical network with the minimum S as the target IP.
In the embodiment, the deployment proper value is calculated by utilizing the functional relationship, so that the method has the characteristic of simple and convenient implementation.
For example, the function min(s) may be used to select the physical network where the target IP address is located.
Further, the step S130 may further include:
acquiring network attribute parameters which can be provided by the physical network and correspond to the current floating IP address; wherein the network attribute parameters include application services provided by the physical network;
and taking the current floating IP address corresponding to the physical network matched with the application service type required by the virtual machine according to the network attribute parameter as the target IP address.
This step may be used in conjunction with the functional relationships previously described. If the currently available floating IP address corresponds to a plurality of physical networks, part of the physical networks which cannot provide the application service type required by the virtual machine to be deployed are screened out through the network attribute parameters. In the above functional relationship, a physical network most suitable for deploying the virtual machine currently is selected from physical networks which can provide application services required by the virtual machine, and a currently available floating IP address of the most suitable physical network is selected as the target IP address.
In some cases, if there is no floating IP address currently providing the application service required by the virtual machine, the created floating IP address is used as the target IP address for providing the floating IP address of the application service network required by the virtual machine.
In some cases, the method further comprises: if the application service required to be provided by the virtual machine changes, the floating IP address bound by the virtual machine is changed into a physical network providing the corresponding application service, so that the migration of the physical network where the virtual machine is located is simply and conveniently realized, and the simple migration and expansion of the virtual machine are realized.
The step S110 may include: responding to the virtual, namely creating request information, and inquiring a floating IP address list; a currently available floating IP address is selected from the list of floating IP addresses that is unused in use.
In the embodiment, the floating IP is managed by using the floating IP address list, so that on one hand, the effective management of the floating IP address is realized, and meanwhile, the query of the currently available floating IP address can be facilitated;
the method further comprises the following steps:
changing the usage status of the target IP address in the floating IP address to used after the binding of the target IP address with the created virtual machine.
After a floating IP address is assigned to a newly deployed virtual machine, in order to facilitate the deployment of a subsequent virtual machine, the use state of the floating IP address assigned to the corresponding virtual machine is configured to be used, so as to facilitate the deployment of a subsequent new virtual machine.
As shown in fig. 2, the present embodiment provides a virtual machine deployment apparatus, including:
a determining unit 110, configured to determine, in response to request information requesting virtual machine creation, a currently available IP address of a floating network protocol;
an obtaining unit 120, configured to obtain a network state parameter of a physical network corresponding to the currently available floating IP address when there is more than one physical network corresponding to the currently available floating IP address;
a selecting unit 130, configured to select, according to the network state parameter, a currently available floating IP corresponding to the physical network most suitable for configuring the virtual machine at present as a target IP address;
a binding unit 140, configured to bind the target IP address and the created virtual machine.
The virtual machine deployment device provided by the embodiment can correspond to various electronic devices or cloud platforms and the like capable of configuring and processing information, for example, various servers. The server may comprise a desktop computer or a cabinet server, etc.
The determining unit 110, the obtaining unit 120, the selecting unit 130, and the binding unit 140 may correspond to a processor or a processing circuit in the electronic device. The processor may include a central processing unit CPU, a microprocessor MCU, a digital signal processor DSP, a programmable array PLC, or an application processor AP, etc. The processing circuitry may comprise an application specific integrated circuit ASIC or the like. The processor or processing circuit may perform the functions of the functional units described above through execution of the executable code.
The determining unit 110, the obtaining unit 120, the selecting unit 130 and the binding unit 140 may correspond to one processor or processing circuit in common, or may correspond to different processors or processing circuits respectively.
In summary, in the embodiment, when the virtual machine deployment device performs virtual machine deployment, the network state parameter of the physical network where the currently available floating IP address is located is obtained, and the physical network most suitable for deploying the virtual machine is selected according to the network state parameter, so that the problems of low response rate of the virtual machine, unbalanced load of the physical network, and high idle rate of physical resources of some physical networks, which are caused by unreasonable virtual machine deployment due to random deployment, are avoided.
In some embodiments, the obtaining unit 120 is configured to obtain at least one of a network load rate, an available transmission rate, and a ratio of the number of configured virtual machines to the number of configurable virtual machines of the physical network corresponding to the currently available floating IP address; the selecting unit 130 is configured to select the target IP address according to at least one of a network load rate, an available transmission rate, a ratio of the number of configured virtual machines to the number of configurable virtual machines, and an application service attribute.
In this embodiment, the network status parameters may include one or more of a network load rate, an available transmission rate, and a ratio of the number of configured virtual machines to the number of configurable virtual machines. The selecting unit 130 selects the physical network according to at least one of the three parameters, obviously, the load imbalance phenomenon can be reduced by the root network load rate, and the problems of low transmission rate and low response rate of the deployed virtual machine due to the fact that the physical machine is deployed in the physical network with a lower current available transmission rate can be avoided according to the available transmission rate. According to the ratio, the physical network where the virtual machine is located is selected, so that the problem that the physical resource idle rate of the physical network is too high due to the fact that some physical networks are provided with too many deployable virtual machines and some physical networks are provided with too few deployed virtual machines can be obviously solved; obviously, the transmission rate and the response rate of the virtual machine are improved, and the effective utilization rate of resources is improved.
In some embodiments, the selecting unit 130 is specifically configured to calculate a deployment suitability value S of the physical network corresponding to the currently available floating IP address according to the following functional relationship; s ═ T × N + P × m + N × i; wherein T represents the ratio of the number of configured virtual machines to the number of configurable virtual machines; the n is the weight corresponding to the T, and the value is positive; the P represents the network load rate; m is the weight of P, and the value is an integer; the N represents the available transmission rate; the i is the weight of the N and takes a negative value; and selecting the currently available floating IP corresponding to the physical network with the minimum S as the target IP address.
In this embodiment, the selecting unit 130 determines a deployment fitness value simply and conveniently through a functional relationship; and then the rotation of the physical network is carried out according to the deployment proper value, and the method has the characteristic of simple and convenient realization.
In other embodiments, the selecting unit 130 is specifically configured to acquire a network attribute parameter that can be provided by the physical network and corresponds to the current floating IP address; wherein the network attribute parameters include application services provided by the physical network; and taking the current floating IP address corresponding to the physical network matched with the application service type required by the virtual machine according to the network attribute parameter as the target IP address.
In some cases, the application services available by the physical network are specifically defined, so that some servers that need to provide specific application services may not be suitable for deployment in the corresponding physical network, and in this embodiment, the selecting unit further obtains the network attribute parameter of the physical network, and selects a floating IP address of the physical network that is adapted to the application service needed by the virtual machine as the IP address of the virtual machine. In a specific application, the selecting unit 130 is configured to screen out a physical network capable of providing the application service required by the virtual machine according to the network attribute parameter, and then screen out a current available floating IP address of the physical network capable of providing the application service required by the virtual machine according to the functional relationship, where the current available floating IP address is used as the target IP address, that is, an IP address of the virtual machine.
In some embodiments, the determining unit 110 is configured to query a floating IP address list in response to the virtual creation request information; a currently available floating IP address is selected from the list of floating IP addresses that is unused in use. In this embodiment, the virtual machine deployment apparatus maintains a floating IP address list. The floating IP address list at least includes a floating IP address, and optionally further includes a use status field, where the use status field is used to indicate whether the corresponding floating IP address is in a use status or an unused status. The determination unit 110 may go into the list of floating IP addresses, reading out the unused currently available floating IP address.
Meanwhile, the device further comprises: and an updating unit, configured to change, after the target IP address is bound to the created virtual machine, a use state of the target IP address in the floating IP address to be used.
The updating unit may also correspond to a processor or a processing circuit, and may be configured to update the floating IP address list stored in the storage medium in the virtual machine deployment device, so as to ensure correctness of the state of the floating IP address determined by the virtual machine each time, and avoid a collision phenomenon of the IP addresses during the configuration of the virtual machine.
Several specific examples are provided below in connection with the above embodiments:
example one:
the present example provides a method for configuring a virtual machine for cloud computing, comprising:
step 1, a client applies for creating a virtual machine, and parameters required by the virtual machine creation are transmitted to an Openstack server. The OpenStack is an open source cloud computing management platform; the Openstack server is a server of an open source cloud computing management platform and can correspond to the virtual machine deployment device.
And 2, the OpenStack server receives request information of the issuing application system sent by the client, and acquires the floating IP list from the OpenStack environment.
Step 3, OpenStack filters the floating IP list, searches for unbound floating IP addresses and obtains an unbound floating IP list; the unbound floating IP address is the currently available floating IP address.
And 4, judging the unbound floating IP list by the OpenStack server side, and if the unbound floating IP list is empty, creating a floating IP and putting the floating IP into the unbound floating IP list.
And 5, selecting a floating IP address from the unbound floating IP list, wherein the floating IP address is selected from a physical network segment with less use, low network load and high network card transmission rate. The weight of the relevant parameters is set in advance, the parameters are multiplied by the weight and then added, the obtained results are compared, and the network corresponding to the minimum value is the optimal network.
And 6, selecting a corresponding physical network through the floating IP address, and then creating the virtual machine.
And 7, binding the virtual machine with the selected floating IP after the virtual machine is established.
The optimal network segment calculated in step 5 may be as follows:
S=min(T*n%+P*m%+N*i%)
n, m, i represent the weight of each attribute, and these values are preset in advance; t represents the IP using number in the network segment; p represents a network load rate; n represents the transmission rate of the network card; and calculating each network segment according to a formula, and finally obtaining the network segment with the minimum result as the optimal network segment.
Example two:
as shown in fig. 3, the present example provides a virtual machine deployment method comprising:
step S1:
step S2: acquiring a floating IP address field;
step S3: acquiring an unbound floating IP address field;
step S4: and judging whether the floating IP address field is empty, if so, entering the step S5, otherwise, entering the step S7.
Step S5: creating a floating IP address;
step S6: placing the floating IP address into an unbound floating IP address segment;
step S7: acquiring a floating IP address;
step S8: selecting a response physical network according to the floating IP address, and finally determining the floating IP address bound by the virtual machine;
step S9: creating a virtual machine;
step S10: the virtual machine binds the floating IP address.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described device embodiments are merely illustrative, for example, the division of the unit is only a logical functional division, and there may be other division ways in actual implementation, such as: multiple units or components may be combined, or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or units may be electrical, mechanical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed on a plurality of network units; some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, all the functional units in the embodiments of the present invention may be integrated into one processing module, or each unit may be separately used as one unit, or two or more units may be integrated into one unit; the integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
Those of ordinary skill in the art will understand that: all or part of the steps for implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer readable storage medium, and when executed, the program performs the steps including the method embodiments; and the aforementioned storage medium includes: a mobile storage device, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (10)

1. A method of deploying a virtual machine, comprising:
responding to request information created by a request virtual machine, and determining a currently available floating network protocol IP address;
when more than one physical network corresponding to the currently available floating IP address is available, acquiring a network state parameter of the physical network corresponding to the currently available floating IP address; the network state parameter represents whether the current physical network is suitable for configuring the virtual machine; the network state parameter is used for reflecting the information of the network state of the physical network;
selecting a current available floating IP corresponding to the physical network which is most suitable for configuring the virtual machine at present as a target IP address according to the network state parameter;
and binding the target IP address and the created virtual machine.
2. The method of claim 1,
when there is more than one physical network corresponding to the currently available floating IP address, acquiring the network state parameter of the physical network corresponding to the currently available floating IP address, including:
acquiring at least one of a network load rate, an available transmission rate and a ratio of the number of configured virtual machines to the number of configurable virtual machines of the physical network corresponding to the current available floating IP address;
the selecting, according to the network state parameters, a currently available floating IP corresponding to the physical network most suitable for configuring the virtual machine at present as a target IP address comprises:
and selecting the target IP address according to at least one of network load rate, available transmission rate, ratio of the number of configured virtual machines to the number of configurable virtual machines and application service attribute.
3. The method of claim 2,
the selecting the target IP address according to at least one of a network load rate, an available transmission rate, a ratio of the number of configured virtual machines to the number of configurable virtual machines, and an application service attribute includes:
calculating a deployment proper value S of the physical network corresponding to the currently available floating IP address according to the following functional relationship;
s ═ T × N + P × m + N × i; wherein T represents the ratio of the number of configured virtual machines to the number of configurable virtual machines; the n is the weight corresponding to the T, and the value is positive; the P represents the network load rate; m is the weight of P, and the value is an integer; the N represents the available transmission rate; the i is the weight of the N and takes a negative value;
and selecting the currently available floating IP corresponding to the physical network with the minimum S as the target IP address.
4. The method according to claim 2 or 3,
the selecting, according to the network state parameter, a currently available floating IP corresponding to the physical network most suitable for configuring the virtual machine at present as a target IP address further comprises:
acquiring network attribute parameters which can be provided by the physical network and correspond to the current floating IP address; wherein the network attribute parameters include application services provided by the physical network;
and taking the current floating IP address corresponding to the physical network matched with the application service type required by the virtual machine according to the network attribute parameter as the target IP address.
5. The method of claim 1,
the step of determining the currently available IP address of the floating network protocol in response to the request information created by the request virtual machine comprises the following steps:
responding to the virtual machine creation request information, and inquiring a floating IP address list;
selecting a currently available floating IP address with an unused use state from the floating IP address list;
the method further comprises the following steps:
changing the usage status of the target IP address in the floating IP address to used after the binding of the target IP address with the created virtual machine.
6. A virtual machine deployment device, comprising:
the determining unit is used for responding to request information for requesting the virtual machine to establish and determining a currently available floating network protocol IP address;
the acquiring unit is used for acquiring the network state parameters of the physical network corresponding to the currently available floating IP address when more than one physical network corresponding to the currently available floating IP address is available; the network state parameter represents whether the current physical network is suitable for configuring the virtual machine; the network state parameter is used for reflecting the information of the network state of the physical network;
the selection unit is used for selecting the currently available floating IP corresponding to the physical network which is most suitable for configuring the virtual machine at present as a target IP address according to the network state parameter;
and the binding unit is used for binding the target IP address and the created virtual machine.
7. The apparatus of claim 6,
the acquiring unit is configured to acquire at least one of a network load rate, an available transmission rate, and a ratio of the number of configured virtual machines to the number of configurable virtual machines of the physical network corresponding to the current available floating IP address;
the selection unit is configured to select the target IP address according to at least one of a network load rate, an available transmission rate, a ratio of the number of configured virtual machines to the number of configurable virtual machines, and an application service attribute.
8. The apparatus of claim 7,
the selecting unit is specifically configured to calculate a deployment suitability value S of the physical network corresponding to the currently available floating IP address according to the following functional relationship; s ═ T × N + P × m + N × i; wherein T represents the ratio of the number of configured virtual machines to the number of configurable virtual machines; the n is the weight corresponding to the T, and the value is positive; the P represents the network load rate; m is the weight of P, and the value is an integer; the N represents the available transmission rate; the i is the weight of the N and takes a negative value; and selecting the currently available floating IP corresponding to the physical network with the minimum S as the target IP address.
9. The apparatus according to claim 7 or 8,
the selecting unit is specifically configured to acquire a network attribute parameter that can be provided by the physical network and corresponds to the current floating IP address; wherein the network attribute parameters include application services provided by the physical network; and taking the current floating IP address corresponding to the physical network matched with the application service type required by the virtual machine according to the network attribute parameter as the target IP address.
10. The apparatus of claim 6,
the determining unit is used for responding to the virtual machine creation request information and inquiring a floating IP address list;
selecting a currently available floating IP address with an unused use state from the floating IP address list;
the device further comprises:
and an updating unit, configured to change, after the target IP address is bound to the created virtual machine, a use state of the target IP address in the floating IP address to be used.
CN201610802132.5A 2016-09-05 2016-09-05 Virtual machine deployment method and device Expired - Fee Related CN107800814B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610802132.5A CN107800814B (en) 2016-09-05 2016-09-05 Virtual machine deployment method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610802132.5A CN107800814B (en) 2016-09-05 2016-09-05 Virtual machine deployment method and device

Publications (2)

Publication Number Publication Date
CN107800814A CN107800814A (en) 2018-03-13
CN107800814B true CN107800814B (en) 2021-08-13

Family

ID=61530628

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610802132.5A Expired - Fee Related CN107800814B (en) 2016-09-05 2016-09-05 Virtual machine deployment method and device

Country Status (1)

Country Link
CN (1) CN107800814B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108804202A (en) * 2018-06-11 2018-11-13 郑州云海信息技术有限公司 A kind of enterprise-level container mirror image management method and system
CN109067931A (en) * 2018-07-19 2018-12-21 郑州云海信息技术有限公司 A kind of method and system of cloud management platform virtual machine floating IP address setting
CN111200512B (en) * 2018-11-20 2023-05-30 北京京东尚科信息技术有限公司 Network connection disaster recovery method, terminal equipment, storage medium and electronic equipment
CN114567617B (en) * 2022-02-25 2023-08-04 苏州浪潮智能科技有限公司 IP address allocation method, system, electronic equipment and storage medium
CN115174524B (en) * 2022-05-18 2024-01-02 天翼云科技有限公司 Floating IP distribution method and device, electronic equipment and storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
ES2567726T3 (en) * 2011-08-01 2016-04-26 Huawei Technologies Co., Ltd. Network policy configuration method, management device and network management center device
WO2013133837A1 (en) * 2012-03-08 2013-09-12 Hewlett-Packard Development Company, L.P. Modifying virtual machine communications
CN102932498B (en) * 2012-10-24 2016-08-03 广州杰赛科技股份有限公司 A kind of virtual machine IP method for managing resource of cloud computing platform
CN103138990A (en) * 2013-03-12 2013-06-05 无锡城市云计算中心有限公司 Virtual machine management method under cloud computing network and cloud computing network management device
WO2015058377A1 (en) * 2013-10-23 2015-04-30 华为技术有限公司 Method and device for creating virtual machine
CN105208053A (en) * 2014-06-16 2015-12-30 中兴通讯股份有限公司 Method for realizing load balance, device and load balance service system

Also Published As

Publication number Publication date
CN107800814A (en) 2018-03-13

Similar Documents

Publication Publication Date Title
CN107800814B (en) Virtual machine deployment method and device
CN109561141B (en) CDN node selection method and equipment
CN108510389B (en) Intelligent contract calling method and device based on block chain and readable storage medium
CN109547286B (en) CDN node selection method, device and storage medium
EP3664372A1 (en) Network management method and related device
CN109451002B (en) CDN node selection method and equipment
CN105376107B (en) Terminal testing method and proxy server
CN111737003B (en) Pod balanced scheduling method and device, master node and storage medium
CN111163130B (en) Network service system and data transmission method thereof
CN112015544A (en) Load balancing method, device and equipment of k8s cluster and storage medium
CN109600760B (en) Network management method, equipment and system
CN113961312A (en) Target service deployment method and device and electronic equipment
CN110011877B (en) Switch testing method and device
CN104869162A (en) Method of resource downloading and apparatus thereof
CN110474960B (en) Method and device for service deployment in virtual network
CN108933847A (en) A kind of method and device that address is quickly distributed
CN109561054A (en) A kind of data transmission method, controller and access device
CN112738220A (en) Management method, load balancing method and load balancing device of server cluster
CN113254165B (en) Load flow distribution method and device for virtual machine and container, and computer equipment
CN110636149B (en) Remote access method, device, router and storage medium
CN112769829A (en) Deployment method of cloud physical machine, related equipment and readable storage medium
CN108366102A (en) A kind of service discovery method, device and electronic equipment based on Consul
WO2023169106A1 (en) Method and apparatus for scheduling content delivery network domain name
CN110545332A (en) Server cluster balancing method and system
CN114629958B (en) Resource allocation method, device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20210813

CF01 Termination of patent right due to non-payment of annual fee