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

1 hour ago, mackid1993 said:

Backblaze is just for my media which I can stand to lose

Is not "my media" on unraid 98% downloaded files for plex? mmmmk

Probably not support either but yet here we are.

  • Replies 441
  • Views 136.9k
  • 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

3 minutes ago, _cr8tor_ said:

Is not "my media" on unraid 98% downloaded files for plex? mmmmk

Probably not support either but yet here we are.

I'm so confused. I was trying to help you but I'm just another user here. I'm not a Limetech employee or even a community developer that builds components for Limetech. If you're going to begin to speak to me in this way I'm no longer going to respond to you. 

34 minutes ago, _cr8tor_ said:

Is not "my media" on unraid 98% downloaded files for plex? mmmmk

Probably not support either but yet here we are.

 

29 minutes ago, mackid1993 said:

I'm so confused. I was trying to help you but I'm just another user here. I'm not a Limetech employee or even a community developer that builds components for Limetech. If you're going to begin to speak to me in this way I'm no longer going to respond to you. 

 

Let's be respectful to each other please and not hijack the support topic with such discussions. 🙂 

 

The posts after this one were hidden as they only further added fuel to the fire.

Please do not make new posts regarding this misunderstanding and stick to the topic.

 

Edited by Rysz

  • 1 month later...
On 4/28/2023 at 1:13 PM, mackid1993 said:

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 "$@"

 

And called it virtiofsd.sh and placed it in /usr/libexec. In my xml I just changed /usr/libexec/virtiofsd to virtiofsd.sh so it runs with the argument. I am testing this with the latest rust version.

 

To make this persistent I created a folder in /boot called virtiofsd and placed the rust version in there along with my shell script. I added the following to /boot/config/go

 

mv /usr/libexec/virtiofsd /usr/libexec/virtiofsd.old

cp /boot/virtiofsd/virtiofsd /usr/libexec/virtiofsd

chmod +x /usr/libexec/virtiofsd

cp /boot/virtiofsd/virtiofsd.sh /usr/libexec/virtiofsd.sh

chmod +x /usr/libexec/virtiofsd.sh

 

Now to test with Backblaze Personal Backup on Win 11 and hopefully no crashing now. @SimonF does this sound like a good test case?

 

EDIT: Prior to running with --inode-file-handles=mandatory I noticed that in task manager processes were reporting unusually low memory usage but the overall memory usage percentage was extremely high and it just didn't make any sense. Now I am seeing the opposite where processes report memory usage consistent with what I would expect. I'm hopeful that this may work now.

Can this be linked in the OP or added to the "recommended posts" for this thread? I've been trying to solve this issue for days while trying to get backblaze to backup my photos share (with 1M+ files), and this post solved it perfectly. Thank you so much for posting this.

25 minutes ago, sazrocks said:

Can this be linked in the OP or added to the "recommended posts" for this thread? I've been trying to solve this issue for days while trying to get backblaze to backup my photos share (with 1M+ files), and this post solved it perfectly. Thank you so much for posting this.

No need. It's already set by default in Unraid 7. If you keep looking @SimonF wrote a preprocessor script that I documented to get working in 6.12. Not going to go through that, but it's easy to set up or just upgrade to Unraid 7.

33 minutes ago, sazrocks said:

Can this be linked in the OP or added to the "recommended posts" for this thread? I've been trying to solve this issue for days while trying to get backblaze to backup my photos share (with 1M+ files), and this post solved it perfectly. Thank you so much for posting this.

Start here: https://forums.unraid.net/topic/129352-virtiofs-support-page/page/10/#findComment-1397515 and keep reading the next several posts for more context to enable the Unraid 7 changes including rust virtiofsd in Unraid 6.12. Or upgrade to Unraid 7 beta4. It's worth it for better Virotfs support and is quite stable in my setup.

For those having issues with Backblaze and trying to backup lots of files, please try Unraid 7 before panicking.

  • 3 weeks later...

Hi.
I've posted a help thread here : 

 

