7

My question is linked to this one : https://stackoverflow.com/questions/17880460/mounting-shared-folder-in-kvm-vm-error-mount-unknown-filesystem-type-9p

(but can't comment it)

I have apparently the same settings. Here is my problem :

I want to create a shared folder between host and guest using 9p virtio. I'm following http://www.linux-kvm.org/page/9p_virtio :

# mount -t 9p [...]

mount: unknown filesystem type '9p'

According to http://wiki.qemu.org/Documentation/9psetup this line in my /boot/confg-$(uname -r) is not correct (and quite obviously) :

`

# egrep 'CONFIG_(NET_)?_9P' /boot/config-$(uname -r)

CONFIG_NET_9P=m 
CONFIG_NET_9P_VIRTIO=m
CONFIG_NET_9P_RDMA=m
# CONFIG_NET_9P_DEBUG is not set
# CONFIG_9P is not set      <------------

`

the doc tells me to enable it, ok, but how ? I'm not at ease with linux kernel settings...

at the beginning of the config file there is :

automaticaly generated make config - do not modify

meaning I can't just add the line.

My questions :

Should I recompile the kernel with some option? Can't I simply enable that on boot, e.g. by changing something in grub settings ? Can I automaticaly enable that on CentOS installation ? (since this will be some kind of template that should be repeatedly done)

1

2 Answers 2

6

CentOS / RHEL guys seem to have various reasons why they're not including 9p support. Maybe because it was invented by IBM. Here's how to do it:

http://scientificlinuxforum.org/index.php?showtopic=2858

9p is by far the fastest method I've found for sharing data with live guests. If only Win7/8 had 9p support. The SL tutorial is somewhat involved but well written, plus there are some follow-up posts that clarify a few gotchas. I have it in action and it works well.

-Jeff

4

Your kernel config shows you that you have 9P support compiled as a loadable kernel modules. Now you need to load these modules into your running kernel:

modprobe 9pnet
modprobe 9pnet_virtio

You can verify this with

lsmod | grep 9p

Try now your mount commands, etc.

If you want to have these modules loaded after reboot add them to /etc/modules.conf. See man modprobe.conf for more info.

1
  • 1
    The kernel config explicitly says "CONFIG_9P is not set" there; which means that the 9P filesystem support is disabled in the build, and to enable it the reporter would really need to re-compile the kernel.
    – Aleksander
    Commented Sep 29, 2015 at 7:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .