From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:60972) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RQdas-0008MI-FD for qemu-devel@nongnu.org; Wed, 16 Nov 2011 06:23:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RQdar-00037U-3c for qemu-devel@nongnu.org; Wed, 16 Nov 2011 06:23:54 -0500 Received: from mail-ww0-f53.google.com ([74.125.82.53]:43832) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RQdaq-00037N-S3 for qemu-devel@nongnu.org; Wed, 16 Nov 2011 06:23:53 -0500 Received: by wwf27 with SMTP id 27so433124wwf.10 for ; Wed, 16 Nov 2011 03:23:52 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <5655D9ED6883464892A9F66AC561F61F07E20BC87F@DEWDFECCR07.wdf.sap.corp> References: <5655D9ED6883464892A9F66AC561F61F07E20BC87F@DEWDFECCR07.wdf.sap.corp> Date: Wed, 16 Nov 2011 11:23:52 +0000 Message-ID: From: Stefan Hajnoczi Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] Sharing virtio-devices between several kvm virtual machines over network List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Leib, David" Cc: "qemu-devel@nongnu.org" On Tue, Nov 15, 2011 at 5:37 PM, Leib, David wrote: > I am trying to share devices between vm=92s. 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 addres= s 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 mor= e > 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