[go: up one dir, main page]

CN114760269B - 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
CN114760269B
CN114760269B CN202210266411.XA CN202210266411A CN114760269B CN 114760269 B CN114760269 B CN 114760269B CN 202210266411 A CN202210266411 A CN 202210266411A CN 114760269 B CN114760269 B CN 114760269B
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.)
Active
Application number
CN202210266411.XA
Other languages
Chinese (zh)
Other versions
CN114760269A (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

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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 OR CALCULATING; 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 device and a storage medium, wherein the method comprises the following steps: after the corresponding virtual machine is started, a discovery message sent by the virtual machine, which is forwarded to the logic service process by the virtual switch, is received; the virtual machine is pre-bound with the service node; the logic service process is pre-constructed; responding to the discovery message, and sending the preset 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 configuration address information acquired in advance and the relevant information and the local storage position of the virtual machine corresponding to the plurality of configuration address information respectively, and then the configuration address information is 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, addresses of virtual machines, such as internet protocol addresses (Internet Protocol Address, IP) addresses, are generally allocated by sending a request to a dynamic host configuration protocol (Dynamic Host Configuration Protocol, dhcp) server by each virtual machine, and then feeding back the corresponding virtual machine address by the dhcp server to realize allocation of the virtual machine address, however, the existing virtual machine address allocation mode has the following defects:
1. When the dhcp server is physically deployed, the dhcp relay is configured, the deployment is complex, and the address allocation efficiency is reduced. 2. When the dhcpv6 server binds the ip-duid, the duid needs to be obtained by invading the inside of the virtual machine, and the address allocation efficiency is reduced. 3. When the dhcp server fails at a single point, all virtual machine configuration ip functions fail, and the address allocation efficiency is reduced as well.
Disclosure of Invention
The virtual machine address allocation method, the virtual machine address allocation device and the storage medium provided by the embodiment of the invention can improve the efficiency of virtual machine address allocation.
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 of a cloud network environment and comprises the following steps:
after the corresponding virtual machine is started, a discovery message sent by the virtual machine, which is forwarded to the logic service process by the virtual switch, is received; the virtual machine is pre-bound with the service node; the logic service process is pre-constructed;
responding to the discovery message, and sending the preset 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 configuration address information is calculated by the server according to a plurality of configuration address information acquired in advance and the relevant information and the local storage position of the virtual machine corresponding to the plurality of configuration address information respectively, and then the configuration address information is configured to the local.
In the above scheme, after the corresponding virtual machine is started, before the discovery message 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 configuration address information configured to the local by the server, and transmitting the configuration address information to a bottom data surface of the logic service process.
In the above scheme, in response to the discovery message, the logic service process sends the preset configuration address information to the virtual machine according to a preset program, including:
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 response notification confirmation message in a channel of the virtual switch, and converting configuration address information into a response message and sending the response message to the virtual machine by a logic service process in response to the request message.
In the above scheme, the configuration address information includes: IPv4 address information or IPv6 address information, mask information, prefix length, gateway information, and 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 the virtual machine in the cloud network environment and comprises the following steps:
after starting, sending a discovery message to the virtual switch;
receiving a response discovery message of the service node, wherein the logic service process of the service node feeds back configuration address information according to a preset program; the server calculates the configuration address information according to a plurality of configuration address information acquired in advance and the related information and the local storage position of the virtual machine corresponding to the plurality of configuration address information respectively, and then configures the configuration address information 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, the configuration address information fed back by the logic service process of the service node according to the predetermined program after receiving the service node response discovery message includes
Receiving a notification confirmation message fed back by a logic service process by a service node in response 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 of 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 related information of the plurality of virtual machines corresponding to the plurality of configuration address information and the storage positions of the plurality of service nodes, and respectively configuring the plurality of configuration address information to the plurality of service nodes; and the logic service process of each service node sends the preset configuration address information to the corresponding virtual machine according to a preset program.
In the above scheme, the related information includes: operation position information and operation strategy information;
calculating according to the related information of the plurality of virtual machines corresponding to the plurality of configuration address information and the storage positions of the plurality of service nodes, and respectively configuring the plurality of configuration address information to the plurality of service nodes, wherein the method comprises the following steps:
calculating according to the operation position information and the operation strategy information of the plurality of virtual machines corresponding to the plurality of configuration address information and the storage positions of the plurality of service nodes to obtain the binding relation between each virtual machine and the corresponding service node;
and configuring each piece of configuration address information to the corresponding service node bound by the virtual machine.
The embodiment of the invention also provides a virtual machine address allocation device, which is applied to any service node in a server of a cloud network environment and comprises the following steps:
the receiving unit is used for receiving 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 is pre-bound with the service node; the logic service process is pre-constructed;
the logic service process sends the preset configuration address information to the virtual machine according to a preset program in response to the discovery message, and the virtual machine writes the configuration address information into the virtual network card; wherein,
the configuration address information is calculated by the server according to a plurality of configuration address information acquired in advance and the relevant information and the local storage position of the virtual machine corresponding to the plurality of configuration address information respectively, and then the configuration address information is configured to the local.
The embodiment of the invention also provides a virtual address allocation device, which is applied to the virtual machine in the cloud network environment and comprises the following components:
the second sending unit is used for sending a discovery message to the virtual switch after starting;
the second receiving unit is used for receiving the response discovery message of the service node, and the logic service process of the service node feeds back the configuration address information according to a preset program; the server calculates the configuration address information according to a plurality of configuration address information acquired in advance and the related information and the local storage position of the virtual machine corresponding to the plurality of configuration address information respectively, and then configures the configuration address information to the service node; the discovery message is forwarded to the service node by the virtual switch;
The first configuration unit is used for writing the configuration address information into the virtual network card.
The embodiment of the invention also provides a virtual machine address allocation device, which is applied to a server of a cloud network environment and comprises the following components:
a third receiving unit, configured to receive a plurality of configuration address information sent by a plurality of user nodes;
the second configuration unit is used for calculating according to the related information of the plurality of virtual machines corresponding to the plurality of configuration address information and the storage positions of the plurality of service nodes, and respectively configuring the plurality of configuration address information to the plurality of service nodes; and the logic service process of each service node sends the preset configuration address information to the corresponding virtual machine according to a preset 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 which can be run on the first processor, and the first processor realizes steps in a service node side method when executing the program.
The embodiment of the invention also provides a computer readable storage medium, on which a computer program is stored, which when being executed by the 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 which can be run on the second processor, and the second processor realizes the steps in a method at one side of the virtual machine when executing the program.
The embodiment of the invention also provides a computer readable storage medium, on which a computer program is stored, which when executed by the second processor implements steps in a 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 which can be run on the third processor, and the third processor realizes the steps in the server side method when executing the program.
The embodiment of the invention also provides a computer-readable storage medium, on which a computer program is stored, which when executed by a third processor implements steps in a server-side method.
In the embodiment of the invention, after the corresponding virtual machine is started, a discovery message sent by the virtual machine, which is forwarded to the logic service process by the virtual switch, is received; the virtual machine is pre-bound with the service node; the logic service process is pre-constructed; responding to the discovery message, and sending the preset 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 configuration address information acquired in advance and the relevant information and the local storage position of the virtual machine corresponding to the plurality of configuration address information respectively, and then the configuration address information is configured to the local. Because the logic service process in the service node replaces the function of the deployed physical server, and each virtual machine in the scheme has the corresponding service node to distribute the configuration address information, the distribution of the configuration address is not delayed due to the damage of a certain service node, and the non-invasive performance is also realized, so that the efficiency of the address distribution of the virtual machines is improved.
Drawings
FIG. 1 is a schematic flow chart of an alternative method for assigning addresses to virtual machines 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 a schematic flow chart of an alternative method for assigning addresses to virtual machines according to an embodiment of the present invention;
FIG. 8 is a schematic flow chart of an alternative method for assigning addresses to virtual machines according to an embodiment of the present invention;
FIG. 9 is a schematic flow chart of an alternative method for assigning addresses to virtual machines according to an embodiment of the present invention;
FIG. 10 is an interaction schematic diagram of a virtual machine address allocation method according to an embodiment of the present invention;
FIG. 11 is a schematic diagram of a virtual machine address allocation apparatus according to an embodiment of the present invention;
FIG. 12 is a schematic diagram of a hardware entity of a virtual machine address allocation apparatus according to an embodiment of the present invention;
fig. 13 is a schematic structural diagram II of a virtual machine address allocation apparatus according to an embodiment of the present invention;
FIG. 14 is a second 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 III of a virtual machine address allocation apparatus according to an embodiment of the present invention;
fig. 16 is a third schematic hardware entity diagram of a virtual machine address allocation apparatus according to an embodiment of the present invention.
Detailed Description
The technical solution of the present invention will be further elaborated with reference to the accompanying drawings and examples, which should not be construed as limiting the invention, but all other embodiments which can be obtained by one skilled in the art without making inventive efforts are within the scope of protection 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 to be understood that "some embodiments" can be the same subset or different subsets of all possible embodiments and can be combined with one another without conflict.
If a similar description of "first/second" appears in the present document, the following description is added, in which the terms "first/second/third" merely distinguish similar objects and do not represent a specific ordering of the objects, it being understood that the "first/second/third" may, where allowed, interchange a specific order or precedence order such that the embodiments of the invention described herein can be implemented in an order other than that 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 a schematic flowchart of an alternative method for assigning addresses to virtual machines 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 sent by the virtual machine, which is 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 sent by the virtual machine which is forwarded to the logic service process by the virtual switch.
In the embodiment of the invention, after the virtual machine is started, the virtual switch broadcasts the discovery message, 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 process is pre-built.
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 can comprise a plurality of service nodes, and each service node can be correspondingly bound with one virtual machine. The service node may be a host or a terminal in the cloud server, where a logical service process is built on each host.
The embodiment of the invention provides a distributed dhcp scheme based on a virtual machine, and by way of example, referring to fig. 2, the overall structure of the cloud server of the invention relates to the components of the virtual machine 104, the interface 102, the virtual switch 101, the message middleware 100 and the like. The cloud server calculates service nodes to which the ip information is to be distributed by using an algorithm, and distributes the user configuration ip information to the designated service nodes through the message middleware 100. When the virtual machine 104 sends a dhcp request message, the virtual switch 101 of the corresponding service node intercepts the dhcp message, converts the user configuration ip into a dhcp response packet message, sends the dhcp response packet message to the virtual machine 104, and the virtual machine 104 writes the dhcp response packet into the network card according to the dhcp message.
Wherein the discovery message is a dhcp discover discovery message.
S102, responding to the discovery message, and sending the preset 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 configuration address information acquired in advance and the relevant information and the local storage position of the virtual machine corresponding to the plurality of configuration address information respectively, and then the configuration address information is configured to the local.
In the embodiment of the invention, a service node responds to a discovery message, and a logic service process sends preset configuration address information to a virtual machine according to a preset program so that the virtual machine can write the configuration address information into a virtual network card; the configuration address information is calculated by the server according to a plurality of configuration address information acquired in advance and the relevant information and the local storage position of the virtual machine corresponding to the plurality of configuration address information respectively, and then the configuration address information is 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 the 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 in the virtual network card. The notification confirmation message is a dhcp offer message, and the request message is a dh cp request message.
In the embodiment of the invention, the cloud server firstly receives a plurality 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 related information of the plurality of virtual machines and the storage positions of the plurality of service nodes, and respectively configures the plurality of configuration address information to the corresponding service nodes. In an exemplary embodiment of the present invention, the cloud server may perform calculation by using an IP address allocation method, so as to respectively configure a plurality of configuration address information to corresponding service nodes.
In the embodiment of the invention, the user node sends the ipv4/ipv6 information configured by the user to the vm port (which is an interface through which data is transferred between the computer and other devices, between networks or between other directly connected computers) through the message middleware. After the virtual machine is started, a dhcp discover message is sent in a broadcast mode to search for a dhcp server (i.e. a service node). The cloud server builds a logical dhcp server process on each service node. The vm port forwards the dhcp discover message to the dhcp server process of the current host, and the dhcp server process sends the dhcp refer message containing the ip configured at the port by the user and other settings to the virtual machine. vm accepts the first received dhcp offer message and then it responds in broadcast fashion to a dhcp request message containing the contents of the address requested for its selected vm port, and when vm port dhcp server receives the dhcp request message answered by the virtual machine, a dhcp acknowledgement is sent to vm containing the ip address it provides and other settings telling the virtual machine that it can use the ip address it provides, and then the virtual machine binds its tcp/ip protocol to the network card.
In the embodiment of the invention, when a user newly builds a virtual machine, the user can configure the Internet protocol version 4 (Internet Protocol version, IPv 4)/Internet protocol version 6 (Internet Protocol version, IPv 6) on the configuration item of the virtual machine without concern about the operating system of the virtual machine, the storage position of the virtual machine or the running position of the virtual machine, and entering the acquisition duid, and after the operating system is installed in the virtual machine and the virtual switch is connected, the virtual machine can acquire the configured ip information. For example, when a user node newly adds a virtual machine, in conjunction with fig. 3, a user may configure a physical (Media Access Control or Medium Access Control, MAC) address at the newly added virtual machine configuration interface of the user node, and when an IPv4 address is used, an IP address, a subnet mask, a gateway, a preferred domain name system (Domain Name System, DNS), and an alternative DNS may be configured. In connection with fig. 4, a user may configure a MAC address in a newly added virtual machine configuration interface of a user node, and may configure an IP address, a prefix length, a gateway, a preferred domain name system DNS, and an alternative DNS when using an IPv6 address.
In the embodiment of the invention, when a user edits the virtual machine, the user does not need to care about an operating system of the virtual machine, does not need to care about a storage position of the virtual machine, does not need to care about an operation position of the virtual machine and does not need to care about dhcp lease time, the ipv4/ipv6 can be updated to the configuration of the virtual machine, and if the virtual machine is in a shutdown state, the virtual machine is connected with a virtual switch after being started, and the virtual machine can be updated to new ip information. For example, when a user newly adds a virtual machine, in conjunction 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 modified IP setting control of an edit virtual machine configuration interface of a user node. In connection with fig. 6, a user may configure an IP address, a prefix length, a gateway, a preferred domain name system DNS, and an alternative DNS when configuring an IPv6 address in a modified IP settings control of an edit virtual machine configuration interface of a user node.
In the embodiment of the invention, after the corresponding virtual machine is started, a discovery message sent by the virtual machine, which is forwarded to the logic service process by the virtual switch, is received; the virtual machine is pre-bound with the service node; the logic service process is pre-constructed; responding to the discovery message, and sending the preset 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 configuration address information acquired in advance and the relevant information and the local storage position of the virtual machine corresponding to the plurality of configuration address information respectively, and then the configuration address information is configured to the local. Because the logic service process in the service node replaces the function of the deployed physical server, and each virtual machine in the scheme has the corresponding service node to distribute the configuration address information, the distribution of the configuration address is not delayed due to the damage of a certain service node, and the non-invasive performance is also realized, so that the efficiency of the address distribution of the virtual machines is improved.
In some embodiments, the implementation of S101 shown in fig. 1 may further include S103-S104, which will be described in connection with the steps.
S103, constructing a logic service process locally.
In the embodiment of the invention, after receiving the instruction, the service node locally constructs a logic service process.
The instruction may be an instruction issued by the cloud server or an operation instruction of the target object. The logic service process is used for receiving the discovery message and the request message of the virtual machine, and feeding back the notification confirmation message and the response message to the virtual machine according to a preset program.
S104, receiving the configuration address information configured to the local by the server, and transmitting the configuration address information to the bottom data surface 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 transmits the configuration address information to the bottom data surface 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, the configuration address information may include: IPv4 address information or IPv6 address information, mask information, prefix length, gateway information, and domain name system information.
In the embodiment of the invention, the logical service process is constructed in the service node, the dhcp server is replaced by the logical service process, and as each virtual machine corresponds to the logical service process of one service node in the scheme, the address allocation of other virtual machines is not delayed when a certain service node fails, and the logical service process in the scheme is not physically constructed, the method is simpler, and the address allocation efficiency of the virtual machines is further improved.
In some embodiments, S102 shown in fig. 1 may also be implemented by S105-S106, which will be described in connection with the steps.
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 preset program.
S106, intercepting a request message fed back by the virtual machine response notification confirmation message in a channel of the virtual switch, and converting configuration address information into a response message and sending the response message to the virtual machine by the logic service process in response to the request message.
In the embodiment of the invention, the service node intercepts a request message fed back by a virtual machine response notification confirmation message in a channel of the virtual switch, and the logic service process responds to the request message to convert the configuration address information into a 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; if the request message is detected to carry the dhcp protocol, the request message is considered to be the dhcp request message, and the step of intercepting the dhcp request message by the service node is executed.
In the embodiment of the invention, the dhcp server is replaced by the logic service process of the service node, 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 a schematic flowchart of an alternative virtual machine address allocation method according to an embodiment of the present invention, and S101 to S102 shown in fig. 1 may be implemented through S401 to S405, and will be described in connection with each step.
S401, issuing ip information to the port.
In the embodiment of the invention, the user node transmits the ip information to the port.
S402, receiving packets by the vm port.
S403, 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, a service node analyzes the dhcp message and constructs a dhcp response packet according to configuration
S405, sending a dhcp response to vm.
In the embodiment of the invention, the service node sends a dhcp response packet to the vm virtual machine.
In some embodiments, referring to fig. 8, fig. 8 is a schematic flow chart of an alternative method for assigning addresses to virtual machines according to an embodiment of the present invention, and the steps will be described in connection with the following steps.
S201, after starting, sending a discovery message to the virtual switch.
In the embodiment of the invention, after the virtual machine is started, a discovery message is sent to the virtual switch.
S202, receiving a service node response discovery message, wherein a logic service process of the service node feeds back configuration address information according to a preset program; the server calculates the configuration address information according to a plurality of configuration address information acquired in advance and the relevant information and the local storage position of the virtual machine corresponding to the plurality of configuration address information respectively, and then configures the configuration address information to the service node.
In the embodiment of the invention, 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 server calculates the configuration address information according to a plurality of configuration address information acquired in advance and the relevant information and the local storage position of the virtual machine corresponding to the plurality of configuration address information respectively, and then configures the configuration address information to the service node.
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, and 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, and will be described in connection with the steps.
S204, receiving a notification confirmation message fed back by the logic service process by the service node in response 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 after the service node responds to the discovery message.
S205, responding to the notification confirmation message, and broadcasting a request message to the virtual switch.
In the embodiment of the invention, the virtual machine responds to the notification confirmation message and broadcasts a request message to the virtual switch.
S206, 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 the embodiment of the invention, the virtual machine receives the logic service process of the service node, and the feedback response message is converted by the logic service process according to the configuration address information.
In some embodiments, referring to fig. 9, fig. 9 is a schematic flowchart of an alternative method for assigning addresses to virtual machines according to an embodiment of the present invention, and the steps will be described in connection with the following steps.
S301, receiving a plurality of configuration address information sent by a plurality of user nodes.
In the embodiment of the invention, the server receives a plurality of configuration address information sent by a plurality of user nodes.
In the embodiment of the invention, the server can be a cloud server. The user node may be a terminal device of the user side. The user may configure the address information at the user node and then send the configured address information to the server.
S302, calculating according to the related information of the plurality of virtual machines corresponding to the plurality of configuration address information and storage positions of the plurality of service nodes, and respectively configuring the plurality of configuration address information to the plurality of service nodes; and the logic service process of each service node sends the preset configuration address information to the corresponding virtual machine according to a preset program.
In the embodiment of the invention, a server calculates according to the related 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 included, and respectively configures the plurality of configuration address information to the plurality of service nodes; and the logic service process of each service node sends the preset configuration address information to the corresponding virtual machine according to a preset program.
In the embodiment of the invention, a server receives a plurality of pieces of configuration address information sent by a plurality of user nodes, calculates according to the related information of a plurality of virtual machines corresponding to the plurality of pieces of configuration address information and the storage positions of a plurality of included service nodes, and configures the plurality of pieces of configuration address information to the plurality of service nodes respectively; and the logic service process of each service node sends the preset configuration address information to the corresponding virtual machine according to a preset program. Because the dhcp server is replaced by the logic service process of the service node in the scheme, the whole process is simpler, and the address allocation efficiency of the virtual machine is further improved.
In some embodiments, S302 shown in fig. 9 may be implemented by S303-S304, which will be described in connection with the steps.
And S303, calculating according to the operation position information and the operation strategy information of the plurality of virtual machines corresponding to the plurality of configuration address information and the storage positions of the plurality of service nodes to obtain the binding relation between each virtual machine and the corresponding service node.
In the embodiment of the invention, the server calculates according to the operation position information and the operation strategy 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 to obtain the binding relation between each virtual machine and the corresponding service node.
S304, configuring each piece of configuration address information to the corresponding service node bound by the virtual machine.
In the embodiment of the invention, the server configures each piece of configuration address information to the corresponding service node bound by the virtual machine.
In the embodiment of the invention, the server calculates according to the operation position information and the operation strategy information of the virtual machine and the storage positions of a plurality of service nodes, and distributes the corresponding configuration address information to the service nodes so that the logic service process of the corresponding service nodes can send the configuration address information to the virtual machine according to the preset program, thereby improving the distribution efficiency of the virtual machine addresses.
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, and description will be made with reference to each step.
S501, after the virtual machine is started, a discovery message is sent to the virtual switch.
In the embodiment of the present invention, the implementation steps are the same as those in S201, and are not described in detail 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 server calculates the configuration address information according to a plurality of configuration address information acquired in advance and the relevant information and the local storage position of the virtual machine corresponding to the plurality of configuration address information respectively, and then configures the configuration address information to the service node.
In the embodiment of the present invention, the implementation steps are the same as those in S202, and are not described in detail herein.
S503, the virtual machine writes the configuration address information into the virtual network card.
In the embodiment of the present invention, the implementation steps are the same as those in S203, and are not described in detail herein.
In some embodiments, referring to fig. 11, fig. 11 is a schematic structural diagram of a virtual machine address allocation apparatus according to an embodiment of the present invention.
The embodiment of the invention also provides a virtual machine address allocation device 700, which is applied to any service node in a server of a cloud network environment, and comprises: a receiving unit 703 and a transmitting unit 704.
A receiving unit 703, configured to receive, after the corresponding virtual machine is turned on, a discovery packet sent by the virtual machine that is forwarded to the logical service process by the virtual switch; the virtual machine is pre-bound with the service node; the logic service process is pre-constructed;
the sending unit 704 is configured to send, in response to the discovery packet, the preset configuration address information to the virtual machine according to a predetermined program by the logic service process, so that the virtual machine writes the configuration address information into the virtual network card; wherein,
the configuration address information is calculated by the server according to a plurality of configuration address information acquired in advance and the relevant information and the local storage position of the virtual machine corresponding to the plurality of configuration address information respectively, and then the configuration address information is configured to the local.
In the embodiment of the present invention, the virtual machine address allocation apparatus 700 constructs a logical service process locally; and receiving configuration address information configured to the local by the server, and transmitting the configuration address information to a bottom data surface of the logic service process.
In the embodiment of the present invention, the sending unit 704 of the virtual machine address allocation device 700 is configured to respond to the discovery message, and the logic service process sends a notification confirmation message to the virtual machine according to a predetermined program; and intercepting a request message fed back by the virtual machine response notification confirmation message in a channel of the virtual switch, and converting configuration address information into a response message and sending the response message to the virtual machine by a logic service process in response to the request message.
In the embodiment of the invention, the configuration address information comprises: IPV4 address information or IPV 6 address information, mask information, prefix length, gateway information, and domain name system information.
In the embodiment of the invention, the related information comprises: 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 a corresponding virtual machine is turned on, a discovery packet sent by a virtual machine forwarded to a logical service process by a virtual switch; the virtual machine is pre-bound with the service node; the logic service process is pre-constructed; the sending unit 704 is configured to respond to the discovery message, and the logic service process sends the preset configuration address information to the virtual machine according to a preset program, so that the virtual machine can write in the virtual network card by using the configuration address information; the configuration address information is calculated by the server according to a plurality of configuration address information acquired in advance and the relevant information and the local storage position of the virtual machine corresponding to the plurality of configuration address information respectively, and then the configuration address information is configured to the local. Because the logic service process in the service node replaces the function of the deployed physical server, and each virtual machine in the scheme has the corresponding service node to distribute the configuration address information, the distribution of the configuration address is not delayed due to the damage of a certain service node, and the non-invasive performance is also realized, so that the efficiency of the address distribution of the virtual machines is improved.
It should be noted that, in the embodiment of the present invention, if the above-mentioned virtual machine address allocation method is implemented in the form of a software function module, and is sold or used as a separate product, the virtual machine address allocation method may also be stored in a computer readable storage medium. Based on such understanding, the technical solution of the embodiments of the present invention may be embodied essentially or in a part contributing to the related art in the form of a software product stored in a storage medium, including several instructions for causing a virtual machine address allocation apparatus (which may be a personal computer or the like) to perform all or part of the methods of the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read Only Memory (ROM), a magnetic disk, an optical disk, or other various media capable of storing program codes. Thus, embodiments of the invention are not limited to any specific combination of hardware and software.
Correspondingly, an embodiment of the invention provides a computer-readable storage medium, on which a computer program is stored, which computer program, when being executed by a processor, carries out the steps of the above-mentioned method.
Correspondingly, the embodiment of the invention provides a virtual machine address allocation device, which comprises a first memory 702 and a first processor 701, wherein the first memory 702 stores a computer program capable of running on the first processor 701, and the first processor 701 implements the steps in the above method when executing the program.
It should be noted here that: the description of the storage medium and apparatus embodiments above is similar to that of the method embodiments described above, with similar benefits as the method embodiments. For technical details not disclosed in the embodiments of the storage medium and the apparatus of the present invention, please refer to the description of the method embodiments of the present invention.
It should be noted that fig. 12 is a 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, the 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 cache 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 first processor 701 and the virtual machine address allocation apparatus 700, which may be implemented by a FLASH memory (FLASH) or a random access memory (Random Access Memory, RAM).
In some embodiments, referring to fig. 13, fig. 13 is a schematic diagram of a virtual machine address allocation apparatus according to an embodiment of the present invention.
The embodiment of the present invention also provides a virtual address allocation apparatus 800, which is applied to a virtual machine in a cloud network environment, and includes: a second transmitting unit 803, a second receiving unit 804, and a first configuring 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 a response discovery message from the service node, where the logic service process of the service node feeds back configuration address information according to a predetermined program; the server calculates the configuration address information according to a plurality of configuration address information acquired in advance and the related information and the local storage position of the virtual machine corresponding to the plurality of configuration address information respectively, and then configures the configuration address information 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 embodiment of the present invention, the second receiving unit 804 in the virtual address allocation apparatus 800 is configured to receive a notification confirmation message fed back by the logic service process, where the notification confirmation message is a response discovery message of the service node; 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 the 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 service node response discovery message, where the logic service process of the service node feeds back configuration address information according to a predetermined program; the server calculates the configuration address information according to a plurality of configuration address information acquired in advance and the related information and the local storage position of the virtual machine corresponding to the plurality of configuration address information respectively, and then configures the configuration address information 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 the 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 machines is further improved.
Correspondingly, an embodiment of the invention provides a computer-readable storage medium, on which a computer program is stored, which computer program, when being executed by a processor, carries out the steps of the above-mentioned method.
Correspondingly, the embodiment of the invention provides a virtual machine address allocation device, which comprises a second memory 802 and a second processor 801, wherein the second memory 802 stores a computer program capable of running on the second processor 801, and the second processor 801 implements the steps in the above method when executing the program.
It should be noted here that: the description of the storage medium and apparatus embodiments above is similar to that of the method embodiments described above, with similar benefits as the method embodiments. For technical details not disclosed in the embodiments of the storage medium and the apparatus of the present invention, please refer to the description of the method embodiments of the present 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 the 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 apparatus 800.
The second memory 802 is configured to store instructions and applications executable by the second processor 801, and may also cache 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 allocation apparatus 800, which may be implemented by a FLASH memory (FLASH) or a random access memory (Random Access Memory, RAM).
In some embodiments, referring to fig. 15, fig. 15 is a schematic diagram of a virtual machine address allocation apparatus according to an embodiment of the present invention.
The embodiment of the invention also provides a virtual machine address allocation device 900, which is applied to a server of a cloud network environment and comprises: a third receiving unit 903 and a second configuring unit 904.
A third receiving unit 903, configured to receive a plurality of configuration address information sent by a plurality of user nodes;
a second configuration unit 904, configured to calculate according to information related to a plurality of virtual machines corresponding to the plurality of configuration address information and storage locations of a plurality of service nodes included, and configure the plurality of configuration address information to the plurality of service nodes respectively; and the logic service process of each service node sends the preset configuration address information to the corresponding virtual machine according to a preset program.
In the embodiment of the present invention, the second configuration unit 804 in the virtual address allocation apparatus 900 is configured to calculate, according to the operation location information and the operation policy information of a plurality of virtual machines corresponding to the plurality of configuration address information, and the storage locations of a plurality of service nodes, a binding relationship between each virtual machine and a corresponding service node is obtained; and configuring each piece of configuration address information to the corresponding service node bound by the virtual machine.
In the embodiment of the present invention, the third receiving unit 903 in the virtual machine address allocation device 900 is configured to receive multiple pieces of configuration address information sent by multiple user nodes; the second configuration unit 904 is configured to calculate according to information related to a plurality of virtual machines corresponding to the plurality of configuration address information and storage locations of a plurality of service nodes included, and configure the plurality of configuration address information to the plurality of service nodes respectively; and the logic service process of each service node sends the preset configuration address information to the corresponding virtual machine according to a preset program. In the scheme, the dhcp server is replaced by the logic service process of the service node, so that the allocation work of the virtual machine address is simpler, and the allocation efficiency of the virtual machine address is further improved.
Correspondingly, an embodiment of the invention provides a computer-readable storage medium, on which a computer program is stored, which computer program, when being executed by a processor, carries out the steps of the above-mentioned method.
Correspondingly, the embodiment of the invention provides a virtual machine address allocation device, which comprises a third memory 902 and a third processor 901, wherein the third memory 902 stores a computer program capable of running on the third processor 901, and the steps in the method are realized when the third processor 901 executes the program.
It should be noted here that: the description of the storage medium and apparatus embodiments above is similar to that of the method embodiments described above, with similar benefits as the method embodiments. For technical details not disclosed in the embodiments of the storage medium and the apparatus of the present invention, please refer to the description of the method embodiments of the present invention.
It should be noted that, fig. 16 is a third 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. 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 cache 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, which may be implemented by a FLASH memory (FLASH) or a random access memory (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 foregoing processes do not mean the order of execution, and the order of execution of the processes should be determined by the functions and internal logic thereof, and should not constitute any limitation on the implementation process of the embodiments of the present invention. The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages 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 defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In the several embodiments provided by the present invention, it should be understood that the disclosed apparatus and method may be implemented in other manners. The above-described embodiment of the apparatus is merely illustrative, for example, the division of units is merely a logic function division, and there may be other division manners in actual implementation, such as: multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. In addition, the various components shown or discussed may be coupled or directly coupled or communicatively coupled to each other via some interface, device or unit, whether electrical, mechanical or otherwise.
The units described above as separate components may or may not be physically separate, and components shown as units may or may not be physical units; can be located in one place or distributed to a plurality of network units; some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present invention may be integrated in one processing unit, or each unit may be separately used as one unit, or two or more units may be integrated in one unit; the integrated units may be implemented in hardware or in hardware plus software functional units.
Those of ordinary skill in the art will appreciate that: all or part of the steps for implementing the above method embodiments may be implemented by hardware related to program instructions, and the foregoing program may be stored in a computer readable storage medium, where the program, when executed, performs steps including the above method embodiments; and the aforementioned storage medium includes: a removable Memory device, a Read Only Memory (ROM), a magnetic disk or an optical disk, or the like, which can store program codes.
Alternatively, the above-described integrated units of the present invention may be stored in a computer-readable storage medium if implemented in the form of software functional modules and sold or used as separate products. Based on such understanding, the technical solution of the embodiments of the present invention may be embodied essentially or in a part contributing to the related art in the form of a software product stored in a storage medium, including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform 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 removable memory device, a ROM, a magnetic disk, or an optical disk.
The foregoing is merely an embodiment of the present invention, but the protection scope of the present invention is not limited thereto, and any person skilled in the art can easily think about changes or substitutions within the technical scope of the present invention, and the changes and substitutions are intended to be covered in the protection scope of the present invention. Therefore, the protection scope of the invention is subject to the protection scope of the claims.

Claims (11)

1. The virtual machine address allocation method is characterized by being applied to any one of service nodes in a server of a cloud network environment and comprising the following steps of:
After the corresponding virtual machine is started, a discovery message sent by the virtual machine, which is forwarded to a logic service process by a virtual switch, is received; the virtual machine is pre-bound with the service node; the logic service process is pre-constructed;
responding to the discovery message, and sending the preset 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 a virtual network card; wherein,
the configuration address information is calculated by the server according to a plurality of configuration address information acquired in advance and the plurality of configuration address information respectively corresponding to related information and local storage positions of the virtual machine, and is further configured to the local, wherein the related information comprises operation position information and operation strategy information.
2. The method for assigning addresses to virtual machines according to claim 1, wherein, after the corresponding virtual machine is turned on, before receiving a discovery message sent by the virtual machine that is forwarded to a logical service process by a virtual switch, the method further comprises:
constructing a logic service process locally;
and receiving the configuration address information configured to the local by the server, and transmitting the configuration address information to a bottom data surface of the logic service process.
3. The method of claim 2, wherein the responding to the discovery message, the logic service process sends the predetermined configuration address information to the virtual machine according to a predetermined program, 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, and converting the configuration address information into a response message and sending the response message to the virtual machine by the logic service process in response to the request message.
4. The virtual machine address allocation method according to claim 1, wherein the configuration address information includes: IPv4 address information or IPv6 address information, mask information, prefix length, gateway information, and domain name system information.
5. The virtual machine address allocation method is characterized by being applied to a virtual machine in a cloud network environment and comprising the following steps of:
after starting, sending a discovery message to the virtual switch;
receiving a response of a service node to the discovery message, and sending a notification confirmation message to the virtual machine by a logic service process of the service node according to a preset program; intercepting a request message fed back by the virtual machine in response to the notification confirmation message in a channel of the virtual switch, wherein the logic service process responds to the request message and feeds back configuration address information; the server calculates the configuration address information according to a plurality of configuration address information acquired in advance and the related information and the local storage position of the virtual machine corresponding to the plurality of configuration address information respectively, and then configures the configuration address information to the service node; the discovery message is forwarded to the service node by the virtual switch, and the related information comprises operation position information and operation strategy information;
And writing the configuration address information into a virtual network card.
6. The virtual machine address allocation method according to claim 5, wherein said receiving service node responds to said discovery message, and said service node logic service process feeds back configuration address information according to a predetermined program, including
Receiving a notification confirmation message fed back by the logic service process by the service node in response 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.
7. The virtual machine address allocation method is characterized by being applied to a server of a cloud network environment and comprising the following steps of:
receiving a plurality of configuration address information sent by a plurality of user nodes;
calculating according to the related information of a plurality of virtual machines corresponding to the plurality of configuration address information and storage positions of a plurality of service nodes, and respectively configuring the plurality of configuration address information to the plurality of service nodes; and the logic service process of each service node sends the preset configuration address information to the corresponding virtual machine according to a preset program, and the related information comprises operation position information and operation strategy information.
8. The method of claim 7, wherein,
calculating according to the related information of the plurality of virtual machines corresponding to the plurality of configuration address information and the storage positions of the plurality of service nodes, and respectively configuring the plurality 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 plurality of virtual machines corresponding to the plurality of configuration address information and the storage positions of the plurality of service nodes to obtain the binding relation between each virtual machine and the corresponding service node;
and configuring each piece of configuration address information to the corresponding service node bound by the virtual machine.
9. A virtual machine address allocation apparatus, applied to any one of service nodes in a server of a cloud network environment, comprising:
the receiving unit is used for receiving 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 is pre-bound with the service node; the logic service process is pre-constructed;
the sending unit is used for responding to the discovery message, and the logic service process sends the preset 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 configuration address information is calculated by the server according to a plurality of configuration address information acquired in advance and the plurality of configuration address information respectively corresponding to related information and local storage positions of the virtual machine, and is further configured to the local, wherein the related information comprises operation position information and operation strategy information.
10. A virtual machine address allocation apparatus comprising a first memory and a first processor, the first memory storing a computer program executable on the first processor, the first processor implementing the steps of the method of any one of claims 1 to 4 when the program is executed.
11. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a first processor, implements the steps of the method of any of claims 1-4.
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 CN114760269A (en) 2022-07-15
CN114760269B true 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 (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
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
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

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8966082B2 (en) * 2009-02-10 2015-02-24 Novell, Inc. Virtual machine address management
US9952885B2 (en) * 2013-08-14 2018-04-24 Nicira, Inc. Generation of configuration files for a DHCP module executing within a virtualized container
US11070629B2 (en) * 2017-08-30 2021-07-20 Red Hat Israel, Ltd Migration notification and response messages for virtual machines

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
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
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
KVM虚拟机的静态IP地址注入方法;王利;《酒城教育》;全文 *
探讨VMware环境下Linux系统的三种网络工作模式;孔瑞平;《计算机产品与流通》;全文 *
私有云平台上的虚拟机安全检测设计与实现;米永涛;《中国优秀硕士学位论文全文数据库 信息科技辑》;20170315;全文 *

Also Published As

Publication number Publication date
CN114760269A (en) 2022-07-15

Similar Documents

Publication Publication Date Title
EP2267984B1 (en) Address configuring method, apparatus and system
CN101442425B (en) Gateway management method, device, and system
EP1410579B1 (en) Method for configuring a computer network
JP5663549B2 (en) Method, apparatus and system for assigning public IP addresses
US9380020B2 (en) Method for mobile node to dynamically acquire location identifier, and LISP network
CN110995886B (en) Network address management method, device, electronic equipment and medium
EP2579519A1 (en) Method, network device and system for automatically configuring network device in internet protocol version 6 network
WO2008109400A1 (en) Client addressing and roaming in a wireless network
CN102714636A (en) Method and apparatus for facilitating push communication across network boundaries
CN103957288A (en) Method, device and equipment for IP address dynamic allocation
CN103916484A (en) IP-address configuring method and device
JP2007509566A (en) Handover method, handover apparatus, and information recording medium having instructions for performing the handover method under DHCPv4 environment
CN101873320A (en) Client information verification method based on DHCPv6 relay and device thereof
CN102340421B (en) Gateway management method, address allocation method, device and system
CN103516599A (en) Host finding method, network device, and host
EP3883203A1 (en) Ipv6 address configuration method and router device
EP3703343A1 (en) Method and device for configuring service flow
CN114760269B (en) Virtual machine address allocation method, device and storage medium
CN108076025B (en) Method and device for registering network equipment
US20080201477A1 (en) Client side replacement of DNS addresses
KR20170014853A (en) Method for processing traffic based on sdn
CN112003771A (en) Method for realizing intelligent network access of LAN side terminal
JP2013172396A (en) Communication device and program
CN107172229A (en) The collocation method and device of router
CN104954161A (en) IPv6 transitional technology type processing method, device and system

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