VirtioFS Support Page


Recommended Posts

  • JorgeB pinned this topic

Posting here for visibility since it seems like a few people are having issues with VirtioFS and Windows VMs...

 

It looks like the inclusion of virtiofs configuration in the VM XML may result in Windows 10 VM freezes. When this occurs the VM is completely unresponsive and frozen, there is nothing useful in any logs, and all CPUs allocated to the VM become pegged at 100%. Usually this occurs within 30 minutes to 2 hours of the VM being started.

 

I've confirmed that disabling the VirioFS service in windows has no impact on the freezing, nor does I/O load seem to have any impact. Not sure if it matters, but I initially had 32GB of the 64GB of memory I have allocated to the VM.

Link to comment

Interesting.  I did notice my windows 11 vm freeze soon after configure VirtioFS.  I assume it may have something to do with the driver and have update it since but the problem persist.  

Looking forward to a resolution to this as VirtioFS is a great functionality I'd like to keep using.

 

Edited by LeoRX
Link to comment
4 hours ago, LeoRX said:

Interesting.  I did notice my windows 11 vm freeze soon after configure VirtioFS.  I assume it may have something to do with the driver and have update it since but the problem persist.  

Looking forward to a resolution to this as VirtioFS is a great functionality I'd like to keep using.

 

Please can you post your hardware specs in this thread?

 

 

Link to comment
2 hours ago, NLS said:

Waiting for real feedback on the issue before actually using it.

 

QUESTION TO EVERYBODY:

 

Does it work properly with a Linux based VM?

 

I already use 9p mode, but I hear virtiofs is better.

 

Not heard of issues with linux vms so far. I run both Windows and Linux fine on an intel host.

  • Thanks 1
Link to comment

I'm getting bad VM performance over all when Virtio-FS is setup.  

 

Other then the Windows VM freeze issue, I first noticed stutter just using the VM browsing web sites.  and then I noticed games run horriably and becomes unplayable.

so I figure I should do some testing and see if virtio-fs is really better then samba share and I was expecting it to be so, but the finding is interesting.

I did two speed test using parkdale while i have virtio-fs setup. 

 

First testing the speed to a share through samba

931329455_sambawithvirtiofs.thumb.png.c09ee4307dc42d963722ff176e9ab4b8.png

 

then test the speed to the same folder through virtio-fs.

virtiofs.thumb.png.b896d4504951fb12992652518e9a1197.png

 

Lastly, I removed virtio-fs setup and did another test on the same share over samba.

830561234_sambawithoutvirtiofs.thumb.png.3139d43b08c9e4d1743f8b131302be92.png

 

Overall VM performance is so much better without virtio-fs configured and even samba share are faster.  I thought I'm suppose to get "like passthrough" performance using virio-fs.

Am I missing something or doing something wrong?

  • Confused 1
Link to comment
1 hour ago, LeoRX said:

I'm getting bad VM performance over all when Virtio-FS is setup.  

 

Other then the Windows VM freeze issue, I first noticed stutter just using the VM browsing web sites.  and then I noticed games run horriably and becomes unplayable.

so I figure I should do some testing and see if virtio-fs is really better then samba share and I was expecting it to be so, but the finding is interesting.

I did two speed test using parkdale while i have virtio-fs setup. 

 

First testing the speed to a share through samba

931329455_sambawithvirtiofs.thumb.png.c09ee4307dc42d963722ff176e9ab4b8.png

 

then test the speed to the same folder through virtio-fs.

virtiofs.thumb.png.b896d4504951fb12992652518e9a1197.png

 

Lastly, I removed virtio-fs setup and did another test on the same share over samba.

830561234_sambawithoutvirtiofs.thumb.png.3139d43b08c9e4d1743f8b131302be92.png

 

Overall VM performance is so much better without virtio-fs configured and even samba share are faster.  I thought I'm suppose to get "like passthrough" performance using virio-fs.

Am I missing something or doing something wrong?

I found this bug report with some similar with NFS.

 

https://bugzilla.redhat.com/show_bug.cgi?id=1924337

Link to comment

Just want to say I test it again this morning.

