Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MOASN-0002Qb-4t for qemu-devel@nongnu.org; Tue, 07 Jul 2009 09:11:35 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MOASL-0002Ob-Mx for qemu-devel@nongnu.org; Tue, 07 Jul 2009 09:11:34 -0400 Received: from [199.232.76.173] (port=40561 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MOASL-0002ON-Jh for qemu-devel@nongnu.org; Tue, 07 Jul 2009 09:11:33 -0400 Received: from blitz.aql.fr ([83.206.143.227]:40779) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MOASL-0003uI-37 for qemu-devel@nongnu.org; Tue, 07 Jul 2009 09:11:33 -0400 Message-ID: <53352.89.3.148.243.1246972290.squirrel@webmail.aql.fr> In-Reply-To: <20090707090213.GB5690@shareable.org> References: <59673.89.3.148.243.1246956346.squirrel@webmail.aql.fr> <20090707090213.GB5690@shareable.org> Date: Tue, 7 Jul 2009 15:11:30 +0200 (CEST) Subject: Re: [Qemu-devel] bidirectional data exchange between guest and host without network From: "Anthony Lannuzel" MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit Reply-To: anthony.lannuzel@hynesim.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jamie Lokier Cc: qemu-devel@nongnu.org > virtio-serial was designed for exactly this sort of thing. > Patches appear on the list from time to time. > > -- Jamie Hi, thanks for replying. I have just tried the following: On the host I create a fat partition on /dev/sda8. Then I run kvm -hda $IMG -drive file=/dev/sda8,if=virtio -cdrom /dev/cdrom -m 192 In the guest in do the following: sudo mount /dev/vda /mnt/shared sudo touch /mnt/shared/guestFile On the host I mount the partition : sudo mount /dev/sda8 /tmp/qemuShare I can see the file guestFile. Then both the host and guest add a file in the shared directory (newHostFile and newGuestFile), but the other one does not see the change. And when the guest unmounts /dev/vda, the hosts sees the 2 files written by the guest (guestFile and newGuestFile) and loses its own file (newHostFile). It looks like I can not mount this block device from two OSs at the same time, but isn't that virtio's purpose ? I see a dirty workaround: sharing two partitions, one for the host to write and one for the guest to write. But it still seems the writer has to unmount /dev/sda8 for the data to be written on the other side. Am I wrong ? Thanks Anthony