1. Field of the Invention
The present invention relates generally to virtual machines, and more particularly to communication between virtual machines.
2. Description of the Background Art
Virtual machines in the art of computer science, in general, are well known. Briefly, a virtual machine is a software implementation of computer hardware and executes programs like a physical machine. Virtualization allows several virtual machines to run on the same computer hardware. Each virtual machine is, in essence, a separate computer (albeit a virtual one) that has its own operating system, file system, and application programs that are separate from other virtual machines running on the same computer hardware. Because each virtual machine is essentially a separate computing environment, conventional inter-process communication techniques are not readily applicable to communications between different software components running on different virtual machines.
In one embodiment, communication between software components in different virtual machines may be made through a hypervisor between pseudo-devices that have no corresponding physical device. A software component in a virtual machine transfers data to a pseudo-device in the virtual machine. The pseudo-device is connected to another pseudo-device in another virtual machine, and the connection is through the hypervisor. The data from the software component is transferred from the pseudo-device to the other pseudo-device over the connection through the hypervisor. The other pseudo-device in the other virtual machine receives the data and provides the data to another software component in the other virtual machine.
These and other features of the present invention will be readily apparent to persons of ordinary skill in the art upon reading the entirety of this disclosure, which includes the accompanying drawings and claims.
The use of the same reference label in different drawings indicates the same or like components.
In the present disclosure, numerous specific details are provided, such as examples of apparatus, components, and methods, to provide a thorough understanding of embodiments of the invention. Persons of ordinary skill in the art will recognize, however, that the invention can be practiced without one or more of the specific details. In other instances, well-known details are not shown or described to avoid obscuring aspects of the invention.
The computer 100 is a particular machine as programmed with software components 110. The software components 110 comprise computer-readable program code stored non-transitory in the main memory 108 for execution by a processor 101. The software components 110 may be loaded from the data storage device 106 to the main memory 108. The software components 110 may also be made available in other computer-readable medium including optical disk, flash drive, and other memory device.
The hypervisor 220 is a so-called “bare-metal,” i.e., native, hypervisor, such as the XEN hypervisor. Generally speaking, the hypervisor 220 provides CPU scheduling and memory partitioning for the virtual machines. However, the hypervisor 220 has no control of and cannot access the I/O devices 231, which in this example includes a network interface card (NIC) and one or more storage devices. In the hypervisor architecture of
The hypervisor 320, which is also known as a “virtual machine monitor,” may comprise a publicly-available hypervisor, such as the XEN hypervisor, for example. Generally speaking, the hypervisor 320 runs a plurality of virtual machines on a host machine, which in this example comprises the hardware components 330. The hypervisor 320 abstracts the hardware components 330 for the virtual machines and controls execution of the virtual machines. In particular, the hypervisor 320 provides CPU scheduling and memory partitioning for the virtual machines. However, like similar native hypervisors or virtual machine monitors, the hypervisor 320 has no control of and cannot directly access the I/O devices 331.
In the example of
In one embodiment, to establish connection to a virtual machine 310, the service virtual machine 340 makes available a configuration 341 of a pseudo-device 342 in the service virtual machine 340. In one embodiment, a pseudo-device runs in a guest operating system of a virtual machine and serves as a connection port to another virtual machine. As its name implies, a pseudo-device is a fake device. In one embodiment, a pseudo-device is a virtual device that has no corresponding physical device. That is, unlike a virtual device, which is ultimately mapped to a physical device, a pseudo-device is not an abstraction of a physical device. In one embodiment, a pseudo-device is used solely for communication between software components that run in different virtual machines. The hardware components 330 are not shown in subsequent figures involving pseudo-devices because the pseudo-devices do not have corresponding I/O devices 331.
The configuration 341 allows the hypervisor 320 to build pseudo-device instances for virtual machines. The service virtual machine 340 may be booted (i.e., started up) before any other virtual machine, making the configuration 341 of the pseudo-device 342 available to other virtual machines upon their boot up. In the example of
In one embodiment, the connection between pseudo-devices is an I/O communication path through the hypervisor 320, and comprising a shared memory and an event channel. The shared memory may comprise memory locations that are accessible to both virtual machines. An event channel provides a tunnel for notifying a pseudo-device of an event in the I/O communication path, including availability of data in the shared memory. For example, the pseudo-device 312-2 may store data in the shared memory shared by the virtual machine 310-1 and the service virtual machine 340, and alert the pseudo-device 342-2 of the availability of the data in the shared memory by sending a signal over the event channel. In one embodiment, the connection between pseudo-devices comprises para-virtualization device drivers, such as those provided in the XEN hypervisor.
In one embodiment, the para-virtualization driver 523 comprises a para-virtualization driver of the XEN hypervisor or some other publicly available virtual machine monitor. The para-virtualization driver 523 allows for communication between two virtual machines through the hypervisor 320. More specifically, a para-virtualization driver 523 allows for communication between a pseudo-device 310 of a virtual machine and a pseudo-device 340 of a service virtual machine through the hypervisor 320. Although para-virtualization drivers are typically employed for I/O operations to physical I/O devices, embodiments of the present invention may employ para-virtualization drivers to establish a connection between a software component in one virtual machine to another software component in another virtual machine, the connection being through the hypervisor 320.
In one embodiment, the pseudo-device driver 522 is implemented as a child device in the para-virtualization driver 523. The para-virtualization driver 523 serves as a bus driver in the virtual machine 510 and the pseudo-device 520 operates on that bus. The pseudo-device driver 522 may be implemented as a wrapper of the para-virtualization driver 523 to provide a communications interface 521 for receiving event channel and shared memory communications from software components 512 (i.e., 512-1, 512-2, 512-3, etc.) and relaying the communications to the para-virtualization driver 523. The para-virtualization driver 523 connects to and provides the event channel and shared memory communications to another para-virtualization driver in another virtual machine.
The software component 610-1 may, e.g., by way of the pseudo-device 312-1, store data in a shared memory shared by the virtual machine 310-1 and the service virtual machine 340, and send a signal over the event channel of the connection 602 indicating availability of the data in the shared memory. The pseudo-device 342-1 may receive the signal over the event channel of the connection 602, respond to the signal by retrieving the data from the shared memory, parse the data to determine that the data is for the software component 610-4, and forward the data to the software component 610-4. The software component 610-4 or the software component 610-3 may send data to the software component 610-1 in a similar manner in the other direction. Inter-virtual machine communication between the software component 610-2 in the virtual machine 310-2 and the software component 610-3 may also be performed over a connection 606 established between the pseudo-device 312-2 and the pseudo-device 342-2 through the hypervisor 320. In general, inter-virtual machine communication between software components may be established through the hypervisor by creating a pseudo-device in each of the virtual machines where the corresponding software component is running and establishing a connection between pseudo-devices.
In the example of
In the example of
Methods and systems for inter-virtual machine communication have been disclosed. While specific embodiments of the present invention have been provided, it is to be understood that these embodiments are for illustration purposes and not limiting. Many additional embodiments will be apparent to persons of ordinary skill in the art reading this disclosure.
Number | Name | Date | Kind |
---|---|---|---|
6091412 | Simonoff et al. | Jul 2000 | A |
6356931 | Isamel et al. | Mar 2002 | B2 |
6401134 | Razavi et al. | Jun 2002 | B1 |
6433794 | Beadle et al. | Aug 2002 | B1 |
6492995 | Atkin et al. | Dec 2002 | B1 |
6647544 | Ryman et al. | Nov 2003 | B1 |
6757895 | Beadle et al. | Jun 2004 | B1 |
6799195 | Thibault et al. | Sep 2004 | B1 |
6842777 | Tuli | Jan 2005 | B1 |
6842897 | Beadle et al. | Jan 2005 | B1 |
6941552 | Beadle et al. | Sep 2005 | B1 |
6976059 | Rogalski et al. | Dec 2005 | B1 |
7039691 | Turnidge | May 2006 | B1 |
7191211 | Tuli | Mar 2007 | B2 |
7290129 | Chebolu et al. | Oct 2007 | B2 |
7346909 | Eldar | Mar 2008 | B1 |
7506257 | Chavez et al. | Mar 2009 | B1 |
7634811 | Kienzle et al. | Dec 2009 | B1 |
7735138 | Zhao | Jun 2010 | B2 |
7757231 | Anderson | Jul 2010 | B2 |
7779424 | Cherkasova | Aug 2010 | B2 |
7865893 | Omelyanchuk | Jan 2011 | B1 |
8023974 | Diao et al. | Sep 2011 | B1 |
8024790 | Zhao et al. | Sep 2011 | B2 |
8104083 | Sobel | Jan 2012 | B1 |
8239918 | Cohen | Aug 2012 | B1 |
8739156 | Frank | May 2014 | B2 |
8826273 | Chen | Sep 2014 | B1 |
20010054062 | Ismael et al. | Dec 2001 | A1 |
20020129281 | Hatfalvi et al. | Sep 2002 | A1 |
20030041106 | Tuli | Feb 2003 | A1 |
20040148608 | Gendreau et al. | Jul 2004 | A1 |
20040158830 | Chung et al. | Aug 2004 | A1 |
20040230643 | Thibault et al. | Nov 2004 | A1 |
20050188361 | Cai et al. | Aug 2005 | A1 |
20050198485 | Nguyen et al. | Sep 2005 | A1 |
20050246176 | Creamer et al. | Nov 2005 | A1 |
20060112342 | Bantz et al. | May 2006 | A1 |
20070079244 | Brugiolo | Apr 2007 | A1 |
20070199058 | Baumgart et al. | Aug 2007 | A1 |
20110167474 | Sinha | Jul 2011 | A1 |
20120198440 | Shah | Aug 2012 | A1 |
20130185474 | Ge | Jul 2013 | A1 |
Number | Date | Country |
---|---|---|
1 316 873 | Apr 2003 | EP |
1 377 892 | Sep 2004 | EP |
02084459 | Oct 2002 | WO |
20031017068 | Feb 2003 | WO |
2005066786 | Jul 2005 | WO |
Entry |
---|
Hadeel Tariq Al-Rayes “Studying Main Differences between Android & Linux Operating Systems”, Oct. 2012, pp. 46-49, vol. 12, No. 5, International Journal of Electrical & Computer Sciences IJECS-IJENS. |
Nan Li and Yiming Li “A Study of Inter-domain Communication Mechanism on Xen-based Hosting Platforms”, Course Project, CS 270: Advanced Topics in Operating Systems, pp. 1-10. |
Paravirtualizatio—Wikipedia the free encyclopedia, 3 sheets [retrieved on Nov. 4, 2013], retrieved from the internet: http://en.wikipedia.org/wiki/Paravirtualization. |
Xen—Wikipedia the free encyclopedia, 9 sheets [retrieved on Nov. 5, 2013], retrieved from the internet: http://en.wikipedia.org/wiki/Xen. |
Xen, how does Xen work? Dec. 2009, Version 1.0, pp. 1-10. |
VMware White Paper “Understanding Full Virtualization, Paravirtualization, and Hardware Assist”, Nov. 10, 2007, 17 sheets. |