But I'm really in need of a urgent support to know what to do / where to go. I want something viable and sure.

Thanks !

Is it possible to use this in Windows 10 PC, not in Win10 Unraid VM?

  • Author
  • Community Expert
2 minutes ago, HHUBS said:

Is it possible to use this in Windows 10 PC, not in Win10 Unraid VM?

No as uses host memory for the connections.

On 4/28/2024 at 9:39 AM, mackid1993 said:

Enabling Hugepages on Unraid for use with VirtioFS

For anyone interested I thought this would be a good place to write a guide to enable hugepages in Unraid for use with VirtioFS. I've found that this helps decrease latency, especially when the Unraid server has been up for quite a while and also helps with memory fragmentation issues that can lead to other VMs that aren't using VirtoFS from being able to boot up reliably.

 

When

 

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

is enabled on a VM regardless of VirtioFS being in use or not it seems to slowly cause system memory to become more and more fragmented. If you aren't using VirtioFS, remove

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

from your XML and be done with it, but if you are using VirtioFS read on-- this may improve performance for you.

 

Hugepages should really help with these fragmentation issues that lead to sluggishness over time as it allocates a block of memory for the VM at boot that nothing else can touch (with the exception of some greedy Docker containers, more on that at the end). Enabling it is easy but requires a little basic math, as it reserves memory at boot make sure that you have enough RAM in your system to reserve for this.

 

The Guide

The first thing you'll want to do is navigate to the Main tab and click Flash:

image.thumb.png.38b2b96f915ffa8adbc43b1cd5e2ed90.png

 

