CN114760269A - Virtual machine address allocation method, device and storage medium - Google Patents

Virtual machine address allocation method, device and storage medium Download PDF

Info

Publication number
CN114760269A
CN114760269A CN202210266411.XA CN202210266411A CN114760269A CN 114760269 A CN114760269 A CN 114760269A CN 202210266411 A CN202210266411 A CN 202210266411A CN 114760269 A CN114760269 A CN 114760269A
Authority
CN
China
Prior art keywords
virtual machine
address information
configuration address
information
virtual
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.)
Granted
Application number
CN202210266411.XA
Other languages
Chinese (zh)
Other versions
CN114760269B (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.)
Sangfor Technologies Co Ltd
Original Assignee
Sangfor Technologies 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 Sangfor Technologies Co Ltd filed Critical Sangfor Technologies Co Ltd
Priority to CN202210266411.XA priority Critical patent/CN114760269B/en
Publication of CN114760269A publication Critical patent/CN114760269A/en
Application granted granted Critical
Publication of CN114760269B publication Critical patent/CN114760269B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/70Virtual switches
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45595Network integration; Enabling network access in virtual machine instances

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Small-Scale Networks (AREA)

Abstract

The invention provides a virtual machine address allocation method, a virtual machine address allocation device and a storage medium, wherein the method comprises the following steps: after the corresponding virtual machine is started, receiving a discovery message transmitted by the virtual machine forwarded to the logic service process by the virtual switch; the virtual machine and the service node are bound in advance; the logical service process is pre-constructed; responding to the discovery message, and sending the predicted configuration address information to the virtual machine by the logic service process according to a preset program, so that the virtual machine can write the configuration address information into the virtual network card; the configuration address information is calculated by the server according to a plurality of pieces of configuration address information which are acquired in advance and a plurality of pieces of configuration address information which respectively correspond to the relevant information of the virtual machine and the local storage position, and then configured to the local. The scheme improves the efficiency of virtual machine address allocation.

Description

Virtual machine address allocation method, device and storage medium
Technical Field
The embodiment of the invention relates to the technical field of internet, in particular to a virtual machine address allocation method, a virtual machine address allocation device and a storage medium.
Background
In a traditional cloud network environment, the allocation of addresses of virtual machines, such as Internet Protocol (IP) addresses, generally refers to that each virtual machine sends a request to a Dynamic Host Configuration Protocol (dhcp) server, and then the dhcp server feeds back a corresponding virtual machine Address to implement the allocation of the virtual machine Address, but an existing virtual machine Address allocation method has the following defects:
1. when the dhcp server is physically deployed, the dhcp relay is configured, so that the deployment is complex, and the address allocation efficiency is reduced. 2. When the dhcpv6 server performs ip-duid binding, the server needs to invade the inside of the virtual machine to obtain the duid, and the address allocation efficiency is also reduced. 3. When the single point of the dhcp server fails, all the ip functions configured by the virtual machines will fail, and the address allocation efficiency is also reduced.
Disclosure of Invention
The virtual machine address allocation method, the virtual machine address allocation device and the storage medium can improve the virtual machine address allocation efficiency.
The technical scheme of the invention is realized as follows:
the embodiment of the invention provides a virtual machine address allocation method, which is applied to any service node in a server in a cloud network environment and comprises the following steps:
after the corresponding virtual machine is started, receiving a discovery message transmitted by the virtual machine forwarded to the logic service process by the virtual switch; the virtual machine and the service node are bound in advance; the logical service process is pre-constructed;
responding to the discovery message, and sending the predicted configuration address information to the virtual machine by the logic service process according to a preset program, so that the virtual machine can write the configuration address information into the virtual network card; wherein the content of the first and second substances,
the configuration address information is calculated by the server according to a plurality of pieces of configuration address information which are acquired in advance and a plurality of pieces of configuration address information which respectively correspond to the relevant information of the virtual machine and the local storage position, and then configured to the local.
In the above scheme, after the corresponding virtual machine is started and before the discovery packet sent by the virtual machine forwarded to the logical service process by the virtual switch is received, the method further includes:
constructing a logic service process locally;
and receiving the configuration address information configured to the local by the server, and issuing the configuration address information to the bottom data surface of the logic service process.
In the above scheme, the sending, by the logic service process, the predicted configuration address information to the virtual machine according to the predetermined program in response to the discovery packet includes:
responding to the discovery message, and sending a notification confirmation message to the virtual machine by the logic service process according to a preset program;
and intercepting a request message fed back by a virtual machine response notification confirmation message in a channel of the virtual switch, responding the request message by the logic service process, converting the configuration address information into a response message, and sending the response message to the virtual machine.
In the above solution, the configuring the address information includes: IPv4 address information or IPv6 address information, and mask information, prefix length, gateway information, domain name system information.
In the above scheme, the related information includes: operation location information and operation policy information.
The embodiment of the invention also provides a virtual address allocation method, which is applied to a virtual machine in a cloud network environment and comprises the following steps:
sending a discovery message to the virtual switch after starting;
receiving a service node response discovery message, and feeding back configuration address information by a logic service process of the service node according to a preset program; the configuration address information is calculated by the server according to a plurality of pieces of configuration address information which are acquired in advance and a plurality of pieces of configuration address information which respectively correspond to the relevant information of the virtual machine and the local storage position, and then is configured to the service node; the discovery message is forwarded to the service node by the virtual switch;
and writing the configuration address information into the virtual network card.
In the above scheme, when receiving the service node response discovery message, the logical service process of the service node feeds back the configuration address information according to the predetermined program, which includes
Receiving a notification confirmation message fed back by the logic service process when the service node responds to the discovery message;
responding to the notification confirmation message, and broadcasting a request message to the virtual switch;
and receiving a response message fed back by the logic service process of the service node, wherein the response message is converted by the logic service process according to the configuration address information.
The embodiment of the invention also provides a virtual machine address allocation method, which is applied to a server in a cloud network environment and comprises the following steps:
receiving a plurality of configuration address information sent by a plurality of user nodes;
calculating according to the relevant information of a plurality of virtual machines corresponding to a plurality of configuration address information and the storage positions of a plurality of service nodes, and respectively configuring the plurality of configuration address information to the plurality of service nodes; and sending the predicted configuration address information to the corresponding virtual machine by the logic service process of each service node according to a predetermined program.
In the above scheme, the related information includes: operating position information and operating strategy information;
calculating according to the relevant information of a plurality of virtual machines corresponding to a plurality of pieces of configuration address information and the storage positions of a plurality of service nodes, and respectively configuring the plurality of pieces of configuration address information to the plurality of service nodes, wherein the method comprises the following steps:
calculating according to the running position information and the running strategy information of the virtual machines corresponding to the configuration address information and the storage positions of the service nodes to obtain the binding relationship between each virtual machine and the corresponding service node;
and configuring the configuration address information to the service node bound by the corresponding virtual machine.
An embodiment of the present invention further provides a virtual machine address allocation apparatus, which is applied to any service node in a server in a cloud network environment, and includes:
the receiving unit is used for receiving a discovery message which is transmitted to the virtual machine of the logic service process by the virtual switch after the corresponding virtual machine is started; the virtual machine and the service node are bound in advance; the logical service process is pre-constructed;
the sending unit is used for responding to the discovery message, and the logic service process sends the predicted configuration address information to the virtual machine according to a preset program, so that the virtual machine can write the configuration address information into the virtual network card; wherein the content of the first and second substances,
the configuration address information is calculated by the server according to a plurality of pieces of configuration address information which are acquired in advance and a plurality of pieces of configuration address information which respectively correspond to the relevant information of the virtual machine and the local storage position, and then configured to the local.
An embodiment of the present invention further provides a virtual address allocation apparatus, which is applied to a virtual machine in a cloud network environment, and includes:
the second sending unit is used for sending the discovery message to the virtual switch after starting;
the second receiving unit is used for receiving the configuration address information fed back by the logic service process of the service node according to a preset program in response to the discovery message; the configuration address information is calculated by the server according to a plurality of pieces of configuration address information which are acquired in advance and a plurality of pieces of configuration address information which respectively correspond to the relevant information of the virtual machine and the local storage position, and then is configured to the service node; the discovery message is forwarded to the service node by the virtual switch;
and the first configuration unit is used for writing the configuration address information into the virtual network card.
The embodiment of the present invention further provides a virtual machine address allocation apparatus, which is applied to a server in a cloud network environment, and includes:
a third receiving unit, configured to receive multiple pieces of configuration address information sent by multiple user nodes;
the second configuration unit is used for calculating according to the relevant information of the virtual machines corresponding to the configuration address information and the storage positions of the service nodes, and respectively configuring the configuration address information to the service nodes; and sending the predicted configuration address information to the corresponding virtual machine by the logic service process of each service node according to a predetermined program.
The embodiment of the invention also provides a virtual machine address allocation device, which comprises a first memory and a first processor, wherein the first memory stores a computer program capable of running on the first processor, and the first processor realizes the steps in the method at the service node side when executing the program.
Embodiments of the present invention further provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a first processor, implements steps in a service node side method.
The embodiment of the invention also provides a virtual machine address allocation device, which comprises a second memory and a second processor, wherein the second memory stores a computer program capable of running on the second processor, and the second processor implements the steps in the virtual machine side method when executing the program.
Embodiments of the present invention also provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a second processor, implements the steps in the virtual machine-side method.
The embodiment of the invention also provides a virtual machine address allocation device, which comprises a third memory and a third processor, wherein the third memory stores a computer program capable of running on the third processor, and the third processor implements the steps in the server-side method when executing the program.
Embodiments of the present invention also provide a computer-readable storage medium, on which a computer program is stored, which, when executed by a third processor, implements the steps in the server-side method.
In the embodiment of the invention, after the corresponding virtual machine is started, a discovery message transmitted by the virtual machine forwarded to the logic service process by the virtual switch is received; the virtual machine and the service node are bound in advance; the logical service process is pre-constructed; responding to the discovery message, and sending the predicted configuration address information to the virtual machine by the logic service process according to a preset program, so that the virtual machine can write the configuration address information into the virtual network card; the configuration address information is calculated by the server according to a plurality of pieces of configuration address information which are acquired in advance and a plurality of pieces of configuration address information which respectively correspond to the relevant information of the virtual machine and the local storage position, and then configured to the local. Because the logic service process in the service node in the scheme replaces the function of a deployed physical server, and each virtual machine in the scheme has a corresponding service node to allocate the configuration address information, the allocation of the configuration address cannot be delayed due to the damage of a certain service node, and meanwhile, the non-invasiveness is realized, so that the address allocation efficiency of the virtual machine is improved.
Drawings
Fig. 1 is an optional flowchart of a virtual machine address allocation method according to an embodiment of the present invention;
fig. 2 is a schematic diagram illustrating an optional effect of the virtual machine address allocation method according to the embodiment of the present invention;
fig. 3 is a schematic diagram illustrating an optional effect of the virtual machine address allocation method according to the embodiment of the present invention;
fig. 4 is a schematic diagram illustrating an optional effect of the virtual machine address allocation method according to the embodiment of the present invention;
fig. 5 is a schematic diagram illustrating an optional effect of the virtual machine address allocation method according to the embodiment of the present invention;
fig. 6 is a schematic diagram illustrating an optional effect of the virtual machine address allocation method according to the embodiment of the present invention;
fig. 7 is an alternative flowchart of a virtual machine address allocation method according to an embodiment of the present invention;
fig. 8 is an alternative flowchart of a virtual machine address allocation method according to an embodiment of the present invention;
fig. 9 is an alternative flowchart of a virtual machine address allocation method according to an embodiment of the present invention;
fig. 10 is an interaction diagram of a virtual machine address allocation method according to an embodiment of the present invention;
fig. 11 is a first schematic structural diagram of a virtual machine address allocation apparatus according to an embodiment of the present invention;
fig. 12 is a first hardware entity diagram of an apparatus for allocating virtual machine addresses according to an embodiment of the present invention;
fig. 13 is a schematic structural diagram of a virtual machine address allocation apparatus according to an embodiment of the present invention;
fig. 14 is a hardware entity diagram of a virtual machine address allocation apparatus according to an embodiment of the present invention;
fig. 15 is a schematic structural diagram three of a virtual machine address allocation apparatus according to an embodiment of the present invention;
fig. 16 is a hardware entity diagram of a virtual machine address allocation apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention are further described in detail with reference to the drawings and the embodiments, the described embodiments should not be construed as limiting the present invention, and all other embodiments obtained by a person of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
In the following description, reference is made to "some embodiments" which describe a subset of all possible embodiments, but it is understood that "some embodiments" may be the same subset or different subsets of all possible embodiments, and may be combined with each other without conflict.
To the extent that similar descriptions of "first/second" appear in this patent document, the description below will be added, where reference is made to the term "first \ second \ third" merely to distinguish between similar objects and not to imply a particular ordering with respect to the objects, it being understood that "first \ second \ third" may be interchanged either in a particular order or in a sequential order as permitted, to enable embodiments of the invention described herein to be practiced in other than the order illustrated or described herein.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used herein is for the purpose of describing embodiments of the invention only and is not intended to be limiting of the invention.
Fig. 1 is an optional flowchart of a virtual machine address allocation method according to an embodiment of the present invention, and will be described with reference to the steps shown in fig. 1.
S101, after the corresponding virtual machine is started, a discovery message transmitted by the virtual machine forwarded to the logic service process by the virtual switch is received.
In the embodiment of the invention, after the corresponding virtual machine is started, the service node receives the discovery message which is transmitted to the virtual machine of the logic service process by the virtual switch.
In the embodiment of the invention, the virtual machine broadcasts the discovery message to the virtual switch after being started, and the virtual switch forwards the discovery message to the logic service process of the corresponding service node. Wherein the virtual machine is pre-bound with the service node. The logical service processes are pre-constructed.
In the embodiment of the invention, the service node is one service node in a cloud server in a cloud network environment. The cloud server may include a plurality of service nodes, and each service node may be correspondingly bound with one virtual machine. The service node may be one host or one terminal in the cloud server, wherein a logical service process is built on each host.
An embodiment of the present invention provides a scheme for implementing distributed dhcp based on a virtual machine, and for example, with reference to fig. 2, the overall structure of the cloud server of the present invention relates to a virtual machine 104, an interface 102, a virtual switch 101, a message middleware 100, and the like. The cloud server firstly uses an algorithm to calculate service nodes to be distributed of the ip information, and the cloud server distributes the user configuration ip information to the specified service nodes through the message middleware 100. When the virtual machine 104 sends a dhcp request message, the virtual switch 101 corresponding to the service node intercepts the dhcp message, converts the user configuration ip into a dhcp response packet message, and sends the dhcp response packet message to the virtual machine 104, and the virtual machine 104 writes the dhcp message into the network card.
Wherein, the discovery message is the dhcp discover message.
S102, responding to the discovery message, and sending the predicted configuration address information to the virtual machine by the logic service process according to a preset program, so that the virtual machine can write the configuration address information into the virtual network card; the configuration address information is calculated by the server according to a plurality of pieces of configuration address information which are acquired in advance and a plurality of pieces of configuration address information which respectively correspond to the relevant information of the virtual machine and the local storage position, and then configured to the local.
In the embodiment of the invention, the service node responds to the discovery message, and the logic service process sends the predicted configuration address information to the virtual machine according to the preset program, so that the virtual machine can write the configuration address information into the virtual network card; the configuration address information is calculated by the server according to a plurality of pieces of configuration address information which are acquired in advance and a plurality of pieces of configuration address information which respectively correspond to the relevant information of the virtual machine and the local storage position, and then configured to the local.
Wherein the related information includes: operation location information and operation policy information.
In the embodiment of the invention, the service node responds to the discovery message, feeds back a notification confirmation message to the virtual machine through the logic service process, receives the request message of the virtual machine, converts the configuration address information into a response message according to a preset program by the logic service process of the service node, and sends the response message to the virtual machine for the virtual machine to write into the virtual network card. The notification acknowledgement message, that is, the dhcp offer message, and the request message, that is, the dh cp request message.
In the embodiment of the invention, the cloud server firstly receives a plurality of pieces of configuration address information sent by a plurality of user nodes. The plurality of matching address information corresponds to the plurality of virtual machines. And the cloud server calculates according to the relevant information of the virtual machines and the storage positions of the service nodes, and configures the configuration address information to the corresponding service nodes respectively. For example, in the embodiment of the present invention, the cloud server may perform calculation by using an IP address allocation method, and further configure a plurality of pieces of configuration address information to corresponding service nodes, respectively.
In an embodiment of the invention, a user node sends user-configured ipv4/ipv6 information through messaging middleware to a vm port (which is an interface through which data is passed between a computer and other devices, between networks, or between other directly connected computers). After the virtual machine is started, sending a dhcp discover message in a broadcast mode to search for a dhcp server (namely, a service node). The cloud server constructs a logic dhcp server process on each service node. And the vm port forwards the dhcp discover message to a dhcp server process of the current host, and the dhcp server process sends an ip containing the port configured by the user and other set dhcp offer messages to the virtual machine. The vm receives a first received dhcp offer message, then it replies a dhcp request message in a broadcast mode, the message contains the content of ip address requested to vm port selected by it, when vm port dhcp server receives the dhcp request message replied by the virtual machine, it sends a dhcp acknowledge message containing the ip address provided by it and other settings to vm, tells the virtual machine that it can use the ip address provided by it, then the virtual machine binds its tcp/ip protocol with the network card.
In the embodiment of the invention, when a user creates a virtual machine, the user does not need to care about an operating system of the virtual machine, the storage position of the virtual machine, the running position of the virtual machine and the access to obtain the duid, and can configure Internet Protocol version 4(Internet Protocol version 4, IPv 4)/Internet Protocol version 6(Internet Protocol version 6, IPv 6) to the configuration item of the virtual machine, and after the virtual machine is provided with the operating system and connected with the virtual switch, the virtual machine can obtain the configured ip information. For example, when a virtual machine is newly added to a user node, in combination with fig. 3, a user may configure a physical (Media Access Control or Media Access Control, MAC) address on a newly added virtual machine configuration interface of the user node, and may configure an IP address, a subnet mask, a gateway, a preferred Domain Name System (DNS), and an alternative DNS when using an IPv4 address. With reference to fig. 4, the user may configure the MAC address on the newly added virtual machine configuration interface of the user node, and may configure the IP address, the prefix length, the gateway, the preferred domain name system DNS, and the alternative DNS when using the IPv6 address.
In the embodiment of the invention, when a user edits the virtual machine, the ipv4/ipv6 can be updated to the configuration of the virtual machine without concerning the operating system of the virtual machine, the storage position of the virtual machine, the running position of the virtual machine and the dhcp lease time, and if the virtual machine is in a shutdown state, and after the virtual machine is started, the virtual machine is connected with the virtual switch, the virtual machine can be updated to new ip information. For example, when a user newly adds a virtual machine, in combination with fig. 5, the user may configure an IP address, a subnet mask, a gateway, a preferred domain name system DNS, and an alternative DNS when configuring an IPv4 address in a modification IP setting control of an editing virtual machine configuration interface of a user node. With reference to fig. 6, when the user can configure the IPv6 address in the modified IP setting control of the editing virtual machine configuration interface of the user node, the IP address, the prefix length, the gateway, the preferred domain name system DNS, and the alternative DNS can be configured.
In the embodiment of the invention, after the corresponding virtual machine is started, a discovery message transmitted by the virtual machine forwarded to the logic service process by the virtual switch is received; the virtual machine is pre-bound with the service node; the logical service process is pre-constructed; responding to the found message, and sending the pre-known configuration address information to the virtual machine by the logic service process according to a preset program, so that the virtual machine can write the configuration address information into the virtual network card; the configuration address information is calculated by the server according to a plurality of pieces of configuration address information which are acquired in advance and a plurality of pieces of configuration address information which respectively correspond to the relevant information of the virtual machine and the local storage position, and then configured to the local. Because the logic service process in the service node in the scheme replaces the function of a deployed physical server, and each virtual machine in the scheme has a corresponding service node to allocate the configuration address information, the allocation of the configuration address cannot be delayed due to the damage of a certain service node, and meanwhile, the non-invasiveness is realized, so that the address allocation efficiency of the virtual machine is improved.
In some embodiments, S101 shown in fig. 1 may also be implemented by steps S103-S104, which will be described in conjunction with the above steps.
S103, a logic service process is constructed locally.
In the embodiment of the invention, after receiving the instruction, the service node constructs a logic service process locally.
The instruction may be an instruction issued by a cloud server or an operation instruction of a target object. The logic service process is used for receiving a discovery message and a request message of the virtual machine and feeding back a notification confirmation message and a response message to the virtual machine according to a preset program.
And S104, receiving the configuration address information configured to the local by the server, and sending the configuration address information to the bottom data plane of the logic service process.
In the embodiment of the invention, the service node receives the configuration address information configured to the local by the server and sends the configuration address information to the bottom data plane of the logic service process.
In the embodiment of the invention, the logic service process acquires the configuration address information on the bottom data surface after receiving the request message sent by the virtual machine, converts the configuration address information into the response message and sends the response message to the virtual machine. Wherein, configuring the address information may include: IPv4 address information or IPv6 address information, and mask information, prefix length, gateway information, domain name system information.
In the embodiment of the invention, the logic service process is constructed at the service node and replaces a dhcp server, and because each virtual machine corresponds to the logic service process of one service node, the address allocation of other virtual machines cannot be delayed when a certain service node fails, and the logic service process is not physically constructed, so that the method is simpler and further improves the address allocation efficiency of the virtual machines.
In some embodiments, S102 shown in fig. 1 can also be implemented through S105-S106, which will be described in conjunction with the various steps.
And S105, responding to the discovery message, and sending a notification confirmation message to the virtual machine by the logic service process according to a preset program.
In the embodiment of the invention, the service node responds to the discovery message, and the logic service process sends a notification confirmation message to the virtual machine according to a predetermined program.
S106, intercepting a request message fed back by the virtual machine response notification acknowledgement message in a channel of the virtual switch, responding the request message by the logic service process, converting the configuration address information into a response message, and sending the response message to the virtual machine.
In the embodiment of the invention, the service node intercepts the request message fed back by the virtual machine response notification acknowledgement message in the channel of the virtual switch, and the logic service process responds to the request message, converts the configuration address information into the response message and sends the response message to the virtual machine.
In the embodiment of the invention, when the request message is forwarded to the channel, the virtual switch analyzes the type of the request message; and if the request message is detected to carry a dhcp protocol, the request message is considered as the dhcp request message, and the step that the service node intercepts the dhcp request message is executed.
In the embodiment of the invention, the logical service process of the service node is used for replacing the dhcp server, so that the construction process of the server is simplified, and the address allocation efficiency of the virtual machine is further improved.
In some embodiments, referring to fig. 7, fig. 7 is an optional flowchart of a virtual machine address allocation method provided in the embodiment of the present invention, and S101 to S102 shown in fig. 1 may be implemented by S401 to S405, which will be described with reference to each step.
S401, sending the ip information to the port.
In the embodiment of the invention, the user node sends the ip information to the port.
S402, receiving a packet by the vm port.
And S403, carrying out a dhcp client message.
S404, analyzing the dhcp message, and constructing a dhcp response packet according to the configuration.
In the embodiment of the invention, the service node analyzes the dhcp message and constructs a dhcp response packet according to the configuration
And S405, sending a dhcp response to vm.
In the embodiment of the invention, the service node sends the dhcp response packet to the vm virtual machine.
In some embodiments, referring to fig. 8, fig. 8 is an optional flowchart of the virtual machine address allocation method according to the embodiment of the present invention, and the method will be described with reference to steps.
S201, sending a discovery message to the virtual switch after starting.
In the embodiment of the invention, the virtual machine sends a discovery message to the virtual switch after being started.
S202, receiving a service node response discovery message, and feeding back configuration address information by a logic service process of the service node according to a preset program; the configuration address information is calculated by the server according to a plurality of pieces of configuration address information which are acquired in advance and a plurality of pieces of configuration address information which respectively correspond to the relevant information of the virtual machine and the local storage position, and then configured to the service node.
In the embodiment of the invention, a virtual machine receives a service node response discovery message, and a logic service process of the service node feeds back configuration address information according to a preset program; the configuration address information is calculated by the server according to a plurality of pieces of configuration address information which are acquired in advance and a plurality of pieces of configuration address information which respectively correspond to the relevant information of the virtual machine and the local storage position, and then configured to the service node.
And S203, writing the configuration address information into the virtual network card.
In the embodiment of the invention, the virtual machine writes the configuration address information into the virtual network card.
In the embodiment of the invention, the virtual machine sends the discovery message to the service node, the logic service process of the service node responds to the discovery message according to the preset program and feeds back the configuration address information to the virtual machine.
In some embodiments, S202 shown in fig. 8 may be implemented by S204-S206, which will be described in conjunction with various steps.
And S204, receiving a notification confirmation message fed back by the logic service process when the service node responds to the discovery message.
In the embodiment of the invention, the virtual machine receives the notification confirmation message fed back by the logic service process and the service node response discovery message.
S205, responding to the notification confirmation message, and broadcasting the request message to the virtual switch.
In the embodiment of the invention, the virtual machine responds to the notification confirmation message and broadcasts the request message to the virtual switch.
S206, receiving a logical service process of the service node and a feedback response message, wherein the response message is converted by the logical service process according to the configuration address information.
In the embodiment of the invention, the virtual machine receives the logical service process of the service node and the feedback response message, wherein the response message is converted by the logical service process according to the configuration address information.
In some embodiments, referring to fig. 9, fig. 9 is an optional flowchart of a virtual machine address allocation method according to an embodiment of the present invention, and the method will be described with reference to steps.
S301, receiving a plurality of configuration address information sent by a plurality of user nodes.
In the embodiment of the invention, a server receives a plurality of pieces of configuration address information sent by a plurality of user nodes.
In the embodiment of the present invention, the server may be a cloud server. The user node may be a terminal device of a user terminal. The user may configure address information at the user node and then send the configured address information to the server.
S302, calculating according to the relevant information of the virtual machines corresponding to the configuration address information and the storage positions of the service nodes, and respectively configuring the configuration address information to the service nodes; and sending the predicted configuration address information to the corresponding virtual machine by the logic service process of each service node according to a predetermined program.
In the embodiment of the invention, a server calculates according to the relevant information of a plurality of virtual machines corresponding to a plurality of configuration address information and the storage positions of a plurality of service nodes, and respectively configures the plurality of configuration address information to the plurality of service nodes; and sending the preset configuration address information to the corresponding virtual machine by the logic service process of each service node according to a preset program.
In the embodiment of the invention, a server receives a plurality of configuration address information sent by a plurality of user nodes, calculates according to the relevant information of a plurality of virtual machines corresponding to the plurality of configuration address information and the storage positions of a plurality of service nodes, and respectively configures the plurality of configuration address information to the plurality of service nodes; and sending the predicted configuration address information to the corresponding virtual machine by the logic service process of each service node according to a predetermined program. In the scheme, the logical service process of the service node is used for replacing the dhcp server, so that the whole process is simpler, and the address allocation efficiency of the virtual machine is improved.
In some embodiments, S302 shown in fig. 9 may be implemented by S303-S304, which will be described in conjunction with the various steps.
And S303, calculating according to the running position information and the running strategy information of the virtual machines corresponding to the configuration address information and the storage positions of the service nodes to obtain the binding relationship between each virtual machine and the corresponding service node.
In the embodiment of the invention, the server calculates according to the running position information and the running strategy information of the virtual machines corresponding to the configuration address information and the storage positions of the service nodes to obtain the binding relationship between each virtual machine and the corresponding service node.
S304, configuring the configuration address information to the service node bound by the corresponding virtual machine.
In the embodiment of the invention, the server configures each piece of configuration address information to the service node bound by the corresponding virtual machine.
In the embodiment of the invention, the server carries out calculation according to the running position information and the running strategy information of the virtual machine and the storage positions of a plurality of service nodes, and allocates the corresponding configuration address information to the service nodes so that the logic service process of the corresponding service node can send the configuration address information to the virtual machine according to the preset program, thereby improving the allocation efficiency of the virtual machine address.
In some embodiments, referring to fig. 10, fig. 10 is an interaction schematic diagram of a virtual machine address allocation method according to an embodiment of the present invention, which will be described with reference to steps.
S501, sending a discovery message to the virtual switch after the virtual machine is started.
In the embodiment of the present invention, the implementation steps are the same as those in S201, and are not repeated herein.
S502, the virtual machine receives a service node response discovery message, and a logic service process of the service node feeds back configuration address information according to a preset program; the configuration address information is calculated by the server according to a plurality of pieces of configuration address information which are obtained in advance and a plurality of pieces of configuration address information which respectively correspond to the relevant information of the virtual machine and the local storage position, and then is configured to the service node.
In the embodiment of the present invention, the implementation steps are the same as those in S202, and are not repeated herein.
S503, the virtual machine writes the configuration address information into the virtual network card.
In the embodiment of the present invention, the step is the same as the step in S203, and is not repeated herein.
In some embodiments, referring to fig. 11, fig. 11 is a first schematic structural diagram of a virtual machine address allocation apparatus according to an embodiment of the present invention.
The embodiment of the present invention further provides a virtual machine address allocation apparatus 700, which is applied to any service node in a server in a cloud network environment, and includes: a receiving unit 703 and a transmitting unit 704.
A receiving unit 703, configured to receive a discovery message sent by the virtual machine, which is forwarded to the logic service process by the virtual switch, after the corresponding virtual machine is started; the virtual machine and the service node are bound in advance; the logic service process is constructed in advance;
a sending unit 704, configured to respond to the discovery message, send, by the logic service process according to a predetermined program, the pre-known configuration address information to the virtual machine, so that the virtual machine writes the configuration address information into the virtual network card; wherein, the first and the second end of the pipe are connected with each other,
the configuration address information is calculated by the server according to a plurality of pieces of configuration address information which are acquired in advance and a plurality of pieces of configuration address information which respectively correspond to the relevant information of the virtual machine and the local storage position, and then configured to the local.
In the embodiment of the present invention, the virtual machine address allocation apparatus 700 locally constructs a logic service process; and receiving the configuration address information configured to the local by the server, and issuing the configuration address information to the bottom data surface of the logic service process.
In this embodiment of the present invention, the sending unit 704 of the virtual machine address allocation apparatus 700 is configured to respond to the discovery packet, and the logic service process sends a notification confirmation packet to the virtual machine according to a predetermined program; and intercepting a request message fed back by a virtual machine response notification confirmation message in a channel of the virtual switch, responding the request message by the logic service process, converting the configuration address information into a response message, and sending the response message to the virtual machine.
In the embodiment of the present invention, configuring address information includes: IPV4 address information or IPV6 address information, and mask information, prefix length, gateway information, domain name system information.
In the embodiment of the present invention, the related information includes: operation location information and operation policy information.
In the embodiment of the present invention, the receiving unit 703 in the virtual machine address allocation apparatus 700 is configured to receive, after the corresponding virtual machine is started, a discovery message that is forwarded by the virtual switch to the virtual machine of the logic service process; the virtual machine is pre-bound with the service node; the logical service process is pre-constructed; the sending unit 704 is configured to respond to the discovery message, and send, by the logic service process according to a predetermined program, the predicted configuration address information to the virtual machine, so that the virtual machine writes the configuration address information into the virtual network card; the configuration address information is calculated by the server according to a plurality of pieces of configuration address information which are acquired in advance and a plurality of pieces of configuration address information which respectively correspond to the relevant information of the virtual machine and the local storage position, and then configured to the local. Because the logic service process in the service node in the scheme replaces the function of a deployed physical server, and each virtual machine in the scheme has a corresponding service node to allocate the configuration address information, the allocation of the configuration address cannot be delayed due to the damage of a certain service node, and meanwhile, the non-invasiveness is realized, so that the address allocation efficiency of the virtual machine is improved.
It should be noted that, in the embodiment of the present invention, if the virtual machine address assignment method is implemented in the form of a software functional module and is sold or used as a standalone product, the virtual machine address assignment method may also be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for enabling a virtual machine address assignment device (which may be a personal computer or the like) to execute all or part of the methods of the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read Only Memory (ROM), a magnetic disk, or an optical disk. Thus, embodiments of the invention are not limited to any specific combination of hardware and software.
Correspondingly, the embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the steps of the above-mentioned method.
Correspondingly, an embodiment of the present invention provides an apparatus for allocating a virtual machine address, including a first memory 702 and a first processor 701, where the first memory 702 stores a computer program that can be executed on the first processor 701, and the first processor 701 implements the steps in the foregoing method when executing the program.
Here, it should be noted that: the above description of the storage medium and apparatus embodiments, similar to the description of the method embodiments above, have similar beneficial effects as the method embodiments. For technical details not disclosed in the embodiments of the storage medium and the apparatus according to the invention, reference is made to the description of the embodiments of the method according to the invention.
It should be noted that fig. 12 is a first schematic diagram of a hardware entity of a virtual machine address allocation apparatus according to an embodiment of the present invention, as shown in fig. 12, a hardware entity of the virtual machine address allocation apparatus 700 includes: a first processor 701 and a first memory 702, wherein;
the first processor 701 generally controls the overall operation of the virtual machine address assignment device 700.
The first Memory 702 is configured to store instructions and applications executable by the first processor 701, and may also buffer data (e.g., image data, audio data, voice communication data, and video communication data) to be processed or already processed by the first processor 701 and modules in the virtual machine address assignment device 700, and may be implemented by a FLASH Memory (FLASH) or a Random Access Memory (RAM).
In some embodiments, referring to fig. 13, fig. 13 is a schematic structural diagram of a virtual machine address allocation apparatus according to an embodiment of the present invention.
The embodiment of the present invention further provides a virtual address allocation apparatus 800, which is applied to a virtual machine in a cloud network environment, and includes: a second sending unit 803, a second receiving unit 804 and a first configuration unit 805.
A second sending unit 803, configured to send a discovery message to the virtual switch after starting;
a second receiving unit 804, configured to receive the configuration address information fed back by the logical service process of the service node according to a predetermined program in response to the discovery message; the configuration address information is calculated by the server according to a plurality of pieces of configuration address information which are acquired in advance and a plurality of pieces of configuration address information which respectively correspond to the relevant information of the virtual machine and the local storage position, and then is configured to the service node; the discovery message is forwarded to the service node by the virtual switch;
the first configuration unit 805 is configured to write configuration address information into the virtual network card.
In this embodiment of the present invention, the second receiving unit 804 in the virtual address allocating apparatus 800 is configured to receive a notification confirmation message fed back by the logic service process and a service node response discovery message; responding to the notification confirmation message, and broadcasting a request message to the virtual switch; and receiving a response message fed back by the logic service process of the service node, wherein the response message is converted by the logic service process according to the configuration address information.
In this embodiment of the present invention, the second sending unit 803 in the virtual machine address allocation apparatus 800 is configured to send a discovery message to the virtual switch after being started; the second receiving unit 804 is configured to receive the configuration address information fed back by the logical service process of the service node according to a predetermined program in response to the discovery message; the configuration address information is calculated by the server according to a plurality of pieces of configuration address information which are acquired in advance and a plurality of pieces of configuration address information which respectively correspond to the relevant information of the virtual machine and the local storage position, and then is configured to the service node; the discovery message is forwarded to the service node by the virtual switch; the first configuration unit 805 is configured to write configuration address information into the virtual network card. In the scheme, each virtual machine is provided with a corresponding service node, and the original dhcp server is replaced by the logic service process of the service node, so that the whole address allocation process is simpler, and the address allocation efficiency of the virtual machine is improved.
Correspondingly, the embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the steps of the above-mentioned method.
Correspondingly, the embodiment of the present invention provides a virtual machine address allocation apparatus, which includes a second memory 802 and a second processor 801, where the second memory 802 stores a computer program that can be executed on the second processor 801, and the second processor 801 executes the computer program to implement the steps in the foregoing method.
Here, it should be noted that: the above description of the storage medium and apparatus embodiments, similar to the description of the method embodiments above, have similar beneficial effects as the method embodiments. For technical details not disclosed in the embodiments of the storage medium and the apparatus according to the invention, reference is made to the description of the embodiments of the method according to the invention.
It should be noted that fig. 14 is a second schematic diagram of a hardware entity of the virtual machine address allocation apparatus according to an embodiment of the present invention, as shown in fig. 14, the hardware entity of the virtual machine address allocation apparatus 800 includes: a second processor 801 and a second memory 802, wherein;
the second processor 801 generally controls the overall operation of the virtual machine address assignment device 800.
The second Memory 802 is configured to store instructions and applications executable by the second processor 801, and may also buffer data (e.g., image data, audio data, voice communication data, and video communication data) to be processed or already processed by each module in the second processor 801 and the virtual machine address assignment device 800, and may be implemented by a FLASH Memory (FLASH) or a Random Access Memory (RAM).
In some embodiments, referring to fig. 15, fig. 15 is a schematic structural diagram three of a virtual machine address allocation apparatus according to an embodiment of the present invention.
The embodiment of the present invention further provides a virtual machine address allocation apparatus 900, which is applied to a server in a cloud network environment, and includes: a third receiving unit 903 and a second configuration unit 904.
A third receiving unit 903, configured to receive multiple pieces of configuration address information sent by multiple user nodes;
a second configuration unit 904, configured to perform calculation according to the relevant information of the multiple virtual machines corresponding to the multiple pieces of configuration address information and the storage locations of the multiple service nodes included in the virtual machines, and configure the multiple pieces of configuration address information to the multiple service nodes, respectively; and sending the predicted configuration address information to the corresponding virtual machine by the logic service process of each service node according to a predetermined program.
In this embodiment of the present invention, the second configuration unit 804 in the virtual address allocation apparatus 900 is configured to perform calculation according to the operation location information and the operation policy information of the multiple virtual machines corresponding to the multiple configuration address information, and the storage locations of the multiple service nodes, so as to obtain the binding relationship between each virtual machine and the corresponding service node; and configuring the configuration address information to the service node bound by the corresponding virtual machine.
In this embodiment of the present invention, the third receiving unit 903 in the virtual machine address allocation apparatus 900 is configured to receive multiple pieces of configuration address information sent by multiple user nodes; the second configuration unit 904 is configured to perform calculation according to the relevant information of the plurality of virtual machines corresponding to the plurality of configuration address information and the storage locations of the plurality of service nodes included in the virtual machine, and configure the plurality of configuration address information to the plurality of service nodes respectively; and sending the predicted configuration address information to the corresponding virtual machine by the logic service process of each service node according to a predetermined program. In the scheme, the logical service process of the service node replaces a dhcp server, so that the allocation work of the virtual machine address is simpler, and the allocation efficiency of the virtual machine address is improved.
Correspondingly, the embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the steps of the above-mentioned method.
Correspondingly, an embodiment of the present invention provides a virtual machine address allocation apparatus, including a third memory 902 and a third processor 901, where the third memory 902 stores a computer program that can be executed on the third processor 901, and the third processor 901 implements the steps in the foregoing method when executing the program.
Here, it should be noted that: the above description of the storage medium and apparatus embodiments is similar to the description of the method embodiments above, with similar beneficial effects as the method embodiments. For technical details not disclosed in the embodiments of the storage medium and the apparatus according to the invention, reference is made to the description of the embodiments of the method according to the invention.
It should be noted that fig. 16 is a third schematic diagram of a hardware entity of the virtual machine address allocation apparatus according to the embodiment of the present invention, as shown in fig. 16, the hardware entity of the virtual machine address allocation apparatus 900 includes: a third processor 901 and a third memory 902, wherein;
the third processor 901 generally controls the overall operation of the virtual machine address allocation apparatus 900.
The third Memory 902 is configured to store instructions and applications executable by the third processor 901, and may also buffer data (e.g., image data, audio data, voice communication data, and video communication data) to be processed or already processed by each module in the third processor 901 and the virtual machine address allocation apparatus 900, and may be implemented by a FLASH Memory (FLASH) or a Random Access Memory (RAM).
It should be appreciated that reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the present invention. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. It should be understood that, in various embodiments of the present invention, the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention. The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element identified by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the unit is only a logical division, and there may be other divisions when the actual implementation is implemented, 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 in 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; can be located in one place or 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 unit, or each unit may be separately regarded 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 realizing the method embodiments can be completed by hardware related to program instructions, the program can be stored in a computer readable storage medium, and the program executes the steps comprising the method embodiments when executed; and the aforementioned storage medium includes: various media capable of storing program codes, such as a removable Memory device, a Read Only Memory (ROM), a magnetic disk, or an optical disk.
Alternatively, the integrated unit of the present invention may be stored in a computer-readable storage medium if it is implemented in the form of a software functional module and sold or used as a separate product. Based on such understanding, the technical solutions of the embodiments of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the methods of the embodiments of the present invention. And the aforementioned storage medium includes: various media that can store program codes, such as a removable storage device, a ROM, a magnetic disk, or an optical disk.
The above description is only an embodiment 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 changes or substitutions within the technical scope of the present invention, and all such changes or substitutions are intended to be included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (12)

1. A virtual machine address allocation method is applied to any service node in a server of a cloud network environment, and comprises the following steps:
after the corresponding virtual machine is started, receiving a discovery message which is transmitted by the virtual machine and is forwarded to the logic service process by the virtual switch; the virtual machine and the service node are bound in advance; the logical service process is pre-constructed;
responding to the discovery message, the logic service process sends the predicted configuration address information to the virtual machine according to a preset program, so that the virtual machine can write the configuration address information into a virtual network card; wherein the content of the first and second substances,
the configuration address information is calculated by the server according to a plurality of pieces of configuration address information which are acquired in advance and the plurality of pieces of configuration address information which respectively correspond to the relevant information of the virtual machine and the local storage position, and then configured to the local.
2. The method according to claim 1, wherein after the corresponding virtual machine is started and before receiving the discovery packet sent by the virtual machine, which is forwarded by the virtual switch to the logical service process, the method further comprises:
constructing a logic service process locally;
and receiving the local configuration address information configured by the server, and sending the configuration address information to the bottom data plane of the logic service process.
3. The method according to claim 2, wherein the sending, by the logic service process in response to the discovery packet, the predetermined configuration address information to the virtual machine according to a predetermined procedure includes:
responding to the discovery message, and sending a notification confirmation message to the virtual machine by the logic service process according to a preset program;
and intercepting a request message fed back by the virtual machine in response to the notification confirmation message in a channel of the virtual switch, responding to the request message by the logic service process, converting the configuration address information into a response message, and sending the response message to the virtual machine.
4. The virtual machine address allocation method according to claim 1, wherein the configuration address information includes: IPv4 address information or IPv6 address information, and mask information, prefix length, gateway information, domain name system information.
5. The virtual machine address allocation method according to claim 1, wherein the related information includes: operation location information and operation policy information.
6. A virtual address allocation method is applied to a virtual machine in a cloud network environment, and comprises the following steps:
sending a discovery message to the virtual switch after starting;
receiving configuration address information fed back by a logic service process of the service node according to a preset program when the service node responds to the discovery message; the configuration address information is calculated by the server according to a plurality of pieces of configuration address information which are acquired in advance, and the plurality of pieces of configuration address information are respectively corresponding to the relevant information of the virtual machine and the local storage position, and then are configured to the service node; the discovery message is forwarded to the service node by the virtual switch;
and writing the configuration address information into a virtual network card.
7. The virtual machine address allocation method according to claim 6, wherein the received service node responds to the discovery packet, and the logical service process of the service node feeds back configuration address information according to a predetermined procedure, including
Receiving a notification confirmation message fed back by the logic service process when the service node responds to the discovery message;
responding to the notification confirmation message, and broadcasting a request message to the virtual switch;
and receiving a response message fed back by the logic service process of the service node, wherein the response message is converted by the logic service process according to the configuration address information.
8. A virtual machine address allocation method is applied to a server in a cloud network environment, and comprises the following steps:
receiving a plurality of configuration address information sent by a plurality of user nodes;
calculating according to the relevant information of a plurality of virtual machines corresponding to the configuration address information and the storage positions of a plurality of service nodes, and respectively configuring the configuration address information to the service nodes; and sending the predicted configuration address information to the corresponding virtual machine by the logic service process of each service node according to a predetermined program.
9. The virtual machine address allocation method according to claim 8, wherein the related information includes: operating position information and operating strategy information;
the calculating according to the relevant information of the virtual machines corresponding to the configuration address information and the storage positions of the service nodes, and configuring the configuration address information to the service nodes respectively, includes:
calculating according to the operation position information and the operation strategy information of the virtual machines corresponding to the configuration address information and the storage positions of the service nodes to obtain the binding relationship between each virtual machine and the corresponding service node;
and configuring the configuration address information to the service node bound by the corresponding virtual machine.
10. A virtual machine address allocation device is applied to any service node in a server of a cloud network environment, and comprises:
the receiving unit is used for receiving a discovery message which is transmitted by the virtual machine and is forwarded to the logic service process by the virtual switch after the corresponding virtual machine is started; the virtual machine and the service node are bound in advance; the logical service process is pre-constructed;
a sending unit, configured to respond to the discovery packet, where the logic service process sends, according to a predetermined program, pre-known configuration address information to the virtual machine, so that the virtual machine writes, in a virtual network card, the configuration address information; wherein the content of the first and second substances,
the configuration address information is calculated by the server according to a plurality of pieces of configuration address information which are acquired in advance and the plurality of pieces of configuration address information which respectively correspond to the relevant information of the virtual machine and the local storage position, and then configured to the local.
11. A virtual machine address assignment arrangement, comprising a first memory and a first processor, the first memory storing a computer program operable on the first processor, the first processor implementing the steps of the method according to any of claims 1-5 when executing the program.
12. A computer-readable storage medium, on which a computer program is stored which, when being executed by a first processor, carries out the steps of the method of any one of claims 1 to 5.
CN202210266411.XA 2022-03-17 2022-03-17 Virtual machine address allocation method, device and storage medium Active CN114760269B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210266411.XA CN114760269B (en) 2022-03-17 2022-03-17 Virtual machine address allocation method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210266411.XA CN114760269B (en) 2022-03-17 2022-03-17 Virtual machine address allocation method, device and storage medium

