CN106790767A - A kind of method based on the automatic distribution virtual machine IP of VMware virtualizations - Google Patents

A kind of method based on the automatic distribution virtual machine IP of VMware virtualizations Download PDF

Info

Publication number
CN106790767A
CN106790767A CN201710093166.6A CN201710093166A CN106790767A CN 106790767 A CN106790767 A CN 106790767A CN 201710093166 A CN201710093166 A CN 201710093166A CN 106790767 A CN106790767 A CN 106790767A
Authority
CN
China
Prior art keywords
virtual machine
vmware
network
dhcp
virtualizations
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
CN201710093166.6A
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.)
Shandong Inspur Cloud Service Information Technology Co Ltd
Original Assignee
Shandong Inspur Cloud Service 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 Shandong Inspur Cloud Service Information Technology Co Ltd filed Critical Shandong Inspur Cloud Service Information Technology Co Ltd
Priority to CN201710093166.6A priority Critical patent/CN106790767A/en
Publication of CN106790767A publication Critical patent/CN106790767A/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
    • H04L61/5014Internet protocol [IP] addresses using dynamic host configuration protocol [DHCP] or bootstrap protocol [BOOTP]
    • 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
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/618Details of network addresses
    • H04L2101/622Layer-2 addresses, e.g. medium access control [MAC] addresses

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Small-Scale Networks (AREA)

Abstract

The present invention discloses a kind of method based on the automatic distribution virtual machine IP of VMware virtualizations, it is related to virtualize field of cloud calculation, by SDK and vmware tools, the instruction of the establishment virtual network that application system sends is received in systems, data query is carried out first, the addition of virtual network and the startup of correspondence DHCP service are performed after inquiry, if data query does not find the corresponding DHCP Server of current network, the establishment of DHCP Server servers is then carried out by system-based template, and initialize DHCP service, then the action for doing the addition network information.The present invention runs DHCP processes by the way of NameSpace, greatlys save the service condition of resource;The payment speed and the efficiency of management of virtual machine, so as to reduce the time of user's wait, save human cost and substantial contribution under quickening VMware platforms.

Description

