-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hyperv-iso #1
Comments
I forgot to mention that starting with the 6.0.0 release, the legacy network adapter also stopped working. It does, however, with in previous releases. And as I mentioned above, the dfly doesn't have the drivers necessary to use a non-legacy network adapter. |
My server still had support for older virtual hardware revisions, so I tried setting up a VM using the rather old v5.0, but it didn't appear to make a difference. I did, however, find an article with a note that suggests write caching functioned differently on older versions of Hyper-V. Perhaps that is why it's now broken. From the article:
|
And more from the Hyper-V docs:
|
Thank you for the detailed report. I'll redirect this issue to relevant developers and try to figure it out. |
@liweitianux any progress on the bug, or workarounds? |
Hi @ladar , sorry for the delay. I asked the developers then but didn't get a reply, and then I forgot about this. Now I asked again and got some info this time:
One more thing about ATA: it's being problematic on dfly for years, and we never tried to fix it, because SATA (AHCI) or VirtIO should always be used instead. Moreover, Matt Dillon rewrote the callout API last year (e.g., commit fac0eb3cf4c969cfb8eab610321bd0b712266d62), and that might break the ATA further. Regards. |
Ok, a bit more info from a developer:
So we think it may need significant work to port Hyper-V support from FreeBSD. However, I personally don't see much interests in doing this, due to the limited manpower. Regards. |
@liweitianux I think the ATA driver is calling the ATA equivalent of the I think the other BSD drivers must have added logic to handle this. Possibly by ignoring, or not using the functionality in question. I'm guessing, but I bet if I pull out an old enough system, that hasn't received the hotfix/service pack, then Dfly will boot just fine. I think that was how I created the image that 've been recycling for the last couple years on the Vagrant cloud, since I can't update it (it's the only one out of 700+ that I haven't found a solution for). The hotfix was linked to in the article above, but I think it was this hotfix/change that broke Dfly: To quote the hotfix:
I tried poking around the kernel code to see if I could pinpointg the precise place this was happening, but the error message was too generic, and I couldn't find it. I also not an expert on the low level ATA commands/protocol, so I don't know how to fix it. |
@ladar , thank you for the detailed analysis and information. I'll redirect the info to other developers. I'll also look into it a bit, but I'm not an expert either and don't have an Hyper-V environment at the moment. |
If you were in Texas I could probably help you out, but if your profile is right, it would probably be easier, and cheaper to find a spare notebook somewhere to test with, than make the trip here. You might be able to setup Windows inside a VM, and then run Dfly as a nested guest. I've done nested virtualization in the past, with mixed success, but haven't tried to use Hyper-V in this manner yet. As I mentioned initially, I've tried a large number of possible kernel options to fix this, and while some altered how the problem manifested, none of them worked. I'm starting to wonder if the last time I was able to run Dfly and build an image, my solution was to replace the virtual disk with a pass through to a physical one. It occurred to me to try that again recently, but I only had a flash drive at the time, and that didn't work. I'm wondering if a regular hard drive attached via USB would be a different story. Not sure when I'll get a chance to test the theory though, since I've been building my Hyper-V images on a blade server at our datacenter as of late, and I don't know when I'll be able to dig out the Windows laptop and try it. |
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
andhw.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:
The text was updated successfully, but these errors were encountered: