### Download and Setup OC4VM Release Source: https://context7.com/drdonk/oc4vm/llms.txt Steps to download, extract, and set up the OC4VM release for a new macOS VM. Ensure qemu-img is installed for recoveryOS conversion. ```bash # 1. Download and extract the OC4VM release wget https://github.com/DrDonk/oc4vm/releases/download/v3.0.0/oc4vm-3.0.0.zip unzip oc4vm-3.0.0.zip cd oc4vm-3.0.0 # 2. Copy the CPU-appropriate template to a new VM folder # Use "Intel" if running on Intel hardware, "AMD" for AMD hardware cp -r vmware/Intel ~/VMs/my-sequoia-vm # 3. Install qemu-img (needed to convert the recoveryOS download) # Linux: sudo apt install -y qemu-utils # macOS: brew install qemu # Windows (Chocolatey): choco install qemu # 4. Navigate to the host tools folder and run recoveryOS to download # the Sequoia recovery image cd tools/linux # or tools/macos / tools/windows ./recoveryOS # Select: 6 (Sequoia) -> Enter, then 1 (VMware VMDK) -> Enter # Output: sequoia.vmdk (ready to attach to VM) # 5. Open ~/VMs/my-sequoia-vm/macos.vmx in VMware # Add sequoia.vmdk as a second SATA hard disk in VM settings # Power on and proceed through the macOS installer # Template folder contents: # opencore.iso - OpenCore boot ISO (USB3 device in VM) # macos.nvram - Pre-configured NVRAM (boot-args, SIP, resolution) # macos.vmx - VMware settings file # macos.vmdk - Pre-formatted empty APFS target disk # macos.plist - VMware Fusion config file ``` -------------------------------- ### 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-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 ``` -------------------------------- ### 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 ``` -------------------------------- ### 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 Emulation Cpuid1Data Example Source: https://github.com/drdonk/oc4vm/wiki/Notes Demonstrates generating the base64 encoded DATA for Cpuid1Data using printf, xxd, and base64 commands. ```bash printf "\xC3\x06\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" | xxd ``` ```bash printf "\xC3\x06\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" | base64 ``` ```bash printf wwYDAAAAAAAAAAAAAAAAAA== | base64 -D | xxd ``` -------------------------------- ### 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" ``` -------------------------------- ### Kernel Emulation Cpuid1Mask Example Source: https://github.com/drdonk/oc4vm/wiki/Notes Demonstrates generating the base64 encoded DATA for Cpuid1Mask using printf, xxd, and base64 commands. ```bash printf "\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" | xxd ``` ```bash printf "\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" | base64 ``` ```bash printf ////AAAAAAAAAAAAAAAAAA== | base64 -D | xxd ``` -------------------------------- ### Build OC4VM from Source Source: https://context7.com/drdonk/oc4vm/llms.txt Clone the repository and run the make.sh script on a macOS host to build OC4VM. Ensure prerequisites like p7zip are installed via Homebrew. ```bash # Prerequisites (macOS host) brew install p7zip # Clone and build git clone https://github.com/DrDonk/OC4VM.git cd OC4VM ./make.sh # Artifacts produced: # build/ — per-variant build directories with opencore.iso and VMware files # dist/ — final release ZIP ready for distribution ``` -------------------------------- ### Kernel Patching DATA Entries Example Source: https://github.com/drdonk/oc4vm/wiki/Notes Examples of Find, Mask, Replace, and ReplaceMask values for kernel patching in config.plist, shown in hex and binary representations. ```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. ``` -------------------------------- ### Install VoodooHDA for Tahoe Sound Support Source: https://context7.com/drdonk/oc4vm/llms.txt This multi-step process installs VoodooHDA for audio support on macOS Tahoe. It involves setting System Integrity Protection (SIP) to a specific value using the OpenCore UEFI shell and then installing the VoodooHDA package within the guest. ```bash # Check current SIP status: fs7:\EFI\OC\Tools\CsrUtil.efi status ``` ```bash # Set the root-patching SIP value: fs7:\EFI\OC\Tools\CsrUtil.efi disable 0xA85 ``` ```bash # Reboot back into macOS: reset ``` -------------------------------- ### 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 ``` -------------------------------- ### Virtualization Cloaking in macOS Guest Source: https://context7.com/drdonk/oc4vm/llms.txt Execute these commands within the macOS guest VM to hide or re-expose the hypervisor (VMM) bit from user-space applications. Note that installers and updaters may still detect the VMM bit. ```bash # Hide the hypervisor (VMM) bit from macOS user-space apps: /Volumes/OPENCORE/OC4VM/tools/guest/cloak.zsh ``` ```bash # Re-expose the VMM bit: /Volumes/OPENCORE/OC4VM/tools/guest/uncloak.zsh ``` -------------------------------- ### Toggle VMM Bit with cloak/uncloak Source: https://github.com/drdonk/oc4vm/wiki/OC4VM-Tools Use this tool to toggle macOS's ability to see the VMM bit. When cloaked, macOS believes it's running on a real Mac, which is useful for system processes like installers and updaters. ```shell Usage: (un)cloak.zsh ``` -------------------------------- ### Spoof Real Mac Model Identifiers in VMX File Source: https://context7.com/drdonk/oc4vm/llms.txt The spoof tool injects hardware identifiers into the VMX file to make the VM appear as a genuine iMac 2019 (iMac19,2) to macOS. This is crucial for compatibility and avoiding installer issues. Use the appropriate script for your host OS. ```bash # Linux / macOS host ./tools/linux/spoof.sh ~/VMs/my-sequoia-vm/macos.vmx # or ./tools/macos/spoof.sh ~/VMs/my-sequoia-vm/macos.vmx # Windows host (PowerShell) .\tools\windows\spoof.ps1 "C:\VMs\my-sequoia-vm\macos.vmx" # Example output: # 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" # CAUTION: Avoid T1/T2 Mac models — macOS installer attempts firmware updates # and will fail. Safe choice: iMac19,1 or iMac19,2 (iMac 2019) # After spoofing, verify inside the guest with: # /Volumes/OPENCORE/OC4VM/tools/guest/sysinfo.zsh ``` -------------------------------- ### Run diskzero Tool Source: https://github.com/drdonk/oc4vm/wiki/OC4VM-Tools Use this command to zero out all free space on the main Data volume for disk space recovery. This is the first step in the disk recovery process. ```shell Usage: diskzero.zsh ``` -------------------------------- ### 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" ``` -------------------------------- ### Recommended CPU Layout for VMs Source: https://context7.com/drdonk/oc4vm/llms.txt Follow these guidelines for CPU core and socket configurations to ensure VM stability, especially for macOS. Always use multiples of 2 for sockets and avoid odd core counts. ```bash # Recommended CPU layout — always use multiples of 2 for sockets: # 4 cores -> numvcpus=4, cpuid.coresPerSocket=2 (2 sockets x 2 cores) # 8 cores -> numvcpus=8, cpuid.coresPerSocket=4 (2 sockets x 4 cores) # WARNING: 1 CPU / 3 cores will NOT boot macOS — use even core counts only ``` -------------------------------- ### Run diskshrink Tool Source: https://github.com/drdonk/oc4vm/wiki/OC4VM-Tools Execute this command after diskzero to instruct VMware to recover the zero-filled space, completing the disk space recovery process. ```shell Usage: diskshrink.zsh ``` -------------------------------- ### 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" ``` -------------------------------- ### macOS Boot Arguments (Shell) Source: https://github.com/drdonk/oc4vm/wiki/Notes Provides various sets of boot arguments for macOS, including default, verbose, trace, debug, and KDK configurations. These arguments control logging, debugging, and compatibility checks during boot. ```shell [default] keepsyms=1 -lilubetaall -no_compat_check -no_panic_dialog cwad ``` ```shell [verbose] keepsyms=1 -lilubetaall -v -no_compat_check -no_panic_dialog -liludbgall cwad ``` ```shell [trace] keepsyms=1 -lilubetaall -v -no_compat_check -no_panic_dialog -liludbgall serial=1 debug=2 -topo -cpuid cwad ``` ```shell [debug] keepsyms=1 -lilubetaall -v -no_compat_check -no_panic_dialog -liludbgall serial=1 debug=2 -topo -cpuid cwad ``` ```shell [kdk] keepsyms=1 -lilubetaall -v -no_compat_check -no_panic_dialog -liludbgall serial=1 debug=2 -topo -cpuid cwad kcsuffix=development ``` -------------------------------- ### Make Boot Drive Writable via VMX Edit Source: https://context7.com/drdonk/oc4vm/llms.txt Modify the `usb_xhci:0.readonly` setting in the VM's `.vmx` file from `TRUE` to `FALSE` to allow direct modification of the OpenCore boot drive from within the guest OS. Remember to revert the change after use. ```bash # Option A — manual VMX edit (VM must be shut down first) # Open macos.vmx in a text editor and change: # usb_xhci:0.readonly = "TRUE" to: # usb_xhci:0.readonly = "FALSE" # Save, boot the VM, modify /Volumes/OPENCORE contents, then revert ``` -------------------------------- ### 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 ``` -------------------------------- ### 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 ``` -------------------------------- ### Configure VM USB device with vmxtool Source: https://context7.com/drdonk/oc4vm/llms.txt Use `vmxtool` to programmatically set VM properties, such as making a USB device read-only. This is useful for scripting and CI/CD pipelines. ```bash vmxtool set ~/VMs/my-sequoia-vm/macos.vmx usb_xhci:0.readonly="FALSE" ``` ```bash vmxtool set ~/VMs/my-sequoia-vm/macos.vmx usb_xhci:0.readonly="TRUE" ``` -------------------------------- ### Check Hardware Identifiers with sysinfo Source: https://context7.com/drdonk/oc4vm/llms.txt Run this script within the macOS guest VM to verify all hardware identifiers that have been set by the spoofing tool. This is useful for ensuring correct system information is reported. ```bash # Check all hardware identifiers set by the spoof tool: /Volumes/OPENCORE/OC4VM/tools/guest/sysinfo.zsh ``` -------------------------------- ### Define Dummy VMX Sections Source: https://github.com/drdonk/oc4vm/wiki/Notes Use double underscores as a prefix and suffix to define dummy sections in the VMX file, which VMware interprets as valid but does not use. ```vmx __Apple_Model__ = "" ``` -------------------------------- ### 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 ``` -------------------------------- ### OC4VM Build Configuration (oc4vm.toml) Source: https://context7.com/drdonk/oc4vm/llms.txt Defines build variants for OpenCore ISO generation. Configure boot arguments, SIP settings, debug options, and resolution for different macOS versions and host types. ```toml # oc4vm.toml — configure build variants for Intel and AMD [intel] BUILD = '1' # Include this target in make.sh output AMD = '0' # Intel host path BOOTARGS = 'keepsyms=1 -lilubetaall -no_compat_check -no_panic_dialog cwad' CSRCONFIG = 'AAAAAA==' # base64-encoded SIP CSR value (0x000000 = SIP enabled) DEBUG = '0' # Use release OpenCore binary DESCRIPTION = 'macOS Intel Release OC' DMG = 'release' # release | debug RESOLUTION = '1440x900@32' # WxH@Bpp or Max TIMEOUT = '5' # Seconds before auto-boot (0 = disable picker) [intel-verbose] BUILD = '1' AMD = '0' BOOTARGS = 'keepsyms=1 -lilubetaall -v -no_compat_check -no_panic_dialog -liludbgall cwad' CSRCONFIG = 'AAAAAA==' DEBUG = '0' DESCRIPTION = 'macOS Intel Verbose OC' DMG = 'release' RESOLUTION = '1440x900@32' TIMEOUT = '5' [amd] BUILD = '1' AMD = '1' # AMD host path — enables AMD_Vanilla kernel patches BOOTARGS = 'keepsyms=1 -lilubetaall -no_compat_check -no_panic_dialog cwad' CSRCONFIG = 'AAAAAA==' DEBUG = '0' DESCRIPTION = 'macOS AMD Release OC' DMG = 'release' RESOLUTION = '1440x900@32' TIMEOUT = '5' [amd-debug] BUILD = '1' AMD = '1' BOOTARGS = 'keepsyms=1 -lilubetaall -v -no_compat_check -no_panic_dialog -liludbgall serial=1 debug=2 -topo -cpuid cwad' CSRCONFIG = 'AAAAAA==' DEBUG = '1' # Use debug OpenCore binary DESCRIPTION = 'macOS AMD Debug OC' DMG = 'debug' RESOLUTION = '1440x900@32' TIMEOUT = '0' # 0 disables auto-boot, stays at picker ``` -------------------------------- ### Dump Guest CPUID Data Source: https://github.com/drdonk/oc4vm/wiki/OC4VM-Tools This program dumps the guest's CPUID data for debugging specific guest issues. The recommended options are -d and -c0. ```shell Usage: cpuid -d -c0 ``` -------------------------------- ### Reclaim Unused Disk Space in macOS Guest Source: https://context7.com/drdonk/oc4vm/llms.txt Run these two commands sequentially inside the macOS guest VM to zero out free space and then instruct VMware to reclaim it, shrinking the VMDK file. Ensure the OC4VM tools are accessible at the specified path. ```bash # Step 1: Zero out all free space on the Data volume /Volumes/OPENCORE/OC4VM/tools/guest/diskzero.zsh ``` ```bash # Step 2: Instruct VMware to reclaim the zeroed space (shrinks .vmdk file) /Volumes/OPENCORE/OC4VM/tools/guest/diskshrink.zsh ``` -------------------------------- ### 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. ``` -------------------------------- ### 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 ``` -------------------------------- ### Dump Guest CPUID Data Source: https://context7.com/drdonk/oc4vm/llms.txt Use this command inside the macOS guest VM to dump CPUID data, which is helpful for diagnosing emulation issues on AMD processors. The `-d -c0` flags specify the desired output. ```bash # Dump guest CPUID data (useful for diagnosing AMD emulation issues): /Volumes/OPENCORE/OC4VM/tools/guest/cpuid -d -c0 ``` -------------------------------- ### Encode Binary Data to Base64 for config.plist Source: https://context7.com/drdonk/oc4vm/llms.txt Use printf and base64 to encode binary data into Base64 strings, which are then used in the config.plist for kernel patches like Cpuid1Data. Decode to verify the output. ```bash # Encode binary to base64 (e.g. Cpuid1Data for Haswell emulation): printf "\xC3\x06\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" | base64 # Output: wwYDAAAAAAAAAAAAAAAAAA== # Decode to verify: printf "wwYDAAAAAAAAAAAAAAAAAA==" | base64 -D | xxd # Output: 00000000: c306 0300 0000 0000 0000 0000 0000 0000 ................ ``` -------------------------------- ### Display Guest System Information Source: https://github.com/drdonk/oc4vm/wiki/OC4VM-Tools Use this tool to check the details of a spoofed real Mac, including settings and NVRAM variables like serial number, ROM, and MLB. ```shell Usage: sysinfo.zsh ``` -------------------------------- ### Enable CPU Overcommit in VMX Source: https://context7.com/drdonk/oc4vm/llms.txt Use this command to enable CPU overcommit for a VM, allowing more virtual CPUs than physical cores. Ensure correct syntax for the VMX file path. ```bash vmxtool set ~/VMs/my-sequoia-vm/macos.vmx numvcpus.overcommit="TRUE" ``` -------------------------------- ### Config.plist DATA Entries for Emulation Source: https://github.com/drdonk/oc4vm/wiki/Notes Shows the final XML structure for Cpuid1Data and Cpuid1Mask DATA entries to be added to the config.plist. ```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 ``` -------------------------------- ### Configure Kernel Emulation for AMD Hosts Source: https://context7.com/drdonk/oc4vm/llms.txt This XML configuration snippet for `config.plist` is used on AMD hosts to emulate a Haswell Intel CPUID for macOS. It includes settings for `Cpuid1Data`, `Cpuid1Mask`, and `DummyPowerManagement`. ```xml Emulate Cpuid1Data wwYDAAAAAAAAAAAAAAAAAA== Cpuid1Mask ////AAAAAAAAAAAAAAAAAA== DummyPowerManagement MaxKernel MinKernel ``` -------------------------------- ### Set macOS Guest Type in VMware VMX File Source: https://context7.com/drdonk/oc4vm/llms.txt Use macguest to write the correct 'guestOS' string into a VMX file when using VMware Workstation on Linux or Windows, as the UI does not expose this option. The script can be run non-interactively with the VMX file path. ```bash # Linux — run from tools/linux/ ./macguest.sh -f ~/VMs/my-sequoia-vm/macos.vmx # Or launch the interactive file selector: ./macguest.sh # Windows — run macguest.exe and browse to the VMX file via the GUI # macOS Guest OS strings written to VMX (reference table): # macOS 11 Big Sur -> guestOS = "darwin20-64" # macOS 12 Monterey -> guestOS = "darwin21-64" # macOS 13 Ventura -> guestOS = "darwin22-64" # macOS 14 Sonoma -> guestOS = "darwin23-64" # macOS 15 Sequoia -> guestOS = "darwin24-64" # macOS 26 Tahoe -> guestOS = "darwin25-64" ``` -------------------------------- ### Configure Emulated CPU for AMD Processors (XML) Source: https://github.com/drdonk/oc4vm/wiki/Notes This XML configuration snippet is used within OpenCore's config.plist to emulate a Haswell CPU for AMD processors. It sets Cpuid1Data and Cpuid1Mask to ensure VMware correctly passes through core and thread counts. ```xml Emulate Cpuid1Data wwYDAAAAAAAAAAAAAAAAAA== Cpuid1Mask ////AAAAAAAAAAAAAAAAAA== DummyPowerManagement MaxKernel MinKernel ``` -------------------------------- ### Automate VMX File Edits with vmxtool Source: https://context7.com/drdonk/oc4vm/llms.txt Use vmxtool to programmatically read and write key-value pairs in VMware VMX files. This is useful for scripting VM configurations, such as making the opencore.iso boot disk writable or fixing specific VMware Workstation crashes. ```bash # Make the opencore.iso boot disk writable (needed to modify OC config): vmxtool set ~/VMs/my-sequoia-vm/macos.vmx usb_xhci:0.readonly="FALSE" # Restore it to read-only (recommended after changes): vmxtool set ~/VMs/my-sequoia-vm/macos.vmx usb_xhci:0.readonly="TRUE" # Fix VMware Workstation 25H2 crash ("Third party host clock rate already set"): vmxtool set ~/VMs/my-sequoia-vm/macos.vmx mks.enableVulkanPresentation="FALSE" ``` -------------------------------- ### Force NUMA Node Sizing in VMX Source: https://github.com/drdonk/oc4vm/wiki/Notes Set 'numa.autosize.once' to 'FALSE' in the VMX file to force NUMA node sizing at each boot, rather than just once. ```vmx numa.autosize.once = "FALSE" ``` -------------------------------- ### 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 ``` -------------------------------- ### Download and Convert macOS Recovery Images Source: https://context7.com/drdonk/oc4vm/llms.txt The recoveryOS tool downloads official macOS recovery images and converts them to VMDK format. Run it from the appropriate host OS tools folder and follow the interactive prompts. ```bash # Run from the appropriate host OS tools folder cd tools/linux # or tools/macos / tools/windows ./recoveryOS # Interactive session example — downloading Sequoia: # OC4VM recoveryOS Image Maker # ============================ # 1. Catalina 2. Big Sur 3. Monterey 4. Ventura # 5. Sonoma 6. Sequoia 7. Tahoe 0. Exit # Input menu number: 6 # # Downloading 093-10615... # 847.4/847.4 MB |==========================| 100.0% downloaded # 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 # Created vmdk disk: sequoia.vmdk # Result files in the tools folder: # sequoia.chunklist — integrity manifest (can be deleted after verification) # sequoia.dmg — raw Apple DMG (can be deleted after conversion) # sequoia.vmdk — attach this to the VM as a second SATA hard disk ``` -------------------------------- ### Encode Binary to Base64 Source: https://github.com/drdonk/oc4vm/wiki/Notes Use this command to encode binary data into a base64 string, often required for DATA entries in config.plist. ```bash printf "\xBA\x00\x00\x00\x00" | xxd -r | base64 ``` -------------------------------- ### Decode Base64 to Binary Source: https://github.com/drdonk/oc4vm/wiki/Notes Use this command to decode a base64 encoded string back into its binary representation, useful for inspecting DATA entries. ```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" ``` -------------------------------- ### Configure Virtual USB CD-ROM/Drive in VMX Source: https://github.com/drdonk/oc4vm/wiki/Notes Add virtual USB CD-ROM or disk drives by manually editing the VMX file. Ensure correct device type and file paths are specified. The 'ehci' prefix is for USB2 and 'usb_xhci' for USB3. ```vmx :#.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). ``` -------------------------------- ### Spoof Real Mac Hardware Details Source: https://github.com/drdonk/oc4vm/wiki/OC4VM-Tools This tool allows the guest to mimic an iMac 2019 (iMac19,2) by modifying the VMX file. It is available as a shell script for Linux/macOS and a PowerShell script for Windows. ```shell Usage: spoof.sh or spoof.ps1 path_to_vmx_file ``` -------------------------------- ### Enable CPU Overcommit in VMX Source: https://github.com/drdonk/oc4vm/wiki/Notes Set 'numvcpus.overcommit' to 'TRUE' in the VMX file to allow assigning more virtual CPU cores than the host system physically supports. ```vmx numvcpus.overcommit = "TRUE" ``` -------------------------------- ### 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 ``` -------------------------------- ### Modify VMX File for macOS Guest Type (Linux) Source: https://github.com/drdonk/oc4vm/wiki/OC4VM-Tools This shell script updates the guestOS setting in a VMX file to select the macOS version. It can be run with a specified VMX file path or by selecting a file from a menu. ```shell 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 ```