A kind of method based on the automatic distribution virtual machine IP of VMware virtualizations
Technical field
It is specifically a kind of virtual based on the automatic distribution of VMware virtualizations the present invention relates to virtualize field of cloud calculation The method fuyonggaoya of machine IP.
Background technology
In the epoch of current cloud computing, various Intel Virtualization Technologies, the relatively more representational IAAS that increases income are occurred in that Platform has:CloudStack, OpenStack, Eucalyptus, OpenNebula etc..VMware Intel Virtualization Technologies are ripe and steady It is fixed to be generally acknowledged by industry.However, KVM, XEN etc. increase income, Intel Virtualization Technology there has also been fast development, either in function and property All increasingly ripe and stabilizations can be gone up.Herein on basis, cloud computing development surges forward, and all big enterprises research and develop release cloud meter one after another Calculate product.
All big enterprises are different to the relevant way to manage of cloud computing product, service mode and market orientation, relatively common Have public cloud, private clound, mixed cloud, industry cloud, government affairs cloud etc., for different demands, each manufacturer realizes technology It is also different, the way to manage of product and the occupation mode of user also change.In cloud computing era user purchase Cloud product afterwards, O&M mode is different from traditional IT O&M modes completely, and the operation of cloud computing era user is real-time, A new demand is thus derived, how to have accomplished fast and accurately to complete virtual machine IP configuration works.Traditional IT O&Ms Epoch can be managed by way of DHCP, but cannot accomplish payment in real time, and the delivery time is long, and scale is big After do not allow manageability, error rate is high.
The content of the invention
Demand and weak point of the present invention for the development of current technology, there is provided one kind is based on automatic point of VMware virtualizations Method with virtual machine IP.
A kind of method based on the automatic distribution virtual machine IP of VMware virtualizations of the present invention, solves above-mentioned technical problem The technical scheme of use is as follows:A kind of method based on the automatic distribution virtual machine IP of VMware virtualizations, by SDK and Vmware-tools, receives the instruction of the establishment virtual network that application system sends in systems, and data query is carried out first, looks into The addition of virtual network and the startup of correspondence DHCP service are performed after inquiry, the action of virtual network information is then added.
Preferably, after the instruction of the establishment virtual network that application system sends is received in systems, data query is carried out, The current network ID for creating virtual network of inquiry whether there is in database, and whether corresponding DHCP service starts, if net Network ID and DHCP service are all present, then directly create corresponding NameSpace and start DHCP service;If not existing, lead to Crossing system-based module carries out the establishment of DHCP service virtual machine and initializes DHCP service, then adds virtual network and starts DHCP service.
Preferably, whether application system have sent the request for creating virtual machine, judge there is specified IP in the parameter submitted to, if There is specified IP then to perform the action for creating virtual machine;The MAC Address of current virtual machine is obtained after establishment virtual machine by interface, is obtained Corresponding data is written in the database file of DHCP server side after taking MAC Address, is now recorded and is started in application system Virtual machine.
Preferably, if application system sends creates no submission IP address in virtual machine request, by interface in application Unappropriated IP is inquired about in the database of system, and distributes to corresponding virtual machine.
Preferably, when deletion action is carried out to virtual machine, the network information related to current virtual machine is inquired about first, and Corresponding IP information is deleted in corresponding DHCP service database, in release IP and registration database.
A kind of method based on the automatic distribution virtual machine IP of VMware virtualizations of the present invention has compared with prior art Some beneficial effects are:The present invention can be carried out the increasing of virtual machine IP address, deleted, changed, looking into work by the pre-stored data of inquiry Make, it is adaptable to which the Intel Virtualization Technology such as VMware realizes the application scenarios that virtual machine automation is paid;
In the present invention, network data is managed by data syn-chronization, and the database of DHCP service only needs to receive upper platform The data of request are stored;DHCP processes are run by the way of NameSpace, the use feelings of resource are greatlyd save Condition;Manually-operated cumbersome, the payment speed and the efficiency of management of virtual machine, solution under quickening VMware platforms can be reduced The problem and the rental period expired problem for bringing virtual machine IP to discharge of IP cannot be automatically distributed under VMware platforms;So as to reduce The time that user waits, save human cost and substantial contribution.
Brief description of the drawings
Accompanying drawing 1 is the schematic block diagram of the method for the automatic distribution virtual machine IP;
Accompanying drawing 2 is the flow chart of establishment processing procedure of the invention;
Accompanying drawing 3 is the flow chart of the processing procedure of present invention release IP.
Specific embodiment
To make the object, technical solutions and advantages of the present invention become more apparent, below in conjunction with specific embodiment, to this hair A kind of bright method based on the automatic distribution virtual machine IP of VMware virtualizations is further described.
For existing demand and the situation of current platform, the present invention proposes a kind of based on the automatic distribution of VMware virtualizations The method of virtual machine IP, its main contents include that the instruction of the establishment virtual network that reception application system sends, first in systems Advanced row data query, performs the addition of virtual network and the startup of correspondence DHCP service after inquiry, be then added virtual The action of the network information.Whole operation process of the present invention is completed by means of SDK and vmware-tools, if kvm is then borrowed Help qemu-guest or cloud-init to complete.
Embodiment 1:
Described in the present embodiment the step of a kind of method based on the automatic distribution virtual machine IP of VMware virtualizations, specific execution such as Under:
1)After receiving the instruction of the establishment virtual network that application system sends in systems, data query is carried out, inquiry is current The network ID of virtual network is created with the presence or absence of in database, and whether corresponding DHCP service starts, if network ID and DHCP service is all present, then directly create corresponding NameSpace and start DHCP service;If not existing, by system Basic module carries out the establishment of DHCP service virtual machine and initializes DHCP service, then adds virtual network and starts DHCP clothes Business;As shown in Figure 1;
2)Step 1)On the premise of, whether application system have sent the request for creating virtual machine, judge there is finger in the parameter submitted to Determine IP, the action for creating virtual machine is performed if having specified IP;The MAC of current virtual machine is obtained after establishment virtual machine by interface , be written to corresponding data in the database file of DHCP server side after obtaining MAC Address by address, is now recorded in application system And start virtual machine;As shown in Figure 2;
3)Step 2)In, if application system sends creates no submission IP address in virtual machine request, by interface in application Unappropriated IP is inquired about in the database of system, and distributes to corresponding virtual machine.By above-mentioned steps, completed after running succeeded The assigning process of whole virtual machine IP.
In the method for the automatic distribution virtual machine IP, when deletion action is carried out to virtual machine, inquire about first and current void The related network information of plan machine, and corresponding IP information is deleted in corresponding DHCP service database, discharge IP and reference numerals According in storehouse;Whole treatment terminates;As shown in Figure 3.
The major way of automatic distribution IP sends a DHCP DISCOVER in a network while virtual machine starts Broadcast packet, make requests on IP.When the DHCP Servers in network receive the information of request IP of virtual machine, oneself is inquired about Database in whether have the IP that can be distributed, if having by this IP mark, and broadcast a DHCP offer bag.In this bag Comprising:The IP of client computer, subnet mask, host name and lease.After virtual machine receives first DHCP offer bag, and extensively A Bao Wen of DHCP request is broadcast in current network, the service comprising virtual machine is indicated in the message(IP), DHCP Service end(Server)Sign is checked, to determine whether the IP address that oneself is provided is chosen by virtual machine, if client computer receives IP, The Dynamic Host Configuration Protocol server for then sending IP address retains the address.Next IP leases request is provided if refusal.Last DHCP Server confirms IP leases and sends a DHCP ack/DHCP nack bag.After virtual machine receives information, IP is just configured with Address, completes this initial work.The management of IP leases, lease is Infinite Time, follows the life cycle pipe of virtual machine Reason, if can so ensure virtual machine in prolonged shutdown process, IP address can be binding all the time, prevent virtual IP address is expired after machine long shutdown.
Embodiment 2:
For virtual machine instance is created in cloud platform system, using the method for automatic distribution virtual machine IP this implementation described, its tool Body step is as follows:
1)After logging in system by user, the list of the virtual network of establishment is filled in by the page, and submit request to create to, for example, created Virtual network VLAN ID be 2001, carry out data query after submission information, inquire about whether current VMware platforms have corresponding DHCP service, if current DHCP service information is present, directly creates corresponding in corresponding DHCP service NameSpace, such as dhcp-ax01-vlan2001 simultaneously start DHCP service;If there is no current DHCP service in database The network information, then can call the creation method of virtual machine and carry out the deployment of DHCP service after submission form, be deployed through customization DHCP modules start and bind the corresponding network information, or start a virtual machine by remote scripting by way of enter Row initialization operation.
2) in step 1)On the premise of, carried in the lump after CPU, MEM, DISK, NET information that virtual machine is chosen from the page Request to create is handed over, if the IP information specified is 192.168.1.1, learns that current IP is in unallocated shape by inquiring about data State, then distribute the IP to current virtual machine;The mac address information of current virtual machine is obtained by interface, together with IP information one And be stored in the middle of the database file of DHCP service, the startup of virtual machine is completed, and return to the network information of virtual machine to platform In system, while in recorded database.Be recorded after the completion of all of operation note in database, if operation failure, passed through The recording mark of database just can remove the data message deposited in DHCP service.
3)Step 1)、2)On the premise of, the processing procedure of release virtual machine IP is, by the pre-stored data of inquiry, to enter The increasing of row virtual machine IP address, delete, change, looking into work;When deletion action is carried out to virtual machine, current virtual is obtained from database The network information corresponding relation of machine, including the network ID of virtual machine, virtual machine title and IP, and delete right in DHCP service The data relationship answered.
Above-mentioned specific embodiment is only specific case of the invention, and scope of patent protection of the invention is included but is not limited to Above-mentioned specific embodiment, any person of an ordinary skill in the technical field that meet claims of the present invention and any The appropriate change or replacement done to it, should all fall into scope of patent protection of the invention.

