[go: up one dir, main page]

CN109710423B - Method and equipment for communication between virtual machines - Google Patents

Method and equipment for communication between virtual machines Download PDF

Info

Publication number
CN109710423B
CN109710423B CN201811513714.7A CN201811513714A CN109710423B CN 109710423 B CN109710423 B CN 109710423B CN 201811513714 A CN201811513714 A CN 201811513714A CN 109710423 B CN109710423 B CN 109710423B
Authority
CN
China
Prior art keywords
virtual machine
agent
state
host
reply
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
CN201811513714.7A
Other languages
Chinese (zh)
Other versions
CN109710423A (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.)
Shanghai Yunzhou Technology Co.,Ltd.
Original Assignee
Shanghai Zstack Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Zstack Information Technology Co ltd filed Critical Shanghai Zstack Information Technology Co ltd
Priority to CN201811513714.7A priority Critical patent/CN109710423B/en
Publication of CN109710423A publication Critical patent/CN109710423A/en
Application granted granted Critical
Publication of CN109710423B publication Critical patent/CN109710423B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The method comprises the steps that configuration information of a source host and configuration information of a destination host are checked through a main agent corresponding to a cloud route; the main agent determines the survival state of a first agent on the source host and a second agent on the destination host according to the configuration information; the main agent sends message instruction information to a first virtual machine on the source host and a second virtual machine on the target host according to the survival state and a preset protocol format; and the first agent and the second agent monitor the message instruction information respectively so that the source host and the target host establish communication connection between the first virtual machine and the second virtual machine according to the message instruction information. The method has lower time delay, does not depend on a database, and improves the reliability of the network. And the preset protocol format is used, so that the delay is reduced, the analysis time is shortened, and the automatic deployment difficulty is reduced.

Description

Method and equipment for communication between virtual machines
Technical Field
The present application relates to the field of computers, and in particular, to a method and an apparatus for communication between virtual machines.
Background
With the rapid development of internet technology and the increasing demand of users for the internet, larger data centers with various capabilities are being built to meet the demand. Among other things, the development of virtualization technology has made it possible to implement a large number of Virtual Machines (VMs) in a data center, which can essentially operate as physical machines and perform various functions such as a Web server or a database server. When two Virtual Machines (VM) belonging to different networks respectively belong to different network segments, direct communication cannot be realized. The existing communication mode among virtual machines among different networks has the problems of network availability reduction, complex configuration, network code vulnerability rate reduction, great network reliability reduction and the like. In addition, some communication methods use a distributed routing, a mechanism of network agent computing nodes and network agents on the routing, information of the distributed routing is stored in a database and is issued to each computing node by a management node in a unified manner, as shown in an architecture diagram shown in fig. 1, wherein a message queue is generally a RabbitMQ or similar message queue, and there are several disadvantages in using the message queue: the message queue becomes a centralized fault domain, the message queue generally has a centralized processing server, and when the message queue fails, the distributed routing can not be configured; the forwarding delay is high, the Message queue from the management node to the computing node needs to be forwarded, the delay is increased, the Message queue generally runs on a Transmission Control Protocol (TCP), and the parsing time is increased by carrying content through Protocol formats such as Advanced Message Queuing (AMQP); message transmission needs to be monitored in advance, and each network agent needs to be configured with the address, the port, the message subject and the queue of the message queue server in advance, so that the automatic deployment difficulty is increased.
Disclosure of Invention
An object of the present application is to provide a method and a device, which solve the problems in the prior art that gateway spoofing is introduced, forwarding through a router generates high delay, network reliability is low, and distributed routing configuration is not limited by message queue validity, parsing time is long, and automatic deployment is difficult.
According to an aspect of the present application, there is provided a method for inter-virtual machine communication, the method including:
a main agent corresponding to the cloud route checks configuration information of a source host and a destination host;
the main agent determines the survival state of a first agent on the source host and a second agent on the destination host according to the configuration information;
the main agent sends message instruction information to a first virtual machine on the source host and a second virtual machine on the target host according to the survival state and a preset protocol format;
and the first agent and the second agent monitor the message instruction information respectively so that the source host and the target host establish communication connection between the first virtual machine and the second virtual machine according to the message instruction information.
Further, the checking, by the master agent corresponding to the cloud route, of the configuration information of the source host and the destination host includes:
a main agent corresponding to a cloud route acquires a connection tracking table in the cloud route and determines a connection target to be optimized in the connection tracking table;
recording the connection target to be optimized in a state table as a state entry;
and controlling the state entry through a state machine to determine the configuration information of the source host and the destination host corresponding to the state entry.
Further, controlling the state entry through a state machine to determine configuration information of a source host and a destination host corresponding to the state entry, including:
the state machine sends check information to the source host and the destination host;
the master agent modifies the state of the state entry in the state table according to the check information to obtain a modification result;
and the state machine determines the configuration information of the source host and the configuration information of the destination host according to the modification result.
Further, the modifying, by the master agent, the state of the state entry in the state table according to the check information includes:
the master agent determines a reply result of one party in the connection target to be optimized according to the check information, wherein the reply result comprises a successful reply, a reply failure and a reply overtime;
and the master agent modifies the state of the state item in the state table according to the reply result.
Further, the method comprises:
and when the reply result is a reply failure, deleting the state entry of which the reply failure time exceeds a first preset time through the state machine.
Further, the method comprises:
and when the reply result is successful reply, deleting the state entry with the time of successful reply exceeding second preset time through the state machine.
Further, the preset protocol format includes any combination of protocol version, message type and code, header length, full length, source two-layer network type, source network identifier, destination two-layer network type, destination network identifier, source IP address, destination IP address, source MAC address, and destination MAC address.
Further, the monitoring of the message instruction information by the first agent and the second agent respectively includes:
the first agent captures message instruction information received by the first virtual machine according to the preset protocol format;
and the second agent captures message instruction information received by the second virtual machine according to the preset protocol format.
Further, the establishing, by the source host and the destination host, a communication connection between the first virtual machine and the second virtual machine according to the message instruction information includes:
the source host modifies the relevant information of the first virtual machine into the relevant information of the second virtual machine according to the message instruction information captured by the first agent, and obtains a modification result of the first virtual machine;
the destination host modifies the relevant information of the second virtual machine into the relevant information of the first virtual machine according to the message instruction information captured by the second agent, and obtains the modification result of the second virtual machine;
and establishing communication connection between the first virtual machine and the second virtual machine according to the modification result of the first virtual machine and the modification result of the second virtual machine.
According to still another aspect of the present application, there is also provided an apparatus for inter-virtual machine communication, wherein the apparatus includes:
one or more processors; and
a memory storing computer readable instructions that, when executed, cause the processor to perform the operations of the foregoing method.
According to another aspect of the present application, there is also provided a computer readable medium having computer readable instructions stored thereon, the computer readable instructions being executable by a processor to implement the aforementioned method for inter-virtual machine communication.
Compared with the prior art, the configuration information of the source host and the destination host is checked through the main agent corresponding to the cloud route; the main agent determines the survival state of a first agent on the source host and a second agent on the destination host according to the configuration information; the main agent sends message instruction information to a first virtual machine on the source host and a second virtual machine on the target host according to the survival state and a preset protocol format; and the first agent and the second agent monitor the message instruction information respectively so that the source host and the target host establish communication connection between the first virtual machine and the second virtual machine according to the message instruction information. The method has lower delay, does not depend on a database, and preferentially ensures that the user service is not influenced under any condition; even if one of the agents is hung, the original path is only reduced, the flow is not interrupted, and the reliability of the network is improved. On the other hand, when the main agent sends message instruction information and the network agent on the computing node captures the message instruction information, the preset protocol format is relied on, and the preset protocol format reduces delay, analysis time and automatic deployment difficulty.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
FIG. 1 is a diagram illustrating an architecture for implementing message queue delivery by a management node to a compute node in the prior art;
FIG. 2 illustrates a flow diagram of a method for inter-virtual machine communication provided in accordance with an aspect of the present application;
fig. 3 is a schematic diagram illustrating a communication between two virtual machines on different networks according to an embodiment of the present application.
The same or similar reference numbers in the drawings identify the same or similar elements.
Detailed Description
The present application is described in further detail below with reference to the attached figures.
In a typical configuration of the present application, the terminal, the device serving the network, and the trusted party each include one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include non-transitory computer readable media (transient media), such as modulated data signals and carrier waves.
Fig. 2 is a flowchart illustrating a method for inter-virtual machine communication according to an aspect of the present application, where the method includes: step S11 to step S14,
in step S11, the master agent corresponding to the cloud route checks configuration information of the source host and the destination host; here, the master Agent is a router network Agent, and may send a control command to the virtual machine, and a network Agent (computer node network Agent) located on a physical machine where the virtual machine is located captures the control command, and the computer node network Agent replies a message to the router network Agent. In an SDN network, cloud routing is distributed routing. The source host is a host sending messages, and the destination host is a host receiving messages. When communication is performed between virtual machines respectively located on a source host and a destination host, an optimized path can be taken, namely after route information of a first message is captured by a main agent located on the same host as a cloud route, configuration information of the source host and the destination host is checked, wherein the configuration information comprises survival states of network agents on the source host and the destination host.
In step S12, the master agent determines the survival status of the first agent on the source host and the second agent on the destination host according to the configuration information; after determining the configuration information of the source host and the configuration information of the destination host respectively according to the checked results, determining whether the first agent on the source host is alive or not and whether the second agent on the destination host is alive or not, so as to determine whether to establish the communication connection between the virtual machines through the optimized path of the message or not according to the alive state.
Next, in step S13, the master agent sends message instruction information to the first virtual machine on the source host and the second virtual machine on the destination host according to the survival status and according to a preset protocol format; here, the master agent, the first agent and the second agent are network agents; when a first agent on a source host and a second agent on a target host are both in a survival state, a main agent sends message instruction information to a first virtual machine on the source host and a second virtual machine on the target host, wherein the message instruction information is sent according to a preset protocol format, so that delay is reduced, resolution time is reduced, the problem that the address, the port, the message theme, the queue and the like of a message queue server need to be configured in advance by each agent is avoided, and the difficulty of automatic deployment is reduced.
Subsequently, in step S14, the first agent and the second agent respectively monitor the message instruction information, so that the source host and the destination host establish a communication connection between the first virtual machine and the second virtual machine according to the message instruction information. The first agent and the second agent on the computing node respectively monitor message instruction information sent by the main agent and received by the virtual machine, so that the source host and the destination host exchange relevant information of the virtual machine through a three-layer exchange method according to the message instruction information, and communication connection between the first virtual machine and the second virtual machine in different networks is established. In the embodiment of the application, the preset protocol format is based on an IP protocol, a network agent on a computing node monitors all traffic entering the computing node in the preset protocol format, and a network agent on a router monitors all traffic entering the router in the preset protocol format, so that the network agent on the router only needs to send a message in the preset protocol format to a virtual machine needing to optimize the traffic, and the message is intercepted and analyzed on a physical machine, so that a control instruction is sent to a correct computing node through the preset protocol format without knowing the computing node where the virtual machine is located, and the correctness is guaranteed by the operation of a network bottom layer, so that the risks of database information error, outdating and the like are avoided. The computing nodes are a source host and a destination host in the distributed network.
In an embodiment of the present application, in step S11, a master agent corresponding to a cloud route acquires a connection tracking table in the cloud route, and determines a connection target to be optimized in the connection tracking table; recording the connection target to be optimized in a state table as a state entry; and controlling the state entry through a state machine to determine the configuration information of the source host and the destination host corresponding to the state entry. Here, a master agent on the same host as the cloud route checks a connection tracking table in the cloud route, which records message-related information and route-related information of a path in which a message sent from a source host is forwarded to a destination host via the cloud route. Determining whether a path for sending a subsequent message is optimized or not by a path state of a path for forwarding a first message sent from a source host to a destination host through a cloud route, when the path taken by the first message is the path state, determining that the source host sending the subsequent message and the destination host receiving the subsequent message are connection targets to be optimized, for example, when the path for sending the first message to a virtual machine VM2 by a virtual machine VM1 is normal, the message path from the VM1 to the VM2 needs to be optimized, adding a connection record which needs to be optimized and does not exist in a state table into the state table, that is, taking the optimized message path between the VM1 and VM2 in the connection targets to be optimized as a state entry in the state table, and thus checking configuration information of the VM1 and VM2 against the state entry.
In an embodiment of the present application, controlling the state entry through a state machine to determine configuration information of a source host and a destination host corresponding to the state entry may be implemented in the following manner: the state machine sends check information to the source host and the destination host; the master agent modifies the state of the state entry in the state table according to the check information to obtain a modification result; and the state machine determines the configuration information of the source host and the configuration information of the destination host according to the modification result.
Here, the master agent checks the connection tracking table, adds the connection records that need to be optimized and are not present in the state table to the state table, marks them as New states (e.g., marks "New"), and hands them over to the state machine control. The state machine sends the checking information of the source host and the destination host to the new state entry, and marks the entry as a sent checking state (such as a state marked as 'check _ send'); when a feedback message to be checked is received by the main agent, checking the state table and modifying the state of the item; determining the configuration information of the source host and the configuration information of the destination host according to the modified result, if the state of the modified entry is 'all checked', sending the configuration information of the source host, and when the configuration information feedback of the source host is received, checking the state table, modifying the state, and sending the configuration information of the destination host according to the modified result.
Further, when the master agent modifies the state of the state entry in the state table according to the check information, the following is specifically implemented: the master agent determines a reply result of one party in the connection target to be optimized according to the check information, wherein the reply result comprises a successful reply, a reply failure and a reply overtime; and the master agent modifies the state of the state item in the state table according to the reply result. Here, when there is a checked feedback message received by the master agent, the status table is checked, and the entry status is modified: if the reply is successful, then the mark is 'source host checked' or 'destination host checked'; if the state at this time is either that the source host has been checked or that the destination host has been checked and the new reply is complementary to it, then the state is marked as "all checked"; if the received reply is failure, marking as failure; if the reply times out, it is marked as "failed".
Further, when the reply result is a reply failure, deleting the state entry of which the reply failure time exceeds a first preset time through the state machine. And when the reply result is successful reply, deleting the state entry with the time of successful reply exceeding second preset time through the state machine. Here, the state machine deletes the entry whose state marked as "failed" exceeds a first preset time (e.g., 10min), and deletes the entry whose configuration information of the destination host is checked as a successful reply and times out for a second preset time (e.g., 5 min).
In a preferred embodiment of the present application, a master Agent (Agent) corresponding to a cloud route checks a connection tracking table in the cloud route, adds a connection record which needs to be optimized and does not have a protocol state table into a state table, marks the connection record as a New state, and sends the New state to a state machine for control. The state machine sends a check message to the source host and the destination host for the New state entry, marking the entry as "check _ send" state. When a check rsp message is received by the master agent, the state table is checked, and the entry state is modified: if the reply is successful, it is marked as "src _ checked" or "dst _ checked"; if the state at this time is already "src _ checked" or "dst _ checked" and the new reply is complementary to it, then it is marked as "all _ checked"; if the received reply fails, marking as 'failed'; if the reply times out (say 10s), it is marked as "failed". The state machine sends a configuration message for the source host, labeled "sec _ sent", to the "all _ checked" entry; when the config srcrrsp is received by the master agent, the state table is checked and the state is modified: if the reply is successful, it is marked as "src _ succ"; if the reply fails or times out (say 10s), it is marked as "failed". The state machine sends a configuration message for the destination host, labeled "dst _ sent", to the "src _ succ" entry; when the config dstrsp is received, the state table is checked, and the state is modified: if the reply is successful, it is marked as "dst _ succ"; if the reply fails or times out (say 10s), it is marked as "failed". The state machine deletes entries that are "failed" timeout (say 10min), and the state machine deletes entries that are "dst _ succ" timeout (say 5 min). It should be noted that config srcrsp is configured to send configuration feedback on a configuration message of a source host, and config dstrsp is configured to send configuration feedback on a configuration message of a destination host.
In an embodiment of the present application, the preset protocol format includes any combination of a protocol version, a message type and a code, a header length, a full length, a source two-layer network type, a source network identifier, a destination two-layer network type, a destination network identifier, a source IP address, a destination IP address, a source MAC address, and a destination MAC address. The preset protocol runs on an IP protocol, the preset protocol format consists of a plurality of fields, and the fields all use network byte sequences during transmission, wherein the protocol version is used for upgrading future protocols; and the message type and the message code, for example, when the message type is 1 and the message code is 0, the source host configurable message is checked, and when the message type is 2 and the message code is 0, the source host configurable reply is checked, so that the message is successful. The header length is the length from version to end of tlv (type-length-value); full length is the length from version to end of data (data), i.e. the header length plus the length of the data; the source two-tier network types include support for a vlan-less interface, a vlan interface, and a vxlan interface. Additionally, the fields may also include tlv fields and data.
In an embodiment of the present application, in step S14, the first agent captures, according to the preset protocol format, message instruction information received by the first virtual machine; and the second agent captures message instruction information received by the second virtual machine according to the preset protocol format. Here, as shown in fig. 3, the first Agent (Agent1) and the first virtual machine VM1 are located on the source host (host1), the second Agent (Agent2) and the second virtual machine VM2 are located on the destination host (host2), the master Agent feeds back message instruction information to the virtual machines (source host and destination host) associated with the first message, and the first Agent (Agent1) and the second Agent (Agent2) monitor the internet access to capture the message instruction information; specifically, Agent1 and Agent2 receive and intercept the message instruction information by monitoring the relevant message protocol and format, and thus receive the message instruction information issued by the master Agent, where the message instruction information is the second message path taken by the message sent from VM1 to VM 2. The second message path is formed by mutually matching a main Agent (Agent), a first Agent (Agent1) and a second Agent (Agent2), the main Agent feeds back message instruction information to the virtual machine associated with the first message, and then the first Agent (Agent1) and the second Agent (Agent2) monitor the message instruction information, so that the relevant information of the first virtual machine and the second virtual machine is exchanged on the host according to the message instruction information, and the communication between the first virtual machine and the second virtual machine is carried out. It should be noted that the path that the first message passes through is a first path, and the routing information is determined according to the first path, and then the routing information is analyzed, and whether the first path is in a path state is determined, and if so, the master agent is triggered to issue message instruction information to the virtual machine.
In an embodiment of the present application, in step S14, the source host modifies, according to the message instruction information captured by the first agent, the relevant information of the first virtual machine into the relevant information of the second virtual machine, so as to obtain a modification result of the first virtual machine; the destination host modifies the relevant information of the second virtual machine into the relevant information of the first virtual machine according to the message instruction information captured by the second agent, and obtains the modification result of the second virtual machine; and establishing communication connection between the first virtual machine and the second virtual machine according to the modification result of the first virtual machine and the modification result of the second virtual machine. Wherein the related information comprises a source MAC address, a destination MAC address and a Time To Live (TTL).
When the master Agent sends message instruction information to the first virtual machine and the second virtual machine through an IP layer protocol, the destination addresses of the IP layers are the IP address of the first virtual machine and the IP address of the second virtual machine respectively, and the addresses of the MAC layers are the MAC address of the first virtual machine and the MAC address of the second virtual machine respectively. When the first Agent1 on host1 obtains the relevant information of VM2, and the second Agent2 on host2 obtains the relevant information of VM1, the source MAC address, the destination MAC address and the TTL are directly modified to carry out three-layer exchange, and communication between VM1 and VM2 is established.
The method for communication between the virtual machines has lower time delay, does not depend on a database, and preferentially ensures that the user service is not influenced under any condition; even if one of the agents is hung, the original path is only reduced, the flow is not interrupted, and the reliability of the network is improved. On the other hand, when the main agent sends message instruction information and the network agent on the computing node captures the message instruction information, the preset protocol format is relied on, and the preset protocol format reduces delay, analysis time and automatic deployment difficulty.
The embodiment described in the present application is based on an SDN Network, where the SDN Network is a software defined Network (software defined Network) and is a novel Network innovation architecture, and the Network traffic is flexibly controlled by decoupling a control plane and a data plane of a Network device.
Furthermore, the embodiment of the present application also provides a computer readable medium, on which computer readable instructions are stored, and the computer readable instructions can be executed by a processor to implement the aforementioned method for communication between virtual machines.
According to still another aspect of the present application, there is also provided an apparatus for inter-virtual machine communication, wherein the apparatus includes:
one or more processors; and
a memory storing computer readable instructions that, when executed, cause the processor to perform the operations of the foregoing method.
For example, the computer readable instructions, when executed, cause the one or more processors to:
a main agent corresponding to the cloud route checks configuration information of a source host and a destination host;
the main agent determines the survival state of a first agent on the source host and a second agent on the destination host according to the configuration information;
the main agent sends message instruction information to a first virtual machine on the source host and a second virtual machine on the target host according to the survival state and a preset protocol format;
and the first agent and the second agent monitor the message instruction information respectively so that the source host and the target host establish communication connection between the first virtual machine and the second virtual machine according to the message instruction information.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.
It should be noted that the present application may be implemented in software and/or a combination of software and hardware, for example, implemented using Application Specific Integrated Circuits (ASICs), general purpose computers or any other similar hardware devices. In one embodiment, the software programs of the present application may be executed by a processor to implement the steps or functions described above. Likewise, the software programs (including associated data structures) of the present application may be stored in a computer readable recording medium, such as RAM memory, magnetic or optical drive or diskette and the like. Additionally, some of the steps or functions of the present application may be implemented in hardware, for example, as circuitry that cooperates with the processor to perform various steps or functions.
In addition, some of the present application may be implemented as a computer program product, such as computer program instructions, which when executed by a computer, may invoke or provide methods and/or techniques in accordance with the present application through the operation of the computer. Program instructions which invoke the methods of the present application may be stored on a fixed or removable recording medium and/or transmitted via a data stream on a broadcast or other signal-bearing medium and/or stored within a working memory of a computer device operating in accordance with the program instructions. An embodiment according to the present application comprises an apparatus comprising a memory for storing computer program instructions and a processor for executing the program instructions, wherein the computer program instructions, when executed by the processor, trigger the apparatus to perform a method and/or a solution according to the aforementioned embodiments of the present application.
It will be evident to those skilled in the art that the present application is not limited to the details of the foregoing illustrative embodiments, and that the present application may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the application being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned. Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the apparatus claims may also be implemented by one unit or means in software or hardware. The terms first, second, etc. are used to denote names, but not any particular order.