Publications (2)

Publication Number Publication Date
CN114760269A true CN114760269A (en) 2022-07-15
CN114760269B CN114760269B (en) 2024-04-09

Family

ID=82327234

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210266411.XA Active CN114760269B (en) 2022-03-17 2022-03-17 Virtual machine address allocation method, device and storage medium

Country Status (1)

Country Link
CN (1) CN114760269B (en)

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100205304A1 (en) * 2009-02-10 2010-08-12 Pradeep Kumar Chaturvedi Virtual machine address management
WO2013027923A1 (en) * 2011-08-24 2013-02-28 (주)케이티 System for setting up a virtual machine policy, method for setting up a virtual machine policy, and method for providing a virtual machine policy in a cloud computing server system
JP2013183243A (en) * 2012-03-01 2013-09-12 Kddi Corp Program, method, and physical server for allocating address to virtual machine
JP2015002424A (en) * 2013-06-14 2015-01-05 日本電信電話株式会社 Address allocation device, management device, address allocation program, and management program
US20150052522A1 (en) * 2013-08-14 2015-02-19 Nicira, Inc. Generation of DHCP Configuration Files
CN106101301A (en) * 2016-08-05 2016-11-09 汉柏科技有限公司 Distributed virtual DHCP service provides system and method
CN107426348A (en) * 2017-07-27 2017-12-01 郑州云海信息技术有限公司 A kind of automatic management method and system of IP address
CN108268300A (en) * 2016-12-30 2018-07-10 中移(苏州)软件技术有限公司 The moving method and device of a kind of virtual machine
CN108390956A (en) * 2018-05-29 2018-08-10 郑州云海信息技术有限公司 A kind of method and system for virtual machine configuration internet protocol address
CN109327557A (en) * 2018-10-16 2019-02-12 郑州云海信息技术有限公司 A kind of management method and device of virtual machine IP address
US20190068724A1 (en) * 2017-08-30 2019-02-28 Red Hat Israel, Ltd Migration notification and response messages for virtual machines
CN110392125A (en) * 2019-06-29 2019-10-29 苏州浪潮智能科技有限公司 A kind of realize provides the method and system of DHCP service to virtual machine in virtualized environment
CN110908770A (en) * 2019-11-05 2020-03-24 安超云软件有限公司 Operation and creation method of virtual machine, virtual machine and virtual machine management platform
CN112042170A (en) * 2018-04-30 2020-12-04 微软技术许可有限责任公司 On-node DHCP implementation for virtual machines

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100205304A1 (en) * 2009-02-10 2010-08-12 Pradeep Kumar Chaturvedi Virtual machine address management
WO2013027923A1 (en) * 2011-08-24 2013-02-28 (주)케이티 System for setting up a virtual machine policy, method for setting up a virtual machine policy, and method for providing a virtual machine policy in a cloud computing server system
JP2013183243A (en) * 2012-03-01 2013-09-12 Kddi Corp Program, method, and physical server for allocating address to virtual machine
JP2015002424A (en) * 2013-06-14 2015-01-05 日本電信電話株式会社 Address allocation device, management device, address allocation program, and management program
US20150052522A1 (en) * 2013-08-14 2015-02-19 Nicira, Inc. Generation of DHCP Configuration Files
CN106101301A (en) * 2016-08-05 2016-11-09 汉柏科技有限公司 Distributed virtual DHCP service provides system and method
CN108268300A (en) * 2016-12-30 2018-07-10 中移(苏州)软件技术有限公司 The moving method and device of a kind of virtual machine
CN107426348A (en) * 2017-07-27 2017-12-01 郑州云海信息技术有限公司 A kind of automatic management method and system of IP address
US20190068724A1 (en) * 2017-08-30 2019-02-28 Red Hat Israel, Ltd Migration notification and response messages for virtual machines
CN112042170A (en) * 2018-04-30 2020-12-04 微软技术许可有限责任公司 On-node DHCP implementation for virtual machines
CN108390956A (en) * 2018-05-29 2018-08-10 郑州云海信息技术有限公司 A kind of method and system for virtual machine configuration internet protocol address
CN109327557A (en) * 2018-10-16 2019-02-12 郑州云海信息技术有限公司 A kind of management method and device of virtual machine IP address
CN110392125A (en) * 2019-06-29 2019-10-29 苏州浪潮智能科技有限公司 A kind of realize provides the method and system of DHCP service to virtual machine in virtualized environment
CN110908770A (en) * 2019-11-05 2020-03-24 安超云软件有限公司 Operation and creation method of virtual machine, virtual machine and virtual machine management platform

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
孔瑞平: "探讨VMware环境下Linux***的三种网络工作模式", 《计算机产品与流通》 *
王利: "KVM虚拟机的静态IP地址注入方法", 《酒城教育》 *
米永涛: "私有云平台上的虚拟机安全检测设计与实现", 《中国优秀硕士学位论文全文数据库 信息科技辑》, 15 March 2017 (2017-03-15) *

