acidanthera / bugtracker

Acidanthera Bugtracker
385 stars 44 forks source link

Hyper-V VM randomly drops connection and does not reconnect #2090

Closed Sartharon closed 1 year ago

Sartharon commented 2 years ago

Host

Kexts

macOS

Other

Issue Description

The recovery boots without any issues and at first an internet is present. ifconfig shows: image pinging google works fine as well: image

After some time, the connection just drops and will not connect. Thus, the installer cannot finish downloading and the error message "PKDownloadError error 8" is shown. Thus, installing macOS is not possible. Ping just receives timeouts after the connection has dropped, even to the router. My Router then also shows the device as shutdown/not connected. The setuplog shows the following after a while:

Retrying http://swcdn.apple.com/content/downloads/44/35/012-22320-A_AOID136T4U/[......]
Started downloading package com.apple.pkg.InstallAssistant.macOSBigSur (http://swcdn.apple.come/content/[....])

If you need anything else (probably Debug logs from the HyperV.kext) let me know. Not sure how to enable and/or save/access hyperV.kext debug logs. Though I use the debug version for now and enabled as much debug stuff as mentioned in the OpenCore documentation.

Edit: Disabling IPv6 on the Network does not help either

Goldfish64 commented 2 years ago

Does this occur with SR-IOV disabled on the vSwitch as well? Having it enabled/disabled in either case shouldn't matter as macOS just doesn't have the support, but would like to rule that out. For drop out time is it consistent after a certain about of time/data and how long?

Sartharon commented 2 years ago

I've created a new External Switch without SR-IOV and gave it a different 10 NIC which is not used by anything else. Assigned that switch only to the Hackintosh. So no difference there, just as you expected.

For drop out time is it consistent after a certain about of time/data

No not really it's somewhere between 5 and 35 minutes, and then I can see that the installer starts retrying the download and I can see in on my router that no traffic is generated by the VM/macOS anymore.

and how long?

Indefinitely, but then again I cannot retry the installation most of the time since the OS just locks up retrying the installation after pressing "Ok" on the "PKDownloadError error 8" message, being thrown back to the main recovery screen and choosing to install the OS (again). I can open the Terminal at that time, though. Even using nslookup or pinging an IP after 20 minutes shows that macOS doesn't have an internet connection, nor does my router show that it's even connected anymore

Not sure if this is indicating something, but the first download retry happens shortly after a router advertisement (IPv6) but then again the issue is present even when disabling IPv6 and therefore not having any RAs.

I might as well give you access to the VM and its VHDXs if you need that.

notAperson535 commented 2 years ago

@Sartharon Not an answer, but how exactly did you set up the hyper-v VM? I have been trying but I can not do it.

Sartharon commented 2 years ago

@Sartharon Not an answer, but how exactly did you set up the hyper-v VM? I have been trying but I can not do it.

Since this is very much OT I'll keep it short:

  1. Create a VHD of 16GB attach it on any Windows Machine
  2. Format it as FAT32
  3. Follow the OC Install Guide for a bit
  4. Make sure you use the correct SSDTs and Quirks as provided here
  5. Create a 2nd VHD for macOS itself
  6. Unattach the VHD on the Windows Machine
  7. Create a VM for macOS without Secure boot attach both VHDs and make sure you boot from the smaller VHDs
  8. Boot the VM
notAperson535 commented 2 years ago

I can't get an internet connection at all.

ivansavra1 commented 2 years ago

Could anyone at least boot macOS with a Ryzen CPU? I'm unable to get past the kernel hand-off, and I don't know if this is an AMD issue (Ryzen 5 3600)

notAperson535 commented 2 years ago

@ivansavra1 i cant even boot with ssdt-hv-dev

ivansavra1 commented 2 years ago

@ivansavra1 i cant even boot with ssdt-hv-dev

I don't understand why there isn't a proper guide from Acidanthera or Dortania, this has a lot of potential, running macOS on Hyper-V is probably the best way: You get the performance and the flexibility of running games on Windows without performance impact.

Sartharon commented 2 years ago

@ivansavra1 i cant even boot with ssdt-hv-dev

Did a test myself and cant boot with the new hv-dev either anymore neither Montery nor BigSur (with the correct kext ofc) A Kernel Dump during the initialization referencing the asml is generated.

But that is a different issue than the one this topic is about

ivansavra1 commented 2 years ago

@ivansavra1 i cant even boot with ssdt-hv-dev

I don't understand why there isn't a proper guide from Acidanthera or Dortania, this has a lot of potential, running macOS on Hyper-V is probably the best way: You get the performance and the flexibility of running games on Windows without performance impact.

@Goldfish64 I see you're active on this project, can you make this happen? This project deserves more use, it would be awesome if there was a section on Dortania or at least on the Github README.

ivansavra1 commented 2 years ago

@ivansavra1 i cant even boot with ssdt-hv-dev

Did a test myself and cant boot with the new hv-dev either anymore neither Montery nor BigSur (with the correct kext ofc) A Kernel Dump during the initialization referencing the asml is generated.

But that is a different issue than the one this topic is about

Did you ever got stuck on EXITBS:START? I can't get past this, I tried hackintosh on Hyper-V last year and I also couldn't get past this no matter what, I don't know what to do, I'm already using the AMD patches.

FixBo commented 2 years ago

I randomly get this error on boot and connection doesn't not work at all. image

Goldfish64 commented 2 years ago

@Sartharon Can you test with the latest commits of the kext? After much troubleshooting believe the random stall issues have been resolved for networking and storage. Regarding the SSDTs the ones in the OpenCorePkg releases should be fine on 10.8 and newer, but may need to be built with an older iasl version for older macOS versions.

Sartharon commented 2 years ago

@Sartharon Can you test with the latest commits of the kext?

Sure, could you please provide a kext with those commits? 0.9.1 was built before the network changes.

Regarding the SSDTs the ones in the OpenCorePkg releases should be fine on 10.8 and newer, but may need to be built with an older iasl version for older macOS versions.

I've been using version 20210604 from acpica for Windows. Do you want me to switch to an even older version?

Goldfish64 commented 2 years ago

GitHub Actions builds each commit, current latest is here: https://github.com/acidanthera/MacHyperVSupport/suites/8342261619/artifacts/367114780

Can you upload the panic/dump that is printed when using the SSDTs?

Sartharon commented 2 years ago

GitHub Actions builds each commit, current latest is here: https://github.com/acidanthera/MacHyperVSupport/suites/8342261619/artifacts/367114780

Thank you!

Can you upload the panic/dump that is printed when using the SSDTs?

Nvm the PLUG aml was loaded before the DEV aml (Probably because of the snapshot I've taken after replacing the aml). So no more panic / dump.

Though not sure what changed, either the new OpenCore version or the hyperV.kext, but I cannot get into the installer anymore. During booting, it just gets stuck on this (maybe you might have an idea since that recovery booted just fine before. Seems like a RO problem to me which is weird): image

Edit: Redownloaded the recovery image and get stuck on this now: image and sometimes on this: image

Sartharon commented 1 year ago

Closing this

Since the Boot freezes were caused by UIScale being 0 instead of -1 and SecureBootModel being Default instead of Disabled

sofakng commented 1 year ago

@Sartharon Not an answer, but how exactly did you set up the hyper-v VM? I have been trying but I can not do it.

Since this is very much OT I'll keep it short:

  1. Create a VHD of 16GB attach it on any Windows Machine
  2. Format it as FAT32
  3. Follow the OC Install Guide for a bit
  4. Make sure you use the correct SSDTs and Quirks as provided here
  5. Create a 2nd VHD for macOS itself
  6. Unattach the VHD on the Windows Machine
  7. Create a VM for macOS without Secure boot attach both VHDs and make sure you boot from the smaller VHDs
  8. Boot the VM

Can you provide an example config.plist that is working for you?

Also, did you make any changes to the sample.plist besides the changes mentioned on the MacHyperVSupport instructions?