Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

VirtioFS Support Page

Featured Replies

  • Author
  • Community Expert
16 hours ago, mackid1993 said:

Is there any way to manually upgrade to QEMU 7.2 like how were were able to switch to the rust version of Virtiofsd?

No its not as simple as a package. It is compiled at OS build time but will look to see if any options.

  • Replies 441
  • Views 137.1k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • mackid1993
    mackid1993

    VirtioFS and Memory backing seems much more stable in 6.12-rc2. I have almost a day of uptime and I'm backing up to backblaze in my Windows VM with no issue.   I found this (https://github.c

  • How To: Setup VirtioFS Under Windows and Mount Multiple Unraid shares as individual drive letters. VirtioFS under Windows is now stable as of Unraid 6.12.5 (QEMU 7.2) and Virtio Drivers 0.1.248-1

  • mackid1993
    mackid1993

    I was able to run Virtiofsd with the --inode-file-handles=mandatory switch. I created a script:   #!/bin/sh exec /usr/libexec/virtiofsd --inode-file-handles=mandatory -o sandbox=chroot "$@"

Posted Images

1 hour ago, SimonF said:

No its not as simple as a package. It is compiled at OS build time but will look to see if any options.

That would be great. I think the community would be extremely grateful if a plugin could patch QEMU to fix this prior to 6.13 coming out likely later this year.

  • 2 weeks later...
On 6/18/2023 at 11:15 AM, SimonF said:

No its not as simple as a package. It is compiled at OS build time but will look to see if any options.

Any news on QEMU 7.2+? Perhaps in 6.12.2?

  • Author
  • Community Expert
20 hours ago, mackid1993 said:

Any news on QEMU 7.2+? Perhaps in 6.12.2?

Not until 6.13

6 hours ago, SimonF said:

Not until 6.13

Thanks for the update. Hopefully we don't have to wait super long. :) 

  • 3 weeks later...

Hey there, I'm trying to get this to work on an uBuntu 22.04 Server VM (Unraid Server verion 6.11.5).

 

I have the config done and I've enabled sharing in the xml.

 

Could the QEMU issue noted in this thread be why I can't seem to even get the drive working, or is there a fix in the later version of unraid?

 

My share is not visible (at all) and I can't seem to find any install scripts or any way to troubleshoot this any further.

 

any help would be great.

 

Vin

  • Author
  • Community Expert
4 hours ago, Vinster411 said:

Hey there, I'm trying to get this to work on an uBuntu 22.04 Server VM (Unraid Server verion 6.11.5).

 

I have the config done and I've enabled sharing in the xml.

 

Could the QEMU issue noted in this thread be why I can't seem to even get the drive working, or is there a fix in the later version of unraid?

 

My share is not visible (at all) and I can't seem to find any install scripts or any way to troubleshoot this any further.

 

any help would be great.

 

Vin

Did you mount the share mount -t virtiofs mount_tag /mnt/mount/path

20 hours ago, SimonF said:

Did you mount the share mount -t virtiofs mount_tag /mnt/mount/path

Do I do that in unraid or in the VM?

 

In my VM settings (Form View) I have the mode set to 9P, added the share, the source path and a Mount tag.

 

I edited the XML and updated

 

<memoryBacking>
    <source type='memfd'/>
    <access mode='shared'/>
  </memoryBacking>

 

