Fwd: Installing virtiofs drivers on Windows 11....

Hello to everyone. I'm testing Windows 11 with bhyve and I've found an annoying problem that prevents me from completing some tasks that I'm working on. It seems that the virtio-9p driver does not work inside the Windows 11 os emulated with bhyve and maybe also with qemu-kvm. When Windows 11 is launched,I don't see the folder "mnt" mounted on the root folder of Windows 11. Below you can see which bhyve parameters I've used : bhyve -S -c 4 -m 8G -w -H \ -s 0,hostbridge \ -s 1,ahci-cd,/home/marietto/Downloads/virtio/virtio-win-0.1.208.iso \ -s 2,ahci-hd,/mnt/da0p1/Backups/OS/bhyve/Windows/win11.img \ -s 3,fbuf,tcp=0.0.0.0:5900,w=1440,h=900,wait \ -s 8,virtio-net,tap0 \ ----> -s 9,virtio-9p,sharename=/mnt \ -s 30,xhci,tablet \ -s 31,lpc \ -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd \ vm0 Investigating a little bit more and reading from this tutorial : https://virtio-fs.gitlab.io/howto-windows.html I've realized that there should be some problem with the WinFsp <http://www.secfs.net/winfsp> - Windows File System Proxy and or with the virtiofs PCI device driver because I'm not able to enable the virtiofs service with the command used on the tutorial : C:\> sc start VirtioFsSvc it gives the error : "the dependency service does not exist or it has been marked for the elimination. I've attached some screenshots to help you to understand what's happening. Please help me,thanks. Attached screenshots : https://ibb.co/m5vm1hd https://ibb.co/Qd6TS5d https://ibb.co/3018SGd -- Mario.

On Mon, Nov 29, 2021 at 06:15:40PM +0100, Mario Marietto wrote:
Hello to everyone.
I'm testing Windows 11 with bhyve and I've found an annoying problem that prevents me from completing some tasks that I'm working on.
It seems that the virtio-9p driver does not work inside the Windows 11 os emulated with bhyve and maybe also with qemu-kvm. When Windows 11 is launched,I don't see the folder "mnt" mounted on the root folder of Windows 11. Below you can see which bhyve parameters I've used :
bhyve -S -c 4 -m 8G -w -H \ -s 0,hostbridge \ -s 1,ahci-cd,/home/marietto/Downloads/virtio/virtio-win-0.1.208.iso \ -s 2,ahci-hd,/mnt/da0p1/Backups/OS/bhyve/Windows/win11.img \ -s 3,fbuf,tcp=0.0.0.0:5900,w=1440,h=900,wait \ -s 8,virtio-net,tap0 \ ----> -s 9,virtio-9p,sharename=/mnt \ -s 30,xhci,tablet \ -s 31,lpc \ -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd \ vm0
You're cross-posting this to the libvirt users and virt-tools developers list, and yet you seem to be running bhyve directly so neither libvirt nor virt-manager are involved. I assume that a support list for bhyve users exists. That would be the appropriate forum to ask for help. Anyway, since I'm already replying...
Investigating a little bit more and reading from this tutorial :
https://virtio-fs.gitlab.io/howto-windows.html
I've realized that there should be some problem with the WinFsp <http://www.secfs.net/winfsp> - Windows File System Proxy and or with the virtiofs PCI device driver because I'm not able to enable the virtiofs service with the command used on the tutorial :
C:\> sc start VirtioFsSvc
it gives the error : "the dependency service does not exist or it has been marked for the elimination.
... I will point out that virtio-9p and virtiofs are two completely different things. You've configured the former in the host, and are trying to access data using the latter in the guest. That's not going to work. I could not find confirmation that either bhyve supports virtiofs or that 9p can be used from Windows from a quick search. I'm afraid you might be wading into entirely uncharted territory.
I've attached some screenshots to help you to understand what's happening.
https://ibb.co/m5vm1hd https://ibb.co/Qd6TS5d https://ibb.co/3018SGd
I highly recommend changing your OS' language to English before grabbing screenshots. Limiting the pool of people who might be able to help you to those who can understand Italian is unlikely to make things any easier for you ;) -- Andrea Bolognani / Red Hat / Virtualization

