Skip to content

Guide for using virtiofs to share a filesystem from a Linux host to a Windows guest.

Notifications You must be signed in to change notification settings

silvercreeper356/virtiofs-guide

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 

Repository files navigation

virtiofs-guide

Guide for using virtiofs to share a filesystem from a Linux host to a Windows guest.

No video guide

kyle is fat

This guide goes through setting up virtiofs to share files to a Windows guest. Also possible with Linux guests but this guide only covers Windows.

Contents:

1: Configure in Virtual Machine Manager

2: Install required guest software

3: Install virtio sotrage drivers

4: Manually enable and start Virtio-FS Service

5: Mounting an existing folder to your shared folder

6: Speed

Step 1: Configure in Virtual Machine Manager

Enable Shared Memory and Apply

ShareX_a2HPjjj7Jt

Go to Add Hardware > Filesystem Open XML tab and paste in this (You might have to enable XML Editing)

        <filesystem type='mount' accessmode='passthrough'>
          <driver type='virtiofs' queue='1024'/>
          <source dir='/Path-to-Source'/>
          <target dir='share-name-in-guest'/>
        </filesystem>

Press Finish

2022-09-25_17-59

Step 2: Install required guest software

Download and install virtio guest tools

latest download: https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/latest-virtio/virtio-win-guest-tools.exe

chrome_lGqrtRAdqg

You may need to reboot

Download and install WinFsp

latest download: https://github.com/billziss-gh/winfsp/releases/latest

msiexec_OeWhd25rQx

Step 3: Install virtio storage drivers

!!!!ONLY IF You dont have virtio storage drivers already installed!!!!

If the drivers are already installed then skip to step 4

Download latest virtio-win ISO: https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso

Mount ISO in Windows:

chrome_ztyax7jRKS

Open Device Manager > Other Devices > Right click 'Mass Storage Controller' > Update Driver

chrome_8diRh5b8yN

Click 'Browse my computer for drivers' then 'Browse'

Pick your mounted ISO and click OK

chrome_VumkFnsjsV

Windows should install drivers, click Close

(You might want to install drivers for any other virtio devices)

Step 4: Manually enable and start Virtio-FS Service

Open 'Run' (Windows Key + R) and run 'Services.msc'

explorer_0Ylj3FjGGB

Scroll down to 'Virtio-FS Service' > Open properties

Set 'Startup type' to Automatic and press 'Start' then 'Apply'

mmc_oKeCgqNHk0

Reboot

You should be able to open your Host Z: drive in Windows

chrome_kynQ7aJBRH

If you can't then make sure VirtIO-FS Services is running

Step 5 (Extra): Mounting an existing folder to your shared folder

This is useful for adding other filesystems that aren't already in your shared folder

mkdir NAME

sudo mount -o bind /SOURCE /DEST

UNMOUNT using

sudo umount /DEST

6: SPEED:

Warning that using this method and virtiofs is SLOW, you will NOT get high speeds

Speed comparison of a Gen 3 NVMe SSD to it passed through with virtiofs:

ImageGlass_tgNayqOLvJ

Sources:

https://www.reddit.com/r/VFIO/comments/wpw1bj/how_do_i_setup_file_sharing_between_my_hostarch/

https://www.mail-archive.com/[email protected]/msg02246.html

with help from insomdx#6835

About

Guide for using virtiofs to share a filesystem from a Linux host to a Windows guest.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published