I did manage to get similar speed on virtio-fs drive on the first try with write speed at about 110MBytes/sec.  but the computer freezed up on second try.  

Perhaps its the freeze bug I've been experince that caused performance issue.  I'm looking forward to the day the freeze bug is resolved.  :)

Edited by LeoRX
Link to comment
  • 3 weeks later...

Having a weird issue with my Ubuntu 22.04 VM with virtiofs I wasn't seeing when I was using cifs shares prior, not sure if I just have something set slightly wrong?

So far, I'm only seeing the issue with yt-dlp, when it tries to write a file, it will error out, sometimes part way through the file, sometimes after the file has finished, sometimes it won't even start a file.

 

From my linux side:

ubuntuServer:/downloads/temp$ yt-dlp --version
2022.10.04

ubuntuServer:/downloads/temp$ uname -a
Linux gringott 5.15.0-52-generic #58-Ubuntu SMP Thu Oct 13 08:03:55 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

ubuntuServer:/downloads/temp$ lsb_release -r
Release:        22.04

ubuntuServer:/downloads/temp$ cat /etc/fstab
downloads /downloads virtiofs rw,relatime 0 0

ubuntuServer:/downloads$ ls -alh
drwxrwxrwx  1   99 users  290 Oct 31 13:53 temp

ubuntuServer:/downloads/temp$ yt-dlp "https://www.youtube.com/watch?v=2CbObOuOEuA"
[youtube] 2CbObOuOEuA: Downloading webpage
[youtube] 2CbObOuOEuA: Downloading android player API JSON
[info] 2CbObOuOEuA: Downloading 1 format(s): 313+251
[download] Destination: How to set up Unraid - 2021 Guide [2CbObOuOEuA].f313.webm
[download] 100.0% of  167.95MiB at   46.43MiB/s ETA 00:00ERROR: unable to download video data: [Errno 95] Operation not supported

ubuntuServer:/downloads/temp$ yt-dlp "https://www.youtube.com/watch?v=2CbObOuOEuA"
[youtube] 2CbObOuOEuA: Downloading webpage
[youtube] 2CbObOuOEuA: Downloading android player API JSON
[info] 2CbObOuOEuA: Downloading 1 format(s): 313+251
[download] Resuming download at byte 176106778
[download] How to set up Unraid - 2021 Guide [2CbObOuOEuA].f313.webm has already been downloaded
[download] 100% of  167.95MiB
[download] Destination: How to set up Unraid - 2021 Guide [2CbObOuOEuA].f251.webm
[download] 100.0% of   12.66MiB at   31.19MiB/s ETA 00:00ERROR: unable to download video data: [Errno 95] Operation not supported

ubuntuServer:/downloads/temp$ yt-dlp "https://www.youtube.com/watch?v=2CbObOuOEuA"
[youtube] 2CbObOuOEuA: Downloading webpage
[youtube] 2CbObOuOEuA: Downloading android player API JSON
[info] 2CbObOuOEuA: Downloading 1 format(s): 313+251
[download] How to set up Unraid - 2021 Guide [2CbObOuOEuA].f313.webm has already been downloaded
[download] 100% of  167.95MiB
[download] Resuming download at byte 13270660
[download] How to set up Unraid - 2021 Guide [2CbObOuOEuA].f251.webm has already been downloaded
[download] 100% of   12.66MiB
[Merger] Merging formats into "How to set up Unraid - 2021 Guide [2CbObOuOEuA].webm"
Deleting original file How to set up Unraid - 2021 Guide [2CbObOuOEuA].f313.webm (pass -k to keep)
Deleting original file How to set up Unraid - 2021 Guide [2CbObOuOEuA].f251.webm (pass -k to keep)

 

From my VM Config:
 

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

    <filesystem type='mount' accessmode='passthrough'>
      <driver type='virtiofs' queue='1024'/>
      <binary path='/usr/libexec/virtiofsd' xattr='on'>
        <cache mode='always'/>
        <sandbox mode='chroot'/>
        <lock posix='on' flock='on'/>
      </binary>
      <source dir='/mnt/user/downloads/'/>
      <target dir='downloads'/>
      <alias name='fs1'/>
      <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
    </filesystem>

 

