You are not logged in.

#1 2021-03-31 07:50:06

fistrosan
Member
Registered: 2020-04-01
Posts: 171

[SOLVED] VM shared folder between arch-host and centOS-guest

I am trying to mount a shared folder between my host (running arch) and a centOS VM guest. To do so, in virt-manager I set up a filesystem to be shared and then, inside the guest, I try to mount it as follows:

sudo mount -t 9p -o trans=virtio /host share/

This works well when the guest is i.e. debian, but somehow I cannot get it to work under centOS. The underlying problem seem to be that RHEL has disabled support for 9pfs in the kernel. I have tried a couple of workarounds on the centOS side (which include installing a "plus" kernel with 9pfs support enabled). However I sill cannot get it to work. So, I was wondering if there is something that I can do on the side of the host (running arch): can I set the passthrough with a different filesystem other than 9p ? Maybe this way centOS will be able to mount it ... if possible, can you post a link with some instructions ?

Last edited by fistrosan (2021-03-31 19:27:09)

Offline

#2 2021-03-31 19:26:11

fistrosan
Member
Registered: 2020-04-01
Posts: 171

Re: [SOLVED] VM shared folder between arch-host and centOS-guest

Oh well, after an afternoon of trial and error I have managed to solve the problem on the guest side (centOS) by compiling my own kernel while enabling (in the kernel .config) support for 9p filesystem. Now the command on the original post is capable of mounting the shared folder from host OS into the guest OS.

Offline

#3 2021-04-01 14:21:16

nunopenim
Member
From: Portugal
Registered: 2021-03-06
Posts: 22

Re: [SOLVED] VM shared folder between arch-host and centOS-guest

Well... that's a good solution, however my situation is a bit different. Arch host and windows guest (because of college demanding we use MS Office and Times New Roman). I don't think I am able to compile the windows kernel roll hmm

Anyway, it was helpful, at least I understand what's wrong now!


Check my GitHub here: github.com/nunopenim

I apologize in advance if some of my comments or replies don't make any sense, English is not my main language, although I try! Thank you for understanding, you can also point out stuff I misspell or just doesn't sound right.

Offline

Board footer

Powered by FluxBB