Claims (10)

1. A method for inter-virtual machine communication, wherein the method comprises:
a main agent corresponding to the cloud route checks configuration information of a source host and a destination host;
the main agent determines the survival state of a first agent on the source host and a second agent on the destination host according to the configuration information;
the main agent sends message instruction information to a first virtual machine on the source host and a second virtual machine on the target host according to the survival state and a preset protocol format;
the first agent and the second agent respectively monitor the message instruction information so that the source host and the target host establish communication connection between the first virtual machine and the second virtual machine according to the message instruction information;
the method for checking the configuration information of the source host and the destination host by the main agent corresponding to the cloud route includes:
a main agent corresponding to a cloud route acquires a connection tracking table in the cloud route and determines a connection target to be optimized in the connection tracking table;
recording the connection target to be optimized in a state table as a state entry;
and controlling the state entry through a state machine to determine the configuration information of the source host and the destination host corresponding to the state entry.
2. The method of claim 1, wherein controlling the status entry by a state machine to determine configuration information of a source host and a destination host corresponding to the status entry comprises:
the state machine sends check information to the source host and the destination host;
the master agent modifies the state of the state entry in the state table according to the check information to obtain a modification result;
and the state machine determines the configuration information of the source host and the configuration information of the destination host according to the modification result.
3. The method of claim 2, wherein the master agent modifying the state of the state entry in the state table based on the check information comprises:
the master agent determines a reply result of one party in the connection target to be optimized according to the check information, wherein the reply result comprises successful reply and failure reply;
and the master agent modifies the state of the state item in the state table according to the reply result.
4. The method of claim 3, wherein the method comprises:
and when the reply result is a reply failure, deleting the state entry of which the reply failure time exceeds a first preset time through the state machine.
5. The method of claim 3, wherein the method comprises:
and when the reply result is successful reply, deleting the state entry with the time of successful reply exceeding second preset time through the state machine.
6. The method of claim 1, wherein the predetermined protocol format comprises any combination of protocol version, message type and code, header length, full length, source two-tier network type, source network identification, destination two-tier network type, destination network identification, source IP address, destination IP address, source MAC address, and destination MAC address.
7. The method of claim 1, wherein the first agent and the second agent respectively monitor the message instruction information, comprising:
the first agent captures message instruction information received by the first virtual machine according to the preset protocol format;
and the second agent captures message instruction information received by the second virtual machine according to the preset protocol format.
8. The method of claim 1, wherein the establishing, by the source host and the destination host, a communication connection between the first virtual machine and the second virtual machine according to the message instruction information comprises:
the source host modifies the relevant information of the first virtual machine into the relevant information of the second virtual machine according to the message instruction information captured by the first agent, and obtains a modification result of the first virtual machine;
the destination host modifies the relevant information of the second virtual machine into the relevant information of the first virtual machine according to the message instruction information captured by the second agent, and obtains the modification result of the second virtual machine;
and establishing communication connection between the first virtual machine and the second virtual machine according to the modification result of the first virtual machine and the modification result of the second virtual machine.
9. An apparatus for inter-virtual machine communication, wherein the apparatus comprises:
one or more processors; and
a memory storing computer readable instructions that, when executed, cause the processor to perform the operations of the method of any of claims 1 to 8.
10. A computer readable medium having computer readable instructions stored thereon which are executable by a processor to implement the method of any one of claims 1 to 8.
CN201811513714.7A 2018-12-11 2018-12-11 Method and equipment for communication between virtual machines Active CN109710423B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811513714.7A CN109710423B (en) 2018-12-11 2018-12-11 Method and equipment for communication between virtual machines

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811513714.7A CN109710423B (en) 2018-12-11 2018-12-11 Method and equipment for communication between virtual machines

