CN106911779A - A kind of cloud platform virtual machine obtains IP method and devices - Google Patents

A kind of cloud platform virtual machine obtains IP method and devices Download PDF

Info

Publication number
CN106911779A
CN106911779A CN201710108775.4A CN201710108775A CN106911779A CN 106911779 A CN106911779 A CN 106911779A CN 201710108775 A CN201710108775 A CN 201710108775A CN 106911779 A CN106911779 A CN 106911779A
Authority
CN
China
Prior art keywords
virtual machine
network interface
interface card
default
mac address
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
CN201710108775.4A
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.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information Technology 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 Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201710108775.4A priority Critical patent/CN106911779A/en
Publication of CN106911779A publication Critical patent/CN106911779A/en
Pending legal-status Critical Current

Links

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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/668Internet protocol [IP] address subnets

Abstract

The application provides a kind of cloud platform virtual machine and obtains IP method and devices, when virtual machine enabled instruction is received, the IP bags of the virtual machine corresponding with the enabled instruction that acquisition pre-builds from operating system, after DHCP instructions are received, parse the IP bags, obtain the MAC Address of the network interface card of the virtual machine, according to the MAC Address of the network interface card of the virtual machine, the MAC Address of the network interface card of the virtual machine prestored in inquiry database and the binding relationship of default IP, obtain the corresponding IP of MAC Address of the network interface card of the virtual machine, and the IP is returned into corresponding virtual machine.The MAC Address of the network interface card of the virtual machine stored in database in advance by inquiry and the binding relationship of default IP, IP corresponding with the MAC Address of the network interface card of virtual machine can quickly be obtained, and based on DHCP protocol, automatically IP can be returned into corresponding virtual machine, virtual function is obtained IP automatically, overcome the low problem of artificial setting virtual machine IP efficiency.

Description

