Skip to content

Commit 531325e

Browse files
authored
Update for MacHyperVSupport v0.9.8 (#40)
``` * Update License Updates license following acidanthera/MacHyperVSupport@1e854f8 * Remove WS2022 SSDT, Update ACPI patches * Add MacHyperVFramebuffer, update configuration * Update OpenCore, MacHyperVSupport versions * Remove VMHide kext Replaces with more direct `hv_vmm_present` patch. For whatever reason, this kext does not reliably load w/ Lilu. We replace this with a kernel patch as a suggested workaround from #46 (comment). * Fix IOGraphicsFamily paths Fixes IOGraphicsFamily paths and removes MaxKernel version. * Remove ACPI0007 objects from SSDT-HV-DEV Syncs changes following acidanthera/OpenCorePkg@f4e7e29. * Disable MacHyperVFramebuffer injection This keeps MacHyperVFramebuffer in the EFI/OC/Kexts directory to be found later for post-installation. * Add post-install script Automates installing Hyper-V daemons and the MacHyperVFramebuffer kext. * Update README, post-install script instructions Resolves #45 and #47. ```
1 parent fbaecc6 commit 531325e

21 files changed

+425
-37134
lines changed

.github/scripts/run-builds.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## @file
22
# EFI build script for OSX Hyper-V
33
#
4-
# Copyright (c) 2023, Cory Bennett. All rights reserved.
4+
# Copyright (c) 2023-2025, Cory Bennett. All rights reserved.
55
# SPDX-License-Identifier: BSD-3-Clause
66
##
77

.github/workflows/oce-build.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,19 @@ jobs:
6565
name: Validate OCE-Build output
6666
shell: pwsh
6767
run: |
68-
$OCVALIDATE = 'dist\Utilities\ocvalidate\ocvalidate.exe';
69-
$PLIST_PATH = 'dist\EFI\OC\config.plist';
70-
Start-Process -Wait $OCVALIDATE -NoNewWindow -ArgumentList $PLIST_PATH;
68+
& 'dist\Utilities\ocvalidate\ocvalidate.exe' 'dist\EFI\OC\config.plist' |
69+
Tee-Object -FilePath ocvalidate.log
70+
if (Select-String -Path ocvalidate.log -Pattern 'Found \d+ issues') {
71+
Write-Error "Validation failed, please check output for details."
72+
exit 1
73+
}
7174
# Handles compression and lock-hash generation for upload task.
7275
#
7376
# This stores a hash of the output build's lockfile to associate with the
7477
# output EFI directory. This is useful when running concurrent builds with
7578
# this workflow in a matrix for testing prior or future OpenCore versions.
7679
- id: prepare-efi
80+
if: always()
7781
name: Prepares EFI directory for upload
7882
shell: sh
7983
run: |
@@ -89,7 +93,9 @@ jobs:
8993
# Uploads EFI with a short-sha slug. The uploaded EFI will be available
9094
# for download after the current job run as finished.
9195
- name: Upload built EFI
96+
if: always()
9297
uses: actions/upload-artifact@v4
9398
with:
9499
name: EFI-${{ steps.prepare-efi.outputs.LOCKFILE_HASH }}
95-
path: EFI.zip
100+
path: EFI.zip
101+
retention-days: 7

LICENSE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
BSD 3-Clause License
22

3-
Copyright (c) 2021, Goldfish64
3+
Copyright (c) 2021-2025, Goldfish64
44

5-
Copyright (c) 2023, Cory Bennett
5+
Copyright (c) 2023-2025, Cory Bennett
66
All rights reserved.
77

88
Redistribution and use in source and binary forms, with or without

docs/CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,28 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
66

77
The latest progress can be viewed on this repository's [project board](#).
88

9+
## [0.3.0] - Unreleased
10+
11+
A major update introducing significant improvements, new features, and internal refactoring for enhanced compatibility and user experience.
12+
13+
This release modernizes the Hyper-V integration stack with updated kexts, automation scripts, and configuration changes, streamlining macOS installation and post-installation on Hyper-V VMs.
14+
15+
## Changed
16+
- Update License to match upstream ([`3498a02`](https://github.com/Qonfused/OSX-Hyper-V/pull/40/commits/3498a023644184ec8086442365b64cf12998212e))
17+
- Update ACPI patches; remove WS2022 SSDT ([`1d3e69b`](https://github.com/Qonfused/OSX-Hyper-V/pull/40/commits/1d3e69bf29af5e50e7350259bacfd2908c815d06))
18+
- Update OpenCore and MacHyperVSupport versions ([`ac04dd0`](https://github.com/Qonfused/OSX-Hyper-V/pull/40/commits/ac04dd034665250b9c3320b3b12aa2988b370a77))
19+
- Fix IOGraphicsFamily paths and remove MaxKernel version ([`feed097`](https://github.com/Qonfused/OSX-Hyper-V/pull/40/commits/feed09783784373528a4ba9e934339eda1c0fe1e))
20+
- Remove ACPI0007 objects from SSDT-HV-DEV [`238b571`](https://github.com/Qonfused/OSX-Hyper-V/pull/40/commits/238b571e16ef857ffa5eaf7a390f16162774f7fa)
21+
- Remove VMHide kext, replacing with direct `hv_vmm_present` kernel patch ([`a377f97`](https://github.com/Qonfused/OSX-Hyper-V/pull/40/commits/a377f977d1c4b48d4630c5c48fa4006474b9196f); see [#46](https://github.com/Qonfused/OSX-Hyper-V/issues/46#issuecomment-2813907377))
22+
- Disable MacHyperVFramebuffer injection (kept for post-install use) ([`a19f660`](https://github.com/Qonfused/OSX-Hyper-V/pull/40/commits/a19f660b95e1e4f397c9b0ccb581496e3cf0b725))
23+
24+
## Added
25+
- Add MacHyperVFramebuffer kext and update configuration ([`f2eb5a1`](https://github.com/Qonfused/OSX-Hyper-V/pull/40/commits/f2eb5a1b88d3fe802df57e40135049dab2d98351))
26+
- Add post-install script to automate installation of Hyper-V daemons and MacHyperVFramebuffer ([`d888782`](https://github.com/Qonfused/OSX-Hyper-V/pull/40/commits/d888782fbb726e762a80d35609d03ed497bc93b3))
27+
28+
## Fixed
29+
- Update README and post-install script instructions ([`aabc21a`](https://github.com/Qonfused/OSX-Hyper-V/pull/40/commits/aabc21a61cc1d098eea4b5becf277f6f35ed06f4))
30+
931
## [0.2.4] - 2025-01-22
1032

1133
## Changed

docs/README.md

Lines changed: 57 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<a href="/LICENSE">![License](https://img.shields.io/badge/⚖_License-BSD_3_Clause-lightblue?labelColor=3f4551)</a>
1515
<a href="/docs/CHANGELOG.md">![SemVer](https://img.shields.io/github/v/release/Qonfused/OSX-Hyper-V?label=SemVer&logo=SemVer&labelColor=3f4551)</a>
1616
<a href="">![macOS Versions](https://img.shields.io/badge/macOS%20Versions-10.4%20to%2015-important?labelColor=3f4551)</a>
17-
<a href="https://github.com/acidanthera/OpenCorePkg/releases">![OpenCore](https://img.shields.io/badge/OpenCore-1.0.3-0c7dbe?logo=Osano&logoColor=0298e1&labelColor=3f4451)</a>
17+
<a href="https://github.com/acidanthera/OpenCorePkg/releases">![OpenCore](https://img.shields.io/badge/OpenCore-1.0.4-0c7dbe?logo=Osano&logoColor=0298e1&labelColor=3f4451)</a>
1818
<a href="https://github.com/Qonfused/OSX-Hyper-V/actions/workflows/oce-build.yml">![OCE Build](https://github.com/Qonfused/OSX-Hyper-V/actions/workflows/oce-build.yml/badge.svg?branch=main)</a>
1919

2020
</div>
@@ -614,6 +614,9 @@ First check that you've [enabled Hyper-V](https://learn.microsoft.com/en-us/virt
614614
> .\Scripts\create-virtual-machine.ps1 -name "Catalina" -version 10.15 -cpu 4 -ram 16 -size 128
615615
> ```
616616
617+
> [!IMPORTANT]
618+
> Newer macOS versions (Big Sur and newer) require 6-8 GB of RAM to boot the installer. If you are using an older version of macOS, you can use less RAM (4 GB is the minimum).
619+
617620
Below outline the steps to manually create a new virtual machine for macOS:
618621
619622
---
@@ -698,16 +701,67 @@ Then configure the below options under the Hardware section:
698701
699702
Refer to the [Installation Process][Dortania-Guide/Installation-Process] section of the Dortania Guide. Some additional post-install sections are provided to facilitate with Hyper-V (or project) specifics.
700703
704+
<!--
705+
Another user's suggestion for installation steps (for reference):
706+
1. Run PS script to create VM
707+
2. Start VM, open Console
708+
3. boot to EFI (dmg) to launch recovery menu
709+
4. Enter Disk Utility
710+
5. Choose "Msft Virtual Disk Media", Select "Erase"
711+
6. Name new drive "MyInteralDrive", choose AFPS for filesystem format
712+
7. Execute Erase
713+
8. Quit Disk Utility
714+
9. Back at main menu for the Recovery program, choose "Reinstall macOS "
715+
10. Select your newly minted AFPS-formatted disk
716+
11. Let macOS do it's thing for approx 2 hours.
717+
-->
718+
719+
A basic summary of the installation process is as follows:
720+
721+
1. Start the virtual machine and select the `EFI (dmg)` from the OpenCore boot menu.
722+
- If you created a separate macOS installer VHDX, this may also show up as `macOS Base System (External)` or `Install macOS Big Sur (External)` depending on the version of macOS you are installing.
723+
2. Once the installer loads, open Disk Utility from the Utilities menu.
724+
- Select the `Msft Virtual Disk Media` (your main virtual hard disk) from the list of disks.
725+
- Click `Erase` to format the disk.
726+
- Name the disk as desired (e.g., `macOS` or `Macintosh HD`, etc.).
727+
- For macOS 10.13 and newer, use the `APFS` format. For older versions, use `Mac OS Extended (Journaled)`.
728+
4. Quit Disk Utility and return to the main installer menu.
729+
5. Select `Reinstall macOS` to start the main installer.
730+
- Follow the prompts to install macOS on your newly formatted disk.
731+
- Make sure to target the disk you just formatted (e.g., `macOS` or whatever you named it), not the EFI disk.
732+
- Note that this process may take a while (upwards of 30 minutes to 2 hours).
733+
6. Once the installation is complete, the virtual machine will reboot and you should see the OpenCore boot menu again.
734+
- This may require multiple reboots to install additional components and finalize the installation.
735+
7. Select the newly installed macOS disk (or whatever you named it) from the OpenCore boot menu to boot into macOS.
736+
- If you are still unable to boot into your macOS installation, you may need to select the installer disk again.
737+
- You can set this as the default boot entry by holding the `Ctrl` key while selecting the disk.
738+
739+
The EFI virtual disk created by this project bundles a post-installation script responsible for installing the **MacHyperVFramebuffer** driver and configuring daemons for additional Hyper-V service support. This is required to support resolution changes and the hardware cursor in macOS.
740+
741+
To run this script, execute the `post-install.sh` script from the EFI disk located in the `Scripts/` directory. For example, you can run the following command in Terminal after booting into the macOS installer:
742+
743+
```bash
744+
cd /Volumes/EFI # Change to the EFI disk
745+
bash ./Scripts/post-install.sh
746+
```
747+
748+
You can also optionally run the `optimize-vm.sh` script to disable Spotlight indexing, reduce disk I/O, and turn off system animations. This is recommended for virtual machines with CPU-rendered graphics and limited disk performance.
749+
750+
```bash
751+
cd /Volumes/EFI # Change to the EFI disk
752+
bash ./Scripts/optimize-vm.sh
753+
```
754+
701755
[Dortania-Guide/Installation-Process]: https://dortania.github.io/OpenCore-Install-Guide/installation/installation-process.html
702756

703757
#### Limitations
704758

705759
There are some known limitations with the base configuration for Hyper-V:
706760

707761
- Display Resolution
708-
- The default virtual display resolution is set to a 1024x768 resolution and is not resizable.
762+
- The default virtual display resolution is set to a 1024x768 resolution, but can be reconfigured by modifying the `SupportedResolutions` entry in MacHyperVFramebuffer's Info.plist file. See issue #6 for more details.
709763
- Graphics Acceleration
710-
- By default, macOS will run without graphics acceleration using VESA graphics drivers (CPU). Additionally, display graphics is limited to 3 MB of video memory.
764+
- By default, macOS will run using the MacHyperVFramebuffer synthetic graphics driver, which provides basic graphics support (with 8 MB of video memory). This driver is sufficient for basic tasks, but does not provide hardware acceleration or advanced graphics features.
711765
- GPU acceleration is possible through [Discrete Device Assignment (DDA)][aka.ms/dda] using a supported GPU, however there exist a couple major caveats:
712766
- AMD GPUs (particularly Navi and older GPUs) generally have poor compatibility with macOS through DDA. Natively supported NVIDIA GPUs (using driver v465 or later on Windows) tend to have the best results.
713767
- GPU patching with Lilu and WhateverGreen is currently not supported (refer to [#2299](https://github.com/acidanthera/bugtracker/issues/2299) for tracking). This also applies to other kexts like NootedRed/NootedRX that use Lilu.

scripts/build.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## @file
22
# EFI build script for OSX Hyper-V
33
#
4-
# Copyright (c) 2023, Cory Bennett. All rights reserved.
4+
# Copyright (c) 2023-2025, Cory Bennett. All rights reserved.
55
# SPDX-License-Identifier: BSD-3-Clause
66
##
77

@@ -27,6 +27,7 @@ function HasFlag {
2727
}
2828

2929
# Switches for additional '--legacy' and '--32-bit' patches
30+
# TODO: Add switch for legacy iASL for macOS 10.6 and older
3031
$patches = @('-p config.yml')
3132
if (HasFlag '--legacy') { $patches += @('-p patch.legacy.yml') }
3233
if (HasFlag '--32-bit') {

scripts/lib/convert-efi-disk.ps1

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## @file
22
# EFI VHDX conversion script for Hyper-V
33
#
4-
# Copyright (c) 2023, Cory Bennett. All rights reserved.
4+
# Copyright (c) 2023-2025, Cory Bennett. All rights reserved.
55
# SPDX-License-Identifier: BSD-3-Clause
66
##
77

@@ -29,6 +29,31 @@ $efiDisk = New-VHD -Path "$dest" -Dynamic -SizeBytes 5GB |
2929
# Copy EFI folder to VHDX disk
3030
Copy-Item -Path "$path" -Recurse -Destination "$($efiDisk.DriveLetter):\EFI"
3131

32+
# Copy the Scripts directory (for post-install scripts)
33+
$scriptsDir = "$pwd\dist\Scripts"
34+
if (Test-Path -Path $scriptsDir) {
35+
# Only copy shell scripts (.sh) intended for post-install
36+
$postInstallScripts = Get-ChildItem -Path $scriptsDir -Filter "*.sh" -Recurse
37+
if ($postInstallScripts) {
38+
foreach ($script in $postInstallScripts) {
39+
$destinationPath = "$($efiDisk.DriveLetter):\Scripts\$($script.Name)"
40+
Copy-Item -Path $script.FullName -Destination $destinationPath -Force
41+
Write-Host "Copied script: $($script.Name) to $destinationPath"
42+
}
43+
}
44+
} else {
45+
Write-Host "Scripts directory not found at $scriptsDir. Skipping copy."
46+
}
47+
48+
# Copy the Tools directory (for post-install daemons)
49+
$toolsDir = "$pwd\dist\Tools"
50+
if (Test-Path -Path $toolsDir) {
51+
Copy-Item -Path $toolsDir -Recurse -Destination "$($efiDisk.DriveLetter):\Tools"
52+
Write-Host "Copied Tools directory to $($efiDisk.DriveLetter):\Tools"
53+
} else {
54+
Write-Host "Tools directory not found at $toolsDir. Skipping copy."
55+
}
56+
3257
# Copy macOS recovery image if present
3358
$recoveryImage = "com.apple.recovery.boot"
3459
if (Test-Path -Path "$($pwd)\$recoveryImage") {

scripts/lib/create-macos-recovery.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## @file
22
# macrecovery.py wrapper script
33
#
4-
# Copyright (c) 2023, Cory Bennett. All rights reserved.
4+
# Copyright (c) 2023-2025, Cory Bennett. All rights reserved.
55
# SPDX-License-Identifier: BSD-3-Clause
66
##
77

scripts/lib/create-virtual-machine.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## @file
22
# Hyper-V virtual machine creation script
33
#
4-
# Copyright (c) 2023, Cory Bennett. All rights reserved.
4+
# Copyright (c) 2023-2025, Cory Bennett. All rights reserved.
55
# SPDX-License-Identifier: BSD-3-Clause
66
##
77

scripts/lib/optimize-vm.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## @file
44
# Post-Install script - Optimizes macOS virtual machines for Hyper-V
55
#
6-
# Copyright (c) 2023, Cory Bennett. All rights reserved.
6+
# Copyright (c) 2023-2025, Cory Bennett. All rights reserved.
77
# SPDX-License-Identifier: BSD-3-Clause
88
##
99

0 commit comments

Comments
 (0)