How do I share a folder on host (Linux KVM) with guest (TrueNAS)?

vin

Cadet
Joined
Oct 23, 2022
Messages
3
Hi folks

(Sorry if this question has been asked before, I just haven't been able to find an answer anywhere).

So I've installed Linux with LVM on one of my spare machines. It works well for launching any sort of VM. Usually, I am able to share my host's /home/myuser/media folder with any of my guest VMs with a command: mount -t virtiofs mounttag mounthpath

But the command when ran on my guest TrueNAS' shell, i see this error: virtiofs operation not permitted.

On looking up this error, I have seen mixed results for whether it is possible to share a directory with the guest at all? If yes, is there a guide?

My use case is simply sharing my media within the home devices.

With thanks
vin
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
To clarify here, you've got TrueNAS set up as a guest VM on your LVM storage host?

You're expected to let TrueNAS do the sharing. You set up NFS and then use NFS mounts to mount the TrueNAS share. TrueNAS does not have tools to play the client role, so when you try a virtiofs command, it fails.


 
  • Like
Reactions: vin

vin

Cadet
Joined
Oct 23, 2022
Messages
3
Oh boy! I made a terrible mistake. I meant to say Linux KVM (and not LVM, sorry I'm bad with names and abbreviations). Is it too late to amend the thread title??

Anyway, I get it now. TrueNAS is not meant to be used as a virtual machine. It's just that I am now used to KVM and I think it'd be really handy if I could just get TrueNAS as a VM working on it too.

So if not TrueNAS, I was thinking of using another guest VM (e.g. ubuntu) to share my media stuff over the network through it and then use Kodi on the client devices. Are there any better alternatives?
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Oh boy! I made a terrible mistake. I meant to say Linux KVM (and not LVM, sorry I'm bad with names and abbreviations). Is it too late to amend the thread title??

No worries, easily fixed. I tend to be very literal and take things at face value unless there's an obvious mistake. Having an LVM based host with a hypervisor of some sort make a certain kind of sense, so it didn't come across as a mistake. But we'll get it all sorted out.

Anyway, I get it now. TrueNAS is not meant to be used as a virtual machine. It's just that I am now used to KVM and I think it'd be really handy if I could just get TrueNAS as a VM working on it too.

Well, there's nothing to stop you from trying. Some people have reported good success with Proxmox, which implies that KVM may be viable, but I've also heard of problems. I will just say that I don't guarantee any particular result.

So if not TrueNAS, I was thinking of using another guest VM (e.g. ubuntu) to share my media stuff over the network through it and then use Kodi on the client devices. Are there any better alternatives?

I don't know anything about Kodi. If it's friendly towards working off an NFS mount, you should be able to.
 
  • Like
Reactions: vin

vin

Cadet
Joined
Oct 23, 2022
Messages
3
Thanks @jgreco for making the change in title. I might give proxmox a go too at some point if needed. Cheers.
 
Top