If I umount /downloads, and remount it using the cifs share, the Errno 95 goes away. Any ideas what I may have done wrong?

Link to comment
On 10/31/2022 at 10:00 AM, Iron_Forge said:

So far, I'm only seeing the issue with yt-dlp, when it tries to write a file, it will error out, sometimes part way through the file, sometimes after the file has finished, sometimes it won't even start a file.

 

I had a similar issue with my Debian VM and yt-dlp with 6.11.1. Ended up reverting to 9p.

Link to comment
  • 3 weeks later...

I'm testing Virtiofs on my main Win11 VM, and having quite some success, but with a few caveats.

 

Firstly, while installing the latest virtio drivers, my VM IMMEDIATELY CRASHES.

I found through lots of trial and crashes that if I leave "Fwcfg" DISABLED, the install finishes.

Disabling it allows install of updated drivers, sets up services, and does not crash the VM.

image.png.9459690fdfb74af3fec4eb736ef51eb5.png

What is this Fwcfg, can anyone shed some light on that?

 

Secondly, I'm trying to setup 2 virtiofs disks, but only 1 appears as the Z: drive

If I setup 2 drives, only the second appears as Z: when the VM boots.

In this example, I setup "vdata1" and "vdata2":

image.png.1acd6b7d53ed6b46265f32052dcf90ba.png

 

Thirdly, the virtiofs is always set as Z:

I cannot find or see any way to reassign the drive letter, or indeed use multiple drive letters.

Is there a way to change the assigned drive?

 

Link to comment

How are people even getting the vitrioFS share to show up in windows 10???

 

I have the share setup in unraid, I have the latest vitrio drivers installed yet I can not figure out any method for getting the share to show up??

 

After a lot fo searching the issue seems to be that the virtio-FS service will not start. If I try to manually start it, it just gives an error "service did not start in a timely fashion".

 

https://github.com/virtio-win/kvm-guest-drivers-windows/issues/550

 

This seems to indicate that it needs the WinFsp.Launcher and the VirtioFsDrv driver to work but I can not find these services installed?

 

I am lost, this is a fresh clean VM install with the latest virtIO drivers and guest agent installed and not much else.

 

Edit: Just installed 2 fresh clean windows 10 VM's and same issue on both of them as well.

Edited by TexasUnraid
Link to comment
9 hours ago, TexasUnraid said:

How are people even getting the vitrioFS share to show up in windows 10???

 

I have the share setup in unraid, I have the latest vitrio drivers installed yet I can not figure out any method for getting the share to show up??

 

After a lot fo searching the issue seems to be that the virtio-FS service will not start. If I try to manually start it, it just gives an error "service did not start in a timely fashion".

 

https://github.com/virtio-win/kvm-guest-drivers-windows/issues/550

 

This seems to indicate that it needs the WinFsp.Launcher and the VirtioFsDrv driver to work but I can not find these services installed?

 

I am lost, this is a fresh clean VM install with the latest virtIO drivers and guest agent installed and not much else.

 

Edit: Just installed 2 fresh clean windows 10 VM's and same issue on both of them as well.

You need to install WInFSP also for windows. https://winfsp.dev/rel/

 

@SpaceInvaderOne has created a video re VirtioFS. Added to first post.

Link to comment
5 hours ago, SimonF said:

You need to install WInFSP also for windows. https://winfsp.dev/rel/

 

@SpaceInvaderOne has created a video re VirtioFS. Added to first post.

Thanks! That did it.

 

The steps and all the drivers needed for this to work should REALLY be included in the notes for the share in the VM setup or something. Even better the winfsp drivers could be a downloadable ISO that can be inserted as well.

Link to comment
33 minutes ago, TexasUnraid said:

Thanks! That did it.

 

The steps and all the drivers needed for this to work should REALLY be included in the notes for the share in the VM setup or something. Even better the winfsp drivers could be a downloadable ISO that can be inserted as well.

Fixed for Windows was only showing for non Windows and added additional info.

 

image.thumb.png.a1da16b3fdeffa8402ffbd944c852cde.png

Link to comment

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.