### Install QEMU on Windows with Chocolatey/Scoop Source: https://github.com/drdonk/oc4vm/wiki/Before-Installation Installs QEMU on Windows using either Chocolatey or Scoop package managers. This ensures the qemu-img utility is available. ```bash choco/scoop install qemu ``` -------------------------------- ### Install p7zip with Homebrew Source: https://github.com/drdonk/oc4vm/wiki/Building-OC4VM Installs the p7zip package, a prerequisite for building OC4VM, using the Homebrew package manager. ```bash brew install p7zip ``` -------------------------------- ### Install QEMU on macOS with Homebrew Source: https://github.com/drdonk/oc4vm/wiki/Before-Installation Installs QEMU on macOS using the Homebrew package manager. This provides the necessary qemu-img utility. ```bash brew install qemu ``` -------------------------------- ### Install qemu-utils on Debian Source: https://github.com/drdonk/oc4vm/wiki/Before-Installation Installs the qemu-utils package on Debian-based Linux distributions, which includes the qemu-img utility required for disk format creation. ```bash sudo apt install -y qemu-utils ``` -------------------------------- ### VMDK Descriptor File Example Source: https://github.com/drdonk/oc4vm/wiki/Make-Boot-Drive-Writeable This is an example of a VMDK descriptor file, which is a simple text file containing disk configuration information. The 'RW 81920 FLAT "opencore.iso" 0' line indicates a read-write disk. ```text # Disk DescriptorFile version=1 encoding="UTF-8" CID=fffffffe parentCID=ffffffff isNativeSnapshot="no" createType="monolithicFlat" # Extent description RW 81920 FLAT "opencore.iso" 0 # The Disk Data Base #DDB ddb.adapterType = "lsilogic" #ddb.geometry.cylinders is not used by Mac OS. #ddb.geometry.heads is not used by Mac OS. #ddb.geometry.sectors is not used by Mac OS. #ddb.longContentID will be generated on the first write to the file. #ddb.uuid is not used by Mac OS. ddb.virtualHWVersion = "6" ``` -------------------------------- ### macOS VM CPU/Core Configuration Examples Source: https://github.com/drdonk/oc4vm/wiki/CPUs-and-Cores Illustrates recommended CPU and core counts for macOS VMs on VMware to ensure stability and proper booting. Avoid configurations like 1 CPU / 3 cores. ```text 4 cores = 2 CPU / 2 cores 8 cores = 2 CPU / 4 cores or 4 CPU / 2 cores etc ... ``` -------------------------------- ### Kernel Patching Configuration Source: https://github.com/drdonk/oc4vm/wiki/Notes Example of Find, Mask, Replace, and ReplaceMask values used in kernel patching. ```text Find: wegaAAA= -> c1 e81a 0000 - 1100 0001 1110 1000 0001 1010 0000 0000 0000 0000 Mask: //3/AAA= -> ff fdff 0000 - 1111 1111 1111 1101 1111 1111 0000 0000 0000 0000 Replace: uggAAAA= -> ba 0800 0000 - 1011 1010 0000 0000 0000 0000 0000 0000 0000 0000 ReplaceMask: //////8= -> ff ffff ffff - 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 ``` -------------------------------- ### recoveryOS program output and interaction Source: https://github.com/drdonk/oc4vm/wiki/Before-Installation This is an example of the output seen when running the recoveryOS program, including the download and conversion process for creating a VMDK disk image. ```text OC4VM recoveryOS Image Maker ============================ Version 1.0.0-e04f399 (c) David Parsons 2022-25 Create a recoveryOS virtual image 1. Catalina 2. Big Sur 3. Monterey 4. Ventura 5. Sonoma 6. Sequoia 7. Tahoe 0. Exit Input menu number: 6 Downloading DMG... Downloading 093-10615... Saving http://oscdn.apple.com/content/downloads/52/42/093-10615/f1wx7fb81oy1x1l3d5kjfce2iurbhw9qbk/RecoveryImage/BaseSystem.chunklist to sequoia.chunklist... 0.0 MB downloaded... Download complete! Saving http://oscdn.apple.com/content/downloads/52/42/093-10615/f1wx7fb81oy1x1l3d5kjfce2iurbhw9qbk/RecoveryImage/BaseSystem.dmg to sequoia.dmg... 847.4/847.4 MB |==========================| 100.0% downloaded Download complete! Verifying image with chunklist... Chunk 85 (7811435 bytes) Image verification complete! Convert the recoveryOS virtual image 1. VMware VMDK 2. QEMU QCOW2 3. Microsoft VHDX 4. Raw image 5. All 0. Exit Input menu number: 1 Converting to vmdk: (100.00/100%) Created vmdk disk: sequoia.vmdk Done! Your recoveryOS image is ready. ``` -------------------------------- ### Example VMX Spoofing Output Source: https://github.com/drdonk/oc4vm/wiki/Spoofing-A-Real-Mac This output shows the settings being added to the VMX file to spoof an iMac 2019 model. It includes identifiers like board-id, hw.model, and serialNumber. ```text OC4VM Spoof ----------- Spoofing iMac identifiers... Adding these settings to VMX file: __Apple_Model_Start__ = "iMac 2019" board-id = "Mac-63001698E7A34814" hw.model = "iMac19,2" serialNumber = "C02DR0SFJWDW" efi.nvram.var.MLB = "C020483004NKGQGJC" efi.nvram.var.ROM = "%48%F3%3E%B7%14%C9" __Apple_Model_End__ = "iMac 2019" Running vmxtool to update file... ``` -------------------------------- ### Disable SIP with Custom Value Source: https://github.com/drdonk/oc4vm/wiki/Tahoe-Sound-Support-with-VoodooHDA Execute this command in the OpenCore UEFI shell to set the specific SIP value required for root patching. This value (0xA85) is necessary for VoodooHDA installation. ```shell fs7:\EFI\OC\Tools\CsrUtil.efi disable 0xA85 ``` -------------------------------- ### macOS Boot Arguments Source: https://github.com/drdonk/oc4vm/wiki/Notes Common boot-arg configurations for different macOS environments. ```text [default] keepsyms=1 -lilubetaall -no_compat_check -no_panic_dialog cwad [verbose] keepsyms=1 -lilubetaall -v -no_compat_check -no_panic_dialog -liludbgall cwad [trace] keepsyms=1 -lilubetaall -v -no_compat_check -no_panic_dialog -liludbgall serial=1 debug=2 -topo -cpuid cwad [debug] keepsyms=1 -lilubetaall -v -no_compat_check -no_panic_dialog -liludbgall serial=1 debug=2 -topo -cpuid cwad [kdk] keepsyms=1 -lilubetaall -v -no_compat_check -no_panic_dialog -liludbgall serial=1 debug=2 -topo -cpuid cwad kcsuffix=development ``` -------------------------------- ### Automate VMX Setting with vmxtool (Enable Writeable) Source: https://github.com/drdonk/oc4vm/wiki/Make-Boot-Drive-Writeable Use the vmxtool to set the 'usb_xhci:0.readonly' parameter to 'FALSE', enabling writeable mode for the opencore.iso. Ensure there are no spaces around the equals sign. ```bash vmxtool set usb_xhci:0.readonly="FALSE" ``` -------------------------------- ### Automate VMX Setting with vmxtool (Enable Read-Only) Source: https://github.com/drdonk/oc4vm/wiki/Make-Boot-Drive-Writeable Use the vmxtool to set the 'usb_xhci:0.readonly' parameter back to 'TRUE', reverting the opencore.iso to read-only mode. Ensure there are no spaces around the equals sign. ```bash vmxtool set usb_xhci:0.readonly="TRUE" ``` -------------------------------- ### Recovering Disk Space with diskzero Source: https://github.com/drdonk/oc4vm/wiki/OC4VM-Tools Zeros out free space on the main Data volume as the first step in disk recovery. ```text Usage: diskzero.zsh ``` -------------------------------- ### Check Current SIP Status with CsrUtil Source: https://github.com/drdonk/oc4vm/wiki/Tahoe-Sound-Support-with-AppleHDA Use this command in the OpenCore UEFI shell to verify the current System Integrity Protection (SIP) status. Ensure the VM is booted into the shell and the correct drive mapping (e.g., FS7:) is used. ```shell fs7:\EFI\OC\Tools\CsrUtil.efi status ``` -------------------------------- ### Configure Haswell CPU Emulation in OpenCore Source: https://github.com/drdonk/oc4vm/wiki/Notes Settings for the Kernel->Emulate section in config.plist to map CPUID data to a Haswell processor. ```xml Emulate Cpuid1Data wwYDAAAAAAAAAAAAAAAAAA== Cpuid1Mask ////AAAAAAAAAAAAAAAAAA== DummyPowerManagement MaxKernel MinKernel ``` -------------------------------- ### Build OC4VM Project Source: https://github.com/drdonk/oc4vm/wiki/Building-OC4VM Executes the main build script for OC4VM. This command should be run from the root of the cloned repository. ```bash ./make.sh ``` -------------------------------- ### Mounting OC4VM Guest Tools Source: https://github.com/drdonk/oc4vm/wiki/OC4VM-Tools Paths for accessing the OC4VM boot drive and guest tools within the macOS guest environment. ```text /Volumes/OPENCORE ``` ```text /Volumes/OPENCORE/OC4VM/tools/guest ``` -------------------------------- ### Updating Guest OS with macguest Source: https://github.com/drdonk/oc4vm/wiki/OC4VM-Tools Utility for Linux and Windows to update the guestOS setting in a VMX file. ```bash Usage: macguest.sh [OPTIONS] Options: -f, --file PATH Specify VMX file path (bypasses file selector) -h, --help Show this help message Example: macguest.sh -f ~/VMs/macos.vmx ``` -------------------------------- ### VMX Spoofing Tool Usage Source: https://github.com/drdonk/oc4vm/wiki/Spoofing-A-Real-Mac Use this command-line tool to generate and apply VMX file settings for spoofing a Mac model. Ensure the path to your VMX file is correct. ```bash Usage: spoof.sh/spoof.cmd path_to_vmx_file ``` -------------------------------- ### Checking Guest System Information Source: https://github.com/drdonk/oc4vm/wiki/OC4VM-Tools Displays NVRAM variables and settings for guests spoofed as real Macs. ```text Usage: sysinfo.zsh ``` -------------------------------- ### VMware VMX Commenting and Section Prefixes Source: https://github.com/drdonk/oc4vm/wiki/Notes Techniques for commenting out lines and creating dummy sections in VMX files to prevent automatic reformatting. ```text _smbios.reflectHost = "FALSE" smbios.reflectHost = "FALSE" __Apple_Model__ = "" ``` -------------------------------- ### VMX Settings Before Spoofing Source: https://github.com/drdonk/oc4vm/wiki/Spoofing-A-Real-Mac Displays the default system information from a VMware VM before spoofing. Note the generic model and potentially invalid serial number warnings. ```text Model: VMware20,1 Board ID: 440BX Desktop Reference Platform FW Version: VMW201.00V.24866131.B64.2507211911 Hardware UUID: 977FB2EB-3CE3-5973-9C0A-F63172B36495 Serial Number: VMaXcEADBles WARN: Invalid symbol 'a' in serial! WARN: Invalid symbol 'c' in serial! WARN: Invalid symbol 'l' in serial! WARN: Invalid symbol 'e' in serial! WARN: Invalid symbol 's' in serial! WARN: Invalid week symbol 'c'! WARN: Decoded week -1 is out of valid range [1, 53]! Country: VMa - Unknown, please report! Year: X - 2018 Week: c - -1 Line: EAD - 1305 (copy 12) Model: Bles - Unknown SystemModel: Unknown, please report! Valid: Unlikely System ID: 564DF979-6BC1-2DA9-526F-A4B42E68942C ROM: 564DF9796BC1 MLB: LalSb6S0LmiULA... WARN: Invalid MLB checksum! Gq3489ugfi: E6ABE54622099326A2EC09D7D4C813AA88 Fyp98tpgj: 224869C683CE62A45250D7686EF90A9725 kbjfrfpoJU: 86CD846FF168DE2BCC7887A913DF1DB6B6 oycqAZloTNDm: 7E4C502DDD62FAE3AE8A88C84116C38266 abKPld1EcMni: E359A16C151FBBD57D0113BB6E065EB7D2 Version 2.1.8. Use -h argument to see usage options. ``` -------------------------------- ### Dumping CPUID Data Source: https://github.com/drdonk/oc4vm/wiki/OC4VM-Tools Dumps guest CPUID data for debugging purposes using recommended parameters. ```text Usage: cpuid -d -c0 ``` -------------------------------- ### Reboot System from OpenCore UEFI Shell Source: https://github.com/drdonk/oc4vm/wiki/Tahoe-Sound-Support-with-AppleHDA After making changes in the OpenCore UEFI shell, use this command to reboot the virtual machine back into macOS. This command should be executed after setting the desired SIP value. ```shell reset ``` -------------------------------- ### Update VMX file parameters for OC4VM upgrade Source: https://github.com/drdonk/oc4vm/blob/main/upgrade.md Use these commands to update the VMX configuration file with the new version, revision, and mouse settings after replacing the boot drive files. ```bash set guestinfo.oc4vm.version="3.0.1" set guestinfo.oc4vm.revision="b28843f" set guestinfo.oc4vm.upgraded="TRUE" set tools.upgrade.policy="manual" set __USB_Mouse_Fix__="" set mouse.vusb.enable="TRUE" set mouse.vusb.useBasicMouse="FALSE" set usb.generic.allowHID="TRUE" ``` -------------------------------- ### Recovering Disk Space with diskshrink Source: https://github.com/drdonk/oc4vm/wiki/OC4VM-Tools Instructs VMware to recover zero-filled space as the second step in disk recovery. ```text Usage: diskshrink.zsh ``` -------------------------------- ### Config.plist XML Snippet Source: https://github.com/drdonk/oc4vm/wiki/Notes The resulting XML structure for Cpuid1Data and Cpuid1Mask entries. ```xml Cpuid1Data wwYDAAAAAAAAAAAAAAAAAA== Cpuid1Mask ////AAAAAAAAAAAAAAAAAA== ``` -------------------------------- ### Run recoveryOS to create a VMDK image Source: https://github.com/drdonk/oc4vm/wiki/Before-Installation Executes the recoveryOS program from the OC4VM tools directory to download and convert a macOS recovery image into a VMDK format. Select option 6 for Sequoia and then option 1 for VMDK output. ```bash ./recoveryOS ``` -------------------------------- ### CPUID Emulation Data Conversion Source: https://github.com/drdonk/oc4vm/wiki/Notes Commands to generate and verify Cpuid1Data and Cpuid1Mask base64 strings. ```bash printf "\xC3\x06\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" | xxd 00000000: c306 0300 0000 0000 0000 0000 0000 0000 ................ printf "\xC3\x06\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" | base64 wwYDAAAAAAAAAAAAAAAAAA== printf wwYDAAAAAAAAAAAAAAAAAA== | base64 -D | xxd 00000000: c306 0300 0000 0000 0000 0000 0000 0000 ................ printf "\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" | xxd 00000000: ffff ff00 0000 0000 0000 0000 0000 0000 ................ printf "\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" | base64 ////AAAAAAAAAAAAAAAAAA== printf ////AAAAAAAAAAAAAAAAAA== | base64 -D | xxd 00000000: ffff ff00 0000 0000 0000 0000 0000 0000 ................ ``` -------------------------------- ### Locating Host Tools Source: https://github.com/drdonk/oc4vm/wiki/OC4VM-Tools Path structure for host-side tools used to modify VMware VMX files. ```text /tools/ ``` -------------------------------- ### VMware Virtual USB Device Settings Source: https://github.com/drdonk/oc4vm/wiki/Notes Configuration template for adding virtual USB CD-ROM or disk drives to a VMX file. ```text :#.present = "TRUE" :#.deviceType = "disk" or "cdrom-image :#.fileName = "pathToFile.vmdk" or "pathToFile.iso" :#.readonly = "FALSE" or "TRUE" where is ehci for USB2 or usb_xhci for USB3 where # is a number ranging from 0 to 5 (or 7 if you configure the USB ports in the configuration file). ``` -------------------------------- ### Disable SIP to 0x803 with CsrUtil Source: https://github.com/drdonk/oc4vm/wiki/Tahoe-Sound-Support-with-AppleHDA This command disables System Integrity Protection (SIP) to a specific value (0x803) required for root patching. Execute this in the OpenCore UEFI shell after checking the current status. This value is necessary for modifying system extensions. ```shell fs7:\EFI\OC\Tools\CsrUtil.efi disable 0x803 ``` -------------------------------- ### Encode and Decode Base64 Binary Data Source: https://github.com/drdonk/oc4vm/wiki/Notes Use these shell commands to convert binary strings to base64 for config.plist or to verify existing base64 entries. ```bash printf "\xBA\x00\x00\x00\x00" | xxd -r | base64 ``` ```bash printf AAAf/w== | base64 -D | xxd ``` -------------------------------- ### Change VMX Setting to Enable Writeable Mode Source: https://github.com/drdonk/oc4vm/wiki/Make-Boot-Drive-Writeable Modify the 'usb_xhci:0.readonly' setting in the VMX file from 'TRUE' to 'FALSE' to enable writeable mode for the opencore.iso. ```ini usb_xhci:0.readonly = "TRUE" ``` ```ini usb_xhci:0.readonly = "FALSE" ``` -------------------------------- ### Spoofing Hardware Identity Source: https://github.com/drdonk/oc4vm/wiki/OC4VM-Tools Configures a VMX file to mimic an iMac 2019 using either shell or PowerShell scripts. ```text Usage: spoof.sh or spoof.ps1 path_to_vmx_file ``` -------------------------------- ### VMX Settings After Spoofing Source: https://github.com/drdonk/oc4vm/wiki/Spoofing-A-Real-Mac Shows the system information after applying spoofing settings to the VMX file. The model, serial number, and other identifiers are updated to match a specific Mac model (iMac19,2). ```text Model: iMac19,2 Board ID: Mac-63001698E7A34814 FW Version: VMW201.00V.24866131.B64.2507211911 Hardware UUID: 977FB2EB-3CE3-5973-9C0A-F63172B36495 Serial Number: C02DR0SFJWDW Country: C02 - China (Quanta Computer) Year: D - 2020 Week: R - 48 (25.11.2020-01.12.2020) Line: 0SF - 899 (copy 1) Model: JWDW - iMac19,2 SystemModel: iMac (Retina 4K, 21.5-inch, 2019) Valid: Possibly System ID: 564DF979-6BC1-2DA9-526F-A4B42E68942C ROM: 48F33EB714C9 MLB: C020483004NKGQGJC Gq3489ugfi: F50C5390E57DAB58245455E4096C3F1E60 Fyp98tpgj: 224869C683CE62A45250D7686EF90A9725 kbjfrfpoJU: 86CD846FF168DE2BCC7887A913DF1DB6B6 oycqAZloTNDm: 5A7D716E9D2CAED3710B99ECFAE5E0CE96 abKPld1EcMni: 4E3C7E00D3EB8A9DA58AD21D79E1E806DF Version 2.1.8. Use -h argument to see usage options. ``` -------------------------------- ### Clone OC4VM Repository Source: https://github.com/drdonk/oc4vm/wiki/Building-OC4VM Clones the OC4VM source code repository from GitHub. This is a necessary step before building the project. ```git git clone https://github.com/DrDonk/OC4VM.git ``` -------------------------------- ### VMware CPU Hacks Source: https://github.com/drdonk/oc4vm/wiki/Notes Configuration settings for overcommitting vCPUs and controlling NUMA node sizing. ```text numvcpus.overcommit = "TRUE" numa.autosize.once = "FALSE" ``` -------------------------------- ### Toggling VMM Bit with cloak Source: https://github.com/drdonk/oc4vm/wiki/OC4VM-Tools Toggles the VMM bit to hide or show the virtual machine status to macOS. ```text Usage: cloak.zsh {on|off|status} ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.