Claims (5)

1. a kind of method based on the automatic distribution virtual machine IP of VMware virtualizations, it is characterised in that by SDK and Vmware-tools, receives the instruction of the establishment virtual network that application system sends in systems, and data query is carried out first, looks into The addition of virtual network and the startup of correspondence DHCP service are performed after inquiry, the action of virtual network information is then added.
2. a kind of based on the automatic method for distributing virtual machine IP of VMware virtualizations according to claim 1, it is characterised in that After receiving the instruction of the establishment virtual network that application system sends in systems, data query is carried out, inquiry is current to create empty The network ID of plan network whether there is in database, and whether corresponding DHCP service starts, if network ID and DHCP service All exist, then directly create corresponding NameSpace and start DHCP service;If not existing, by system-based module Carry out the establishment of DHCP service virtual machine and initialize DHCP service, then add virtual network and start DHCP service.
3. a kind of based on the automatic method for distributing virtual machine IP of VMware virtualizations according to claim 2, it is characterised in that Whether application system have sent the request for creating virtual machine, judge there is specified IP in the parameter submitted to, be performed if having specified IP Create the action of virtual machine;The MAC Address of current virtual machine is obtained after establishment virtual machine by interface, will after acquisition MAC Address Corresponding data is written in the database file of DHCP server side, and virtual machine is now recorded and started in application system.
4. a kind of based on the automatic method for distributing virtual machine IP of VMware virtualizations according to claim 3, it is characterised in that If application system sends creates no submission IP address in virtual machine request, looked into the database of application system by interface Unappropriated IP is ask, and distributes to corresponding virtual machine.
5. a kind of based on the automatic method for distributing virtual machine IP of VMware virtualizations according to claim 4, it is characterised in that When deletion action is carried out to virtual machine, the network information related to current virtual machine is inquired about first, and in corresponding DHCP clothes Corresponding IP information is deleted in business database, in release IP and registration database.
CN201710093166.6A 2017-02-21 2017-02-21 A kind of method based on the automatic distribution virtual machine IP of VMware virtualizations Pending CN106790767A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710093166.6A CN106790767A (en) 2017-02-21 2017-02-21 A kind of method based on the automatic distribution virtual machine IP of VMware virtualizations

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710093166.6A CN106790767A (en) 2017-02-21 2017-02-21 A kind of method based on the automatic distribution virtual machine IP of VMware virtualizations

Publications (1)

Publication Number Publication Date
CN106790767A true CN106790767A (en) 2017-05-31

Family

ID=58958428

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710093166.6A Pending CN106790767A (en) 2017-02-21 2017-02-21 A kind of method based on the automatic distribution virtual machine IP of VMware virtualizations

Country Status (1)

Country Link
CN (1) CN106790767A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107741874A (en) * 2017-10-12 2018-02-27 武汉中地数码科技有限公司 A kind of GIS clouds virtual machine automatically creates method and system
CN108989481A (en) * 2018-07-26 2018-12-11 郑州云海信息技术有限公司 A kind of method and apparatus automatically configuring IP address for virtual machine
CN110377232A (en) * 2019-07-19 2019-10-25 苏州浪潮智能科技有限公司 A kind of method, apparatus and system for disposing distributed storage cluster
CN115314466A (en) * 2022-05-06 2022-11-08 保升(中国)科技实业有限公司 Operation and maintenance perception technology based on IP/E1 network

Citations (2)

* 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
CN105635332A (en) * 2015-12-21 2016-06-01 国云科技股份有限公司 Method for multiple virtual machines to share IP of single external network

Patent Citations (2)

* 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
CN105635332A (en) * 2015-12-21 2016-06-01 国云科技股份有限公司 Method for multiple virtual machines to share IP of single external network

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107741874A (en) * 2017-10-12 2018-02-27 武汉中地数码科技有限公司 A kind of GIS clouds virtual machine automatically creates method and system
CN107741874B (en) * 2017-10-12 2021-05-14 武汉中地数码科技有限公司 Automatic creating method and system for GIS cloud virtual machine
CN108989481A (en) * 2018-07-26 2018-12-11 郑州云海信息技术有限公司 A kind of method and apparatus automatically configuring IP address for virtual machine
CN110377232A (en) * 2019-07-19 2019-10-25 苏州浪潮智能科技有限公司 A kind of method, apparatus and system for disposing distributed storage cluster
CN115314466A (en) * 2022-05-06 2022-11-08 保升(中国)科技实业有限公司 Operation and maintenance perception technology based on IP/E1 network

Similar Documents

Publication Publication Date Title
US11714671B2 (en) Creating virtual machine groups based on request
CN106301829B (en) A kind of method and apparatus of network service dilatation
EP3471345B1 (en) Sla-based resource allocation method and nfvo
CN106790767A (en) A kind of method based on the automatic distribution virtual machine IP of VMware virtualizations
WO2018059222A1 (en) File slice uploading method and apparatus, and cloud storage system
RU2683630C2 (en) Method for update of nsd network service descriptor and device
US11687354B2 (en) Virtual machine management using onboarding operations and openstack control
CN105912389B (en) The virtual machine (vm) migration system under mixing cloud environment is realized based on data virtualization
WO2020238891A1 (en) Method and device for leasing physical host, cloud platform, and readable storage medium
CN103516547B (en) A kind of network parameter distribution method and device
JP2018523434A (en) Network service life cycle management method and device
CN105103507A (en) Network function virtualization method and device
WO2014169870A1 (en) Virtual network element automatic loading and virtual machine ip address acquisition method and system, and storage medium
WO2014063463A1 (en) Method, device and physical host for managing physical network card
KR102022441B1 (en) Hardware Acceleration Methods and Related Devices
CN106326226B (en) The method and system of log-on data library service in a kind of public cloud
CN108390956A (en) A kind of method and system for virtual machine configuration internet protocol address
CN106933648A (en) For the method and system of multi-tenant container resource management
CN109561054A (en) A kind of data transmission method, controller and access device
WO2017035738A1 (en) Resource management method and device
CN103207965A (en) Method and device for License authentication in virtual environment
CN104735176A (en) PXE booting method and device and server single board
CN104793981B (en) A kind of online snapshot management method and device of cluster virtual machine
WO2017185992A1 (en) Method and apparatus for transmitting request message
CN107454177A (en) The dynamic realizing method of network service

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

Application publication date: 20170531

RJ01 Rejection of invention patent application after publication