Batch Update 2 - September 2023

Changes:

- Update to OpenCore 0.9.5

- Switch around the emulated video device (required for Ventura)

- Change default resolution to 1920x1080

- Include ventura in shortname CLI help

- Add notes on 'bridged networking'

- Better networking documentation (thomaspaulb)

- Support for offline installations (kwadwokyeremeh)

- Initial WIP macOS Sonoma support (via 'luchina-gabriel')
This commit is contained in:
Dhiru Kholia 2023-04-08 06:50:53 +05:30 committed by Dhiru Kholia
parent 1184c09bc6
commit 422bb3b713
104 changed files with 566 additions and 22081 deletions

View file

@ -1,6 +1,6 @@
Current OVMF blobs are borrowed from the following URL(s),
- http://ftp.debian.org/debian/pool/main/e/edk2/ (ovmf_2022.08-1_all.deb)
- http://ftp.debian.org/debian/pool/main/e/edk2/ (ovmf_2023.05-2_all.deb)
Building OVMF
-------------

Binary file not shown.

Binary file not shown.

View file

@ -37,11 +37,12 @@ args=(
# -device usb-mouse,bus=ehci.0
-device nec-usb-xhci,id=xhci
-global nec-usb-xhci.msi=off
# -global ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off
# -device usb-host,vendorid=0x8086,productid=0x0808 # 2 USD USB Sound Card
# -device usb-host,vendorid=0x1b3f,productid=0x2008 # Another 2 USD USB Sound Card
-device isa-applesmc,osk="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc"
-drive if=pflash,format=raw,readonly=on,file="$REPO_PATH/$OVMF_DIR/OVMF_CODE.fd"
-drive if=pflash,format=raw,file="$REPO_PATH/$OVMF_DIR/OVMF_VARS-1024x768.fd"
-drive if=pflash,format=raw,file="$REPO_PATH/$OVMF_DIR/OVMF_VARS-1920x1080.fd"
-smbios type=2
-device ich9-intel-hda -device hda-duplex
-device ich9-ahci,id=sata
@ -52,10 +53,10 @@ args=(
-drive id=MacHDD,if=none,file="$REPO_PATH/mac_hdd_ng.img",format=qcow2
-device ide-hd,bus=sata.4,drive=MacHDD
# -netdev tap,id=net0,ifname=tap0,script=no,downscript=no -device virtio-net-pci,netdev=net0,id=net0,mac=52:54:00:c9:18:27
-netdev user,id=net0 -device virtio-net-pci,netdev=net0,id=net0,mac=52:54:00:c9:18:27
-netdev user,id=net0,hostfwd=tcp::2222-:22 -device virtio-net-pci,netdev=net0,id=net0,mac=52:54:00:c9:18:27
# -netdev user,id=net0 -device vmxnet3,netdev=net0,id=net0,mac=52:54:00:c9:18:27 # Note: Use this line for High Sierra
-monitor stdio
-device VGA,vgamem_mb=128
-device vmware-svga
)
qemu-system-x86_64 "${args[@]}"

View file

@ -0,0 +1 @@
Disabled

Binary file not shown.

View file

@ -1 +0,0 @@
Disabled

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -1,66 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>18A391011</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleGetInfoString</key>
<string>111.1.18, Copyright 2008-2016 Apple Inc. All rights reserved.</string>
<key>CFBundleIdentifier</key>
<string>com.apple.driver.AGPMInjector</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>AGPMInjector</string>
<key>CFBundlePackageType</key>
<string>KEXT</string>
<key>CFBundleShortVersionString</key>
<string>2.7.3-AGPMInjector</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>111.1.18</string>
<key>IOKitPersonalities</key>
<dict>
<key>AGPM</key>
<dict>
<key>CFBundleIdentifier</key>
<string>com.apple.driver.AGPM</string>
<key>IOClass</key>
<string>AGPMController</string>
<key>IONameMatch</key>
<string>AGPMEnabler</string>
<key>IOProviderClass</key>
<string>IOPlatformPluginDevice</string>
<key>Machines</key>
<dict>
<key>iMacPro1,1</key>
<dict>
<key>GFX0</key>
<dict>
<key>AGDCEnabled</key>
<integer>1</integer>
<key>Heuristic</key>
<dict>
<key>ID</key>
<integer>4</integer>
</dict>
<key>control-id</key>
<integer>17</integer>
<key>max-power-state</key>
<integer>15</integer>
<key>min-power-state</key>
<integer>0</integer>
</dict>
</dict>
</dict>
</dict>
</dict>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2008-2016 Apple Inc. All rights reserved.</string>
<key>OSBundleRequired</key>
<string>Safe Boot</string>
</dict>
</plist>

File diff suppressed because it is too large Load diff

View file

@ -5,20 +5,20 @@
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleGetInfoString</key>
<string>MCEReporterDisabler 0.5, Copyright (GPLv2) © 2017 by RehabMan. All rights reserved.</string>
<string>AppleIntelMCEReporter Disabler 1.0, © 2019 by XLNC. All rights reserved.</string>
<key>CFBundleIdentifier</key>
<string>org.rehabman.disabler.MCEReporter</string>
<string>org.xlnc.disabler.MCEReporter</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>MCEReporterDisabler</string>
<string>DisableAppleIntelMCEReporter</string>
<key>CFBundlePackageType</key>
<string>KEXT</string>
<key>CFBundleVersion</key>
<string>0.5</string>
<string>1.2</string>
<key>IOKitPersonalities</key>
<dict>
<key>MCEInterruptControllerDisabler</key>
<key>DisableMCEInterruptController</key>
<dict>
<key>CFBundleIdentifier</key>
<string>com.apple.driver.AppleIntelMCEReporter</string>
@ -46,7 +46,7 @@
<key>IOProviderClass</key>
<string>IOPlatformExpertDevice</string>
</dict>
<key>MCEReporterDisabler</key>
<key>DisableMCEReporter</key>
<dict>
<key>CFBundleIdentifier</key>
<string>com.apple.driver.AppleIntelMCEReporter</string>
@ -60,5 +60,7 @@
<string>AppleIntelMCEInterruptNub</string>
</dict>
</dict>
<key>OSBundleRequired</key>
<string>Root</string>
</dict>
</plist>

View file

@ -1,81 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>21G83</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>BlueToolFixup</string>
<key>CFBundleIdentifier</key>
<string>as.acidanthera.BlueToolFixup</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>BlueToolFixup</string>
<key>CFBundlePackageType</key>
<string>KEXT</string>
<key>CFBundleShortVersionString</key>
<string>2.6.5</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
<key>CFBundleVersion</key>
<string>2.6.5</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>14A400</string>
<key>DTPlatformName</key>
<string>macosx</string>
<key>DTPlatformVersion</key>
<string>12.3</string>
<key>DTSDKBuild</key>
<string>21E226</string>
<key>DTSDKName</key>
<string>macosx12.3</string>
<key>DTXcode</key>
<string>1401</string>
<key>DTXcodeBuild</key>
<string>14A400</string>
<key>IOKitPersonalities</key>
<dict>
<key>BlueToolFixup</key>
<dict>
<key>CFBundleIdentifier</key>
<string>as.acidanthera.BlueToolFixup</string>
<key>IOClass</key>
<string>BlueToolFixup</string>
<key>IOMatchCategory</key>
<string>BlueToolFixup</string>
<key>IOProviderClass</key>
<string>IOResources</string>
<key>IOResourceMatch</key>
<string>IOKit</string>
</dict>
</dict>
<key>LSMinimumSystemVersion</key>
<string>10.8</string>
<key>OSBundleLibraries</key>
<dict>
<key>as.vit9696.Lilu</key>
<string>1.4.7</string>
<key>com.apple.kpi.bsd</key>
<string>12.0.0</string>
<key>com.apple.kpi.dsep</key>
<string>12.0.0</string>
<key>com.apple.kpi.iokit</key>
<string>12.0.0</string>
<key>com.apple.kpi.libkern</key>
<string>12.0.0</string>
<key>com.apple.kpi.mach</key>
<string>12.0.0</string>
<key>com.apple.kpi.unsupported</key>
<string>12.0.0</string>
</dict>
<key>OSBundleRequired</key>
<string>Root</string>
</dict>
</plist>

View file

@ -1,71 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>21G83</string>
<key>CFBundleExecutable</key>
<string>BrcmFirmwareData</string>
<key>CFBundleIdentifier</key>
<string>as.acidanthera.BrcmFirmwareStore</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>BrcmFirmwareData</string>
<key>CFBundlePackageType</key>
<string>KEXT</string>
<key>CFBundleShortVersionString</key>
<string>2.6.5</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
<key>CFBundleVersion</key>
<string>2.6.5</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>14A400</string>
<key>DTPlatformName</key>
<string>macosx</string>
<key>DTPlatformVersion</key>
<string>12.3</string>
<key>DTSDKBuild</key>
<string>21E226</string>
<key>DTSDKName</key>
<string>macosx12.3</string>
<key>DTXcode</key>
<string>1401</string>
<key>DTXcodeBuild</key>
<string>14A400</string>
<key>IOKitPersonalities</key>
<dict>
<key>BrcmFirmwareStore</key>
<dict>
<key>CFBundleIdentifier</key>
<string>as.acidanthera.BrcmFirmwareStore</string>
<key>IOClass</key>
<string>BrcmFirmwareStore</string>
<key>IOMatchCategory</key>
<string>BrcmFirmwareStore</string>
<key>IOProviderClass</key>
<string>IOResources</string>
</dict>
</dict>
<key>LSMinimumSystemVersion</key>
<string>10.8</string>
<key>OSBundleCompatibleVersion</key>
<string>2.6.5</string>
<key>OSBundleLibraries</key>
<dict>
<key>com.apple.kpi.iokit</key>
<string>9.0</string>
<key>com.apple.kpi.libkern</key>
<string>9.0</string>
<key>com.apple.kpi.mach</key>
<string>9.0</string>
</dict>
</dict>
</plist>

View file

@ -1,239 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>21G83</string>
<key>CFBundleIdentifier</key>
<string>as.acidanthera.injector.BrcmNonPatchRAM2</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>BrcmNonPatchRAM2</string>
<key>CFBundlePackageType</key>
<string>KEXT</string>
<key>CFBundleShortVersionString</key>
<string>2.6.5</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
<key>CFBundleVersion</key>
<string>2.6.5</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>14A400</string>
<key>DTPlatformName</key>
<string>macosx</string>
<key>DTPlatformVersion</key>
<string>12.3</string>
<key>DTSDKBuild</key>
<string>21E226</string>
<key>DTSDKName</key>
<string>macosx12.3</string>
<key>DTXcode</key>
<string>1401</string>
<key>DTXcodeBuild</key>
<string>14A400</string>
<key>IOKitPersonalities</key>
<dict>
<key>03f0_231d native</key>
<dict>
<key>CFBundleIdentifier</key>
<string>com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport</string>
<key>IOClass</key>
<string>BroadcomBluetoothHostControllerUSBTransport</string>
<key>IOProviderClass</key>
<string>IOUSBHostDevice</string>
<key>idProduct</key>
<integer>8989</integer>
<key>idVendor</key>
<integer>1008</integer>
</dict>
<key>03f0_231d no firmware</key>
<dict>
<key>#FirmwareKey</key>
<string>only load and unload native bluetooth</string>
<key>CFBundleIdentifier</key>
<string>as.acidanthera.BrcmNonPatchRAM2</string>
<key>DisplayName</key>
<string>HP 231d (ProBook BT built-in firmware)</string>
<key>IOClass</key>
<string>BrcmPatchRAM2</string>
<key>IOMatchCategory</key>
<string>BrcmPatchRAM2</string>
<key>IOProviderClass</key>
<string>IOUSBHostDevice</string>
<key>idProduct</key>
<integer>8989</integer>
<key>idVendor</key>
<integer>1008</integer>
</dict>
<key>0489_e030 native</key>
<dict>
<key>CFBundleIdentifier</key>
<string>com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport</string>
<key>IOClass</key>
<string>BroadcomBluetoothHostControllerUSBTransport</string>
<key>IOProviderClass</key>
<string>IOUSBHostDevice</string>
<key>idProduct</key>
<integer>57392</integer>
<key>idVendor</key>
<integer>1161</integer>
</dict>
<key>0489_e030 no firmware</key>
<dict>
<key>#FirmwareKey</key>
<string>only load and unload native bluetooth</string>
<key>CFBundleIdentifier</key>
<string>as.acidanthera.BrcmNonPatchRAM2</string>
<key>DisplayName</key>
<string>Foxconn AW-NB290</string>
<key>IOClass</key>
<string>BrcmPatchRAM2</string>
<key>IOMatchCategory</key>
<string>BrcmPatchRAM2</string>
<key>IOProviderClass</key>
<string>IOUSBHostDevice</string>
<key>idProduct</key>
<integer>57392</integer>
<key>idVendor</key>
<integer>1161</integer>
</dict>
<key>0a5c_219a native</key>
<dict>
<key>CFBundleIdentifier</key>
<string>com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport</string>
<key>IOClass</key>
<string>BroadcomBluetoothHostControllerUSBTransport</string>
<key>IOProviderClass</key>
<string>IOUSBHostDevice</string>
<key>idProduct</key>
<integer>2652</integer>
<key>idVendor</key>
<integer>8602</integer>
</dict>
<key>0a5c_219a no firmware</key>
<dict>
<key>#FirmwareKey</key>
<string>only load and unload native bluetooth</string>
<key>CFBundleIdentifier</key>
<string>as.acidanthera.BrcmNonPatchRAM2</string>
<key>DisplayName</key>
<string>Broadcom BCM2070 0a5c_219a (BT on BCM43225HMB)</string>
<key>IOClass</key>
<string>BrcmPatchRAM2</string>
<key>IOMatchCategory</key>
<string>BrcmPatchRAM2</string>
<key>IOProviderClass</key>
<string>IOUSBHostDevice</string>
<key>idProduct</key>
<integer>2652</integer>
<key>idVendor</key>
<integer>8602</integer>
</dict>
<key>0b05_1788 native</key>
<dict>
<key>CFBundleIdentifier</key>
<string>com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport</string>
<key>IOClass</key>
<string>BroadcomBluetoothHostControllerUSBTransport</string>
<key>IOProviderClass</key>
<string>IOUSBHostDevice</string>
<key>idProduct</key>
<integer>6024</integer>
<key>idVendor</key>
<integer>2821</integer>
</dict>
<key>0b05_1788 no firmware</key>
<dict>
<key>#FirmwareKey</key>
<string>only load and unload native bluetooth</string>
<key>CFBundleIdentifier</key>
<string>as.acidanthera.BrcmNonPatchRAM2</string>
<key>DisplayName</key>
<string>Asus BT-270(20702A built-in firmware)</string>
<key>IOClass</key>
<string>BrcmPatchRAM2</string>
<key>IOMatchCategory</key>
<string>BrcmPatchRAM2</string>
<key>IOProviderClass</key>
<string>IOUSBHostDevice</string>
<key>idProduct</key>
<integer>6024</integer>
<key>idVendor</key>
<integer>2821</integer>
</dict>
<key>0b05_178a native</key>
<dict>
<key>CFBundleIdentifier</key>
<string>com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport</string>
<key>IOClass</key>
<string>BroadcomBluetoothHostControllerUSBTransport</string>
<key>IOProviderClass</key>
<string>IOUSBHostDevice</string>
<key>idProduct</key>
<integer>6026</integer>
<key>idVendor</key>
<integer>2821</integer>
</dict>
<key>0b05_178a no firmware</key>
<dict>
<key>#FirmwareKey</key>
<string>only load and unload native bluetooth</string>
<key>CFBundleIdentifier</key>
<string>as.acidanthera.BrcmNonPatchRAM2</string>
<key>DisplayName</key>
<string>HP EliteBook NB-290 (built-in firmware)</string>
<key>IOClass</key>
<string>BrcmPatchRAM2</string>
<key>IOMatchCategory</key>
<string>BrcmPatchRAM2</string>
<key>IOProviderClass</key>
<string>IOUSBHostDevice</string>
<key>idProduct</key>
<integer>6026</integer>
<key>idVendor</key>
<integer>2821</integer>
</dict>
<key>13d3_3295 native</key>
<dict>
<key>CFBundleIdentifier</key>
<string>com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport</string>
<key>IOClass</key>
<string>BroadcomBluetoothHostControllerUSBTransport</string>
<key>IOProviderClass</key>
<string>IOUSBHostDevice</string>
<key>idProduct</key>
<integer>12949</integer>
<key>idVendor</key>
<integer>5075</integer>
</dict>
<key>13d3_3295 no firmware</key>
<dict>
<key>#FirmwareKey</key>
<string>only load and unload native bluetooth</string>
<key>CFBundleIdentifier</key>
<string>as.acidanthera.BrcmNonPatchRAM2</string>
<key>DisplayName</key>
<string>Azurewave BCM943225 (20702A built-in firmware)</string>
<key>IOClass</key>
<string>BrcmPatchRAM2</string>
<key>IOMatchCategory</key>
<string>BrcmPatchRAM2</string>
<key>IOProviderClass</key>
<string>IOUSBHostDevice</string>
<key>idProduct</key>
<integer>12949</integer>
<key>idVendor</key>
<integer>5075</integer>
</dict>
</dict>
<key>LSMinimumSystemVersion</key>
<string>10.8</string>
</dict>
</plist>

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>21G83</string>
<string>21G531</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
@ -17,17 +17,17 @@
<key>CFBundlePackageType</key>
<string>KEXT</string>
<key>CFBundleShortVersionString</key>
<string>1.0.1</string>
<string>1.0.2</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
<key>CFBundleVersion</key>
<string>1.0.1</string>
<string>1.0.2</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>14A400</string>
<string>13F100</string>
<key>DTPlatformName</key>
<string>macosx</string>
<key>DTPlatformVersion</key>
@ -37,9 +37,9 @@
<key>DTSDKName</key>
<string>macosx12.3</string>
<key>DTXcode</key>
<string>1401</string>
<string>1341</string>
<key>DTXcodeBuild</key>
<string>14A400</string>
<string>13F100</string>
<key>IOKitPersonalities</key>
<dict>
<key>CryptexFixup</key>

View file

@ -1,115 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>files</key>
<dict/>
<key>files2</key>
<dict/>
<key>rules</key>
<dict>
<key>^Resources/</key>
<true/>
<key>^Resources/.*\.lproj/</key>
<dict>
<key>optional</key>
<true/>
<key>weight</key>
<real>1000</real>
</dict>
<key>^Resources/.*\.lproj/locversion.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>1100</real>
</dict>
<key>^Resources/Base\.lproj/</key>
<dict>
<key>weight</key>
<real>1010</real>
</dict>
<key>^version.plist$</key>
<true/>
</dict>
<key>rules2</key>
<dict>
<key>.*\.dSYM($|/)</key>
<dict>
<key>weight</key>
<real>11</real>
</dict>
<key>^(.*/)?\.DS_Store$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>2000</real>
</dict>
<key>^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/</key>
<dict>
<key>nested</key>
<true/>
<key>weight</key>
<real>10</real>
</dict>
<key>^.*</key>
<true/>
<key>^Info\.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>20</real>
</dict>
<key>^PkgInfo$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>20</real>
</dict>
<key>^Resources/</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
<key>^Resources/.*\.lproj/</key>
<dict>
<key>optional</key>
<true/>
<key>weight</key>
<real>1000</real>
</dict>
<key>^Resources/.*\.lproj/locversion.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>1100</real>
</dict>
<key>^Resources/Base\.lproj/</key>
<dict>
<key>weight</key>
<real>1010</real>
</dict>
<key>^[^/]+$</key>
<dict>
<key>nested</key>
<true/>
<key>weight</key>
<real>10</real>
</dict>
<key>^embedded\.provisionprofile$</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
<key>^version\.plist$</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
</dict>
</dict>
</plist>

View file

@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>21G83</string>
<string>21G651</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>KEXT</string>
<key>CFBundleShortVersionString</key>
<string>1.6.3</string>
<string>1.6.7</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleSupportedPlatforms</key>
@ -25,11 +25,11 @@
<string>MacOSX</string>
</array>
<key>CFBundleVersion</key>
<string>1.6.3</string>
<string>1.6.7</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>14A400</string>
<string>13F100</string>
<key>DTPlatformName</key>
<string>macosx</string>
<key>DTPlatformVersion</key>
@ -39,9 +39,9 @@
<key>DTSDKName</key>
<string>macosx12.3</string>
<key>DTXcode</key>
<string>1401</string>
<string>1341</string>
<key>DTXcodeBuild</key>
<string>14A400</string>
<string>13F100</string>
<key>IOKitPersonalities</key>
<dict>
<key>as.vit9696.Lilu</key>

BIN
OpenCore/EFI/OC/Kexts/Lilu.kext/Contents/MacOS/Lilu Executable file → Normal file

Binary file not shown.

View file

@ -1,245 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleGetInfoString</key>
<string>1.0 Copyright © 2018-2020 Headsoft. All rights reserved.</string>
<key>CFBundleIdentifier</key>
<string>com.Headsoft.USBPorts</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>USBPorts</string>
<key>CFBundlePackageType</key>
<string>KEXT</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>IOKitPersonalities</key>
<dict>
<key>iMacPro1,1-EH01</key>
<dict>
<key>CFBundleIdentifier</key>
<string>com.apple.driver.AppleUSBMergeNub</string>
<key>IOClass</key>
<string>AppleUSBMergeNub</string>
<key>IONameMatch</key>
<string>EH01</string>
<key>IOPCIPrimaryMatch</key>
<string>0x293a8086</string>
<key>IOProbeScore</key>
<integer>5000</integer>
<key>IOProviderClass</key>
<string>AppleUSBEHCIPCI</string>
<key>IOProviderMergeProperties</key>
<dict>
<key>port-count</key>
<data>
BgAAAA==
</data>
<key>ports</key>
<dict>
<key>HS11</key>
<dict>
<key>UsbConnector</key>
<integer>0</integer>
<key>port</key>
<data>
AQAAAA==
</data>
</dict>
<key>HS12</key>
<dict>
<key>UsbConnector</key>
<integer>0</integer>
<key>port</key>
<data>
AgAAAA==
</data>
</dict>
<key>HS13</key>
<dict>
<key>UsbConnector</key>
<integer>0</integer>
<key>port</key>
<data>
AwAAAA==
</data>
</dict>
<key>HS14</key>
<dict>
<key>UsbConnector</key>
<integer>0</integer>
<key>port</key>
<data>
BAAAAA==
</data>
</dict>
<key>HS15</key>
<dict>
<key>UsbConnector</key>
<integer>0</integer>
<key>port</key>
<data>
BQAAAA==
</data>
</dict>
<key>HS16</key>
<dict>
<key>UsbConnector</key>
<integer>0</integer>
<key>port</key>
<data>
BgAAAA==
</data>
</dict>
</dict>
</dict>
<key>model</key>
<string>iMacPro1,1</string>
</dict>
<key>iMacPro1,1-UHC1</key>
<dict>
<key>CFBundleIdentifier</key>
<string>com.apple.driver.AppleUSBMergeNub</string>
<key>IOClass</key>
<string>AppleUSBMergeNub</string>
<key>IONameMatch</key>
<string>UHC1</string>
<key>IOPCIPrimaryMatch</key>
<string>0x29348086</string>
<key>IOProbeScore</key>
<integer>5000</integer>
<key>IOProviderClass</key>
<string>AppleUSBUHCIPCI</string>
<key>IOProviderMergeProperties</key>
<dict>
<key>port-count</key>
<data>
AgAAAA==
</data>
<key>ports</key>
<dict>
<key>LS01</key>
<dict>
<key>UsbConnector</key>
<integer>0</integer>
<key>port</key>
<data>
AQAAAA==
</data>
</dict>
<key>LS02</key>
<dict>
<key>UsbConnector</key>
<integer>0</integer>
<key>port</key>
<data>
AgAAAA==
</data>
</dict>
</dict>
</dict>
<key>model</key>
<string>iMacPro1,1</string>
</dict>
<key>iMacPro1,1-UHC2</key>
<dict>
<key>CFBundleIdentifier</key>
<string>com.apple.driver.AppleUSBMergeNub</string>
<key>IOClass</key>
<string>AppleUSBMergeNub</string>
<key>IONameMatch</key>
<string>UHC2</string>
<key>IOPCIPrimaryMatch</key>
<string>0x29358086</string>
<key>IOProbeScore</key>
<integer>5000</integer>
<key>IOProviderClass</key>
<string>AppleUSBUHCIPCI</string>
<key>IOProviderMergeProperties</key>
<dict>
<key>port-count</key>
<data>
AgAAAA==
</data>
<key>ports</key>
<dict>
<key>LS03</key>
<dict>
<key>UsbConnector</key>
<integer>0</integer>
<key>port</key>
<data>
AQAAAA==
</data>
</dict>
<key>LS04</key>
<dict>
<key>UsbConnector</key>
<integer>0</integer>
<key>port</key>
<data>
AgAAAA==
</data>
</dict>
</dict>
</dict>
<key>model</key>
<string>iMacPro1,1</string>
</dict>
<key>iMacPro1,1-UHC3</key>
<dict>
<key>CFBundleIdentifier</key>
<string>com.apple.driver.AppleUSBMergeNub</string>
<key>IOClass</key>
<string>AppleUSBMergeNub</string>
<key>IONameMatch</key>
<string>UHC3</string>
<key>IOPCIPrimaryMatch</key>
<string>0x29368086</string>
<key>IOProbeScore</key>
<integer>5000</integer>
<key>IOProviderClass</key>
<string>AppleUSBUHCIPCI</string>
<key>IOProviderMergeProperties</key>
<dict>
<key>port-count</key>
<data>
AgAAAA==
</data>
<key>ports</key>
<dict>
<key>LS05</key>
<dict>
<key>UsbConnector</key>
<integer>0</integer>
<key>port</key>
<data>
AQAAAA==
</data>
</dict>
<key>LS06</key>
<dict>
<key>UsbConnector</key>
<integer>0</integer>
<key>port</key>
<data>
AgAAAA==
</data>
</dict>
</dict>
</dict>
<key>model</key>
<string>iMacPro1,1</string>
</dict>
</dict>
<key>OSBundleRequired</key>
<string>Root</string>
</dict>
</plist>

View file

@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>21G83</string>
<string>21G531</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>KEXT</string>
<key>CFBundleShortVersionString</key>
<string>1.3.1</string>
<string>1.3.2</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleSupportedPlatforms</key>
@ -25,11 +25,11 @@
<string>MacOSX</string>
</array>
<key>CFBundleVersion</key>
<string>1.3.1</string>
<string>1.3.2</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>14A400</string>
<string>13F100</string>
<key>DTPlatformName</key>
<string>macosx</string>
<key>DTPlatformVersion</key>
@ -39,9 +39,9 @@
<key>DTSDKName</key>
<string>macosx12.3</string>
<key>DTXcode</key>
<string>1401</string>
<string>1341</string>
<key>DTXcodeBuild</key>
<string>14A400</string>
<string>13F100</string>
<key>IOKitPersonalities</key>
<dict>
<key>as.vit9696.VirtualSMC</key>

Binary file not shown.

View file

@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>21G83</string>
<string>21G651</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>KEXT</string>
<key>CFBundleShortVersionString</key>
<string>1.6.2</string>
<string>1.6.6</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleSupportedPlatforms</key>
@ -25,11 +25,11 @@
<string>MacOSX</string>
</array>
<key>CFBundleVersion</key>
<string>1.6.2</string>
<string>1.6.6</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>14A400</string>
<string>13F100</string>
<key>DTPlatformName</key>
<string>macosx</string>
<key>DTPlatformVersion</key>
@ -39,9 +39,9 @@
<key>DTSDKName</key>
<string>macosx12.3</string>
<key>DTXcode</key>
<string>1401</string>
<string>1341</string>
<key>DTXcodeBuild</key>
<string>14A400</string>
<string>13F100</string>
<key>IOKitPersonalities</key>
<dict>
<key>NVHDAEnabler</key>

Binary file not shown.

View file

@ -1,115 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>files</key>
<dict/>
<key>files2</key>
<dict/>
<key>rules</key>
<dict>
<key>^Resources/</key>
<true/>
<key>^Resources/.*\.lproj/</key>
<dict>
<key>optional</key>
<true/>
<key>weight</key>
<real>1000</real>
</dict>
<key>^Resources/.*\.lproj/locversion.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>1100</real>
</dict>
<key>^Resources/Base\.lproj/</key>
<dict>
<key>weight</key>
<real>1010</real>
</dict>
<key>^version.plist$</key>
<true/>
</dict>
<key>rules2</key>
<dict>
<key>.*\.dSYM($|/)</key>
<dict>
<key>weight</key>
<real>11</real>
</dict>
<key>^(.*/)?\.DS_Store$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>2000</real>
</dict>
<key>^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/</key>
<dict>
<key>nested</key>
<true/>
<key>weight</key>
<real>10</real>
</dict>
<key>^.*</key>
<true/>
<key>^Info\.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>20</real>
</dict>
<key>^PkgInfo$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>20</real>
</dict>
<key>^Resources/</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
<key>^Resources/.*\.lproj/</key>
<dict>
<key>optional</key>
<true/>
<key>weight</key>
<real>1000</real>
</dict>
<key>^Resources/.*\.lproj/locversion.plist$</key>
<dict>
<key>omit</key>
<true/>
<key>weight</key>
<real>1100</real>
</dict>
<key>^Resources/Base\.lproj/</key>
<dict>
<key>weight</key>
<real>1010</real>
</dict>
<key>^[^/]+$</key>
<dict>
<key>nested</key>
<true/>
<key>weight</key>
<real>10</real>
</dict>
<key>^embedded\.provisionprofile$</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
<key>^version\.plist$</key>
<dict>
<key>weight</key>
<real>20</real>
</dict>
</dict>
</dict>
</plist>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -342,13 +342,31 @@
<dict>
<key>Add</key>
<array>
<dict>
<key>Arch</key>
<string>Any</string>
<key>BundlePath</key>
<string>AppleMCEReporterDisabler.kext</string>
<key>Comment</key>
<string>AppleMCEReporterDisabler.kext</string>
<key>Enabled</key>
<true/>
<key>ExecutablePath</key>
<string></string>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string></string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>Arch</key>
<string>Any</string>
<key>BundlePath</key>
<string>Lilu.kext</string>
<key>Comment</key>
<string>Patch engine</string>
<string>Lilu.kext</string>
<key>Enabled</key>
<true/>
<key>ExecutablePath</key>
@ -356,7 +374,7 @@
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string>8.0.0</string>
<string></string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
@ -366,25 +384,25 @@
<key>BundlePath</key>
<string>VirtualSMC.kext</string>
<key>Comment</key>
<string>SMC emulator</string>
<string>VirtualSMC.kext</string>
<key>Enabled</key>
<false/>
<true/>
<key>ExecutablePath</key>
<string>Contents/MacOS/VirtualSMC</string>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string>8.0.0</string>
<string></string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
<string>Any</string>
<key>BundlePath</key>
<string>WhateverGreen.kext</string>
<key>Comment</key>
<string>Video patches</string>
<string>WhateverGreen.kext</string>
<key>Enabled</key>
<true/>
<key>ExecutablePath</key>
@ -396,42 +414,6 @@
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>Arch</key>
<string>Any</string>
<key>BundlePath</key>
<string>AppleALC.kext</string>
<key>Comment</key>
<string>Audio patches</string>
<key>Enabled</key>
<true/>
<key>ExecutablePath</key>
<string>Contents/MacOS/AppleALC</string>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string>8.0.0</string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
<key>BundlePath</key>
<string>IntelMausi.kext</string>
<key>Comment</key>
<string>Intel Ethernet LAN</string>
<key>Enabled</key>
<false/>
<key>ExecutablePath</key>
<string>Contents/MacOS/IntelMausi</string>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string>13.0.0</string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
@ -450,24 +432,6 @@
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
<key>BundlePath</key>
<string>MCEReporterDisabler.kext</string>
<key>Comment</key>
<string>AppleMCEReporter disabler</string>
<key>Enabled</key>
<true/>
<key>ExecutablePath</key>
<string></string>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string>19.0.0</string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
@ -558,150 +522,6 @@
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
<key>BundlePath</key>
<string>USBPorts.kext</string>
<key>Comment</key>
<string></string>
<key>Enabled</key>
<true/>
<key>ExecutablePath</key>
<string></string>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string></string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
<key>BundlePath</key>
<string>AGPMInjector.kext</string>
<key>Comment</key>
<string></string>
<key>Enabled</key>
<true/>
<key>ExecutablePath</key>
<string></string>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string></string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
<key>BundlePath</key>
<string>BrcmFirmwareData.kext</string>
<key>Comment</key>
<string>Bluetooth firmware</string>
<key>Enabled</key>
<true/>
<key>ExecutablePath</key>
<string>Contents/MacOS/BrcmFirmwareData</string>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string></string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
<key>BundlePath</key>
<string>BrcmNonPatchRAM2.kext</string>
<key>Comment</key>
<string>Bluetooth support for macOS 10.11-10.14</string>
<key>Enabled</key>
<true/>
<key>ExecutablePath</key>
<string>Contents/MacOS/BrcmNonPatchRAM2</string>
<key>MaxKernel</key>
<string>18.99.99</string>
<key>MinKernel</key>
<string>15.0.0</string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
<key>BundlePath</key>
<string>BrcmPatchRAM2.kext</string>
<key>Comment</key>
<string>Bluetooth support for macOS 10.11-10.14</string>
<key>Enabled</key>
<true/>
<key>ExecutablePath</key>
<string>Contents/MacOS/BrcmPatchRAM2</string>
<key>MaxKernel</key>
<string>18.99.99</string>
<key>MinKernel</key>
<string>15.0.0</string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
<key>BundlePath</key>
<string>BrcmPatchRAM3.kext</string>
<key>Comment</key>
<string>Bluetooth support for macOS 10.15-</string>
<key>Enabled</key>
<true/>
<key>ExecutablePath</key>
<string>Contents/MacOS/BrcmPatchRAM3</string>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string>19.0.0</string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
<key>BundlePath</key>
<string>BrcmBluetoothInjector.kext</string>
<key>Comment</key>
<string>Bluetooth support for macOS 10.15-11</string>
<key>Enabled</key>
<true/>
<key>ExecutablePath</key>
<string></string>
<key>MaxKernel</key>
<string>20.99.99</string>
<key>MinKernel</key>
<string>19.0.0</string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
<key>BundlePath</key>
<string>BlueToolFixup.kext</string>
<key>Comment</key>
<string>Bluetooth support for macOS 12-</string>
<key>Enabled</key>
<true/>
<key>ExecutablePath</key>
<string>Contents/MacOS/BlueToolFixup</string>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string>21.0.0</string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
@ -714,7 +534,7 @@
<key>ExecutablePath</key>
<string>Contents/MacOS/CryptexFixup</string>
<key>MaxKernel</key>
<string>22.99.99</string>
<string></string>
<key>MinKernel</key>
<string>22.1.0</string>
<key>PlistPath</key>
@ -1189,7 +1009,7 @@
<key>SystemAudioVolume</key>
<data>Rg==</data>
<key>boot-args</key>
<string>-v keepsyms=1 tlbto_us=0 vti=9</string>
<string>-v keepsyms=1 amfi_get_out_of_my_way=1</string>
<key>csr-active-config</key>
<data>ZwAAAA==</data>
<key>prev-lang:kbd</key>

View file

@ -9,9 +9,11 @@ instructions are included!).
:green_heart: Looking for **commercial** support with this stuff? I am [available
over email](mailto:dhiru.kholia@gmail.com?subject=[GitHub]%20OSX-KVM%20Commercial%20Support%20Request&body=Hi%20-%20We%20are%20interested%20in%20purchasing%20commercial%20support%20options%20for%20your%20project.) for a chat for **commercial support options only**. Note: Project sponsors get access to the `Private OSX-KVM` repository, and direct support.
Struggling with `Content Caching` stuff? We can help.
Working with `Proxmox` and macOS? See [Nick's blog for sure](https://www.nicksherlock.com/).
Yes, we support offline macOS installations now 🎉
Yes, we support offline macOS installations now - see [this document](./run_offline.md) 🎉
### Contributing Back
@ -51,43 +53,22 @@ help (pull-requests!) with the following work items:
* A CPU with AVX2 support is required for >= macOS Mojave
Note: Older AMD CPU(s) are known to be problematic. AMD FX-8350 works but
Phenom II X3 720 does not. Ryzen processors work just fine.
Note: Older AMD CPU(s) are known to be problematic but modern AMD Ryzen
processors work just fine.
### Installation Preparation
* KVM may need the following tweak on the host machine to work.
```
echo 1 | sudo tee /sys/module/kvm/parameters/ignore_msrs
```
To make this change permanent, you may use the following command.
```
sudo cp kvm.conf /etc/modprobe.d/kvm.conf # for intel boxes only, after cloning the repo below
```
* Install QEMU and other packages.
```
sudo apt-get install qemu uml-utilities virt-manager git \
wget libguestfs-tools p7zip-full make dmg2img -y
wget libguestfs-tools p7zip-full make dmg2img tesseract-ocr \
tesseract-ocr-eng genisoimage -y
```
This step may need to be adapted for your Linux distribution.
* Add user to the `kvm` and `libvirt` groups (might be needed).
```
sudo usermod -aG kvm $(whoami)
sudo usermod -aG libvirt $(whoami)
sudo usermod -aG input $(whoami)
```
Note: Re-login after executing this command.
* Clone this repository on your QEMU system. Files from this repository are
used in the following steps.
@ -107,6 +88,30 @@ Phenom II X3 720 does not. Ryzen processors work just fine.
This repository uses rebase based workflows heavily.
* KVM may need the following tweak on the host machine to work.
```
sudo modprobe kvm; echo 1 | sudo tee /sys/module/kvm/parameters/ignore_msrs
```
To make this change permanent, you may use the following command.
```
sudo cp kvm.conf /etc/modprobe.d/kvm.conf # for intel boxes only
sudo cp kvm_amd.conf /etc/modprobe.d/kvm.conf # for amd boxes only
```
* Add user to the `kvm` and `libvirt` groups (might be needed).
```
sudo usermod -aG kvm $(whoami)
sudo usermod -aG libvirt $(whoami)
sudo usermod -aG input $(whoami)
```
Note: Re-login after executing this command.
* Fetch macOS installer.
```
@ -127,11 +132,12 @@ Phenom II X3 720 does not. Ryzen processors work just fine.
1. High Sierra (10.13)
2. Mojave (10.14)
3. Catalina (10.15)
4. Big Sur (11.7) - RECOMMENDED
4. Big Sur (11.7)
5. Monterey (12.6)
6. Ventura (13)
6. Ventura (13) - RECOMMENDED
7. Sonoma (14)
Choose a product to download (1-6): 4
Choose a product to download (1-6): 6
```
Note: Modern NVIDIA GPUs are supported on HighSierra but not on later
@ -148,7 +154,7 @@ Phenom II X3 720 does not. Ryzen processors work just fine.
will need to be updated to point to the new image name.
```
qemu-img create -f qcow2 mac_hdd_ng.img 128G
qemu-img create -f qcow2 mac_hdd_ng.img 256G
```
NOTE: Create this HDD image file on a fast SSD/NVMe disk for best results.
@ -165,7 +171,7 @@ Phenom II X3 720 does not. Ryzen processors work just fine.
./OpenCore-Boot.sh
```
Note: This same script works for Big Sur, Catalina, Mojave, and High Sierra.
Note: This same script works for all recent macOS versions.
- Use the `Disk Utility` tool within the macOS installer to partition, and
format the virtual disk attached to the macOS VM.
@ -202,6 +208,15 @@ Phenom II X3 720 does not. Ryzen processors work just fine.
- Launch `virt-manager` and start the `macOS` virtual machine.
### Headless macOS
- Use the provided [boot-macOS-headless.sh](./boot-macOS-headless.sh) script.
```
./boot-macOS-headless.sh
```
### Setting Expectations Right
Nice job on setting up a `Virtual Hackintosh` system! Such a system can be used
@ -220,24 +235,7 @@ work, patience, and a bit of luck (perhaps?).
### Post-Installation
* See [networking notes](networking-qemu-kvm-howto.txt) to setup guest networking.
I have the following commands present in `/etc/rc.local`.
```
#!/usr/bin/env bash
sudo ip tuntap add dev tap0 mode tap
sudo ip link set tap0 up promisc on
sudo ip link set dev virbr0 up
sudo ip link set dev tap0 master virbr0
```
This has been enough for me so far.
Note: You may need to enable the `rc.local` functionality manually on modern
Ubuntu versions. Check out the [notes](notes.md) included in this repository
for details.
* See [networking notes](networking-qemu-kvm-howto.txt) on how to setup networking in your VM, outbound and also inbound for remote access to your VM via SSH, VNC, etc.
* To passthrough GPUs and other devices, see [these notes](notes.md#gpu-passthrough-notes).

View file

@ -23,16 +23,12 @@
# NOTE: Tweak the "MY_OPTIONS" line in case you are having booting problems!
############################################################################
# Changelog:
# - Add support for 'savevm'
# - Fix cpuid related warning on EPYC
# - Fix 'savevm' support
MY_OPTIONS="+ssse3,+sse4.2,+popcnt,+avx,+aes,+xsave,+xsaveopt,check"
# This script works for Catalina as well as Mojave. Tested with macOS 10.14.6 and macOS 10.15.6.
# This script works for Big Sur, Catalina, Mojave, and High Sierra. Tested with
# macOS 10.15.6, macOS 10.14.6, and macOS 10.13.6.
ALLOCATED_RAM="3072" # MiB
ALLOCATED_RAM="7192" # MiB
CPU_SOCKETS="1"
CPU_CORES="2"
CPU_THREADS="4"
@ -40,32 +36,36 @@ CPU_THREADS="4"
REPO_PATH="."
OVMF_DIR="."
# for snapshots
export TMPDIR=$PWD
# shellcheck disable=SC2054
args=(
-enable-kvm -m "$ALLOCATED_RAM" -cpu Penryn,kvm=on,vendor=GenuineIntel,+invtsc,vmware-cpuid-freq=on,"$MY_OPTIONS"
-machine q35
-usb -device usb-kbd -device usb-tablet
-smp "$CPU_THREADS",cores="$CPU_CORES",sockets="$CPU_SOCKETS"
-device usb-ehci,id=ehci
# -device usb-kbd,bus=ehci.0
# -device usb-mouse,bus=ehci.0
-device nec-usb-xhci,id=xhci
-global nec-usb-xhci.msi=off
-global ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off
# -device usb-host,vendorid=0x8086,productid=0x0808 # 2 USD USB Sound Card
# -device usb-host,vendorid=0x1b3f,productid=0x2008 # Another 2 USD USB Sound Card
-device isa-applesmc,osk="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc"
-drive if=pflash,format=raw,snapshot=off,file="$REPO_PATH/$OVMF_DIR/OVMF_CODE.fd"
-drive if=pflash,format=raw,snapshot=on,file="$REPO_PATH/$OVMF_DIR/OVMF_VARS-1024x768.fd"
-drive if=pflash,format=raw,readonly=on,file="$REPO_PATH/$OVMF_DIR/OVMF_CODE.fd"
-drive if=pflash,format=raw,file="$REPO_PATH/$OVMF_DIR/OVMF_VARS-1920x1080.fd"
-smbios type=2
-device ich9-ahci,id=sata
-drive id=OpenCoreBoot,if=none,snapshot=on,format=qcow2,file="$REPO_PATH/OpenCore/OpenCore.qcow2"
-device ide-hd,bus=sata.2,drive=OpenCoreBoot
-device ide-hd,bus=sata.3,drive=InstallMedia
-drive id=InstallMedia,if=none,file="$REPO_PATH/BaseSystem.img",format=raw
# -drive id=MacHDD,if=none,snapshot=on,file="$REPO_PATH/mac_hdd_ng.img",format=qcow2
-drive id=MacHDD,if=none,snapshot=off,file="$REPO_PATH/mac_hdd_ng.img",format=qcow2
-drive id=MacHDD,if=none,file="$REPO_PATH/mac_hdd_ng.img",format=qcow2
-device ide-hd,bus=sata.4,drive=MacHDD
-netdev user,id=net0 -device vmxnet3,netdev=net0,id=net0,mac=52:54:00:c9:18:27
-netdev user,id=net0,hostfwd=tcp::2222-:22 -device vmxnet3,netdev=net0,id=net0,mac=52:54:00:c9:18:27
-monitor stdio
-vga vmware
-device vmware-svga
-display none
-vnc 0.0.0.0:1,password -k en-us
-vnc 0.0.0.0:1,password=on -k en-us
)
qemu-system-x86_64 "${args[@]}"

View file

@ -1 +1 @@
allow virbr0
allow br0

View file

@ -0,0 +1,76 @@
#!/usr/bin/env bash
# https://learn.microsoft.com/en-us/xamarin/ios/get-started/installation/windows/connecting-to-mac/
# Special thanks to:
# https://github.com/Leoyzen/KVM-Opencore
# https://github.com/thenickdude/KVM-Opencore/
# https://github.com/qemu/qemu/blob/master/docs/usb2.txt
#
# qemu-img create -f qcow2 mac_hdd_ng.img 128G
#
# echo 1 | sudo tee -a /sys/module/kvm/parameters/ignore_msrs # this is required
#
# Usage:
#
# $ boot-macOS-headless.sh
#
# (qemu) change vnc password
# Password: ********
#
# Note: Using RealVNC client, connect to `<localhost:5901>`.
# E.g. `vncviewer localhost:5901`
#
# If using Nested-KVM (running macOS guest under a Ubuntu guest), use socat
# and/or bridged network to exposed the macOS ports.
############################################################################
# NOTE: Tweak the "MY_OPTIONS" line in case you are having booting problems!
############################################################################
MY_OPTIONS="+ssse3,+sse4.2,+popcnt,+aes,+xsave,+xsaveopt,check"
# This script works for Big Sur, Catalina, Mojave, and High Sierra. Tested with
# macOS 10.15.6, macOS 10.14.6, and macOS 10.13.6.
ALLOCATED_RAM="4096" # MiB
CPU_SOCKETS="1"
CPU_CORES="2"
CPU_THREADS="4"
REPO_PATH="."
OVMF_DIR="."
# shellcheck disable=SC2054
args=(
-enable-kvm -m "$ALLOCATED_RAM" -cpu Penryn,kvm=on,vendor=GenuineIntel,vmware-cpuid-freq=on,"$MY_OPTIONS"
-machine q35
-usb -device usb-kbd -device usb-tablet
-smp 2
-device usb-ehci,id=ehci
# -device usb-kbd,bus=ehci.0
# -device usb-mouse,bus=ehci.0
-device nec-usb-xhci,id=xhci
-global nec-usb-xhci.msi=off
# -device usb-host,vendorid=0x8086,productid=0x0808 # 2 USD USB Sound Card
# -device usb-host,vendorid=0x1b3f,productid=0x2008 # Another 2 USD USB Sound Card
-device isa-applesmc,osk="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc"
-drive if=pflash,format=raw,readonly=on,file="$REPO_PATH/$OVMF_DIR/OVMF_CODE.fd"
-drive if=pflash,format=raw,file="$REPO_PATH/$OVMF_DIR/OVMF_VARS-1920x1080.fd"
-smbios type=2
-device ich9-ahci,id=sata
-drive id=OpenCoreBoot,if=none,snapshot=on,format=qcow2,file="$REPO_PATH/OpenCore/OpenCore.qcow2"
-device ide-hd,bus=sata.2,drive=OpenCoreBoot
-device ide-hd,bus=sata.3,drive=InstallMedia
-drive id=InstallMedia,if=none,file="$REPO_PATH/BaseSystem.img",format=raw
-drive id=MacHDD,if=none,file="$REPO_PATH/mac_hdd_ng.img",format=qcow2
-device ide-hd,bus=sata.4,drive=MacHDD
# Note: Shift the host's ssh port some somewhere else!
-netdev user,id=net0,hostfwd=tcp::22-:22 -device vmxnet3,netdev=net0,id=net0,mac=52:54:00:c9:18:27
-monitor stdio
-device vmware-svga
-display none
-vnc 0.0.0.0:1,password=on -k en-us
)
qemu-system-x86_64 "${args[@]}"

View file

@ -15,17 +15,21 @@ Upstream: https://github.com/acidanthera/OpenCorePkg/tree/master/Utilities/macre
pylint -> Your code has been rated at -0.08/10 ;(
"""
import os
import sys
import json
import random
import argparse
import binascii
import hashlib
import json
import linecache
import os
import random
import struct
import sys
try:
from urllib.request import Request, urlopen
from urllib.request import Request, HTTPError, urlopen
from urllib.parse import urlparse
except ImportError:
from urllib2 import Request, urlopen
from urllib2 import Request, HTTPError, urlopen
from urlparse import urlparse
SELF_DIR = os.path.dirname(os.path.realpath(__file__))
@ -46,8 +50,7 @@ INFO_IMAGE_SESS = 'AT'
INFO_SIGN_LINK = 'CU'
INFO_SIGN_HASH = 'CH'
INFO_SIGN_SESS = 'CT'
INFO_REQURED = [INFO_PRODUCT, INFO_IMAGE_LINK, INFO_IMAGE_HASH, INFO_IMAGE_SESS,
INFO_SIGN_LINK, INFO_SIGN_HASH, INFO_SIGN_SESS]
INFO_REQURED = [INFO_PRODUCT, INFO_IMAGE_LINK, INFO_IMAGE_HASH, INFO_IMAGE_SESS, INFO_SIGN_LINK, INFO_SIGN_HASH, INFO_SIGN_SESS]
def run_query(url, headers, post=None, raw=False):
@ -57,19 +60,20 @@ def run_query(url, headers, post=None, raw=False):
data = data.encode('utf-8')
else:
data = None
req = Request(url=url, headers=headers, data=data)
response = urlopen(req)
if raw:
return response
return dict(response.info()), response.read()
try:
response = urlopen(req)
if raw:
return response
return dict(response.info()), response.read()
except HTTPError as e:
print(f'ERROR: "{e}" when connecting to {url}')
sys.exit(1)
def generate_id(itype, nid=None):
def generate_id(id_type, id_value=None):
valid_chars = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F']
if nid is None:
return ''.join(random.choice(valid_chars) for i in range(itype))
return nid
return ''.join(random.choice(valid_chars) for i in range(id_type)) if not id_value else id_value
def product_mlb(mlb):
@ -81,7 +85,60 @@ def mlb_from_eeee(eeee):
print('ERROR: Invalid EEEE code length!')
sys.exit(1)
return '00000000000' + eeee + '00'
return f'00000000000{eeee}00'
def int_from_unsigned_bytes(byte_list, byteorder):
if byteorder == 'little':
byte_list = byte_list[::-1]
encoded = binascii.hexlify(byte_list)
return int(encoded, 16)
# zhangyoufu https://gist.github.com/MCJack123/943eaca762730ca4b7ae460b731b68e7#gistcomment-3061078 2021-10-08
Apple_EFI_ROM_public_key_1 = 0xC3E748CAD9CD384329E10E25A91E43E1A762FF529ADE578C935BDDF9B13F2179D4855E6FC89E9E29CA12517D17DFA1EDCE0BEBF0EA7B461FFE61D94E2BDF72C196F89ACD3536B644064014DAE25A15DB6BB0852ECBD120916318D1CCDEA3C84C92ED743FC176D0BACA920D3FCF3158AFF731F88CE0623182A8ED67E650515F75745909F07D415F55FC15A35654D118C55A462D37A3ACDA08612F3F3F6571761EFCCBCC299AEE99B3A4FD6212CCFFF5EF37A2C334E871191F7E1C31960E010A54E86FA3F62E6D6905E1CD57732410A3EB0C6B4DEFDABE9F59BF1618758C751CD56CEF851D1C0EAA1C558E37AC108DA9089863D20E2E7E4BF475EC66FE6B3EFDCF
ChunkListHeader = struct.Struct('<4sIBBBxQQQ')
assert ChunkListHeader.size == 0x24
Chunk = struct.Struct('<I32s')
assert Chunk.size == 0x24
def verify_chunklist(cnkpath):
with open(cnkpath, 'rb') as f:
hash_ctx = hashlib.sha256()
data = f.read(ChunkListHeader.size)
hash_ctx.update(data)
magic, header_size, file_version, chunk_method, signature_method, chunk_count, chunk_offset, signature_offset = ChunkListHeader.unpack(data)
assert magic == b'CNKL'
assert header_size == ChunkListHeader.size
assert file_version == 1
assert chunk_method == 1
assert signature_method in [1, 2]
assert chunk_count > 0
assert chunk_offset == 0x24
assert signature_offset == chunk_offset + Chunk.size * chunk_count
for _ in range(chunk_count):
data = f.read(Chunk.size)
hash_ctx.update(data)
chunk_size, chunk_sha256 = Chunk.unpack(data)
yield chunk_size, chunk_sha256
digest = hash_ctx.digest()
if signature_method == 1:
data = f.read(256)
assert len(data) == 256
signature = int_from_unsigned_bytes(data, 'little')
plaintext = 0x1ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff003031300d0609608648016503040201050004200000000000000000000000000000000000000000000000000000000000000000 | int_from_unsigned_bytes(digest, 'big')
assert pow(signature, 0x10001, Apple_EFI_ROM_public_key_1) == plaintext
elif signature_method == 2:
data = f.read(32)
assert data == digest
raise RuntimeError('Chunklist missing digital signature')
else:
raise NotImplementedError
assert f.read(1) == b''
def get_session(args):
headers = {
@ -90,19 +147,18 @@ def get_session(args):
'User-Agent': 'InternetRecovery/1.0',
}
headers, output = run_query('http://osrecovery.apple.com/', headers)
headers, _ = run_query('http://osrecovery.apple.com/', headers)
if args.verbose:
print('Session headers:')
for header in headers:
print('{}: {}'.format(header, headers[header]))
print(f'{header}: {headers[header]}')
for header in headers:
if header.lower() == 'set-cookie':
cookies = headers[header].split('; ')
for cookie in cookies:
if cookie.startswith('session='):
return cookie
return cookie if cookie.startswith('session=') else ...
raise RuntimeError('No session in headers ' + str(headers))
@ -132,20 +188,18 @@ def get_image_info(session, bid, mlb=MLB_ZERO, diag=False, os_type='default', ci
headers, output = run_query(url, headers, post)
if sys.version_info[0] >= 3:
output = output.decode('utf-8')
output = output.decode('utf-8')
info = {}
for line in output.split('\n'):
try:
key, value = line.split(': ')
info[key] = value
except:
except Exception:
continue
for k in INFO_REQURED:
if k not in info:
raise RuntimeError('Missing key ' + k)
raise RuntimeError(f'Missing key {k}')
return info
@ -159,16 +213,18 @@ def save_image(url, sess, filename='', directory=''):
'Cookie': '='.join(['AssetToken', sess])
}
if not os.path.exists(directory):
os.mkdir(directory)
if filename == '':
filename = os.path.basename(purl.path)
if filename.find('/') >= 0 or filename == '':
raise RuntimeError('Invalid save path ' + filename)
print('Saving ' + url + ' to ' + filename + '...')
print(f'Saving {url} to {directory}/{filename}...')
with open(os.path.join(directory, filename), 'wb') as fhandle:
with open(os.path.join(directory, filename), 'wb') as fh:
response = run_query(url, headers, raw=True)
total_size = int(response.headers['content-length']) / float(2 ** 20)
# print(total_size)
if total_size < 1:
@ -178,14 +234,35 @@ def save_image(url, sess, filename='', directory=''):
print("Note: The total download size is %0.2f MB" % total_size)
size = 0
while True:
chunk = response.read(2 ** 20)
chunk = response.read(2**20)
if not chunk:
break
fhandle.write(chunk)
fh.write(chunk)
size += len(chunk)
print('\r{} MBs downloaded...'.format(size / (2 ** 20)), end='')
print(f'\r{size / (2**20)} MBs downloaded...', end='')
sys.stdout.flush()
print('\rDownload complete!' + ' ' * 32)
print('\rDownload complete!\t\t\t\t\t')
return os.path.join(directory, os.path.basename(filename))
def verify_image(dmgpath, cnkpath):
print('Verifying image with chunklist...')
with open(dmgpath, 'rb') as dmgf:
cnkcount = 0
for cnksize, cnkhash in verify_chunklist(cnkpath):
cnkcount += 1
print(f'\rChunk {cnkcount} ({cnksize} bytes)', end='')
sys.stdout.flush()
cnk = dmgf.read(cnksize)
if len(cnk) != cnksize:
raise RuntimeError(f'Invalid chunk {cnkcount} size: expected {cnksize}, read {len(cnk)}')
if hashlib.sha256(cnk).digest() != cnkhash:
raise RuntimeError(f'Invalid chunk {cnkcount}: hash mismatch')
if dmgf.read(1) != b'':
raise RuntimeError('Invalid image: larger than chunklist')
print('\rImage verification complete!\t\t\t\t\t')
def action_download(args):
@ -217,16 +294,28 @@ def action_download(args):
"""
session = get_session(args)
info = get_image_info(session, bid=args.board_id, mlb=args.mlb,
diag=args.diagnostics, os_type=args.os_type)
info = get_image_info(session, bid=args.board_id, mlb=args.mlb, diag=args.diagnostics, os_type=args.os_type)
if args.verbose:
print(info)
print('Downloading ' + info[INFO_PRODUCT] + '...')
print(f'Downloading {info[INFO_PRODUCT]}...')
dmgname = '' if args.basename == '' else args.basename + '.dmg'
save_image(info[INFO_IMAGE_LINK], info[INFO_IMAGE_SESS], dmgname, args.outdir)
dmgpath = save_image(info[INFO_IMAGE_LINK], info[INFO_IMAGE_SESS], dmgname, args.outdir)
cnkname = '' if args.basename == '' else args.basename + '.chunklist'
save_image(info[INFO_SIGN_LINK], info[INFO_SIGN_SESS], cnkname, args.outdir)
return 0
cnkpath = save_image(info[INFO_SIGN_LINK], info[INFO_SIGN_SESS], cnkname, args.outdir)
try:
verify_image(dmgpath, cnkpath)
return 0
except Exception as err:
if isinstance(err, AssertionError) and str(err) == '':
try:
tb = sys.exc_info()[2]
while tb.tb_next:
tb = tb.tb_next
err = linecache.getline(tb.tb_frame.f_code.co_filename, tb.tb_lineno, tb.tb_frame.f_globals).strip()
except Exception:
err = "Invalid chunklist"
print(f'\rImage verification failed. ({err})')
return 1
def action_selfcheck(args):
@ -234,31 +323,25 @@ def action_selfcheck(args):
Sanity check server logic for recovery:
if not valid(bid):
return error()
return error()
ppp = get_ppp(sn)
if not valid(ppp):
return latest_recovery(bid = bid) # Returns newest for bid.
return latest_recovery(bid = bid) # Returns newest for bid.
if valid(sn):
if os == 'default':
return default_recovery(sn = sn, ppp = ppp) # Returns oldest for sn.
else:
return latest_recovery(sn = sn, ppp = ppp) # Returns newest for sn.
if os == 'default':
return default_recovery(sn = sn, ppp = ppp) # Returns oldest for sn.
else:
return latest_recovery(sn = sn, ppp = ppp) # Returns newest for sn.
return default_recovery(ppp = ppp) # Returns oldest.
"""
session = get_session(args)
valid_default = get_image_info(session, bid=RECENT_MAC, mlb=MLB_VALID,
diag=False, os_type='default')
valid_latest = get_image_info(session, bid=RECENT_MAC, mlb=MLB_VALID,
diag=False, os_type='latest')
product_default = get_image_info(session, bid=RECENT_MAC, mlb=MLB_PRODUCT,
diag=False, os_type='default')
product_latest = get_image_info(session, bid=RECENT_MAC, mlb=MLB_PRODUCT,
diag=False, os_type='latest')
generic_default = get_image_info(session, bid=RECENT_MAC, mlb=MLB_ZERO,
diag=False, os_type='default')
generic_latest = get_image_info(session, bid=RECENT_MAC, mlb=MLB_ZERO,
diag=False, os_type='latest')
valid_default = get_image_info(session, bid=RECENT_MAC, mlb=MLB_VALID, diag=False, os_type='default')
valid_latest = get_image_info(session, bid=RECENT_MAC, mlb=MLB_VALID, diag=False, os_type='latest')
product_default = get_image_info(session, bid=RECENT_MAC, mlb=MLB_PRODUCT, diag=False, os_type='default')
product_latest = get_image_info(session, bid=RECENT_MAC, mlb=MLB_PRODUCT, diag=False, os_type='latest')
generic_default = get_image_info(session, bid=RECENT_MAC, mlb=MLB_ZERO, diag=False, os_type='default')
generic_latest = get_image_info(session, bid=RECENT_MAC, mlb=MLB_ZERO, diag=False, os_type='latest')
if args.verbose:
print(valid_default)
@ -270,32 +353,28 @@ def action_selfcheck(args):
if valid_default[INFO_PRODUCT] == valid_latest[INFO_PRODUCT]:
# Valid MLB must give different default and latest if this is not a too new product.
print('ERROR: Cannot determine any previous product, got {}'.format(valid_default[INFO_PRODUCT]))
print(f'ERROR: Cannot determine any previous product, got {valid_default[INFO_PRODUCT]}')
return 1
if product_default[INFO_PRODUCT] != product_latest[INFO_PRODUCT]:
# Product-only MLB must give the same value for default and latest.
print('ERROR: Latest and default do not match for product MLB, got {} and {}'.format(
product_default[INFO_PRODUCT], product_latest[INFO_PRODUCT]))
print(f'ERROR: Latest and default do not match for product MLB, got {product_default[INFO_PRODUCT]} and {product_latest[INFO_PRODUCT]}')
return 1
if generic_default[INFO_PRODUCT] != generic_latest[INFO_PRODUCT]:
# Zero MLB always give the same value for default and latest.
print('ERROR: Generic MLB gives different product, got {} and {}'.format(
generic_default[INFO_PRODUCT], generic_latest[INFO_PRODUCT]))
print(f'ERROR: Generic MLB gives different product, got {generic_default[INFO_PRODUCT]} and {generic_latest[INFO_PRODUCT]}')
return 1
if valid_latest[INFO_PRODUCT] != generic_latest[INFO_PRODUCT]:
# Valid MLB must always equal generic MLB.
print('ERROR: Cannot determine unified latest product, got {} and {}'.format(
valid_latest[INFO_PRODUCT], generic_latest[INFO_PRODUCT]))
print(f'ERROR: Cannot determine unified latest product, got {valid_latest[INFO_PRODUCT]} and {generic_latest[INFO_PRODUCT]}')
return 1
if product_default[INFO_PRODUCT] != valid_default[INFO_PRODUCT]:
# Product-only MLB can give the same value with valid default MLB.
# This is not an error for all models, but for our chosen code it is.
print('ERROR: Valid and product MLB give mismatch, got {} and {}'.format(
product_default[INFO_PRODUCT], valid_default[INFO_PRODUCT]))
print('ERROR: Valid and product MLB give mismatch, got {product_default[INFO_PRODUCT]} and {valid_default[INFO_PRODUCT]}')
return 1
print('SUCCESS: Found no discrepancies with MLB validation algorithm!')
@ -306,15 +385,11 @@ def action_verify(args):
"""
Try to verify MLB serial number.
"""
session = get_session()
generic_latest = get_image_info(session, bid=RECENT_MAC, mlb=MLB_ZERO,
diag=False, os_type='latest')
uvalid_default = get_image_info(session, bid=args.board_id, mlb=args.mlb,
diag=False, os_type='default')
uvalid_latest = get_image_info(session, bid=args.board_id, mlb=args.mlb,
diag=False, os_type='latest')
uproduct_default = get_image_info(session, bid=args.board_id, mlb=product_mlb(args.mlb),
diag=False, os_type='default')
session = get_session(args)
generic_latest = get_image_info(session, bid=RECENT_MAC, mlb=MLB_ZERO, diag=False, os_type='latest')
uvalid_default = get_image_info(session, bid=args.board_id, mlb=args.mlb, diag=False, os_type='default')
uvalid_latest = get_image_info(session, bid=args.board_id, mlb=args.mlb, diag=False, os_type='latest')
uproduct_default = get_image_info(session, bid=args.board_id, mlb=product_mlb(args.mlb), diag=False, os_type='default')
if args.verbose:
print(generic_latest)
@ -324,10 +399,7 @@ def action_verify(args):
# Verify our MLB number.
if uvalid_default[INFO_PRODUCT] != uvalid_latest[INFO_PRODUCT]:
if uvalid_latest[INFO_PRODUCT] == generic_latest[INFO_PRODUCT]:
print('SUCCESS: {} MLB looks valid and supported!'.format(args.mlb))
else:
print('SUCCESS: {} MLB looks valid, but probably unsupported!'.format(args.mlb))
print(f'SUCCESS: {args.mlb} MLB looks valid and supported!' if uvalid_latest[INFO_PRODUCT] == generic_latest[INFO_PRODUCT] else f'SUCCESS: {args.mlb} MLB looks valid, but probably unsupported!')
return 0
print('UNKNOWN: Run selfcheck, check your board-id, or try again later!')
@ -335,13 +407,12 @@ def action_verify(args):
# Here we have matching default and latest products. This can only be true for very
# new models. These models get either latest or special builds.
if uvalid_default[INFO_PRODUCT] == generic_latest[INFO_PRODUCT]:
print('UNKNOWN: {} MLB can be valid if very new!'.format(args.mlb))
print(f'UNKNOWN: {args.mlb} MLB can be valid if very new!')
return 0
if uproduct_default[INFO_PRODUCT] != uvalid_default[INFO_PRODUCT]:
print('UNKNOWN: {} MLB looks invalid, other models use product {} instead of {}!'.format(
args.mlb, uproduct_default[INFO_PRODUCT], uvalid_default[INFO_PRODUCT]))
print(f'UNKNOWN: {args.mlb} MLB looks invalid, other models use product {uproduct_default[INFO_PRODUCT]} instead of {uvalid_default[INFO_PRODUCT]}!')
return 0
print('UNKNOWN: {} MLB can be valid if very new and using special builds!'.format(args.mlb))
print(f'UNKNOWN: {args.mlb} MLB can be valid if very new and using special builds!')
return 0
@ -353,56 +424,50 @@ def action_guess(args):
mlb = args.mlb
anon = mlb.startswith('000')
with open(args.board_db, 'r') as fhandle:
db = json.load(fhandle)
with open(args.board_db, 'r', encoding='utf-8') as fh:
db = json.load(fh)
supported = {}
session = get_session(args)
generic_latest = get_image_info(session, bid=RECENT_MAC, mlb=MLB_ZERO,
diag=False, os_type='latest')
generic_latest = get_image_info(session, bid=RECENT_MAC, mlb=MLB_ZERO, diag=False, os_type='latest')
for model in db:
try:
if anon:
# For anonymous lookup check when given model does not match latest.
model_latest = get_image_info(session, bid=model, mlb=MLB_ZERO,
diag=False, os_type='latest')
model_latest = get_image_info(session, bid=model, mlb=MLB_ZERO, diag=False, os_type='latest')
if model_latest[INFO_PRODUCT] != generic_latest[INFO_PRODUCT]:
if db[model] == 'current':
print('WARN: Skipped {} due to using latest product {} instead of {}'.format(
model, model_latest[INFO_PRODUCT], generic_latest[INFO_PRODUCT]))
print(f'WARN: Skipped {model} due to using latest product {model_latest[INFO_PRODUCT]} instead of {generic_latest[INFO_PRODUCT]}')
continue
user_default = get_image_info(session, bid=model, mlb=mlb,
diag=False, os_type='default')
user_default = get_image_info(session, bid=model, mlb=mlb, diag=False, os_type='default')
if user_default[INFO_PRODUCT] != generic_latest[INFO_PRODUCT]:
supported[model] = [db[model], user_default[INFO_PRODUCT], generic_latest[INFO_PRODUCT]]
else:
# For normal lookup check when given model has mismatching normal and latest.
user_latest = get_image_info(session, bid=model, mlb=mlb,
diag=False, os_type='latest')
user_latest = get_image_info(session, bid=model, mlb=mlb, diag=False, os_type='latest')
user_default = get_image_info(session, bid=model, mlb=mlb,
diag=False, os_type='default')
user_default = get_image_info(session, bid=model, mlb=mlb, diag=False, os_type='default')
if user_latest[INFO_PRODUCT] != user_default[INFO_PRODUCT]:
supported[model] = [db[model], user_default[INFO_PRODUCT], user_latest[INFO_PRODUCT]]
except Exception as e:
print('WARN: Failed to check {}, exception: {}'.format(model, str(e)))
print(f'WARN: Failed to check {model}, exception: {e}')
if len(supported) > 0:
print('SUCCESS: MLB {} looks supported for:'.format(mlb))
for model in supported:
print('- {}, up to {}, default: {}, latest: {}'.format(model, supported[model][0],
supported[model][1], supported[model][2]))
print(f'SUCCESS: MLB {mlb} looks supported for:')
for model in supported.items():
print(f'- {model}, up to {supported[model][0]}, default: {supported[model][1]}, latest: {supported[model][2]}')
return 0
print('UNKNOWN: Failed to determine supported models for MLB {}!'.format(mlb))
print(f'UNKNOWN: Failed to determine supported models for MLB {mlb}!')
return None
# https://stackoverflow.com/questions/2280334/shortest-way-of-creating-an-object-with-arbitrary-attributes-in-python
@ -413,28 +478,27 @@ class gdata:
def __init__(self, **kwargs):
self.__dict__.update(kwargs)
def main():
parser = argparse.ArgumentParser(description='Gather recovery information for Macs')
parser.add_argument('--action', choices=['download', 'selfcheck', 'verify', 'guess'], default='',
help='Action to perform: "download" - performs recovery downloading,'
' "selfcheck" checks whether MLB serial validation is possible, "verify" performs'
' MLB serial verification, "guess" tries to find suitable mac model for MLB.')
parser.add_argument('-o', '--outdir', type=str, default=os.getcwd(),
help='customise output directory for downloading, defaults to current directory')
' "selfcheck" checks whether MLB serial validation is possible, "verify" performs'
' MLB serial verification, "guess" tries to find suitable mac model for MLB.')
parser.add_argument('-o', '--outdir', type=str, default='com.apple.recovery.boot',
help='customise output directory for downloading, defaults to com.apple.recovery.boot')
parser.add_argument('-n', '--basename', type=str, default='',
help='customise base name for downloading, defaults to remote name')
parser.add_argument('-b', '--board-id', type=str, default=RECENT_MAC,
help='use specified board identifier for downloading, defaults to ' + RECENT_MAC)
help=f'use specified board identifier for downloading, defaults to {RECENT_MAC}')
parser.add_argument('-m', '--mlb', type=str, default=MLB_ZERO,
help='use specified logic board serial for downloading, defaults to ' + MLB_ZERO)
help=f'use specified logic board serial for downloading, defaults to {MLB_ZERO}')
parser.add_argument('-e', '--code', type=str, default='',
help='generate product logic board serial with specified product EEEE code')
parser.add_argument('-os', '--os-type', type=str, default='default', choices=['default', 'latest'],
help='use specified os type, defaults to default ' + MLB_ZERO)
help=f'use specified os type, defaults to default {MLB_ZERO}')
parser.add_argument('-diag', '--diagnostics', action='store_true', help='download diagnostics image')
parser.add_argument('-s', '--shortname', type=str, default='',
help='available options: high-sierra, mojave, catalina, big-sur, monterey')
help='available options: high-sierra, mojave, catalina, big-sur, monterey, ventura')
parser.add_argument('-v', '--verbose', action='store_true', help='print debug information')
parser.add_argument('-db', '--board-db', type=str, default=os.path.join(SELF_DIR, 'boards.json'),
help='use custom board list for checking, defaults to boards.json')
@ -465,13 +529,12 @@ def main():
{"name": "Catalina (10.15)", "b": "Mac-00BE6ED71E35EB86", "m": "00000000000000000", "short": "catalina"},
{"name": "Big Sur (11.7) - RECOMMENDED", "b": "Mac-2BD1B31983FE1663", "m": "00000000000000000", "short": "big-sur"},
{"name": "Monterey (12.6)", "b": "Mac-B809C3757DA9BB8D", "m": "00000000000000000", "os_type": "latest", "short": "monterey"},
{"name": "Ventura (13)", "b": "Mac-7BA5B2D9E42DDD94", "m": "00000000000000000", "os_type": "latest", "short": "ventura"}
{"name": "Ventura (13)", "b": "Mac-7BA5B2D9E42DDD94", "m": "00000000000000000", "os_type": "latest", "short": "ventura"},
{"name": "Sonoma (14) ", "b": "Mac-A61BADE1FDAD7B05", "m": "00000000000000000", "short": "sonoma"}
]
for index, product in enumerate(products):
name = product["name"]
print('%s. %12s' % (index + 1, name))
# test locally using args.shortname = 'mojave'
if not args.shortname or args.shortname == '':
answer = input('\nChoose a product to download (1-%s): ' % len(products))
@ -488,12 +551,7 @@ def main():
break
else:
index = index+1
# action
product = products[index]
print(product['name'])
try:
os_type = product["os_type"]
except:

2
kvm_amd.conf Normal file
View file

@ -0,0 +1,2 @@
options kvm_amd nested=1
options kvm ignore_msrs=1 report_ignored_msrs=0

View file

@ -44,7 +44,7 @@
<type arch='x86_64' machine='pc-q35-4.2'>hvm</type>
<!-- We don't need patched OVMF anymore when using latest OpenCore, stock one is okay -->
<loader readonly='yes' type='pflash'>/home/CHANGEME/OSX-KVM/OVMF_CODE.fd</loader>
<nvram>/home/CHANGEME/OSX-KVM/OVMF_VARS-1024x768.fd</nvram>
<nvram>/home/CHANGEME/OSX-KVM/OVMF_VARS.fd</nvram>
</os>
<features>
<acpi/>
@ -161,7 +161,7 @@
<listen type='address'/>
</graphics>
<video>
<model type="vga" vram="65536" heads="1" primary="yes"/>
<model type="vmvga" vram="131072" heads="1" primary="yes"/>
</video>
<!-- If you wanna passthrough GPU, make sure the gfx and audio are in the same bus (like 0x01) but different function (0x00 and 0x01)-->
<!-- <hostdev mode='subsystem' type='pci' managed='yes'>

View file

@ -30,14 +30,27 @@ MacOS.
To use this adapter, replace network_adapter with e1000-82545em
vmxnet3 - An alternative solution to e1000 is to use vmxnet3 instead. Unlike
the e1000, vmxnet3 is a paravirtualized NIC, which can allow for better
vmxnet3,virtio-net-pci - An alternative solution to e1000. Instead of emulating
the e1000, these are paravirtualized NICs, which can allow for better
performance (in theory). The only catch is that the you need to have a recent
version of MacOS (10.11 or later).
To use this adapter, replace network_adapter with vmxnet3
To use these adapters, replace network_adapter with vmxnet3 or virtio-net-pci.
SSH access in user mode
-----------------------
Although the IP address of the VM is not visible to the outside, it is possible
to use port forwarding to access the VM's ports from your host, eg the SSH port.
To achieve that:
- In MacOS, turn on SSH under System Preferences > Sharing > Remote Login.
- Modify the startup script to include `-netdev user,id=net0,hostfwd=tcp::10022-:22`
- Use `ssh localhost -p10022` to get in.
You can use the same for VNC.
-----------------------------------
Tap Networking (Better Performance)
-----------------------------------
@ -62,6 +75,25 @@ virsh net-autostart default
Add "-netdev tap,id=net0,ifname=tap0,script=no,downscript=no -device e1000-82545em,netdev=net0,id=net0,mac=52:54:00:c9:18:27 \"
to your qemu-system-x86_64 command.
Using an rc.local startup script
--------------------------------
I have the following commands present in `/etc/rc.local`.
#!/usr/bin/env bash
sudo ip tuntap add dev tap0 mode tap
sudo ip link set tap0 up promisc on
sudo ip link set dev virbr0 up
sudo ip link set dev tap0 master virbr0
This has been enough for me so far.
Note: You may need to enable the `rc.local` functionality manually on modern
Ubuntu versions. Check out the [notes](notes.md) included in this repository
for details.
QEMU networking tip
-------------------
@ -96,3 +128,30 @@ to work, it needs to be setuid root. This can be accomplished with this command:
Note that this is sometimes viewed as a security hole. Be careful and understand
what you are doing before running this command.
-----------------------
Bridged Networking 2023
-----------------------
sudo mkdir -p /etc/qemu
sudo cp bridge.conf /etc/qemu
sudo chmod u+s /usr/lib/qemu/qemu-bridge-helper
sudo ip link add name br0 type bridge
sudo ip link set dev br0 up
sudo ip link set enx00e04c680a67 master br0 && sudo dhclient br0
$ brctl show
bridge name bridge id STP enabled interfaces
br0 8000.ead0ee60b7c1 yes enx00e04c680a67
tap0
Use the following network device in scripts:
-netdev bridge,id=net0,br=br0,"helper=/usr/lib/qemu/qemu-bridge-helper" -device virtio-net-pci,netdev=net0,id=net0,mac=00:16:CB:00:11:34
Also see https://dortania.github.io/OpenCore-Post-Install/universal/iservices.html to tweak the config.plist file.

169
notes.md
View file

@ -3,20 +3,24 @@
Do you see the "Your device or computer could not be verified" message when you
try to login to the App Store? If yes, here are the steps to fix it.
* Make sure that your wired ethernet connection is called "en0" (and not "en1" or
something else). Use "ifconfig" command to verify this.
- Make sure that your wired ethernet connection is called "en0" (and not "en1"
or something else). Use "ifconfig" command to verify this.
* If the wired ethernet connection is not called "en0", then then go to Network
in System Preferences and delete all the devices, and apply the changes. Next,
go to the console and type in `sudo rm /Library/Preferences/SystemConfiguration/NetworkInterfaces.plist`.
Finally reboot, and then use the App Store without problems.
- If the wired ethernet connection is not called "en0", then then go to Network
in System Preferences and delete all the devices, and apply the changes.
Next, go to the console and type in `sudo rm /Library/Preferences/SystemConfiguration/NetworkInterfaces.plist`.
Finally reboot, and then use the App Store without problems.
This fix was found by `Glnk2012` of https://www.tonymacx86.com/ site.
Also tweaking the `smbios.plist` file can help (?).
### Resolution in Ventura
### Resolution in Ventura (WIP)
Update: Switching to `vmware-svga` device seems to have "fixed" the following
problem!
...
From https://superuser.com: macOS Ventura screen resolution settings includes
only 3 predefined options but choosing any of them breaks my installation (I'm
@ -39,7 +43,6 @@ Reboot the macOS Ventura VM.
Note: Running `displayplacer "id:FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF mode:10"`
doesn't help with this resolution problem on macOS Ventura.
### Change resolution in OpenCore
```diff
@ -64,8 +67,8 @@ Note: The macOS VM's resolution can be changed via `Settings -> Displays`
option easily.
Note: After changing the `config.plist` file, please regenerate the
`OpenCore.qcow2` file using the instructions included in this repository.
`OpenCore.qcow2` file using the [instructions](./OpenCore/README.md#notes)
included in this repository.
### GPU passthrough notes
@ -76,7 +79,7 @@ for general-purpose guidance and details.
I am running Ubuntu 20.04.2 LTS on Intel i5-6500 + ASUS Z170-AR motherboard +
AMD RX 570 GPU (May 2021).
* Blacklist the required kernel modules.
- Blacklist the required kernel modules.
```
$ cat /etc/modprobe.d/blacklist.conf
@ -86,7 +89,7 @@ AMD RX 570 GPU (May 2021).
blacklist radeon
```
* Find details of the PCIe devices to passthrough.
- Find details of the PCIe devices to passthrough.
```
$ lspci -nnk | grep AMD
@ -94,7 +97,7 @@ AMD RX 570 GPU (May 2021).
01:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere HDMI Audio [Radeon RX 470/480 / 570/580/590] [1002:aaf0]
```
* Enable IOMMU support and configure VFIO.
- Enable IOMMU support and configure VFIO.
Append the given line to `GRUB_CMDLINE_LINUX_DEFAULT` in `/etc/default/grub`.
@ -106,7 +109,7 @@ AMD RX 570 GPU (May 2021).
`iommu=pt amd_iommu=on <remaining-line-from-above...>`
* Tweak module configuration a bit according to the following output (thanks to Mathias Hueber).
- Tweak module configuration a bit according to the following output (thanks to Mathias Hueber).
```
$ cat /etc/modprobe.d/vfio.conf
@ -117,18 +120,19 @@ AMD RX 570 GPU (May 2021).
softdep drm pre: vfio-pci
```
* Update GRUB, initramfs, and then reboot.
- Update GRUB, initramfs, and then reboot.
```
$ sudo update-grub2
$ sudo update-initramfs -k all -u
sudo update-grub2
sudo update-initramfs -k all -u
```
* In the BIOS setup, set the `Primary Display` to `IGFX` (aka CPU graphics / onboard graphics).
- In the BIOS setup, set the `Primary Display` to `IGFX` (aka CPU graphics / onboard graphics).
Tip: Update the BIOS!
* Verify that the IOMMU ("VT-d" for Intel) is enabled, and `vfio-pci` is
- Verify that the IOMMU ("VT-d" for Intel) is enabled, and `vfio-pci` is
working as expected. Verify that the expected devices are using `vfio-pci` as
their kernel driver.
@ -169,7 +173,7 @@ AMD RX 570 GPU (May 2021).
01:00.1 Audio device [0403]: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere HDMI Audio [Radeon RX 470/480 / 570/580/590] [1002:aaf0] (rev ff)
```
* Fix permissions for the `/dev/vfio/1` device (modify as needed):
- Fix permissions for the `/dev/vfio/1` device (modify as needed):
```
sudo cp vfio-kvm.rules /etc/udev/rules.d/vfio-kvm.rules
@ -178,7 +182,7 @@ AMD RX 570 GPU (May 2021).
sudo udevadm trigger
```
* Open `/etc/security/limits.conf` file and add the following lines:
- Open `/etc/security/limits.conf` file and add the following lines:
```
@kvm soft memlock unlimited
@ -189,10 +193,10 @@ AMD RX 570 GPU (May 2021).
Thanks to `Heiko Sieger` for this solution.
* Confirm the contents of `boot-passthrough.sh` and run it to boot macOS with
- Confirm the contents of `boot-passthrough.sh` and run it to boot macOS with
GPU passthrough.
* To reuse the keyboard and mouse devices from the host, setup "Automatic
- To reuse the keyboard and mouse devices from the host, setup "Automatic
login" in System Preferences in macOS and configure Synergy software.
Note: On `Pop!_OS`, use the `kernelstub` command to change the kernel boot
@ -211,12 +215,11 @@ work in a rugged, consistent manner.
[Link to a list of supported GPUs](https://dortania.github.io/GPU-Buyers-Guide/modern-gpus/amd-gpu.html).
### USB passthrough notes
These steps will need to be adapted for your particular setup.
* Isolate the passthrough PCIe devices with vfio-pci, with the help of `lspci
- Isolate the passthrough PCIe devices with vfio-pci, with the help of `lspci
-nnk` command.
```
@ -228,13 +231,13 @@ These steps will need to be adapted for your particular setup.
Add `1b21:1242` to `GRUB_CMDLINE_LINUX_DEFAULT` in `/etc/default/grub` file
in the required format. See `GPU passthrough notes` (above) for details.
* Update initramfs, and then reboot.
- Update initramfs, and then reboot.
```
$ sudo update-initramfs -k all -u
sudo update-initramfs -k all -u
```
* Use the helper scripts to isolate the USB controller.
- Use the helper scripts to isolate the USB controller.
```
$ scripts/lsgroup.sh
@ -249,19 +252,18 @@ These steps will need to be adapted for your particular setup.
```
```
$ scripts/vfio-group.sh 13
scripts/vfio-group.sh 13
```
* Add `-device vfio-pci,host=03:00.0,bus=pcie.0` line to `boot-passthrough.sh`.
- Add `-device vfio-pci,host=03:00.0,bus=pcie.0` line to `boot-passthrough.sh`.
* Boot the VM, and devices attached to the ASMedia USB controller should just work under macOS.
- Boot the VM, and devices attached to the ASMedia USB controller should just work under macOS.
[Here is a link to a list of recommended USB PCIe cards](http://blog.greggant.com/posts/2018/05/07/definitive-mac-pro-upgrade-guide.html).
### Synergy Notes
* Get Synergy from https://sourceforge.net/projects/synergy-stable-builds.
- Get Synergy from https://sourceforge.net/projects/synergy-stable-builds.
I installed "synergy-v1.8.8-stable-MacOSX-x86_64.dmg" on the macOS guest and
configured it as a client.
@ -270,11 +272,10 @@ These steps will need to be adapted for your particular setup.
System Preferences -> Users & Groups -> Select your user account -> Login Items
-> Add a login item
* On the Linux host machine, install "synergy-v1.8.8-stable-Linux-x86_64.deb"
- On the Linux host machine, install "synergy-v1.8.8-stable-Linux-x86_64.deb"
or newer, configure `~/.synergy.conf` and run `synergys` command.
* The included `.synergy.conf` will need to be adapted according to your setup.
- The included `.synergy.conf` will need to be adapted according to your setup.
### Virtual Sound Device
@ -296,7 +297,6 @@ present.
This cheap(est) USB sound card works pretty well on macOS *without* requiring
USB-controller-passthrough.
### Building QEMU from source
See http://wiki.qemu-project.org/Hosts/Linux for help.
@ -314,7 +314,6 @@ $ ../configure --prefix=/home/$(whoami)/QEMU --enable-trace-backend=simple \
$ make -j8; make install
```
### Connect iPhone / iPad to macOS guest
iDevices can be passed through in two ways: USB or USB OTA.
@ -329,7 +328,6 @@ VFIO USB Passthrough:
https://github.com/Silfalion/Iphone_docker_osx_passthrough
### Exposing AES-NI instructions to macOS
Add `+aes` argument to the `-cpu` option in `boot-macOS.sh` file.
@ -355,7 +353,7 @@ Other host CPU features can be similarly exposed to the macOS guest.
The following command can be used on macOS to verify that AES-NI instructions are exposed,
```
sysctl -a | grep machdep.features
sysctl -a | grep machdep.cpu.features
```
On machines with OpenSSL installed, the following two commands can be used to
@ -367,7 +365,6 @@ openssl speed aes-128-cbc
openssl speed -evp aes-128-cbc # uses AES-NI
```
### Exposing AVX and AVX2 instructions to macOS
Exposing AVX and AVX2 instructions to macOS requires support for these
@ -396,7 +393,6 @@ machdep.cpu.leaf7_features: SMEP BMI1 AVX2 BMI2
machdep.cpu.leaf7_feature_bits: 424
```
### Enabling Hypervisor.Framework (Nested Virtualization / Docker for Mac / Android Emulator / etc)
Docker for Mac, the Android Emulator and other virtualization products require
@ -418,18 +414,17 @@ If the `VMX` flag is missing, use the following steps to enable it:
- Make sure the VM is booted with VMX support passed through using one of the
two below strategies:
- You may add `vmx,rdtscp` arguments to the `-cpu` option in `boot-macOS.sh`
file (easier option).
You may add `vmx,rdtscp` arguments to the `-cpu` option in `boot-macOS.sh`
file (easier option).
- You may add `+vmx,` to the front of `MY_OPTIONS` in the boot script while
changing `-cpu Penryn` to `-cpu Skylake-Client` or [any other suitable supported CPU](https://manpages.ubuntu.com/manpages/disco/man7/qemu-cpu-models.7.html).
You may add `+vmx,` to the front of `MY_OPTIONS` in the boot script while
changing `-cpu Penryn` to `-cpu Skylake-Client` or [any other suitable supported CPU](https://manpages.ubuntu.com/manpages/disco/man7/qemu-cpu-models.7.html).
Note: Host CPU passthrough is troublesome and not generally recommended.
Note: Host CPU passthrough is troublesome and not generally recommended.
Note: You may need to `Reset NVRAM` on the next reboot, but after that you
should see a `1` when you re-check `sysctl kern.hv_support`.
### Using virtio-blk-pci with macOS
Newer macOS (namely Mojave+) have support for some virtio drivers.
@ -442,8 +437,7 @@ get some performance gain.
+ -device virtio-blk-pci,drive=MacHDD \
```
### Permission problems with libvirt / qemu?
### Permission problems with libvirt / qemu
```
sudo setfacl -m u:libvirt-qemu:rx /home/$USER
@ -454,12 +448,11 @@ In general,
sudo setfacl -R -m u:libvirt-qemu:rx <path> # fix virt-manager perm problems
```
### Extract .pkg files
* http://mackyle.github.io/xar/ is unmaintained and may fail for many `.pkg` files.
- http://mackyle.github.io/xar/ is unmaintained and may fail for many `.pkg` files.
* Use a modern version of `7-Zip` instead.
- Use a modern version of `7-Zip` instead.
```
7z l example.pkg
@ -469,21 +462,18 @@ sudo setfacl -R -m u:libvirt-qemu:rx <path> # fix virt-manager perm problems
gunzip -c <something>.pkg/Payload | cpio -i
```
### QEMU quits with `gtk initialization failed`
Append the `display=none` argument to your QEMU execution script (this has
already been done for `boot-passthrough.sh`)
### ISO/DMG (`createinstallmedia` generated) install medium not detected
In OpenCore's `config.plist` and set `ScanPolicy` to `0` ([For more information, check the Dortania Troubleshooting Guide](https://dortania.github.io/OpenCore-Install-Guide/troubleshooting/troubleshooting.html#can-t-see-macos-partitions))
### Attach physical drive to QEMU VM
*Note: If using NVMe, passing the controller may be a better option then passing it as a block device*
Note: If using NVMe, passing the controller may be a better option then passing it as a block device.
Run `ls -la /dev/disk/by-id/` to get the unique mapping for the device you want to attach to the VM (like `sda`, `sdb`, `nvme0n1`, while you can attach only a partition like `sda1`, this is not recommended)
@ -515,30 +505,27 @@ block device without `root` permissions)
-device ide-hd,bus=sata.4,drive=NVMeDrive \
```
### Run the Virtual Machine on Boot
* Edit your QEMU launch script and set the absolute path of `OSX-KVM` as the
- Edit your QEMU launch script and set the absolute path of `OSX-KVM` as the
value of `REPO_PATH`
* Edit `/etc/rc.local` and add the absolute path of the script (with or without
- Edit `/etc/rc.local` and add the absolute path of the script (with or without
`sudo` depending on your needs) to the bottom of the script.
### Setup SSH for internal remote access
Presuming your network interface has a statically defined internal IP (on Ubuntu).
```
$ sudo apt install openssh-server -y
$ sudo ufw allow ssh
$ sudo update-rc.d ssh defaults
$ sudo systemctl enable ssh
$ sudo systemctl enable ssh.socket
$ sudo systemctl enable ssh.service
sudo apt install openssh-server -y
sudo ufw allow ssh
sudo update-rc.d ssh defaults
sudo systemctl enable ssh
sudo systemctl enable ssh.socket
sudo systemctl enable ssh.service
```
### AMD GPU Notes
- https://www.nicksherlock.com/2020/11/working-around-the-amd-gpu-reset-bug-on-proxmox/
@ -546,7 +533,6 @@ $ sudo systemctl enable ssh.service
- Consider using CMMChris's [RadeonBoost.kext](https://forums.macrumors.com/threads/tired-of-low-geekbench-scores-use-radeonboost.2231366/)
for the RX480, RX580, RX590 and Radeon VII GPUs.
### USB passthrough notes
#### USB 3.0 flash drive
@ -554,38 +540,45 @@ $ sudo systemctl enable ssh.service
The following USB configuration works for usb passthrough of a USB 3.0 flash
drive to Fedora 25 guest.
-device nec-usb-xhci,id=xhci \
-device usb-host,bus=xhci.0,vendorid=0x0781,productid=0x5590 \
-usb -device usb-mouse,bus=usb-bus.0 -device usb-kbd,bus=usb-bus.0 \
...
```
-device nec-usb-xhci,id=xhci \
-device usb-host,bus=xhci.0,vendorid=0x0781,productid=0x5590 \
-usb -device usb-mouse,bus=usb-bus.0 -device usb-kbd,bus=usb-bus.0 \
...
```
#### Moto G3 phone
The following USB configuration works for usb passthrough of a Moto G3 phone to
Fedora 25 guest.
```
-device usb-host,bus=usb-bus.0,vendorid=0x22b8,productid=0x002e \
-usb -device usb-mouse,bus=usb-bus.0 -device usb-kbd,bus=usb-bus.0 \
...
```
#### CoolerMaster keyboard
The following USB configuration works for usb passthrough of a CoolerMaster
keyboard to macOS Sierra guest!
```
-device usb-host,bus=usb-bus.0,vendorid=0x2516,productid=0x0004 \
-usb -device usb-tablet,bus=usb-bus.0 -device usb-kbd,bus=usb-bus.0 \
...
```
#### Virtual USB disk
The following USB configuration works for attaching a virtual USB disk to macOS
Sierra guest. Use "qemu-img" to create "disk.raw" virtual disk.
```
-drive if=none,id=usbstick,file=disk.raw,format=raw \
-device usb-storage,bus=usb-bus.0,drive=usbstick \
...
```
However USB passthrough of EHCI, and XHCI (USB 3.0) devices does not work with
macOS Sierra. See https://bugs.launchpad.net/qemu/+bug/1509336 for
@ -597,8 +590,7 @@ It seems that this problem can be fixed by using OVMF + Clover.
Update: OVMF + Clover doesn't help. It seems that macOS is missing the required
drivers for the EHCI, and XHCI controllers that are exposed by QEMU.
### Generate macOS Mojave / Catalina installation ISO.
### Generate macOS Mojave / Catalina installation ISO
This step currently needs to be run on an existing macOS system.
@ -608,21 +600,19 @@ drivers for the EHCI, and XHCI controllers that are exposed by QEMU.
./create_dmg_catalina.sh
```
### Tweaks for macOS
1. Disable `Energy Saver` in `System Preferences`.
- Disable `Energy Saver` in `System Preferences`.
2. Disable `Screen Saver` in `System Preferences -> Desktop & Screen Saver`.
- Disable `Screen Saver` in `System Preferences -> Desktop & Screen Saver`.
3. Turn off indexing using the following command.
- Turn off indexing using the following command.
```
sudo mdutil -a -i off
```
4. Enable `Remote Login` (aka SSH) via `System Preferences -> Sharing`.
```
sudo mdutil -a -i off
```
- Enable `Remote Login` (aka SSH) via `System Preferences -> Sharing`.
### Snapshot Debugging Tips
@ -635,7 +625,6 @@ drivers for the EHCI, and XHCI controllers that are exposed by QEMU.
Ensure that you have plenty of free space in `/var/tmp` and `/`.
To use a separate storage location for storing snapshots, use the following
trick (from `zimbatm`):
@ -643,14 +632,12 @@ drivers for the EHCI, and XHCI controllers that are exposed by QEMU.
export TMPDIR=$PWD/tmp
```
### 'Fix' weird boot problems
```
cp OVMF_VARS-1024x768.fd.bak OVMF_VARS-1024x768.fd
```
### 'Fix' time drift problems
Run the following command periodically from root's crontab:
@ -659,7 +646,6 @@ Run the following command periodically from root's crontab:
sntp -S pool.ntp.org
```
### Pass through all CPU cores / threads
macOS requires a core count that is a power of 2, but some modern CPUs have odd
@ -688,12 +674,10 @@ The `-smp line` should read something like the following:
-smp "$CPU_TOTAL",cores="$CPU_CORES",sockets="$CPU_SOCKETS",threads="$CPU_THREADS",maxcpus="$CPU_TOTAL"
```
### Trouble with iMessage?
### Troubles with iMessage
Check out [this Dortania article on this topic](https://dortania.github.io/OpenCore-Post-Install/universal/iservices.html#using-gensmbios).
### Fix 'guest boots to UEFI shell' problem (stuck at startup.nsh problem)
Use a fresh copy of the `OVMF_VARS-1024x768.fd` file.
@ -702,7 +686,6 @@ Use a fresh copy of the `OVMF_VARS-1024x768.fd` file.
git checkout OVMF_VARS-1024x768.fd
```
### Enable rc.local functionality on modern Ubuntu versions
Create `/etc/rc.local` file with the following content, if it doesn't exist:

30
run_offline.md Normal file
View file

@ -0,0 +1,30 @@
### How to run the Installation offline without macOS
* Download the Ventura installer (`InstallAssistant.pkg`) from [https://mrmacintosh.com/macos-ventura-13-full-installer-database-download-directly-from-apple/](https://mrmacintosh.com/macos-ventura-13-full-installer-database-download-directly-from-apple/)
* Create an ISO file `InstallAssistant.iso` with the `InstallAssistant.pkg` and
`scripts/run_offline.sh` files.
```
mkisofs -allow-limited-size -l -J -r -iso-level 3 -V InstallAssistant -o InstallAssistant.iso path/to/InstallAssistant.pkg scripts/run_offline.sh
```
* Add the following to your `OpenCore-Boot.sh`
```
-drive id=MacDVD,if=none,file="$REPO_PATH/InstallAssistant.iso",format=raw
-device ide-hd,bus=sata.5,drive=MacDVD
```
* Run `./OpenCore-Boot.sh` from the terminal
* Use the `Disk Utility` tool within the macOS installer to partition, and
format the virtual disk attached with name **macOS**
* When completed, close `Disk Utility`
* Go to the Terminal in your virtual machine, Click `Utilities`, select `Terminal`
* Run the `sh /Volumes/InstallAssistant/run_offline.sh` command
* Wait for a few minutes for the installation window to appear

Binary file not shown.

After

Width:  |  Height:  |  Size: 213 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 KiB

Some files were not shown because too many files have changed in this diff Show more