after I added the XML update (not sure how I initially missed it, I can see a VirtIO drive, but it's a size of zero bytes and errors when I open it.

 

Vin

Edited by Vinster411

  • Author
  • Community Expert
1 hour ago, Vinster411 said:

Do I do that in unraid or in the VM?

 

In my VM settings (Form View) I have the mode set to 9P, added the share, the source path and a Mount tag.

 

I edited the XML and updated

 

<memoryBacking>
    <source type='memfd'/>
    <access mode='shared'/>
  </memoryBacking>

 

after I added the XML update (not sure how I initially missed it, I can see a VirtIO drive, but it's a size of zero bytes and errors when I open it.

 

Vin

Memory backing is only required for virtiofs. For both options you will need to mount the device for 9p it is in this format.

 

mount -t 9p -o trans=virtio [mount tag] [mount point] -oversion=9p2000.L

 

This will be inside the VM OS not on unraid.

  • 2 weeks later...

Any word as to when we'll see Qemu 7.2? I'm dying to use this feature in Windows to overcome the SMB bottleneck.

  • 4 weeks later...

Hello, I've been trying to mount multiple shared folders in my Windows 11 VM with no luck. I tried to do the following.

C:\Windows\System32>"C:\Program Files (x86)\WinFsp\bin\launchctl-x64.exe" start virtiofs viofsY mount_tag T:
KO launcher: error 183

 

  • Author
  • Community Expert
2 hours ago, 30zal said:

Hello, I've been trying to mount multiple shared folders in my Windows 11 VM with no luck. I tried to do the following.

C:\Windows\System32>"C:\Program Files (x86)\WinFsp\bin\launchctl-x64.exe" start virtiofs viofsY mount_tag T:
KO launcher: error 183

 

I am not sure you can use that method if you want multiple.

 

Maybe create a batch file and run as a startup. it would be virtiofsd -m z: -t mounttagname

 

image.png

Well I'm chiming in at the end of all this to report that the issues still exist but oddly enough its worse on my personal server versus one I have deployed. On mine I have a VM running Blue Iris that is recording to the array (non cache) and it'll crash overnight. For the other install it almost the same setup but instead the data is offloaded to the array at intervals instead of direct recording. The second server hasn't crashed from what I've seen and its running a lot less things in general as its a customer site. For now on mine I've disabled the direct share in favor of a SMB share but will install a temp SSD to record to later to be similar to the remote site. 

 

EDIT: After checking it turns out that the remote server is also having the same issues but nowhere near as bad as my personal server. 

Edited by Coastal Custom Tech

How To: Setup VirtioFS Under Windows and Mount Multiple Unraid shares as individual drive letters.

VirtioFS under Windows is now stable as of Unraid 6.12.5 (QEMU 7.2) and Virtio Drivers 0.1.248-1. Ensure you install this driver or later as well as Unraid 6.12.5 or later. Earlier versions of Unraid will cause the VM to lock up and earlier drivers have an issue where any filesystem IO will cause a large non-Paged pool memory leak.

image.thumb.png.203fe956ab87dc2dec375687e472a803.png

Go to Settings  -> VM Manager to grab the latest Virtio Windows drivers.

Before anything you must install the WinFSP driver.
VirtioFS relies on this and will not work without WinFSP installed.

I scripted the initial setup here:

  1. This disables the VirtioFS service since we won't be using that.
  2. It also registers VirtoFS with the WinFSP launcher.

Paste into a batch file and run as admin:

sc stop VirtioFsSvc
ping 127.0.0.1
sc config VirtioFsSvc start=demand
ping 127.0.0.1
cmd /c ""C:\Program Files (x86)\WinFsp\bin\fsreg.bat" virtiofs "C:\Program Files\Virtio-Win\VioFS\virtiofs.exe" "-t %%1 -m %%2""
echo Confirm data was properly entered into HKLM\SOFTWARE\WOW6432Node\WinFsp\Services\virtiofs
pause

 

This is the mount script I use. This must be run as admin or scheduled with task scheduler. I like to run it on User Login and once per hour just in case the shares unmount for some reason. I have a little bit of extra stuff at the beginning of the script that will force it to run with admin privileges: 

 

@echo off
:: Check for admin privileges
net session >nul 2>&1
if %errorlevel% == 0 (
    echo Running with admin privileges
) else (
    echo Running without admin privileges
    echo Attempting to elevate process...
    PowerShell -Command "Start-Process -Verb RunAs -FilePath '%comspec%' -ArgumentList '/c %~f0'"
    exit /b
)
:: Rest of your batch file starts here
REM Modify the Drive Letters such as viofsJ J: as well as the tag (tag1) to match the tags (case senstive) set in Unraid.

"C:\Program Files (x86)\WinFsp\bin\launchctl-x64.exe" start virtiofs viofsJ tag1 J:
"C:\Program Files (x86)\WinFsp\bin\launchctl-x64.exe" start virtiofs viofsl tag2 L:
"C:\Program Files (x86)\WinFsp\bin\launchctl-x64.exe" start virtiofs viofsM tag3 M:
"C:\Program Files (x86)\WinFsp\bin\launchctl-x64.exe" start virtiofs viofsS tag4 S:
"C:\Program Files (x86)\WinFsp\bin\launchctl-x64.exe" start virtiofs viofsT tag5 T:
"C:\Program Files (x86)\WinFsp\bin\launchctl-x64.exe" start virtiofs viofsU tag6 U:
"C:\Program Files (x86)\WinFsp\bin\launchctl-x64.exe" start virtiofs viofsV tag7 V:
"C:\Program Files (x86)\WinFsp\bin\launchctl-x64.exe" start virtiofs viofsY tag8 Y:

 

For this script modify as follows for your particular situation:

 

viofsJ and J: should correspond with your drive letter. tag1 should match the tag set in the Unraid web UI exactly case sensitive.

 

Modify these values for all mounts needed and add as many as required.

 

Use this script to unmount VirtioFS shares. This does not need to be run as admin. Modify viofsJ et cetera to match the mount script.

"C:\Program Files (x86)\WinFsp\bin\launchctl-x64.exe" stop virtiofs viofsJ
"C:\Program Files (x86)\WinFsp\bin\launchctl-x64.exe" stop virtiofs viofsL
"C:\Program Files (x86)\WinFsp\bin\launchctl-x64.exe" stop virtiofs viofsM
"C:\Program Files (x86)\WinFsp\bin\launchctl-x64.exe" stop virtiofs viofsS
"C:\Program Files (x86)\WinFsp\bin\launchctl-x64.exe" stop virtiofs viofsT
"C:\Program Files (x86)\WinFsp\bin\launchctl-x64.exe" stop virtiofs viofsU
"C:\Program Files (x86)\WinFsp\bin\launchctl-x64.exe" stop virtiofs viofsV
"C:\Program Files (x86)\WinFsp\bin\launchctl-x64.exe" stop virtiofs viofsY

 

For running the mount script I prefer to set up a scheduled task in Task Scheduler as follows:
image.png.897c5d2b3de8ad65b75507c3611c40fa.png

 

image.png.35fba923229551d34cb30f1de34d4d45.png

 

image.png.9f3612c9b248217cd235f082aa0448f4.png

 

Where C:\Batch\virtiofs.bat is your mount script.

 

image.png.b0c92766c4915f18ab1db73ac77ed0b7.png

 

image.png.bf8da2e339ca2e5cf57764b0ad572c4c.png

This is all sourced from the documentation here.

Edited by mackid1993
Update with new information for latest Virtio Drivers, update screenshots

Any news when we'll see a bump for qemu? I'm hoping we can really use Virtiofs soon on Windows.

On 9/2/2023 at 1:41 PM, mackid1993 said:

I scripted the setup here:

sc stop VirtioFsSvc
ping 127.0.0.1
sc config VirtioFsSvc start=demand
ping 127.0.0.1
cmd /c ""C:\Program Files (x86)\WinFsp\bin\fsreg.bat" virtiofs "C:\Program Files\Virtio-Win\VioFS\virtiofs.exe" "-t %%1 -m %%2""
echo Confirm data was properly entered into HKLM\SOFTWARE\WOW6432Node\WinFsp\Services\virtiofs
pause

 

This is the mount script I use:

 

"C:\Program Files (x86)\WinFsp\bin\launchctl-x64.exe" start virtiofs viofsJ tag1 J:
"C:\Program Files (x86)\WinFsp\bin\launchctl-x64.exe" start virtiofs viofsl tag2 l:
"C:\Program Files (x86)\WinFsp\bin\launchctl-x64.exe" start virtiofs viofsM tag3 m:
"C:\Program Files (x86)\WinFsp\bin\launchctl-x64.exe" start virtiofs viofsS tag4 s:
"C:\Program Files (x86)\WinFsp\bin\launchctl-x64.exe" start virtiofs viofsT tag5 T:
"C:\Program Files (x86)\WinFsp\bin\launchctl-x64.exe" start virtiofs viofsU tag6 U:
"C:\Program Files (x86)\WinFsp\bin\launchctl-x64.exe" start virtiofs viofsV tag7 V:
"C:\Program Files (x86)\WinFsp\bin\launchctl-x64.exe" start virtiofs viofsY tag8 Y:

 

Beware of the issues with Virtiofs currently, we are waiting for QEMU to be upgraded to 7.2 to hopefully patch a non-paged pool memory leak that causes Windows to lock up.

 

Edit: I forgot to add my unmount script for anyone that may need it:

"C:\Program Files (x86)\WinFsp\bin\launchctl-x64.exe" stop virtiofs viofsJ
"C:\Program Files (x86)\WinFsp\bin\launchctl-x64.exe" stop virtiofs viofsl
"C:\Program Files (x86)\WinFsp\bin\launchctl-x64.exe" stop virtiofs viofsM
"C:\Program Files (x86)\WinFsp\bin\launchctl-x64.exe" stop virtiofs viofsS
"C:\Program Files (x86)\WinFsp\bin\launchctl-x64.exe" stop virtiofs viofsT
"C:\Program Files (x86)\WinFsp\bin\launchctl-x64.exe" stop virtiofs viofsU
"C:\Program Files (x86)\WinFsp\bin\launchctl-x64.exe" stop virtiofs viofsV
"C:\Program Files (x86)\WinFsp\bin\launchctl-x64.exe" stop virtiofs viofsY

 

Just save any of these into a batch file (obviously modify with your tags and preferred drive letters and run. I like to set my mount script to run as a scheduled task every hour just incase something breaks and it unmounts.

Thank you for sharing that script! I'll be able to use it on the Windows VM. :)

 

 

1 hour ago, 30zal said:

Thank you for sharing that script! I'll be able to use it on the Windows VM. :)

 

 

No problem. I just want to again caution against Virtiofs in Windows at this time. It's known to cause lockups. We are hoping that when Limetech decides to upgrade QEMU to 7.2 or newer it will be more stable.

 

I just recently set up a VLAN on my server and bound a secondary virtual NIC to it to keep SMB traffic between my VM and Unraid within the server and not dependent on my home network.

  • Author
  • Community Expert
22 minutes ago, 30zal said:

So, I tried mounting my drives in an Arch VM following this guide https://blog.siglerdev.us/setup-unraidos-virtual-machine-with-virtiofs-share/ .

 

All the mount points that I put in give a "mount point does not exist" error, not sure what to do since little information seems to be available on how to set it up for Linux.

You need to create a mount point in linux. https://docs.kernel.org/filesystems/virtiofs.html

  • Author
  • Community Expert
21 hours ago, mackid1993 said:

Any news when we'll see a bump for qemu? I'm hoping we can really use Virtiofs soon on Windows.

Not as yet qemu is now 8.1 and 9.8 for lib virt so would expect these to be in next release

24 minutes ago, SimonF said:

You need to create a mount point in linux. https://docs.kernel.org/filesystems/virtiofs.html

It just gives me the following error

mount: /mnt: wrong fs type, bad option, bad superblock on myfs, missing codepage or helper program, or other error.

 

  • Author
  • Community Expert
8 minutes ago, 30zal said:

It just gives me the following error

mount: /mnt: wrong fs type, bad option, bad superblock on myfs, missing codepage or helper program, or other error.

 

image.png

 

On Debian VM

 

image.png

 

root@computenode:~# cd /mnt/user/ecole-test/
root@computenode:/mnt/user/ecole-test# ls
test
root@computenode:/mnt/user/ecole-test# cat test
Test
root@computenode:/mnt/user/ecole-test# 
 

 

2 hours ago, SimonF said:

Not as yet qemu is now 8.1 and 9.8 for lib virt so would expect these to be in next release

Thanks @SimonF! Any idea if we'll see it before the end of the year?

The virtiofs support is working great with my ubuntu VM. I just had one small problem which I managed to solve with a workaround. Ubuntu could not automount via fstab an unraid share with the tag "media". I don't exactly know why. DMESG in the vm looked like this:

 

[   24.644594] systemd[1]: Mounting /mnt/unraid/ben...
[   24.647784] systemd[1]: Mounting /mnt/unraid/media...
[   24.669726] virtiofs virtio0: virtio_fs_setup_dax: No cache capability
[   24.679994] virtiofs virtio1: virtio_fs_setup_dax: No cache capability
[   24.685471] virtio-fs: tag </media> not found

 

I tried additional shares, and all of them worked - but not the "media" share. I tried changing the order of the shares in fstab - same result. If I ran "sudo mount -av" at a command prompt, ubuntu would mount the "media" share no problem - but never at bootup.

 

The workaround was to specify the "media" share manually in the vm config, using some other tag like "xmedia" - and suddenly ubuntu had no problem automounting the share.

 

Now if only I didn't have to resort to xml or virt-manager to add a virtual sound card to a vm in unraid...

Edited by benfishbus

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.