kata-containers / qemu

Kata containers QEMU
Other
22 stars 19 forks source link

how to enable vhost-9p? #8

Open zgen0623 opened 5 years ago

zgen0623 commented 5 years ago

hi,

I tried the following command to apply vhost 9p, but it does not work. Is there any guild how to enable vhost-9p?

thanks. gen.

/home/gen/golang/goproject/src/github.com/kata-containers/qemu/bin/x86_64-softmmu/qemu-system-x86_64 \ -enable-kvm \ -smp sockets=1,cores=2 \ -m 1G \ -object memory-backend-file,id=mem,size=1G,mem-path=/dev/hugepages,share=on \ -numa node,memdev=mem \ -mem-prealloc \ -serial mon:stdio \ -kernel ./bzImage \ -append 'console=ttyS0 root=/dev/vda rw' \ -drive "file=./rootfs.ext4,format=raw,if=virtio" \ -fsdev local,id=sharefs,path=/home/gen/opensource/qemu-kvm/rootfs/share_dir,security_model=none \ -device vhost-9p-pci,fsdev=sharefs,mount_tag=9pfs \ --nographic \

devimc commented 5 years ago

Hi @zgen0623 if you are using kata, then it's enabled by default. you can check it in your configuration file, see https://github.com/kata-containers/runtime/blob/master/cli/config/configuration-qemu.toml.in#L103