A kind of cloud platform virtual machine obtains IP method and devices
Technical field
IP method and devices are obtained the present invention relates to field of cloud computer technology, more particularly to a kind of cloud platform virtual machine.
Background technology
Cloud computing technology is a kind of calculation based on internet burning the hotest in recent years, and it is with Intel Virtualization Technology Basis, the physical resource of computer is abstract and be modeled as some logical resources, some virtual machines are simulated using logical resource, To meet the application needs of different system.Because each virtual machine is required for by Internet protocol (Internet Protocol, abbreviation IP) communicated with other nodes in network, therefore virtual machine IP address acquisition be cloud computing technology base Plinth.
Cloud computing technology relies on cluster to do, when the cluster under cloud platform is because of peak traffic overload, it is necessary to Load when virtual machine adds cluster with balancing traffic peak.The IP address of virtual machine is selected from the network IP resources pond in cluster Idle IP, selects quantity and virtual machine quantity identical IP from idle IP, and the IP that will be selected is set on a virtual machine, empty Plan machine can just be added to cluster and share business load.In the prior art, mainly manual configuration virtual machine IP address, and it is manual The method for configuring virtual machine IP address, labor intensive cost and inefficiency.
The content of the invention
Based on above-mentioned the deficiencies in the prior art, the application proposes that a kind of cloud platform virtual machine obtains IP method and devices, with Solve the problems, such as manual configuration virtual machine IP address labor intensive cost and inefficiency.
To solve the above problems, it is proposed that scheme it is as follows:
A kind of cloud platform virtual machine obtains IP methods, including:
When virtual machine enabled instruction is received, from operating system obtain pre-build it is corresponding with the enabled instruction Virtual machine IP bags, wherein, the IP bags include the MAC Address of the network interface card of the virtual machine;
After DHCP request instruction is received, the IP bags are parsed, obtain the MAC Address of the network interface card of the virtual machine;
According to the MAC Address of the network interface card of the virtual machine, the network interface card of the virtual machine prestored in inquiry database MAC Address and the binding relationship of default IP, obtain the corresponding IP of MAC Address of the network interface card of the virtual machine;
The corresponding IP of the MAC Address of the network interface card of the virtual machine is returned into the virtual machine, so that the virtual machine is by institute In stating the configuration file that IP writes the virtual machine.
Alternatively, the MAC Address of network interface card of the virtual machine for prestoring and the binding relationship of default IP by According to following steps setting:
Obtain the MAC Address and default IP of the network interface card of the virtual machine;
The MAC Address of the network interface card of the virtual machine is bound with the default IP, binding relationship is generated;
The binding relationship is saved in database.
Alternatively, the setting process of the default IP, including:
The number N of the virtual machine of number M and IP to be allocated that status information in an IP resource pools is idle IP is obtained, Wherein, M and N are the natural number more than 0;
If the M is more than or equal to the N, N number of IP is selected as default IP from the idle IP;
If the M is less than the N, new IP resource pools are created, as the 2nd IP resource pools, by the 2nd IP resources Pond is connected to form the 3rd IP resource pools with the first resource pond by router, and shape is selected from the 3rd IP resource pools State information is idle N number of IP as default IP.
Alternatively, after the default IP settings are completed, also include:
It is busy by the state information updating of the default IP.
Alternatively, the virtual machine in virtual machine and configuration file that IP is not write in configuration file including having been written into IP's Virtual machine, wherein the IP having been written into the virtual machine of IP is different from the default IP.
A kind of cloud platform virtual machine obtains IP devices, including:
First acquisition unit, for when virtual machine enabled instruction is received, obtaining what is pre-build from operating system The IP bags of virtual machine corresponding with the enabled instruction, wherein, the IP bags include the MAC ground of the network interface card of the virtual machine Location;
Resolution unit, for after DHCP request instruction is received, parsing the IP bags, obtains the network interface card of the virtual machine MAC Address;
Query unit, for the MAC Address of the network interface card according to the virtual machine, what is prestored in inquiry database is described The binding relationship of the MAC Address of the network interface card of virtual machine and default IP, the MAC Address for obtaining the network interface card of the virtual machine is corresponding IP;
Setting unit, for the corresponding IP of the MAC Address of the network interface card of the virtual machine to be returned into the virtual machine, with toilet Virtual machine is stated by the configuration file of the IP write-in virtual machines.
Alternatively, also including binding relationship generation unit, the binding relationship generation unit, including:
Second obtains subelement, MAC Address and default IP for obtaining the network interface card of the virtual machine;
Binding subelement, for the MAC Address of the network interface card of the virtual machine to be bound with the default IP, generation Binding relationship;
Subelement is preserved, for the binding relationship to be saved in database.
Alternatively, also including default IP acquiring units, the default IP acquiring units, including:
3rd obtains subelement, for obtaining number M that status information in an IP resource pools is idle IP and treating point The number N of the virtual machine with IP, wherein, M and N is the natural number more than 0;
First choice subelement, if being more than or equal to the N for the M, selects N number of IP to make from the idle IP It is default IP;
Second selection subelement, if being less than the N for the M, creates new IP resource pools, as the 2nd IP resources Pond, the 2nd IP resource pools are connected to form the 3rd IP resource pools with the first resource pond by router, from described N number of IP that status information is the free time is selected in 3rd IP resource pools as default IP.
Alternatively, the default IP acquiring units, also include:
Subelement is updated, for being busy by the state information updating of the default IP.
Alternatively, the virtual machine in virtual machine and configuration file that IP is not write in configuration file including having been written into IP's Virtual machine, wherein the IP having been written into the virtual machine of IP is different from the default IP.
The application provides a kind of cloud platform virtual machine and obtains IP method and devices, when virtual machine enabled instruction is received, The IP bags of the virtual machine corresponding with the enabled instruction that acquisition pre-builds, refer to DHCP request is received from operating system After order, the IP bags are parsed, obtain the MAC Address of the network interface card of the virtual machine, according to the MAC ground of the network interface card of the virtual machine Location, the MAC Address and the binding relationship of default IP of the network interface card of the virtual machine prestored in inquiry database, obtains institute The corresponding IP of MAC Address of the network interface card of virtual machine is stated, and the corresponding IP of the MAC Address of the network interface card of the virtual machine is returned described Virtual machine, so that the virtual machine is by the configuration file of the IP write-in virtual machines.Due to being deposited in database in advance The binding relationship of MAC Address and the default IP of the network interface card of virtual machine has been stored up, by the binding relationship inquired about in database, can be fast Speed obtains IP corresponding with the MAC Address of the network interface card of virtual machine, and based on DHCP protocol, IP can be returned into corresponding void automatically Plan machine, therefore, virtual function automatically obtains corresponding IP, is added rapidly to business cluster, empty so as to overcome artificial setting The low problem of plan machine IP efficiency.
Brief description of the drawings
In order to illustrate more clearly of the embodiment of the present application or technical scheme of the prior art, below will be to embodiment or existing The accompanying drawing to be used needed for having technology description is briefly described, it should be apparent that, drawings in the following description are only this The embodiment of application, for those of ordinary skill in the art, on the premise of not paying creative work, can also basis The accompanying drawing of offer obtains other accompanying drawings.
Fig. 1 is the schematic flow sheet that a kind of cloud platform virtual machine disclosed in the embodiment of the present application obtains IP methods;
Fig. 2 is the schematic flow sheet that another cloud platform virtual machine disclosed in the embodiment of the present application obtains IP methods;
Fig. 3 is the schematic flow sheet that another cloud platform virtual machine disclosed in the embodiment of the present application obtains IP methods;
Fig. 4 is the structural representation that a kind of cloud platform virtual machine disclosed in the embodiment of the present application obtains IP devices.
Specific embodiment
The embodiment of the present application discloses a kind of cloud platform virtual machine and obtains IP method and devices, virtual to solve manual configuration Machine IP address labor intensive cost and inefficiency problem.
Below in conjunction with the accompanying drawing in the embodiment of the present application, the technical scheme in the embodiment of the present application is carried out clear, complete Site preparation is described, it is clear that described embodiment is only some embodiments of the present application, rather than whole embodiments.It is based on Embodiment in the application, it is every other that those of ordinary skill in the art are obtained under the premise of creative work is not made Embodiment, belongs to the scope of protection of the invention.
Fig. 1 is that a kind of cloud platform virtual machine obtains IP methods disclosed in the embodiment of the present application, is comprised the following steps:
S101, when virtual machine enabled instruction is received, from operating system obtain pre-build with it is described startup refer to The IP bags of corresponding virtual machine are made, wherein, the IP bags include the MAC Address of the network interface card of the virtual machine.
Cloud platform, it includes calculate node and control node, control node, for being responsible for network control, management and running, answering With interface (API) service, storage management, data base administration, Identity Management and mirror image management etc., calculate node, for being responsible for The actual motion of virtual machine (VM) provides the underlying resources such as CPU and internal memory.
In cloud platform, cloud management server admin several calculate nodes, calculate node is real physical computer, Each calculate node operates above several virtual machines, and the Microsoft Loopback Adapter in virtual machine is true with calculate node by bridge Network interface card is connected, so as to set up network connection with cloud management server.
When virtual machine state by it is not actuated change to startup when, using virtual machine start information as virtual machine start refer to Order, cloud platform is triggered with virtual machine enabled instruction, and after the enabled instruction for receiving virtual machine, acquisition refers to cloud platform with startup Make the IP bags of corresponding virtual machine.
Wherein, virtual machine enabled instruction includes the information or multiple virtual machines of the multiple virtual machines startup in cloud platform In the information that starts of any one or several virtual machines, the information that virtual machine starts specifically includes the name of the virtual machine for starting Claim, number, the parameter such as time order and function order that virtual machine starts.
Wherein, IP bags be by operating system inside procotol station will include according to the Ethernet ICP/IP protocol of standard What the Information encapsulations such as the MAC Address of the network interface card of virtual machine were obtained, generation IP bags are easy to information to be transmitted in cloud platform.
Wherein, physics is also in MAC (Media Access Control, medium access control) address of the network interface card of virtual machine Address, hardware address or link address, write on inside hardware when being produced by network device manufacturers.This address and network without Close, namely no matter the hardware (such as network interface card, hub, router) with this address is linked into the where of network, it is all There is identical MAC Address.
It should be noted that can be while connecing when the enabled instruction of virtual machine includes the enabled instruction of multiple virtual machines The enabled instruction for receiving multiple virtual machines, or the enabled instruction that single virtual machine is successively received by certain time interval, After the enabled instruction of multiple virtual machines is received simultaneously, cloud platform can simultaneously process each enabled instruction, when by certain Time interval successively receive single virtual machine enabled instruction when, cloud platform by the enabled instruction for receiving time sequencing successively The enabled instruction that treatment is received.
S102, after DHCP request instruction is received, parse the IP bags, with obtaining the MAC of the network interface card of the virtual machine Location.
Procotol station inside operating system will include the network interface card of virtual machine according to the Ethernet ICP/IP protocol of standard MAC Address be encapsulated into IP bags after, to cloud platform send DHCP instruct, the corresponding server such as DHCP service in cloud platform After device receives DHCP request instruction, IP bags are parsed by Ethernet ICP/IP protocol, obtain the net of virtual machine corresponding with IP bags The MAC Address of card.Wherein, DHCP (Dynamic Host Configuration Protocol, DynamicHost sets agreement) is One procotol of LAN, is worked using udp protocol, mainly there is two purposes:Supplied to internal network or the webserver Business's automatic IP address allocation is answered, to user or internal network keeper as the means that all computers are made with central management.
S103, according to the virtual machine network interface card MAC Address, the virtual machine prestored in inquiry database The MAC Address of network interface card and the binding relationship of default IP, obtain the corresponding IP of MAC Address of the network interface card of the virtual machine.
The MAC Address of the network interface card of the virtual machine prestored in the server lookup database under cloud platform in control node With the binding relationship of default IP, wherein, the MAC Address of the network interface card of virtual machine can be with data with the binding relationship of default IP The form of table TABLE is saved in database, and database is present in the control node under cloud platform, specifically, can inquire about The tables of data of MAC Address and the binding relationship of default IP of the network interface card comprising virtual machine in database.
The MAC Address of the network interface card of the virtual machine for prestoring and the setting steps of the binding relationship of default IP can be with Referring to following examples, here is omitted.
, referring to following examples, here is omitted for the setting procedure of default IP.
It should be noted that the MAC Address and the binding relationship of default IP of the network interface card of the virtual machine stored in database Number more than or equal to need inquiry virtual machine network interface card MAC Address number.
S104, the corresponding IP of the MAC Address of the network interface card of the virtual machine is returned into the virtual machine, so as to the virtual machine By in the configuration file of the IP write-in virtual machines.
IP is returned to the virtual machine in calculate node by the server under cloud platform in control node, makes virtual function certainly The IP that dynamic acquisition is specified, virtual machine writes IP in the configuration file of virtual machine, specifically, can be by virtual machine internal Proxy module is by the configuration file of IP write-in virtual machines.Wherein, configuration file is the configuration information for recording virtual machine, The IP that virtual machine is then completed in the configuration file of IP address write-in virtual machine is set.
A kind of cloud platform virtual machine that the embodiment of the present application is provided obtains IP methods, due to being stored in database in advance Binding relationship of the MAC Address of the network interface card of virtual machine with default IP, by the binding relationship inquired about in database, can be quick IP corresponding with the MAC Address of the network interface card of virtual machine is obtained, and based on DHCP protocol, automatically can be returned to IP corresponding virtual Machine, therefore, virtual function automatically obtains corresponding IP, is added rapidly to business cluster, so as to overcome artificial setting virtually The low problem of machine IP efficiency.
In another embodiment of the application, as shown in Fig. 2 the network interface card of the virtual machine for prestoring MAC Address can set with the binding relationship of default IP according to following steps:
The MAC Address and default IP of S201, the network interface card of the acquisition virtual machine.
Wherein, the MAC Address of the network interface card of virtual machine is generated when virtual machine creating, is to be solidificated on network interface card to go here and there Physical address in row EEPROM, with uniqueness, default IP is that the status information selected in IP resource pools is idle The fixed IP of IP, i.e. assignment of allocation to virtual machine.
S202, the MAC Address of the network interface card of the virtual machine is bound with the default IP, generated binding relationship.
Binding refers to that the MAC Address of the network interface card of virtual machine is generated into mapping relations with default IP.Section is controlled under cloud platform Server in point binds the MAC Address of the network interface card of virtual machine and IP address, the MAC Address of the network interface card of virtual machine with it is default After IP bindings, it is easy to the MAC Address of the network interface card according to virtual machine to find the IP of corresponding virtual machine assignment of allocation.
S203, the binding relationship is saved in database.
Be saved in for binding relationship in the database in control node by the server under cloud platform in control node, in case The binding relationship is inquired about when needing.
In another embodiment of the application, as shown in figure 3, the setting process of the default IP, Ke Yiwei:
Status information is the virtual machine of the number M and IP to be allocated of idle IP in S301, the first IP resource pools of acquisition Number N, wherein, M and N is the natural number more than 0.
Wherein, IP resource pools are one group of IP set, carry out the size of regulation IP resource pools with IP scopes and start over position, IP resource pools are located in the database of cloud platform control node.The status information of IP includes idle and busy two in IP resource pools The state of kind.
S302, whether the M is judged more than or equal to the N, if it is, S303 is performed, if it is not, then performing S304。
If S303, the M are more than or equal to the N, N number of IP is selected as default IP from the idle IP.
If S304, the M are less than the N, new IP resource pools are created, as the 2nd IP resource pools, by described second IP resource pools are connected to form the 3rd IP resource pools with the first resource pond by router, from the 3rd IP resource pools Selection status information is idle N number of IP as default IP.
Wherein, the 2nd IP resource pools belong to different IP sections from an IP resource pools, are connected by router, can just make the Virtual machine communication in one IP resource pools and the 2nd IP resource pools.
Alternatively, in another embodiment of the application, after the default IP settings are completed, also include:
It is busy by the state information updating of the default IP.
After default IP settings are completed, can be closed in the generation binding of the MAC Address of default IP and the network interface card of virtual machine It is busy by the state information updating of default IP after system.
Alternatively, the virtual machine in virtual machine and configuration file that IP is not write in configuration file including having been written into IP's Virtual machine, wherein the IP having been written into the virtual machine of IP is different from the default IP.
Wherein, the virtual machine that IP is not write in configuration file refers to the virtual machine of new establishment, and the new virtual machine for creating does not set also Put IP, have been written into that the virtual machine of IP refers in configuration file IP has been set but IP is not disposed in the network IP resources pond of cluster Virtual machine, when needing to add the network IP resources pond in cluster, when virtual machine starts, it is necessary to update IP.
A kind of cloud platform virtual machine obtains the structural representation of IP devices disclosed in the embodiment of the present application, as shown in figure 4, bag Include:
First acquisition unit 401, for when virtual machine enabled instruction is received, being obtained from operating system and being pre-build Virtual machine corresponding with the enabled instruction IP bags, wherein, the IP bags include the network interface card of the virtual machine MAC ground Location.
Resolution unit 402, for after DHCP request instruction is received, parsing the IP bags, obtains the virtual machine The MAC Address of network interface card.
Query unit 403, for the MAC Address of the network interface card according to the virtual machine, prestores in inquiry database The MAC Address of the network interface card of the virtual machine and the binding relationship of default IP, obtain the MAC Address pair of the network interface card of the virtual machine The IP for answering.
Setting unit 404, for the corresponding IP of the MAC Address of the network interface card of the virtual machine to be returned into the virtual machine, with Toilet states virtual machine by the configuration file of the IP write-in virtual machines.
A kind of cloud platform virtual machine disclosed in the embodiment of the present application is obtained in IP devices, due to being deposited in database in advance The binding relationship of MAC Address and the default IP of the network interface card of virtual machine has been stored up, by the binding relationship inquired about in database, can be fast Speed obtains IP corresponding with the MAC Address of the network interface card of virtual machine, and based on DHCP protocol, IP can be returned into corresponding void automatically Plan machine, therefore, virtual function automatically obtains corresponding IP, is added rapidly to business cluster, empty so as to overcome artificial setting The low problem of plan machine IP efficiency.
It should be noted that a kind of cloud platform virtual machine obtains the unit in IP devices disclosed in the embodiment of the present application Specific work process, reference can be made to the embodiment of the method for corresponding diagram 1, here is omitted.
Alternatively, in another embodiment of the application, also including binding relationship generation unit, the binding relationship life Into unit, including:
Second obtains subelement, MAC Address and default IP for obtaining the network interface card of the virtual machine.
Binding subelement, for the MAC Address of the network interface card of the virtual machine to be bound with the default IP, generation Binding relationship.
Subelement is preserved, for the binding relationship to be saved in database.
Alternatively, in another embodiment of the application, also including default IP acquiring units, the default IP obtains single Unit, including
3rd obtains subelement, for obtaining number M that status information in an IP resource pools is idle IP and treating point The number N of the virtual machine with IP, wherein, M and N is the natural number more than 0.
First choice subelement, if being more than or equal to the N for the M, selects N number of IP to make from the idle IP It is default IP.
Second selection subelement, if being less than the N for the M, creates new IP resource pools, as the 2nd IP resources Pond, the 2nd IP resource pools are connected to form the 3rd IP resource pools with the first resource pond by router, from described N number of IP that status information is the free time is selected in 3rd IP resource pools as default IP.
Alternatively, the default IP acquiring units, also include:
Subelement is updated, for being busy by the state information updating of the default IP.
Alternatively, the virtual machine in virtual machine and configuration file that IP is not write in configuration file including having been written into IP's Virtual machine, wherein the IP having been written into the virtual machine of IP is different from the default IP.
It should be noted that the specific work process of above-mentioned unit, reference can be made to corresponding embodiment of the method, herein not Repeat again.
Professional and technical personnel can realize or use the present invention.To various modifications of these embodiments to the specialty of this area Be will be apparent for technical staff, generic principles defined herein can not depart from spirit of the invention or model In the case of enclosing, realize in other embodiments.Therefore, the present invention is not intended to be limited to the embodiments shown herein, And it is to fit to the most wide scope consistent with principles disclosed herein and features of novelty.