Also Published As

Publication number Publication date
CN114760269B (en) 2024-04-09

Similar Documents

Publication Publication Date Title
EP3316532B1 (en) Computer device, system and method for implementing load balancing
KR100657316B1 (en) A fast handover method in DHCPv4, handover apparatus thereof and recording medium thereof
EP3070887B1 (en) Communication method, device and system for virtual extensible local area network
JP5663549B2 (en) Method, apparatus and system for assigning public IP addresses
CN108777722B (en) Multi-system networking communication method and device, mobile terminal and storage medium
US8260888B2 (en) Address configuration method, apparatus and system
US8886776B2 (en) Communication apparatus and storing medium
EP2579519A1 (en) Method, network device and system for automatically configuring network device in internet protocol version 6 network
EP2775674A1 (en) Method for mobile node to dynamically acquire location identifier, and lisp network
CN110995886B (en) Network address management method, device, electronic equipment and medium
CN107547665B (en) Method, equipment and system for allocating DHCP (dynamic host configuration protocol) address
EP2704403A1 (en) Method and device for controlling address configuration manner
EP3883203A1 (en) Ipv6 address configuration method and router device
WO2014101891A1 (en) Method and device for configuring ip address
WO2014142258A1 (en) Communication system, control device, address allocation method, and program
EP3703343A1 (en) Method and device for configuring service flow
US20210112007A1 (en) Message processing method and apparatus, and storage medium
WO2016034006A1 (en) Packet sending method and access device
CN106878479B (en) Address allocation method and device
KR20170014853A (en) Method for processing traffic based on sdn
CN112272244A (en) Router WAN end IPv6 internet mode configuration method and device
CN106375489B (en) Method and device for processing Media Access Control (MAC) address
CN114760269A (en) Virtual machine address allocation method, device and storage medium
WO2015085558A1 (en) Method, device and system for dynamically allocating ip address
CN110636146B (en) User address allocation method and device

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