I've been trying to get dfly running on Hyper-V for the last 2 or perhaps 3 years, and it keeps failing. I hoped the 6.0.0 would fix things, but it only got worse.
The short version, sometime ago dfly stopped working properly with the virtual hard disk interface on Hyper-V. I think the last time I was able to build an image, I actually had to swap the VHD out for a physical disk. But it seems that even that trick isn't working anymore.
I've tried switching to an older virtual hardware configuration, but the oldest my test Win 10 system supports is v8.0 which is relatively recent, so I don't know if going back further would help.
I've spent countless hours trying various combinations of boot flags trying to get this fixed, but nothing has worked. I just can't seem to read/write to the disk device.
Disabling DMA, and write caching with hw.ata.ata_wc=0
and hw.ata.ata_dma=0
will eliminate most of the kernel errors, but it doesn't fix the problem. And I'll still see the error message "ad0: timeout waiting for DRQ"
... note that with DMA disabled the drive is forced into PIO4 mode. But neither PIO4 or WDMA2 mode appear to work, and those appear to be the only modes that are supported.
Gen 1 VMs allow IDE or SCSI buses, and legacy network adapters. Moving the virtual disk to a SCSI control on a gen 1 VM doesn't help, since dfly doesn't find it all. In fact it doesn't appear to find the SCSI bus at all (no scbus). Switching to a gen 2 VM doesn't help ,because it requires disks to be on the SCSI bus, and thus doesn't seem them. Gen 2 VM also require the newer virtualized network adapter, which dfly doesn't support.
Can someone tell me what magic combination boot loader params are needed to fix this? I've played around with the following flags (as well as using the natacontrol utility to force a mode manually), but nothing seems to work:
hint.acpi.0.disabled=1
hint.ahci.disabled=1
hint.ahci.force150=1
hint.ahci.nofeatures=1
hint.ata.0.disabled=1
hint.atapci.0.msi=0
hint.ehci.0.disabled=1
hint.xhci.0.disabled=1
hw.ahci.force=1
hw.ahci.msi.enable=0
hw.ata.ata_dma=0
hw.ata.ata_dma_check_80pin=0
hw.ata.ata_wc=0
hw.ata.atapi_dma=0
hw.ata.disk_enable=1
hw.ata.wc=0
hw.bwn.usedma=0
hw.clflush_disable=1
kern.cam.ada.write_cache=0