I've been lucky to find a compatriot :) Sometimes time happens and it makes me feel happy. You are right. I got confused. I've thought virtio-9p working depended on virtiofs working. Anyway, neither of those functions works :( Anyway I'm not sure that the right place to ask this question is the bhyve ML. It seems more a problem of Device drivers and Windows 11. Il giorno lun 29 nov 2021 alle ore 19:21 Andrea Bolognani < abologna@redhat.com> ha scritto:
On Mon, Nov 29, 2021 at 06:15:40PM +0100, Mario Marietto wrote:
Hello to everyone.
I'm testing Windows 11 with bhyve and I've found an annoying problem that prevents me from completing some tasks that I'm working on.
It seems that the virtio-9p driver does not work inside the Windows 11 os emulated with bhyve and maybe also with qemu-kvm. When Windows 11 is launched,I don't see the folder "mnt" mounted on the root folder of Windows 11. Below you can see which bhyve parameters I've used :
bhyve -S -c 4 -m 8G -w -H \ -s 0,hostbridge \ -s 1,ahci-cd,/home/marietto/Downloads/virtio/virtio-win-0.1.208.iso \ -s 2,ahci-hd,/mnt/da0p1/Backups/OS/bhyve/Windows/win11.img \ -s 3,fbuf,tcp=0.0.0.0:5900,w=1440,h=900,wait \ -s 8,virtio-net,tap0 \ ----> -s 9,virtio-9p,sharename=/mnt \ -s 30,xhci,tablet \ -s 31,lpc \ -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd \ vm0
You're cross-posting this to the libvirt users and virt-tools developers list, and yet you seem to be running bhyve directly so neither libvirt nor virt-manager are involved.
I assume that a support list for bhyve users exists. That would be the appropriate forum to ask for help.
Anyway, since I'm already replying...
Investigating a little bit more and reading from this tutorial :
https://virtio-fs.gitlab.io/howto-windows.html
I've realized that there should be some problem with the WinFsp <http://www.secfs.net/winfsp> - Windows File System Proxy and or with the virtiofs PCI device driver because I'm not able to enable the virtiofs service with the command used on the tutorial :
C:\> sc start VirtioFsSvc
it gives the error : "the dependency service does not exist or it has been marked for the elimination.
... I will point out that virtio-9p and virtiofs are two completely different things. You've configured the former in the host, and are trying to access data using the latter in the guest. That's not going to work.
I could not find confirmation that either bhyve supports virtiofs or that 9p can be used from Windows from a quick search. I'm afraid you might be wading into entirely uncharted territory.
I've attached some screenshots to help you to understand what's happening.
https://ibb.co/m5vm1hd https://ibb.co/Qd6TS5d https://ibb.co/3018SGd
I highly recommend changing your OS' language to English before grabbing screenshots. Limiting the pool of people who might be able to help you to those who can understand Italian is unlikely to make things any easier for you ;)
-- Andrea Bolognani / Red Hat / Virtualization
-- Mario.

On Mon, Nov 29, 2021 at 08:00:15PM +0100, Mario Marietto wrote:
I've been lucky to find a compatriot :) Sometimes time happens and it makes me feel happy. You are right. I got confused. I've thought virtio-9p working depended on virtiofs working. Anyway, neither of those functions works :( Anyway I'm not sure that the right place to ask this question is the bhyve ML. It seems more a problem of Device drivers and Windows 11.
I think it might be worth a shot. Hopefully FreeBSD is planning to implement virtiofs support in bhyve at some point in the not too distant future, but in the meantime other users might be able to suggest alternative ways to implement host/guest file sharing. Good luck! -- Andrea Bolognani / Red Hat / Virtualization

I'm confused. Anyway,since I don't know how it works virtiofs,I'm using virtio-9p every day. So I can say that bhyve already supports virtio-9p. This is how I make it work under Linux : -s 8,virtio-9p,sharename=<host-dir-path> In the guest I need something like : mount -t 9p -o trans=virtio,version=9p2000.L,rw sharename /mnt I assume that what's missing on Windows 10 is only the ability to mount the shared folder. Since mount is a linux command and windows 10 / 11 supports linux with it's proper kernel,a good idea could be to try to mount the shared resource within the WSL2 :) Il giorno mar 30 nov 2021 alle ore 09:50 Andrea Bolognani < abologna@redhat.com> ha scritto:
On Mon, Nov 29, 2021 at 08:00:15PM +0100, Mario Marietto wrote:
I've been lucky to find a compatriot :) Sometimes time happens and it makes me feel happy. You are right. I got confused. I've thought virtio-9p working depended on virtiofs working. Anyway, neither of those functions works :( Anyway I'm not sure that the right place to ask this question is the bhyve ML. It seems more a problem of Device drivers and Windows 11.
I think it might be worth a shot. Hopefully FreeBSD is planning to implement virtiofs support in bhyve at some point in the not too distant future, but in the meantime other users might be able to suggest alternative ways to implement host/guest file sharing.
Good luck!
-- Andrea Bolognani / Red Hat / Virtualization
-- Mario.

ok I can't because bhyve does not support nested virtualization. sorry for the mistake. Il giorno mar 30 nov 2021 alle ore 10:09 Mario Marietto < marietto2008@gmail.com> ha scritto:
I'm confused. Anyway,since I don't know how it works virtiofs,I'm using virtio-9p every day. So I can say that bhyve already supports virtio-9p. This is how I make it work under Linux :
-s 8,virtio-9p,sharename=<host-dir-path>
In the guest I need something like :
mount -t 9p -o trans=virtio,version=9p2000.L,rw sharename /mnt
I assume that what's missing on Windows 10 is only the ability to mount the shared folder. Since mount is a linux command and windows 10 / 11 supports linux with it's proper kernel,a good idea could be to try to mount the shared resource within the WSL2 :)
Il giorno mar 30 nov 2021 alle ore 09:50 Andrea Bolognani < abologna@redhat.com> ha scritto:
On Mon, Nov 29, 2021 at 08:00:15PM +0100, Mario Marietto wrote:
I've been lucky to find a compatriot :) Sometimes time happens and it makes me feel happy. You are right. I got confused. I've thought virtio-9p working depended on virtiofs working. Anyway, neither of those functions works :( Anyway I'm not sure that the right place to ask this question is the bhyve ML. It seems more a problem of Device drivers and Windows 11.
I think it might be worth a shot. Hopefully FreeBSD is planning to implement virtiofs support in bhyve at some point in the not too distant future, but in the meantime other users might be able to suggest alternative ways to implement host/guest file sharing.
Good luck!
-- Andrea Bolognani / Red Hat / Virtualization
-- Mario.
-- Mario.

It seems that it can work on Windows guest. Did you miss this thread ? https://github.com/virtio-win/kvm-guest-drivers-windows/issues/126# Il giorno mar 30 nov 2021 alle ore 10:15 Mario Marietto < marietto2008@gmail.com> ha scritto:
ok I can't because bhyve does not support nested virtualization. sorry for the mistake.
Il giorno mar 30 nov 2021 alle ore 10:09 Mario Marietto < marietto2008@gmail.com> ha scritto:
I'm confused. Anyway,since I don't know how it works virtiofs,I'm using virtio-9p every day. So I can say that bhyve already supports virtio-9p. This is how I make it work under Linux :
-s 8,virtio-9p,sharename=<host-dir-path>
In the guest I need something like :
mount -t 9p -o trans=virtio,version=9p2000.L,rw sharename /mnt
I assume that what's missing on Windows 10 is only the ability to mount the shared folder. Since mount is a linux command and windows 10 / 11 supports linux with it's proper kernel,a good idea could be to try to mount the shared resource within the WSL2 :)
Il giorno mar 30 nov 2021 alle ore 09:50 Andrea Bolognani < abologna@redhat.com> ha scritto:
On Mon, Nov 29, 2021 at 08:00:15PM +0100, Mario Marietto wrote:
I've been lucky to find a compatriot :) Sometimes time happens and it makes me feel happy. You are right. I got confused. I've thought virtio-9p working depended on virtiofs working. Anyway, neither of those functions works :( Anyway I'm not sure that the right place to ask this question is the bhyve ML. It seems more a problem of Device drivers and Windows 11.
I think it might be worth a shot. Hopefully FreeBSD is planning to implement virtiofs support in bhyve at some point in the not too distant future, but in the meantime other users might be able to suggest alternative ways to implement host/guest file sharing.
Good luck!
-- Andrea Bolognani / Red Hat / Virtualization
-- Mario.
-- Mario.
-- Mario.

Please don't top post on technical lists. On Tue, Nov 30, 2021 at 10:31:47AM +0100, Mario Marietto wrote:
I'm confused. Anyway,since I don't know how it works virtiofs,I'm using virtio-9p every day. So I can say that bhyve already supports virtio-9p. This is how I make it work under Linux :
-s 8,virtio-9p,sharename=<host-dir-path>
In the guest I need something like :
mount -t 9p -o trans=virtio,version=9p2000.L,rw sharename /mnt
I assume that what's missing on Windows 10 is only the ability to mount the shared folder.
Correct. FreeBSD as a host supports virtio-9p, but Windows as a guest doesn't have the necessary drivers as far as I can tell.
Since mount is a linux command and windows 10 / 11 supports linux with it's proper kernel,a good idea could be to try to mount the shared resource within the WSL2 :)
From what I understand, 9p is used by Windows to make its files available to Linux in WSL2. In that scenario, Windows acts as the server; what you would need is for Windows to be a 9p client.
I don't think there's a way you can simply forward the 9p server created by bhyve to WSL2, but even if you could do that you'd only be able to access the host's file from within WSL2, which is probably not what you were looking for.
ok I can't because bhyve does not support nested virtualization. sorry for the mistake.
Right, this makes the above idea even less feasible.
It seems that it can work on Windows guest. Did you miss this thread ?
https://github.com/virtio-win/kvm-guest-drivers-windows/issues/126
I've skimmed the thread, and I've seen no indication in it that a virtio-9p driver for Windows has been produced. Once again, virtio-9p and virtiofs are two completely different things, and the fact that a Windows driver for the latter exists doesn't mean that the former will work. You'd need a separate driver, and to the best of my knowledge one doesn't currently exist. Yes, the fact that virtio-9p is sometimes also referred to as "VirtFS" is extremely confusing :( All reports of success in that thread seem to come from people who are using virtiofs, not virtio-9p. You could certainly do the same if you were using QEMU, but bhyve doesn't have virtiofs support yet. -- Andrea Bolognani / Red Hat / Virtualization
participants (2)
-
Andrea Bolognani
-
Mario Marietto