Installing OS X on native hardware via VMware
General guide for installing physical boot OS X from a Windows VMware hosted guest instance - Including some specifics for Yosemite El Capitan, the Clover boot loader and my hardware.
This guide is pretty dense with comments but the core idea is quite simple - basically just get into an OS X virtual machine and from there install OS X to your physical drive :)
This guide is pretty dense with comments but the core idea is quite simple - basically just get into an OS X virtual machine and from there install OS X to your physical drive :)
Motivation:
- This approach basically assumes you've got a PC already running Windows and you want to leverage that same hardware to physically boot OSX at times as well.
- Once you're in OSX, Parallels and VMware Fusion do both support running your physical Windows instance as a VM... this corresponds to VM'ing your Bootcamp partition under a real Mac... so to be clear, we use a Windows host to run an OSX VM from where we install OSX to a physical drive, then boot that OSX host and run that same original Window host installation as a VM under OSX :)
- To put it out there up front - Prevalent, ready-to-run VMware OSX images provide a convenient bootstrapping approach.
- I had trouble getting my USB stick to boot with Clover – which appears to be a known issue on my mobo (Gigabyte X99-UD4) – so on the way to prepping a USB for UniBeast, I figured why not see how tough it is to install directly from VM OSX to my intended physical drive vs fighting the USB
- This skips the whole slog of extracting the latest OSX installer from it's app store wrapper and getting it all setup on a USB boot copacetic with your individual hardware... one might argue that we're shifting dependency to a VMware image version rat race but all we actually need is the app store to download the latest OSX... so whatever VMware+OSX image you obtain now, will remain a viable stepping stone to install the latest greatest OSX you want onto your physical drive.
- For what it's worth, this pretty much guarantees you won't run into issue just getting the vanilla OSX bits on your physical drive... of course you will still have to slog through whatever your individual hardware compatibility effort requires to actually boot up...
- Yet when troubleshooting is necessary, it is much more robust to do so from the full working OSX VM environment vs the constrained OS X Installation / Recovery boot environment that comes with typical USB approach.
Hardware as of this guide:
- CPU: Intel i7-5820k - 6 core Haswell-E (vanilla via Clover flags)
- Noteworthy - I traced a OS X "re-wake" problem back to my Corsair H80i Cooler... the "i" is the USB version that can supposedly report temperature stats... I find it all to be unusably flaky even under Windows, highly recommend avoiding any of these "Corsair Link" products.
Obtain Software Bits:
Software versions only listed for reference as of this build, not crucial unless noted.- VMware Workstation (v11.1)
- OSX VMWare image (Yosemite v10.10 14A389) - this package includes crucial patches enabling OS X guests
- Clover Configurator (v4.23.0) - very very handy, seals the deal on Clover convenience
- while UniBeast still seems to cover more diverse hardware situations, Clover is pretty slick if your hardware is copacetic (basically starting with a UEFI capable mobo)
- the "EFI partition only" footprint is nice for vanilla segregation - it sits there intact if you want to completely wipe & reinstall OS X primary partition
- Couple nice bits for my hardware
- HaswellE kernel patch is a checkbox vs manually patching the kernel - nice!
- no fuss NVRAM checkbox which effortlessly enables iMessage and App Store connectivity
- Clover (v2.3k r3241, change descriptions) - during install steps, you can use Cover Configurator to conveniently download and launch Clover installer
- KextWizard (v3.7.11) - one handy feature above other more well known kext loaders, it will target another drive which is perfect for this side-load scenario
- Nvidia's web driver
- Raw kexts
- FakeSMC - bare minimum DSMOS avoidance for non apple hardware
- AppleIntelE1000e (v3.1.0) - for X99-UD4's onboard Intel I218-V ethernet
- VoodooTSCSync patched for 6 core (my hardware) - author site says this addresses "spin lock" issue
GenericUSBXHCI - in conjunction with disabling XHCI in bios, enabled night and day difference in VM performance... this behavior changed under El Capitan v10.11.2... my USB devices stopped working... removing this GenericUSB kext caused them to work again and fortunately the previous Parallels VM performance problems didn't manifest after that... I have up'd from Parallels V10 to V11.1.1 (32312) since then which might also be aiding this complex compatibility equation.
BIOS settings:
- SATA controller in AHCI mode - classic requirement
VMware Guest Configs:
- add 'smc.version = 0' to the VMX file in order to resolve error: vmcore/vmm/main/physMem_monitor.c:1123
Lessons Learned:
- Major Parallels/Fusion VM performance fix!! - the nutshell is apparently the xhci stuff has a major impact... i had mine disabled but then didn't have xhci manual mode selected
nor the GenericUsbXhci.kext loaded(see El Capitan update under Software Bits 8.4) and after doing both of those my Parallels 10 performance was respectable...prior to that all Windows VM spinups were major slow and obviously just hammering the first core from Activity Monitor, afterwards all cores jump around randomly. - Bootcamp under Parallels, fix "missing operating system" - first shutdown the Bootcamp guest VM so you can make configuration edits, then "Edit Partitions" and for me, my little recovery partition wasn't selected vs the main Windows OS partition, just had to select it (in addition) and restart.
- Updating Nvidia drivers - SEE THIS POST - they can put you in a non-bootable state pretty quick, like when you upgrade OSX and the currently installed driver is no longer compatible... so the main thing to be aware of is using nv_disable=1 in your boot args to temporarily remove them from loading, which then gets you back into working low res where you can install another version of the drivers.
Using MacPro6,1 for your SMBIOS requires a special patch - see Fix#4- I've come to understand that iMac14,1 is one of the more forgiving choices... Apple is changing the USB game a lot starting with El Capitan... they are restricting USB ports depending your SMBIOS machine... reportedly iMac14,x does not currently (v10.11.2) receive any restrictions on the USB 2.0 side (EHCI)... i can report at least all my USB2.0 devices operate (Logitech Z305 speaker, Logitech C910 webcam, Logitech Anywhere receiver)
- starting from a completely bare drive - just format it as GPT Journaled with a single partition via DiskUtil - this will create an unavoidable ~200MB EFI partition which is good for clover
- Yosemite installer or Recovery script will add "Recovery HD" partition - however, i don't particularly see the need for Recovery mode vs booting into full OSX VM for any troubleshooting
- on the VM image i had major kernal_task CPU crunches that would storm in and bring everything to a stand still... guessing thru googling that some IO kext is getting hung up... i disabled sleep and this issue no longer occurred, no big surprise.
- easy success with Migration Assistant restoring from Time Machine backup after booting into a fresh OSX install makes this my preferred approach - see "Time Machine saving to Windows share" under Misc tweaks below.
El Capitan:
- System Integrity Protection (SIP) is the new challenge to hacking kexts (good ref)... nutshell:
- Under Clover Configurator set the follow RT Variables:
- CsrActiveConfig = 0x03 (for full) - or 0x01 (for partial)
- BooterConfig = 0x28
- remove the old rootless=0 and kext-dev-mode=1 from boot args
- Kext Utility 2.6.4 seemed to resolve refusal to load S/L/E kexts after edits were made
Install Steps:
- Use Clover Configurator to download and install latest Clover - Remember to select the physical drive as the installation point
- I went with the EFI only install with no other checkboxes necessary
- Copy kexts to EFI\EFI\CLOVER\Kexts\10.10
- FakeSMC
- VoodooTSCSync (my hardware)
GenericUSBXHCI (my hardware)- see El Capitan update under Software Bits 8.4- AppleIntelE1000e (my hardware)
- You should now be able to reboot into this new physical OS X - *** I've needed to include "nv_disable=1" in the boot args until i've gotten the Nvidia WebDrivers loaded ***; THIS POST is very helpful for all the different issues
- Play it safe, do a Time Machine backup of this pristine install before you do anything else to screw it up (see "Time Machine saving to Windows share" below) - *** especially before the Nvidia drivers ***, i've had them black screen me... if that happens, try nv_disable=1 boot arg first before starting completely over.
- Last juicy step is to go ahead and install latest full Nvidia web drivers (Tip: confirm your specific OS X version via Finder > About This Mac > and hold ⌘ when you click the version number)
Misc tweaks and tools:
- DiskPart cheat sheet
- XtraFinder - F2=rename, Enter=launch file, Delete=delete file, dual pane tabbed Finders and tons of other must haves
- Kext Utility
- Clover Preference Pane
- Installing Windows in UEFI Mode - this makes it more straightforward to target the drive for booting from Clover... it's also supposed to be the fastest way to boot up
- Fix Home/End keys: Karabiner > "PC style" keys options
- Show All Drives in DiskUtility:
defaults write com.apple.DiskUtility DUDebugMenuEnabled 1