For QEMU/KVM, how to share data between host and guest

General question for developers to access data between VM and VMM.

asked Aug 27, 2017 by harryxiyou (5,740 points)

1 Answer

Best answer

As I know, paravirtualization solution is a good way to share data for VM and VMM since it has better performance.

Please use Virtio 9p solution for QEMU/KVM. Note that you need to load 9p related modules for guest kernel.

Add following in your virsh start xml file.

<filesystem type='mount' accessmode='passthrough'>
  <source dir='host_dir_path'/>
  <target dir='testlabel'/>

After start guest OS, run following command

# mount testlabel /mnt/ -t 9p -o trans=virtio


answered Aug 27, 2017 by harryxiyou (5,740 points)

Please log in or register to answer this question.

Copyright © SysTutorials. User contributions licensed under cc-wiki with attribution required.
Hosted on Dreamhost