According to the spec here ( https://docs.oasis-open.org/virtio/virtio/v1.1/virtio-v1.1.html#x1-99001r97 ) and virtio windows guest driver ( https://github.com/virtio-win/kvm-guest-drivers-windows/blob/a9ecb1dc1ecbde82ad655cb5581fb139ada1a512/vioscsi/vioscsi.inx ), virtio-scsi is supposed to have device id of 0x1004 bhyve on the other hand has it at 0x1008 ( https://cgit.freebsd.org/src/tree/usr.sbin/bhyve/virtio.h ) which results in driver from redhat virtio cd for windows can't be used. I can't find any information on it but is it actually intentional and bhyve's virtio-scsi is just different compared to others?
Created attachment 229632 [details] png file that shows that the virtio driver is not accepted
Created attachment 229633 [details] png file that shows that the virtio driver is not accepted
it happens to me also,using these arguments : bhyve -S -c 4 -m 8G -w -H \ -s 0,hostbridge \ -s 1,ahci-cd,/mnt/da2s1/ISO/Windows/Win.All.85in1.June.2021__CmTeamPK.CoM.iso \ -s 2,ahci-cd,/home/marietto/Downloads/virtio-win-0.1.208.iso \ -s 3,virtio-blk,/mnt/da2s1/OS/bhyve/Windows/win7.img \ -s 4,fbuf,tcp=0.0.0.0:5900,w=1440,h=900,wait \ -s 5:0,passthru,2/0/0,rom=TU102.rom \ -s 5:1,passthru,2/0/1 \ -s 5:2,passthru,2/0/2 \ -s 5:3,passthru,2/0/3 \ -s 8,virtio-net,tap0 \ -s 9,virtio-9p,sharename=/home/marietto \ -s 30,xhci,tablet \ -s 31,lpc \ -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd \ vm0
Created attachment 229642 [details] 0x1004 for scsi device id This change seems reasonable. Do either of you have the ability to test this patch?
yes, the driver can be installed after changing the device id. weirdly windows doesn't detect any disks even after installing the virtio-scsi driver. Tested same config on debian and freebsd, both see the disk fine so I'm not sure where it went wrong.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=b4cc5d63b6112746598d21413c9800a43171da52 commit b4cc5d63b6112746598d21413c9800a43171da52 Author: Robert Wing <rew@FreeBSD.org> AuthorDate: 2022-01-31 18:44:47 +0000 Commit: Robert Wing <rew@FreeBSD.org> CommitDate: 2022-01-31 18:44:47 +0000 bhyve/virtio: use correct device id for virtio-scsi Section 4.1.2.1 of the virtio spec states that the transitional PCI device id for a scsi device is 0x1004. Fix suggested by reporter. PR: 259961 Reported by: me@nanaya.pro Reviewed by: imp, jhb Fixes: f9c005a17f4e ("Add bhyve virtio-scsi storage backend support.") Differential Revision: https://reviews.freebsd.org/D34103 usr.sbin/bhyve/virtio.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=cd6bdac0818a44f4faceddc485e314855c0b3f11 commit cd6bdac0818a44f4faceddc485e314855c0b3f11 Author: Robert Wing <rew@FreeBSD.org> AuthorDate: 2022-01-31 18:44:47 +0000 Commit: Robert Wing <rew@FreeBSD.org> CommitDate: 2022-02-10 19:45:56 +0000 bhyve/virtio: use correct device id for virtio-scsi Section 4.1.2.1 of the virtio spec states that the transitional PCI device id for a scsi device is 0x1004. Fix suggested by reporter. PR: 259961 Reported by: me@nanaya.pro Reviewed by: imp, jhb Fixes: f9c005a17f4e ("Add bhyve virtio-scsi storage backend support.") Differential Revision: https://reviews.freebsd.org/D34103 (cherry picked from commit b4cc5d63b6112746598d21413c9800a43171da52) usr.sbin/bhyve/virtio.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
The Windows issue of not detecting any disks after the virtio-scsi driver is installed sounds like a separate problem. I'm closing this bug report as fixed.