* [Qemu-devel] Sharing virtio-devices between several kvm virtual machines over network
@ 2011-11-15 17:37 Leib, David
2011-11-16 11:23 ` Stefan Hajnoczi
0 siblings, 1 reply; 2+ messages in thread
From: Leib, David @ 2011-11-15 17:37 UTC (permalink / raw)
To: qemu-devel@nongnu.org
[-- Attachment #1: Type: text/plain, Size: 4203 bytes --]
Hi,
I am trying to share devices between vm's. For example I want to use a cdrom-drive who is exposed to a vm from another vm over the network.
In addition to this I want to use virtio for this idea.
What I am trying to do step by step:
1. If virtqueue_pop is called on the KVM 2 I take the iovec structure information
2. I send it over to the KVM 1
3. KVM 1 put it into the own virtqueue_pop
4. KVM 1 wait for virtqueue_push
5. KVM 1 take the information from virtqueue_push
6. KVM 1 send it over to KVM 2
7. KVM 2 put it into the virtqueue push
|----------------------| |--------------------|
| | | |
| KVM 1 | | KVM 2 |
| | | |
| | | |
|----------------------| |--------------------|
| | | | | |
| | | | | |
| | | | | |
| /--------\<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<</-----\ |
First virtqueue | | | TCP/IP Connection | | Second Virtqueue
| | |>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>| | |
| \-------/ \_____/ |
| | | |
| | | _______________________
----------------------- | |
| | | |
| | | |
| Host 1 | | |
| | | Host 2 |
|______ | | |
| | | | |
| CDROM| | | |
|______|______________| |----------------------|
I tried it already slightly different by stopping KVM 1 and only waiting for request of KVM 2 but there are some problems with the iovec buffer address I am not able to use as a address of the buffer.
Has somebody experience with that or an idea of doing this maybe in a more smarter way or is it generally possible to do that?
Thank you for your help
David Leib
SAP Research Belfast
SAP (UK) Limited I The Concourse I Queen's Road I Queen's Island I Belfast BT3 9DT
mailto: david.leib@sap.com<mailto:mary.clarke@sap.com> I www.sap.com/research<http://www.sap.com/research>
--------------------------------------------------------------------------------------------------------------------------
This communication contains information which is confidential and may also be privileged. It is for the exclusive use of the addressee. If you are not the addressee please contact us immediately and also delete the communication from your computer. Steps have been taken to ensure this e-mail is free from computer viruses but the recipient is responsible for ensuring that it is actually virus free before opening it or any attachments. Any views and/or opinions expressed in this e-mail are of the author only and do not represent the views of SAP.
SAP (UK) Limited, Registered in England No. 2152073. Registered Office: Clockhouse Place, Bedfont Road, Feltham, Middlesex, TW14 8HD
---------------------------------------------------------------------------------------------------------------------------
[-- Attachment #2: Type: text/html, Size: 16222 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] Sharing virtio-devices between several kvm virtual machines over network
2011-11-15 17:37 [Qemu-devel] Sharing virtio-devices between several kvm virtual machines over network Leib, David
@ 2011-11-16 11:23 ` Stefan Hajnoczi
0 siblings, 0 replies; 2+ messages in thread
From: Stefan Hajnoczi @ 2011-11-16 11:23 UTC (permalink / raw)
To: Leib, David; +Cc: qemu-devel@nongnu.org
On Tue, Nov 15, 2011 at 5:37 PM, Leib, David <david.leib@sap.com> wrote:
> I am trying to share devices between vm’s. For example I want to use a
> cdrom-drive who is exposed to a vm from another vm over the network.
The normal way of doing this would be to export the CD-ROM using
NFS/CIFS or iSCSI. It has nothing to do with virtualization.
> In addition to this I want to use virtio for this idea.
Why? It's not clear what problem you are trying to solve and why you
want to use virtio.
> What I am trying to do step by step:
>
> If virtqueue_pop is called on the KVM 2 I take the iovec structure
> information
> I send it over to the KVM 1
> KVM 1 put it into the own virtqueue_pop
> KVM 1 wait for virtqueue_push
> KVM 1 take the information from virtqueue_push
> KVM 1 send it over to KVM 2
> KVM 2 put it into the virtqueue push
> I tried it already slightly different by stopping KVM 1 and only waiting for
> request of KVM 2 but there are some problems with the iovec buffer address I
> am not able to use as a address of the buffer.
> Has somebody experience with that or an idea of doing this maybe in a more
> smarter way or is it generally possible to do that?
In theory it would be possible to implement a virtio TCP/IP transport.
The protocol needs to support virtqueue operations (push, pop),
notify, configuration space, and device lifecycle. Then it would be
possible to launch a virtio-blk server on machine A and attach to the
device from machine B.
But back to my first two points: what are you really trying to do?
Stefan
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-11-16 11:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-15 17:37 [Qemu-devel] Sharing virtio-devices between several kvm virtual machines over network Leib, David
2011-11-16 11:23 ` Stefan Hajnoczi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).