Claims (10)

1. a kind of cloud platform virtual machine obtains IP methods, it is characterised in that including:
When virtual machine enabled instruction is received, the void corresponding with the enabled instruction that acquisition pre-builds from operating system The IP bags of plan machine, wherein, the IP bags include the MAC Address of the network interface card of the virtual machine;
After DHCP request instruction is received, the IP bags are parsed, obtain the MAC Address of the network interface card of the virtual machine;
According to the MAC Address of the network interface card of the virtual machine, the MAC of the network interface card of the virtual machine prestored in inquiry database Address and the binding relationship of default IP, obtain the corresponding IP of MAC Address of the network interface card of the virtual machine;
The corresponding IP of the MAC Address of the network interface card of the virtual machine is returned into the virtual machine, so that the virtual machine is by the IP In writing the configuration file of the virtual machine.
2. method according to claim 1, it is characterised in that the MAC of the network interface card of the virtual machine for prestoring Address sets with the binding relationship of default IP according to following steps:
Obtain the MAC Address and default IP of the network interface card of the virtual machine;
The MAC Address of the network interface card of the virtual machine is bound with the default IP, binding relationship is generated;
The binding relationship is saved in database.
3. method according to claim 1, it is characterised in that the setting process of the default IP, including:
The number N of the virtual machine of number M and IP to be allocated that status information in an IP resource pools is idle IP is obtained, its In, M and N is the natural number more than 0;
If the M is more than or equal to the N, N number of IP is selected as default IP from the idle IP;
If the M is less than the N, create new IP resource pools, as the 2nd IP resource pools, will the 2nd IP resource pools and The first resource pond is connected to form the 3rd IP resource pools by router, and state letter is selected from the 3rd IP resource pools Cease is idle N number of IP as default IP.
4. method according to claim 3, it is characterised in that after the default IP settings are completed, also include:
It is busy by the state information updating of the default IP.
5. method according to claim 1, it is characterised in that the virtual machine includes not writing in configuration file the void of IP The virtual machine of IP is had been written into plan machine and configuration file, wherein the IP having been written into the virtual machine of IP is different from described presetting IP.
6. a kind of cloud platform virtual machine obtains IP devices, it is characterised in that including:
First acquisition unit, for when virtual machine enabled instruction is received, obtained from operating system pre-build with institute The IP bags of the corresponding virtual machine of enabled instruction are stated, wherein, the IP bags include the MAC Address of the network interface card of the virtual machine;
Resolution unit, for after DHCP request instruction is received, parsing the IP bags, obtains the network interface card of the virtual machine MAC Address;
Query unit, for the MAC Address of the network interface card according to the virtual machine, what is prestored in inquiry database is described virtual The MAC Address of the network interface card of machine and the binding relationship of default IP, obtain the corresponding IP of MAC Address of the network interface card of the virtual machine;
Setting unit, for the corresponding IP of the MAC Address of the network interface card of the virtual machine to be returned into the virtual machine, so as to the void Plan machine writes the IP in the configuration file of the virtual machine.
7. device according to claim 6, it is characterised in that also including binding relationship generation unit, the binding relationship Generation unit, including:
Second obtains subelement, MAC Address and default IP for obtaining the network interface card of the virtual machine;
Binding subelement, for the MAC Address of the network interface card of the virtual machine to be bound with the default IP, generation binding Relation;
Subelement is preserved, for the binding relationship to be saved in database.
8. device according to claim 6, it is characterised in that also including default IP acquiring units, the default IP is obtained Unit, including:
3rd obtains subelement, for number M and IP to be allocated that status information in the first IP resource pools of acquisition is idle IP Virtual machine number N, wherein, M and N is the natural number more than 0;
First choice subelement, if being more than or equal to the N for the M, N number of IP is selected as pre- from the idle IP If IP;
Second selection subelement, if being less than the N for the M, creates new IP resource pools, as the 2nd IP resource pools, The 2nd IP resource pools are connected to form the 3rd IP resource pools with the first resource pond by router, from the described 3rd N number of IP that status information is the free time is selected in IP resource pools as default IP.
9. device according to claim 8, it is characterised in that the default IP acquiring units, also includes:
Subelement is updated, for being busy by the state information updating of the default IP.
10. device according to claim 6, it is characterised in that the virtual machine includes not writing IP's in configuration file The virtual machine of IP is had been written into virtual machine and configuration file, wherein the IP having been written into the virtual machine of IP is different from described pre- If IP.
CN201710108775.4A 2017-02-27 2017-02-27 A kind of cloud platform virtual machine obtains IP method and devices Pending CN106911779A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710108775.4A CN106911779A (en) 2017-02-27 2017-02-27 A kind of cloud platform virtual machine obtains IP method and devices

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710108775.4A CN106911779A (en) 2017-02-27 2017-02-27 A kind of cloud platform virtual machine obtains IP method and devices