Publications (2)

Publication Number Publication Date
CN109710423A CN109710423A (en) 2019-05-03
CN109710423B true CN109710423B (en) 2020-11-03

Family

ID=66255613

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811513714.7A Active CN109710423B (en) 2018-12-11 2018-12-11 Method and equipment for communication between virtual machines

Country Status (1)

Country Link
CN (1) CN109710423B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114024880B (en) * 2022-01-10 2022-04-29 南京赛宁信息技术有限公司 Network target range probe acquisition method and system based on proxy IP and flow table
CN119854320B (en) * 2025-03-19 2025-06-24 济南浪潮数据技术有限公司 Configuration information synchronization method, device, storage medium and electronic device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1474564A (en) * 2002-08-05 2004-02-11 ��Ϊ�������޹�˾ A communication method between virtual local area networks
CN102549977A (en) * 2009-09-24 2012-07-04 日本电气株式会社 Inter-virtual server communication identification system and inter-virtual server communication identification method
CN104468775A (en) * 2014-12-05 2015-03-25 国云科技股份有限公司 Distributed router obtaining method suitable for cloud computing
CN106656719A (en) * 2016-09-26 2017-05-10 华为技术有限公司 Inter-cloud communication method and related device, and inter-cloud communication configuration method and related device
CN107181681A (en) * 2016-03-10 2017-09-19 中兴通讯股份有限公司 SDN layer 2 forwarding methods and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8909781B2 (en) * 2010-05-24 2014-12-09 Pi-Coral, Inc. Virtual access to network services

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1474564A (en) * 2002-08-05 2004-02-11 ��Ϊ�������޹�˾ A communication method between virtual local area networks
CN102549977A (en) * 2009-09-24 2012-07-04 日本电气株式会社 Inter-virtual server communication identification system and inter-virtual server communication identification method
CN104468775A (en) * 2014-12-05 2015-03-25 国云科技股份有限公司 Distributed router obtaining method suitable for cloud computing
CN107181681A (en) * 2016-03-10 2017-09-19 中兴通讯股份有限公司 SDN layer 2 forwarding methods and system
CN106656719A (en) * 2016-09-26 2017-05-10 华为技术有限公司 Inter-cloud communication method and related device, and inter-cloud communication configuration method and related device

Also Published As

Publication number Publication date
CN109710423A (en) 2019-05-03

Similar Documents

Publication Publication Date Title
CN109714238B (en) Method and equipment for realizing communication between virtual machines
US7257817B2 (en) Virtual network with adaptive dispatcher
US7899047B2 (en) Virtual network with adaptive dispatcher
US10637781B2 (en) Method for reliable data delivery between tunnel endpoints using BFD protocol
CN113326228B (en) Message forwarding method, device and equipment based on remote direct data storage
US8166547B2 (en) Method, apparatus, signals, and medium for managing a transfer of data in a data network
US9880870B1 (en) Live migration of virtual machines using packet duplication
CN111913782A (en) A method and device for implementing virtual machine traffic mirroring based on tunnel technology
CN115174472B (en) Message forwarding processing method and related device
CN108063714A (en) A kind of processing method and processing device of network request
TW201541919A (en) Scalable address resolution
CN110417782B (en) System, method and readable medium for intelligent hardware message transmission
US11531564B2 (en) Executing multi-stage distributed computing operations with independent rollback workflow
CN112887229B (en) Session information synchronization method and device
WO2017190339A1 (en) Fault processing method and device
CN113765885B (en) Firewall rule synchronization method and device, electronic equipment and storage medium
CN109710423B (en) Method and equipment for communication between virtual machines
CN105610594A (en) Service chain fault diagnosis method and service chain fault diagnosis device
US7453865B2 (en) Communication channels in a storage network
CN110149365B (en) Service adaptation method, apparatus, system, and computer-readable medium
CN109450794B (en) Communication method and device based on SDN network
US10313254B1 (en) Network management interface for a network element with network-wide information
CN112217689B (en) Network message tracking method and system based on OpenStack
CN116264538A (en) Data processing method, device, equipment and computer storage medium
CN113839876A (en) Transmission path optimization method and equipment for internal network

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
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: Room 502A, dinglou, 555 Dongchuan Road, Minhang District, Shanghai, 200241

Patentee after: Shanghai Yunzhou Technology Co.,Ltd.

Country or region after: China

Address before: Room 4159, building e, 555 Dongchuan Road, Minhang District, Shanghai 200241

Patentee before: SHANGHAI YUNZHOU INFORMATION TECHNOLOGY CO.,LTD.

Country or region before: China