摘要 |
The present disclosure provides a method for implementing communications between virtual machines, the method includes: receiving a first communication request sent by a source virtual machine, returning a first mark ID to the source virtual machine, and binding the first mark ID to a first callback function registered by the source virtual machine; receiving a second communication request sent by a target virtual machine, returning a second mark ID to the target virtual machine, and binding second mark ID to a second callback function registered by the target virtual machine; and forwarding communication information sent by the source virtual machine to the target virtual machine, and authorizing a CPU to the target virtual machine to process the communication information. The present disclosure also provides a corresponding device. In the method for implementing communications between virtual machines based on a scheduling layer, by using the scheduling layer, a source virtual machine can directly send communication information to a target virtual machine, thus improving communication speed between virtual machines to a large extent and saving memory resources. |