We need to modify our Syslinux with the highlighted configuration in this exact syntax, placed right after append (don't mess up the syntax or your server will fail to boot!!):

image.thumb.png.05eb343ac8ea17cc5c7bde8ae1581faa.png

 

We'll want to set:

hugepagesz=2M

That will set the size of each page to 2MB. Then we'll want to allocate our hugepages for the exact amount of RAM we'll be using for our VirtioFS enabled VM. This memory will be reserved whether the VM is booted or not, so if you have multiple VMs using VirtioFS you'll want to ensure you have enough memory to do this, especially if the VMs aren't spun up all of the time. This is best used for VMs that are always running as the memory will always be reserved and cannot be used by anything else unless this is removed from the Syslinux config. If the VM is always in use this doesn't matter because the memory will be used anyway, but for a VM that is used occasionally I wouldn't suggest this method. 

 

My main VM is always running and is the only VM I use VirtioFS on, it has 32GB of RAM assigned (32768 MB). So I'm going to set:

 

hugepages=16384

 

16384*2=32768

 

As an example if your VM has 16 GB (16384 MB) assigned you'll want to set:

 

hugepages=8192

 

Now reboot your server to allocate the memory.

 

Next edit the VM's XML. Find the <memoryBacking> tag.

 

It should look like this:

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

 

Change <nosharepages/> to <hugepages/>:

 

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

 

Now as long as you allocated the right amount of memory assigned to the VM, it should spin right up!

 

Greedy Docker Containers

One thing to note, some docker containers may try to steal your hugepages! Apache and Postgres are two that will, if you have those installed it would be prudent to assign a little extra RAM to prevent a condition where the VM won't start. It would also be smart to limit the RAM of the containers that are stealing the hugepages so you don't run into a condition where the VM won't start. For example, if you know a container is doing this because it's keeping your VM from starting and you know it needs about 2 GB of RAM to run properly, assign an extra 1 GB in your Syslinux (because it's multiplied by 2) and add --memory=2G to the extra parameters of the offending container.

 

I implement this yesterday as I want to use virtiofs but still got 100% CPU usage today. What to do next?

  • 1 month later...

Anyone know how to change the drive letter? It wants to use drive Z. I have a specific App that requires drive D.

I Get the following error


"C:\Program Files (x86)\WinFsp\bin\launchctl-x64.exe" start virtiofs viofsD games D:
KO launcher: error 2

The unraid mount tag is games

I have followed everything

 

up to the point of starting the service because I want the drive to be called D instead of Z

 

Sure enough it starts as z but I cant stop it

 

image.thumb.png.71ac7fb9a1137200162d492fed74ff7d.png

 

Edited by xokia

Yeah, the integration kind of sucks. After installing the latest VirtIO drivers and beta WinFSP I had to do this in an elevated prompt to show up extra shares:

"C:\Program Files (x86)\WinFsp\bin\launchctl-x64.exe" start virtiofs viofs1 "extra share 1" M:
"C:\Program Files (x86)\WinFsp\bin\launchctl-x64.exe" start virtiofs viofs2 "extra share 2" N:
"C:\Program Files (x86)\WinFsp\bin\launchctl-x64.exe" start virtiofs viofs3 "extra share 3" P:

And I still have a Z: share with one of the viofs devices...

Edit: This got rid of the Z: drive.
 

sc stop VirtioFsSvc
sc config VirtioFsSvc start=demand

 

Edited by realies

  • Author
  • Community Expert
18 hours ago, xokia said:

I Get the following error


"C:\Program Files (x86)\WinFsp\bin\launchctl-x64.exe" start virtiofs viofsD games D:
KO launcher: error 2

The unraid mount tag is games

I have followed everything

 

up to the point of starting the service because I want the drive to be called D instead of Z

 

Sure enough it starts as z but I cant stop it

 

image.thumb.png.71ac7fb9a1137200162d492fed74ff7d.png

 

As you are using the service you need to change in the reg as per the link I posted.

 

Since command-line arguments can't be assigned to Windows service permanently, virtiofs can parse them from the registry. When command-line arguments are absent the service looks up for the following parameters under HKLM\Software\virtiofs:

DebugFlags (DWORD)

DebugLogFile (String)

MountPoint (String)

CaseInsensitive (DWORD)

Owner (String)

FileSystemName (String)

After bashing my head against this for like an hour:

 

If running VirtioFS as a service works but not through the .exe (or WinFSP), check your account has permission to log on as a service. Easiest way to get it is to pop into services.msc, edit the propeties for the VirtioFS service, and set it to run as your account.

 

Maybe this is mentioned somewhere else and I missed it.

No D drive.

 

image.thumb.png.98bc62dc95b32bff39e6b48f025d8dc7.png

 

I honestly couldn't follow this. Do not know if something in unraid cmd prompt need to be done here.

Where exactly am I adjusting the QEMU command line parameters?

QEMU
Run virtiofsd daemon:

/usr/libexec/virtiofsd --socket-path=/tmp/virtiofs_socket -o source=/home/user/viofs
Adjust following QEMU command-line parameters:

Instantiate the character device for socket communication between QEMU and virtiofsd: -chardev socket,id=char0,path=/tmp/virtiofs_socket
Instantiate the virtiofs PCI device: -device vhost-user-fs-pci,queue-size=1024,chardev=char0,tag=my_virtiofs
Force use of memory sharing with virtiofsd (replace 4G with your desired VM RAM size): -m 4G -object memory-backend-file,id=mem,size=4G,mem-path=/dev/shm,share=on -numa node,memdev=mem
virtiofsd
Modern virtiofsd is written in Rust and supported here: https://gitlab.com/virtio-fs/virtiofsd

To build virtiofsd:

cargo build

 

Edited by xokia

  • 4 weeks later...

Anyone have any issues with drives not mounting now? Unraid 7.0.1 Windows 11 24H2

 

Thank you!

  • 2 weeks later...

I'm running Unraid 7.0.1.  I created a Linux VM (Proxmox Backup) and trying to mount a virtiofs/9p share. 

 

I'm having an odd issue that if I add the virtiofs share, the networking in the VM does not start.  If I start the VM without the share, networking works.  Same with 9p mode.

 

I have a very strange behavior. I am using Unraid 7.0.0. I have a Windows 11 VM. I followed the instruction in the 'Recommended post' for mounting Unraid user share as Windows drive.  

 

The mount is only successful for user share from 'Cache' storage, but never successful for user share from 'Array'. When I use command "C:\Program Files (x86)\WinFsp\bin\launchctl-x64.exe" start virtiofs viofs1 'Share-name' M:, 'OK' is displayed but drive M: never shows up in File Explorer.  

 

Here is some information for troubleshooting.

WinFS: v2.0.23075

Virtual-Win-Driver: v0.1.266

 

Does anyone know what could be wrong? 

 

[Update - resolved] With some effort, I figured out why 2nd share is not mounting. And this may be useful for someone who is wondering the same thing. 

 

To make Unraid share mountable in Windows VM, 'Unraid Share Mode:' in Unraid VM setting needs to be defined. To mount additional user share, click '+' button on the left side for adding additional share. Only Unraid share declared in this setting can be mounted with WinFS in Windows VM.  

Edited by LunaWhisper
Found resolution for the question

I've got Unraid 7.0.0, working multiple mount points (from your tutorial), and I've edited my VM in GUI, I've added more RAM, and first problem: network dissapeared. I reinstalled virtual-win-driver, but it didn't helped. 

 

For network helped that in VM GUI I've change Network mode from virtio-net to e1000, started VM, closed VM, and then reverted back to virtio-net. And it repaired itself - network from VM is accessible.

 

But now I've got problem with multiple shares. I've mounting 5 shares. I'm using the same script, but now instead of 5 shares only one share is visible. Visible is only FIRST SHARE that is set in VMs GUI.

 

So for example I've got share ThisGonnaBeDriveJ setted as first share in VMs GUI, in Windows only gonna be visible share ThisGonnaBeDriveJ as letter J. But if I edit VM and as first share set: ThisGonnaBeDriveK, in Windows only share ThisGonnaBeDriveK as letter K gonna be visible.

 

How to fix it?

 

 

  • 2 weeks later...
On 3/17/2025 at 5:47 PM, LunaWhisper said:

[Update - resolved] With some effort, I figured out why 2nd share is not mounting. And this may be useful for someone who is wondering the same thing. 

 

To make Unraid share mountable in Windows VM, 'Unraid Share Mode:' in Unraid VM setting needs to be defined. To mount additional user share, click '+' button on the left side for adding additional share. Only Unraid share declared in this setting can be mounted with WinFS in Windows VM.  

Edit: Adding version info:

UnRAID 7.0.1

Windows 11 24H2

 

I'm having a similar, but slightly different issue that I'm hoping someone can help with.

 

I got my first share to work flawlessly.  I added two more shares... they show up.  I restart my VM, and only the first share shows up again.  I shut down the VM, go into edit, remove then re-add shares 2-3 and restart my VM... this time only share 3 shows up.

 

Any idea what might cause this?

 

edit (again)

Screenshot showing my settings.

 

image.png.2464f153cc7a73c25212ebf030ee23a7.png

Edited by psyonico

1 hour ago, psyonico said:

Edit: Adding version info:

UnRAID 7.0.1

Windows 11 24H2

 

I'm having a similar, but slightly different issue that I'm hoping someone can help with.

 

I got my first share to work flawlessly.  I added two more shares... they show up.  I restart my VM, and only the first share shows up again.  I shut down the VM, go into edit, remove then re-add shares 2-3 and restart my VM... this time only share 3 shows up.

 

Any idea what might cause this?

 

edit (again)

Screenshot showing my settings.

 

image.png.2464f153cc7a73c25212ebf030ee23a7.png

But you're using the mount script added to Windows schedule?

Edited by sekator
mistake

1 hour ago, sekator said:

But you're using the mount script added to Windows schedule?

found the issue, looks like I forgot to run the first script in the post the one that does this:

 

Quote

This disables the VirtioFS service since we won't be using that.

It also registers VirtoFS with the WinFSP launcher.

 

so the mount script was just erroring out (but since it was in task scheduler, I wasn't seeing the error.)

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.