Moderators tomnic Posted November 13, 2023 Moderators Share Posted November 13, 2023 Virtualization on AMD based Hackintosh on Sonoma real hardware... possible! The key program is Virtualbox 6.1.46 or its minor latest updates + related USB 3 extensions, where the code to support AMD-V/SVM are still present. VirtualBox 7 is not ok because it only works with VT-X/VT-D owned only by Intel CPUs now, nobody created a wrapper yet. But how can we get Virtualbox running on recent macOS? The prerequisite is to disable SIP and use the AMFIpass.kext with the bootflag -amfipassbeta in order to allow VirtualBox kexts to be loaded once installed, nothing more. In fact, once rebooted and allowed the kexts to run in Security section you can even disable the loading of AMFIpass.kext and remove the related bootflag, by now the kexts have bypassed the blacklist, forever! After that you can also install Windows 11 as a VM, direct without any issue, and the performance is also great if you don't overdo the number of cores (my maximum is 2 then it starts to slow down)!!! Me and @fabiosun have also experimented with various macOS: all of them work with the original ISO/DMGs starting from Tiger Server to Monterey... probably Ventura and Sonoma need an updated bootloader than the internal EFI one (which I'd like to understand what it is because it even performs better than clover and OC imho). Let's go through all the attempts made with the various macOS, as there is often a need for CPU spoofing since we have an AMD based host. For all Apple VMs the GPU will be emulated in EFI and should be set with 128Mb or where possible 256Mb RAM. Starting from Mojave till Monterey use the Mac OS X 64 bit template. Don't give more than 2 virtual CPUs to the VM or it will slow down. Set in Ports, USB -> USB 3.0 Controller (xHCI), hence the need to have VBox extensions installed. Set everything as per the screenshots where I do not specify anything else. With Tiger, I was only able to start the installation via Tiger Server 10.4.7 since the previous stock kernels do not work even with spoof. If we create the virtual machine with the name Tigro, the following commands are needed to start the installation, after selecting Mac OS X and Mac OS X 32 bit as Guest OS. Also set ICH6 as the controller for the disks, IDE. It is mandatory to choose only one CPU as processor otherwise we will have a panic: tomnic@MacProAMD ~ % /Applications/VirtualBox.app/Contents/MacOS/VBoxManage setextradata Tigro VBoxInternal/Devices/efi/0/Config/DmiBIOSVersion EFI32..Virtual.Box tomnic@MacProAMD ~ % /Applications/VirtualBox.app/Contents/MacOS/VBoxManage setextradata Tigro VBoxInternal/Devices/efi/0/Config/DmiSystemProduct "MacBookPro3,1" tomnic@MacProAMD ~ % /Applications/VirtualBox.app/Contents/MacOS/VBoxManage setextradata Tigro "VBoxInternal/Devices/efi/0/Config/DmiBoardProduct" "Mac-2BD1B31983FE1663" tomnic@MacProAMD ~ % /Applications/VirtualBox.app/Contents/MacOS/VBoxManage setextradata Tigro VBoxInternal/Devices/efi/0/Config/DmiUseHostInfo 0 tomnic@MacProAMD ~ % /Applications/VirtualBox.app/Contents/MacOS/VBoxManage modifyvm Tigro --cpu-profile 'Intel Pentium 4 3.00GHz' tomnic@MacProAMD ~ % /Applications/VirtualBox.app/Contents/MacOS/VBoxManage modifyvm Tigro --cpuidset 00000000 00000004 756e6547 6c65746e 49656e69 tomnic@MacProAMD ~ % /Applications/VirtualBox.app/Contents/MacOS/VBoxManage modifyvm Tigro --cpuidset 00000001 00000f43 00020800 fbffffff ffffffff tomnic@MacProAMD ~ % /Applications/VirtualBox.app/Contents/MacOS/VBoxManage modifyvm Tigro --cpuidset 80000001 00000000 00000000 ffffffff ffffffff tomnic@MacProAMD ~ % /Applications/VirtualBox.app/Contents/MacOS/VBoxManage setextradata Tigro VBoxInternal/Devices/smc/0/Config/DeviceKey "ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" tomnic@MacProAMD ~ % /Applications/VirtualBox.app/Contents/MacOS/VBoxManage setextradata Tigro VBoxInternal/Devices/smc/0/Config/GetKeyFromRealSMC 1 tomnic@MacProAMD ~ % /Applications/VirtualBox.app/Contents/MacOS/VBoxManage setextradata Tigro VBoxInternal2/EfiGraphicsResolution 1280x800 The startup speed is impressive! Here it is as I am upgrading the operating system to 10.4.11: For Snow Leopard select Mac OS X and Mac OS X 64-bit Snow Leopard, always one CPU. I used a retail installation DVD version 10.6.7 in ISO format. Startup always lightning fast! These are the commands by calling Snow the VM: tomnic@MacProAMD ~ % /Applications/VirtualBox.app/Contents/MacOS/VBoxManage modifyvm Snow --cpu-profile "Intel Xeon X5482 3.20GHz" tomnic@MacProAMD ~ % /Applications/VirtualBox.app/Contents/MacOS/VBoxManage modifyvm Snow --cpuidset 00000000 00000004 756e6547 6c65746e 49656e69 tomnic@MacProAMD ~ % /Applications/VirtualBox.app/Contents/MacOS/VBoxManage modifyvm Snow --cpuidset 00000001 00000f43 00020800 fbffffff ffffffff tomnic@MacProAMD ~ % /Applications/VirtualBox.app/Contents/MacOS/VBoxManage modifyvm Snow --cpuidset 80000001 00000000 00000000 ffffffff ffffffff tomnic@MacProAMD ~ % /Applications/VirtualBox.app/Contents/MacOS/VBoxManage setextradata Snow VBoxInternal2/EfiGraphicsResolution 1280x800 @fabiosun reports to me that the lines with cpuid definitions are redundant. You can omit them! For El Capitan always create a virtual machine by choosing Mac OS X 64 bit El Capitan from the templates, only strings to enter by hand, assuming you have named it ElCap: tomnic@MacProAMD ~ % /Applications/VirtualBox.app/Contents/MacOS/VBoxManage modifyvm ElCap --cpu-profile "Intel Xeon X5482 3.20GHz" tomnic@MacProAMD ~ % /Applications/VirtualBox.app/Contents/MacOS/VBoxManage setextradata ElCap VBoxInternal2/EfiGraphicsResolution 1280x800 To create the iso I used the script https://gist.github.com/coolaj86/8c36d132250163011c83bad8284975ee. Place script and downloadable file directly from Apple InstallMacOSX.dmg in your home, give chmod +x to the script and run it. You will always get the el-capitan.iso file in your home ready for installation. Note that you can also use 2 CPUs this time, increasing the number as well as slowing down the boot may generate panic so watch out. For other versions of Mac OS X we will have to create the bootable media suitable for VBox ourselves. For Mavericks after downloading from the App Store and copying Install Mac OS Mavericks to the Applications folder we need to create a temporary 8 Gb blank volume using disk utility, File, New Image, Blank Image: The command to create the bootable media is: sudo /Applications/Install\ OS\ X\ Mavericks.app/Contents/Resources/createinstallmedia --volume /Volumes/Mavericks --applicationpath /Applications/Install\ OS\ X\ Mavericks.app --nointeraction We must then convert it to a disk image for VBox because an ISO would return an error since the Mavericks installation app must reside on a medium where it can also be written to: /Applications/VirtualBox.app/Contents/MacOS/VBoxManage convertdd ~/Desktop/Mavericks.dmg ~/Desktop/Mavericks.vdi Now the commands to be able to run the VM, named Mav, are: /Applications/VirtualBox.app/Contents/MacOS/VBoxManage modifyvm Mav --cpu-profile "Intel Xeon X5482 3.20GHz" /Applications/VirtualBox.app/Contents/MacOS/VBoxManage setextradata Mav VBoxInternal2/EfiGraphicsResolution 1280x800 Create a Mac OS X 64 bit Mavericks VM, you can also use 2 CPUs, add among the storage devices a Hard Disk and give it the Mavericks.vdi image. Bring in Hard Disk as the first boot device. Inside the VM, before partitioning the virtual disk where you will install Mavericks, open Terminal and type: date 0202020216 Proceed slowly with partitioning and you will have Mavericks installed. For Yosemite proceed similarly, mutatis mutandis. The command for the date is: date 1020170014 From Catalina on up an empty 16384 MB image must be created in disk utility. To get the Installers from High Sierra and up use our blazoned Runme_downloaderV4 which I attach. The commands to create the bootable and writable installation media are respectively: sudo /Applications/Install\ macOS\ High\ Sierra.app/Contents/Resources/createinstallmedia --volume /Volumes/HighSierra sudo /Applications/Install\ macOS\ Mojave.app/Contents/Resources/createinstallmedia --volume /Volumes/Mojave sudo /Applications/Install\ macOS\ Catalina.app/Contents/Resources/createinstallmedia --volume /Volumes/Catalina sudo /Applications/Install\ macOS\ Big\ Sur.app/Contents/Resources/createinstallmedia --volume /Volumes/BigSur sudo /Applications/Install\ macOS\ Monterey.app/Contents/Resources/createinstallmedia --volume /Volumes/Monterey ...and to generate the bootable vdi disk: /Applications/VirtualBox.app/Contents/MacOS/VBoxManage convertdd ~/Desktop/HighSierra.dmg ~/Desktop/HighSierra.vdi /Applications/VirtualBox.app/Contents/MacOS/VBoxManage convertdd ~/Desktop/Mojave.dmg ~/Desktop/Mojave.vdi /Applications/VirtualBox.app/Contents/MacOS/VBoxManage convertdd ~/Desktop/Catalina.dmg ~/Desktop/Catalina.vdi /Applications/VirtualBox.app/Contents/MacOS/VBoxManage convertdd ~/Desktop/BigSur.dmg ~/Desktop/BigSur.vdi /Applications/VirtualBox.app/Contents/MacOS/VBoxManage convertdd ~/Desktop/Monterey.dmg ~/Desktop/Monterey.vdi In particular, to allow, for example, the installation of Big Sur, assuming you have called the VM Mac, the commands to be given are: /Applications/VirtualBox.app/Contents/macOS/VBoxManage modifyvm mac --cpuidset 00000001 000106e5 00100800 0098e3fd bfebfbff /Applications/VirtualBox.app/Contents/macOS/VBoxManage modifyvm mac --cpu-profile "Intel Core i7-6700K" /Applications/VirtualBox.app/Contents/macOS/VBoxManage setextradata mac "VBoxInternal/Devices/efi/0/Config/DmiSystemProduct" "iMac19,1" /Applications/VirtualBox.app/Contents/macOS/VBoxManage setextradata mac "VBoxInternal/Devices/efi/0/Config/DmiSystemVersion" "1.0" /Applications/VirtualBox.app/Contents/macOS/VBoxManage setextradata mac "VBoxInternal/Devices/smc/0/Config/DeviceKey" "ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" /Applications/VirtualBox.app/Contents/macOS/VBoxManage setextradata mac "VBoxInternal/Devices/smc/0/Config/GetKeyFromRealSMC" 1 /Applications/VirtualBox.app/Contents/macOS/VBoxManage setextradata mac “VBoxInternal2/EfiGraphicsResolution 1280x800 /Applications/VirtualBox.app/Contents/macOS/VBoxManage setextradata mac "VBoxInternal/TM/TSCMode" "RealTSCOffset" /Applications/VirtualBox.app/Contents/macOS/VBoxManage setextradata mac "VBoxInternal/Devices/efi/0/Config/DmiBoardProduct" "Mac-AA95B1DDAB278B95" The installation of Ventura and Sonoma is under consideration... for now they crash during the second pass of Sealing... I will try loading a generic OpenCore. Stay tuned! RunMe_DownloaderV4.zip 1 1 Link to comment Share on other sites More sharing options...
pcmaclover Posted March 22 Share Posted March 22 I am trying to run Sonoma in a VM using VirualBox on Ryzen 3700 PC Build. Once I added the --cpu-profile line, I was able to start the OS install process, however kernel panic happened. Link to comment Share on other sites More sharing options...
Driftwood Posted March 28 Share Posted March 28 (edited) On 11/13/2023 at 11:06 AM, tomnic said: But how can we get Virtualbox running on recent macOS? The prerequisite is to disable SIP and use the AMFIpass.kext with the bootflag -amfipassbeta in order to allow VirtualBox kexts to be loaded once installed, nothing more. In fact, once rebooted and allowed the kexts to run in Security section you can even disable the loading of AMFIpass.kext and remove the related bootflag, by now the kexts have bypassed the blacklist, forever! After that you can also install Windows 11 as a VM, direct without any issue, and the performance is also great if you don't overdo the number of cores (my maximum is 2 then it starts to slow down)!!! Hi Tomnic, Nice guide. Ive tried this with 6.1.50 and everything working installing Win 10 guest into the Box Host on Sonoma(in the process installing Win 32bit apps I needed etc...) but on reboot and resetting NVRAM SIP to 0000000 & removing the AMFIPass kext in config.plist its back to the kernel error cant load. Any info on this? BTW I used AMFIPass v1.40 and didn't require the bootflag -amfipassbeta METHODOLOGY 1. In config.plist (see image) inside your boot EFI, Add the numbers csr-active-config = 03080000 (see image) into the NVRAM section of config.plist (to workaround security & Privacy Oracle Box kext sign problems with this partial SIP disable). 2. Add AMFIPass.kext details (see image) into kernel section of config.plist. Save config.plist back to the EFI /OC folder. 3. Download version 1.40 of AMFIPass.kext and copy it over onto your EFI drive's Kext folder. 4. Ensure you can reset NVRAM in Opencore when rebooting 5. Reboot, and hit space, number to reset your NVRAM. 6. Now it should boot with your SIP disabled and use AMFIpass to allow the box kernel thru. 7. Download & install Vbox v.6.1.48 or 6.1.50 8. During the installation process it should ask you to sign / allow the Oracle Virtual Box / ALLOW it inside your 'System Settings' Security & privacy section. 9. After install and the kernel of box has been signed it will ask to reboot. Go ahead and reboot. 10. After reboot, locate and download/install Oracle_VM_VirtualBox_Extension_Pack-6.1.50.vbox-extpack (if using ver 6.1.50) 11. Now grab a ISO from Microsoft and install your guest OS - in my case it was Windows 10 32 bit iso 12. Go thru the motions of installing the guest OS like you normally would. 13. Locate and download VBoxGuestAdditions_6.1.50.iso or VBoxGuestAdditions_6.1.48.iso and install them from a guest ISO storage drive.This will provide a number of addition hardware features and functionality. 14. Finally, fine tune your guest OS for display USB pointing devices etc... 15. If you get problems running virtual box - quit Vbox completely (stop any guest VMs running first if you can) and then rerun it by running it from within Applications folder and not as an alias as sometimes aliases get corrupted or lose sight of the software. 16 I tried then resetting SIP to Enabled and disabling AMFIPass kext inside config plist Kernel section, reboot, resetting NVRAM and booting up to Sonoma but the Kernel errors reappeared and I found they were no longer 'Allowed' by the OS. Subsequently, virtual box guest VM's failed to start. 😞 17. So went back to partially Disabling SIP (csr-active-config = 03080000) but didn't require AMFIPass to ON now that Ive installed vBox. More on this soon... useful links: Virtual Box Old Builds: https://www.virtualbox.org/wiki/Download_Old_Builds_6_1 and https://download.virtualbox.org/virtualbox/6.1.50/ to find the Guest Additions etc... AMFIPass kext: https://community.macmeup.com/index.php?/files/category/3-kexts/. or payloads/Kexts/Acidanthera/AMFIPass-v1.4.0-RELEASE.zip Edited March 29 by Driftwood forgot a few points 1 Link to comment Share on other sites More sharing options...
Moderators tomnic Posted March 28 Author Moderators Share Posted March 28 On 3/22/2024 at 3:14 PM, pcmaclover said: I am trying to run Sonoma in a VM using VirualBox on Ryzen 3700 PC Build. Once I added the --cpu-profile line, I was able to start the OS install process, however kernel panic happened. As I've specified in the bottom of the thread Ventura and Sonoma are not supported as guest os right now, I'm investigating and probably the issue is that AVX2 CPU extensions are required for these two latest releases of macOS and they are not passed to the VM. Probably with a custom OC EFI and CryptexFixup.kext it could work but I need to test it. 1 Link to comment Share on other sites More sharing options...
Moderators tomnic Posted March 28 Author Moderators Share Posted March 28 52 minutes ago, Driftwood said: Hi Tomnic, Nice guide. Ive tried this with 6.1.50 and everything working installing Win 10 guest into the Box Host on Sonoma(in the process installing Win 32bit apps I needed etc...) but on reboot and resetting NVRAM SIP to 0000000 & removing the AMFIPass kext in config.plist its back to the kernel error cant load. Any info on this? BTW I used AMFIPass v1.40 and didn't require the bootflag -amfipassbeta Thanks for your appreciation on my guide, probably resetting the nvram parameters recreates the kext blacklist, I'm on 6.1.48 right now and I'll try with 6.1.50. Yes the new AMFIPass doesn't require the specific bootflag, I'll update the guide. 1 Link to comment Share on other sites More sharing options...
Driftwood Posted March 28 Share Posted March 28 3 hours ago, tomnic said: Thanks for your appreciation on my guide, probably resetting the nvram parameters recreates the kext blacklist, I'm on 6.1.48 right now and I'll try with 6.1.50. Yes the new AMFIPass doesn't require the specific bootflag, I'll update the guide. @tomnic Ive updated the above to see if you spot any additions I need! Link to comment Share on other sites More sharing options...
Driftwood Posted March 28 Share Posted March 28 For Win 10 32-bit SYSTEM setup I'm finding this seems to work best / quickest. 1 Link to comment Share on other sites More sharing options...
Moderators tomnic Posted March 28 Author Moderators Share Posted March 28 You can also Install Windows 98 + softGPU and have a nice 3d accelerated vintage Win98 machine! I'll post a tutorial shortly 2 Link to comment Share on other sites More sharing options...
Driftwood Posted March 29 Share Posted March 29 (edited) @tomnic As I'm currently using Sonoma 14.2 (23C64) apparently there was a cursor / pointing device bug with this version of the OS from what I was reading somewhere and I think its not been helping the vbox guests with sluggish 'forgetful' performance. Whats the latest version of Sonoma (14.4.1) been like with pointer control in VBox guests? Edited March 29 by Driftwood Link to comment Share on other sites More sharing options...
Driftwood Posted March 31 Share Posted March 31 https://audiosex.pro/threads/sip-enabled-for-steinberg-and-v-r-stuff.74681/ Wondering if these SIP workaround techniques could be used for VBox ? Link to comment Share on other sites More sharing options...
Xsario Posted April 8 Share Posted April 8 On 3/28/2024 at 2:38 PM, Driftwood said: METHODOLOGY 1. In config.plist (see image) inside your boot EFI, Add the numbers csr-active-config = 03080000 (see image) into the NVRAM section of config.plist (to workaround security & Privacy Oracle Box kext sign problems with this partial SIP disable). 2. Add AMFIPass.kext details (see image) into kernel section of config.plist. Save config.plist back to the EFI /OC folder. 3. Download version 1.40 of AMFIPass.kext and copy it over onto your EFI drive's Kext folder. 4. Ensure you can reset NVRAM in Opencore when rebooting 5. Reboot, and hit space, number to reset your NVRAM. 6. Now it should boot with your SIP disabled and use AMFIpass to allow the box kernel thru. 7. Download & install Vbox v.6.1.48 or 6.1.50 8. During the installation process it should ask you to sign / allow the Oracle Virtual Box / ALLOW it inside your 'System Settings' Security & privacy section. 9. After install and the kernel of box has been signed it will ask to reboot. Go ahead and reboot. 10. After reboot, locate and download/install Oracle_VM_VirtualBox_Extension_Pack-6.1.50.vbox-extpack (if using ver 6.1.50) 11. Now grab a ISO from Microsoft and install your guest OS - in my case it was Windows 10 32 bit iso 12. Go thru the motions of installing the guest OS like you normally would. 13. Locate and download VBoxGuestAdditions_6.1.50.iso or VBoxGuestAdditions_6.1.48.iso and install them from a guest ISO storage drive.This will provide a number of addition hardware features and functionality. 14. Finally, fine tune your guest OS for display USB pointing devices etc... 15. If you get problems running virtual box - quit Vbox completely (stop any guest VMs running first if you can) and then rerun it by running it from within Applications folder and not as an alias as sometimes aliases get corrupted or lose sight of the software. 16 I tried then resetting SIP to Enabled and disabling AMFIPass kext inside config plist Kernel section, reboot, resetting NVRAM and booting up to Sonoma but the Kernel errors reappeared and I found they were no longer 'Allowed' by the OS. Subsequently, virtual box guest VM's failed to start. 😞 17. So went back to partially Disabling SIP (csr-active-config = 03080000) but didn't require AMFIPass to ON now that Ive installed vBox. More on this soon... useful links: Virtual Box Old Builds: https://www.virtualbox.org/wiki/Download_Old_Builds_6_1 and https://download.virtualbox.org/virtualbox/6.1.50/ to find the Guest Additions etc... AMFIPass kext: https://community.macmeup.com/index.php?/files/category/3-kexts/. or payloads/Kexts/Acidanthera/AMFIPass-v1.4.0-RELEASE.zip HI @Driftwood, Thank you for this wonderful guide. I have used your metrology and installed the Virtualbox on my Ryzentosh system. It's working perfectly. 🫠 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now