Hi there,
I do have a Layer 8 problem with the Passthrough Filesystem in KVM Plugin. ![]()
How does the Passthrough Filesystem setup work?
Where do I find the Mount Tag in the running VM to mount the passthrough?
Hi there,
I do have a Layer 8 problem with the Passthrough Filesystem in KVM Plugin. ![]()
How does the Passthrough Filesystem setup work?
Where do I find the Mount Tag in the running VM to mount the passthrough?
How does the Passthrough Filesystem setup work?
https://libvirt.org/kbase/virtiofs.html
Where do I find the Mount Tag in the running VM to mount the passthrough?
Depends on the OS. The link above describes it for Linux. No idea about Windows.
THX,
it's for Linux.
And it was a Layer 8 problem. ![]()
Of course, I mounted it wrong, it has to be -t virtiofs, that was the issue.
THX for the very helpful link.
Hello,
I did not get to try out the link until today.
The first thing, I noticed was, that the Domain XML differs to the one on libvirt.org (my domain xml.png, from libvirt.org.png)
Reading the note: this requires virtiofs support in the guest kernel (Linux v5.4 or later).
I found a guide on https://wiki.sep.de/wiki/index…ng_guestfs-tools_on_Linux and installed the guestfs-tools package.
I ran the command, as shown at libvirt.org mount -t virtiofs mount_tag /mnt/mount /path an got this error (mount error- noVNC.png)
What am I missing again? ![]()
![]()
![]()
THX
What am I missing again?
Not sure. I haven't tried in a long time but I know the xml the plugin is generating works. I will have to try it again even though I have no use for this. It might be a couple of days.
that the Domain XML differs to the one on libvirt.org
There is more than one way to configure.
I'm trying the same to mount the passthrough filesystem, but I'm failing.
I guess I did it right on the host
<filesystem type='mount' accessmode='mapped'>
<source dir='/srv/dev-disk-xxxx/DLNA'/>
<target dir='/DLNA'/>
<alias name='fs0'/>
<address type='pci' domain='0x0000' bus='0x08' slot='0x00' function='0x0'/>
</filesystem>
But what do I have to do on the guest?
Guestsystem is Home Assistant, I do not know if this matters.
I tried it with this on the guest
mount -t 9p -o trans=virtio /DLNA /media/Music
but without success. ("no such device")
Any idea how to mount the host folder?
What is the output of: lsmod | grep -i 9p
hmmm
nothing?
on both (host and guest) the command is valid but no response
The command only matters on the guest. You don't have 9p support loaded. I have no idea how home assistant is built but you could try loading the module with sudo modprobe 9p
Okay I will try ![]()
Thanks for the support.
I will report.
seems it is not working or installed ![]()
modprobe: can't change directory to '/lib/modules': no such file or directory
tried to created the missing folder, but this does not help, too
modprobe: can't change directory to '5.15.72': no such file or directory
seems it is not working or installed
That would be a good question for the home assistant forum.
Any idea where I find the passthough filesystem on a generic Ubuntu?
where I find the passthough filesystem on a generic Ubuntu?
Where you "find" it? Not sure why you are trying to find it. You really should take the slash out of the tag for the target since it is not a path. Then you mount by tag - mount -t virtiofs mount_tag /mnt/mount/path. So, nothing to find. https://libvirt.org/kbase/virtiofs.html
Ah I see. What I do not get is, how to edit the XML config file over the OMV userinterface. I can edit it, but when I saved it and re-open all modifications are gone.
I tried to edit it, because I have this entry
<filesystem type='mount' accessmode='mapped'>
<source dir='/srv/dev-disk-by-uuid-xxx/DLNA'/>
<target dir='DLNA'/>
<alias name='fs0'/>
<address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0'/>
</filesystem>
But I would like to try this one
<filesystem type='mount' accessmode='passthrough'>
<driver type='virtiofs'/>
<source dir='/path'/>
<target dir='mount_tag'/>
</filesystem>
Anyway your command returns an error (worng filesystem, wrong options, Superblock corrupted).
I can edit it, but when I saved it and re-open all modifications are gone.
You should do it when the VM is not running.
Anyway your command returns an error (
It was an example not something you should try. You should follow the docs I linked to.
Thanks again.
I tried it, with "shutoff"-state. But the XML won't save my changes.
But anyway, I guess this gets to complicated here for to less of use. I will try another way to get my Music Directory to the Home Assistant ![]()
Okay I figured it out. I solved it with an isolated network between host and guest and mounted the folder ![]()
I did manage to passthrough a folder using the method described in ryecoaaron 's link, with editing the xml and inserting the Memorybacking and Filesystem entries.
Only thing that threw me for a loop for a second is that when you use the UI to create a passthrough link, in the xml the accesmode is set as "mapped" instead as "passthrough", and I don't need mapped.
So my fix was to not use the UI and just do it all in the xml while the VM is down:
<filesystem type='mount' accessmode='passthrough'>
<driver type='virtiofs' queue='1024'/>
<binary path='/usr/lib/qemu/virtiofsd'/>
<source dir='/srv/dev-disk/shared_folder'/>
<target dir='shared_folder_tag'/>
<alias name='fs0'/>
<address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
</filesystem>
After that in the VM create a mountpoint mount_here (with correct permissions, read section mapped, passthrough, squash in link) and mount the tag :
EDIT : see my post below concerning unique hardware addressing.
And something to add : How to add unique passthrough hardware/folders
I only found this out afterwards, so only editing the xml would be more difficult. You need to use UI and edit xml.
The tricky bit is that in the xml the virtual addressing for the passthrough "hardware"" needs to be unique. This is in every device-entry handeled by this line :
I tried changing for instance slot or bus to a random number but if you get it wrong (not unique or not conforming to general linux rules) the entire device-entry gets removed.
So what you can do is first use the UI to add a "mapped" folder in the xml. This way you get an entry with a unique address. And then you change accessmode "mapped" to "passthrough" and add two lines like in my post above.
Also, to mount automatically use this in /etc/fstab :
Don’t have an account yet? Register yourself now and be a part of our community!