qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] bidirectional data exchange between guest and host wit


From: Anthony Lannuzel
Subject: Re: [Qemu-devel] bidirectional data exchange between guest and host without network
Date: Tue, 7 Jul 2009 15:11:30 +0200 (CEST)
User-agent: SquirrelMail/1.4.13

> 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






reply via email to

[Prev in Thread] Current Thread [Next in Thread]