Publications (1)

Publication Number Publication Date
CN106911779A true CN106911779A (en) 2017-06-30

Family

ID=59209022

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710108775.4A Pending CN106911779A (en) 2017-02-27 2017-02-27 A kind of cloud platform virtual machine obtains IP method and devices

Country Status (1)

Country Link
CN (1) CN106911779A (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107332945A (en) * 2017-07-02 2017-11-07 郑州云海信息技术有限公司 A kind of virtual machine IP address acquisition methods and device
CN107370623A (en) * 2017-07-20 2017-11-21 郑州云海信息技术有限公司 A kind of method and device for realizing system installation
CN107707687A (en) * 2017-10-10 2018-02-16 郑州云海信息技术有限公司 A kind of method and apparatus of virtual machine IP address configuration
CN108347472A (en) * 2018-01-12 2018-07-31 网宿科技股份有限公司 Configuration method, Cloud Server, cloud platform and the readable storage medium storing program for executing of IP address
CN109347656A (en) * 2018-09-11 2019-02-15 郑州云海信息技术有限公司 A kind of method and system of fictitious host computer uplink network card configuration
CN110061921A (en) * 2019-04-17 2019-07-26 北京云杉世纪网络科技有限公司 A kind of cloud platform packet delivery method and system
CN111294373A (en) * 2018-12-07 2020-06-16 中国移动通信集团山东有限公司 Information management and control system based on mobile industry cloud desktop architecture
CN111427662A (en) * 2020-03-23 2020-07-17 深信服科技股份有限公司 Method for allocating IP addresses of virtual machines, terminal equipment and DHCP server
CN113709200A (en) * 2020-05-21 2021-11-26 阿里巴巴集团控股有限公司 Method and device for establishing communication connection
CN115333933A (en) * 2022-08-11 2022-11-11 北京蔚领时代科技有限公司 Automatic management method, medium and equipment for server on rack in machine room

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102710814A (en) * 2012-06-21 2012-10-03 奇智软件(北京)有限公司 Method and device for controlling Internet protocol (IP) address of virtual machine
CN102932498A (en) * 2012-10-24 2013-02-13 广州杰赛科技股份有限公司 Virtual machine internet protocol (IP) resource management method of cloud computing platform
CN103037023A (en) * 2012-11-23 2013-04-10 中国电信股份有限公司云计算分公司 Operation method of virtual machine system and virtual machine system
US20140064104A1 (en) * 2012-08-30 2014-03-06 Cisco Technology, Inc. Host Detection by Top of Rack Switch Devices in Data Center Environments
CN103685608A (en) * 2013-12-24 2014-03-26 北京启明星辰信息技术股份有限公司 Method and device for automatically configuring IP (Internet Protocol) address of security virtual machine
CN104683491A (en) * 2013-11-29 2015-06-03 铁道部信息技术中心 Method and system for obtaining Internet protocol addresses of virtual machines

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102710814A (en) * 2012-06-21 2012-10-03 奇智软件(北京)有限公司 Method and device for controlling Internet protocol (IP) address of virtual machine
US20140064104A1 (en) * 2012-08-30 2014-03-06 Cisco Technology, Inc. Host Detection by Top of Rack Switch Devices in Data Center Environments
CN102932498A (en) * 2012-10-24 2013-02-13 广州杰赛科技股份有限公司 Virtual machine internet protocol (IP) resource management method of cloud computing platform
CN103037023A (en) * 2012-11-23 2013-04-10 中国电信股份有限公司云计算分公司 Operation method of virtual machine system and virtual machine system
CN104683491A (en) * 2013-11-29 2015-06-03 铁道部信息技术中心 Method and system for obtaining Internet protocol addresses of virtual machines
CN103685608A (en) * 2013-12-24 2014-03-26 北京启明星辰信息技术股份有限公司 Method and device for automatically configuring IP (Internet Protocol) address of security virtual machine

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107332945A (en) * 2017-07-02 2017-11-07 郑州云海信息技术有限公司 A kind of virtual machine IP address acquisition methods and device
CN107370623A (en) * 2017-07-20 2017-11-21 郑州云海信息技术有限公司 A kind of method and device for realizing system installation
CN107707687B (en) * 2017-10-10 2021-07-30 郑州云海信息技术有限公司 Method and device for configuring IP address of virtual machine
CN107707687A (en) * 2017-10-10 2018-02-16 郑州云海信息技术有限公司 A kind of method and apparatus of virtual machine IP address configuration
CN108347472A (en) * 2018-01-12 2018-07-31 网宿科技股份有限公司 Configuration method, Cloud Server, cloud platform and the readable storage medium storing program for executing of IP address
CN109347656A (en) * 2018-09-11 2019-02-15 郑州云海信息技术有限公司 A kind of method and system of fictitious host computer uplink network card configuration
CN109347656B (en) * 2018-09-11 2022-02-18 郑州云海信息技术有限公司 Method and system for configuring virtual host uplink network card
CN111294373A (en) * 2018-12-07 2020-06-16 中国移动通信集团山东有限公司 Information management and control system based on mobile industry cloud desktop architecture
CN110061921A (en) * 2019-04-17 2019-07-26 北京云杉世纪网络科技有限公司 A kind of cloud platform packet delivery method and system
CN111427662A (en) * 2020-03-23 2020-07-17 深信服科技股份有限公司 Method for allocating IP addresses of virtual machines, terminal equipment and DHCP server
CN111427662B (en) * 2020-03-23 2024-04-09 深信服科技股份有限公司 IP address allocation method of virtual machine, terminal equipment and DHCP server
CN113709200A (en) * 2020-05-21 2021-11-26 阿里巴巴集团控股有限公司 Method and device for establishing communication connection
CN113709200B (en) * 2020-05-21 2023-11-28 阿里巴巴集团控股有限公司 Method and device for establishing communication connection
CN115333933A (en) * 2022-08-11 2022-11-11 北京蔚领时代科技有限公司 Automatic management method, medium and equipment for server on rack in machine room
CN115333933B (en) * 2022-08-11 2024-04-19 北京蔚领时代科技有限公司 Automatic management method, medium and equipment for servers on machine room

Similar Documents

Publication Publication Date Title
CN106911779A (en) A kind of cloud platform virtual machine obtains IP method and devices
CN103997414B (en) Generate method and the network control unit of configuration information
CN106375176B (en) A kind of method of physical machine access cloud platform
CN102571698B (en) Access authority control method, system and device for virtual machine
CN108924268B (en) Container cloud service system and pod creation method and device
CN106031116B (en) A kind of correlating method, the apparatus and system of NS and VNF
WO2018205325A1 (en) Method and system for use in constructing content delivery network platform on heterogeneous resources
CN103078965B (en) The IP address management method of virtual machine
CN103152200B (en) Virtual machine migration method, switch, network management device and network system
CN109981493B (en) Method and device for configuring virtual machine network
CN103026660A (en) Network policy configuration method, management device and network management centre device
CN104468574A (en) Dynamic IP address acquisition method, system and device for virtual machines
CN102148879A (en) Port mapping method and device and communication system
CN103534987B (en) For the method and system of configuration virtual network configuration
CN104407913A (en) Method for implementing two-wire access through virtual machine with single network card
CN106612196B (en) Obtain the method and device of resource
CN101951325A (en) Network terminal configuration system based on automatic discovery and configuration method thereof
CN107147580A (en) The method and communication system of a kind of tunnel building
CN101321054B (en) Method and device for automatically preventing imitation of network side media access control address
CN104539632A (en) Programmable network equipment managing and controlling method based on virtual address spaces
CN104506403B (en) A kind of virtual network management method for supporting multi-stage isolation
CN107276826A (en) A kind of capacitor network collocation method and device
CN107809386A (en) IP address conversion method, routing device and communication system
CN109936490A (en) Virtual home network share method and system based on VXLAN and OpenFlow
CN105827496B (en) Manage the method and device of PE equipment

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20170630