Jump to content
fusion71au

Run Vanilla OS X El Capitan, Sierra, High Sierra or Mojave in VirtualBox 5.x.x on a Windows Host

92 posts in this topic

Recommended Posts

Hi, I'm not really understanding how to install clover. When I turn EFI off and put in the commands in the command line, it shows a fatal error so I can't even open the vm to install clover efi. Any help?

Share this post


Link to post
Share on other sites
Advertisement

Hey,

 

So I've been following many guides around here but I don't understand how to prepare MacOS.vmdk like you did. What's on it? I'd like to make one like this myself.

 

Also, I'd like to thank all of you for the excellent job done around here. All InanelyMac users. :)

 

EDIT: I've just followed above tutorial for HighSierra from scratch and gone as far as doing the accepting the agreement and then turning off on MACH Reboot message. I've unmounted the BaseSystem.vmdk, started machine again and all I get is black screen. Been hanging like that for few minutes right now, with no feedback at all. What could have possibly gone wrong?

 

Cheers,

Furai

Share this post


Link to post
Share on other sites

Hi, I'm not really understanding how to install clover. When I turn EFI off and put in the commands in the command line, it shows a fatal error so I can't even open the vm to install clover efi. Any help?

 

Legacy Clover no longer works in VirtualBox 5.1.x and VirtualBox 5.2.x (causes red screen error).  Need to install in UEFI mode only and press <F12>, select "EFI Hard Drive" from Boot Manager to start VM with Clover.

 

 

Hey,

 

So I've been following many guides around here but I don't understand how to prepare MacOS.vmdk like you did. What's on it? I'd like to make one like this myself.

 

Also, I'd like to thank all of you for the excellent job done around here. All InanelyMac users. :)

 

EDIT: I've just followed above tutorial for HighSierra from scratch and gone as far as doing the accepting the agreement and then turning off on MACH Reboot message. I've unmounted the BaseSystem.vmdk, started machine again and all I get is black screen. Been hanging like that for few minutes right now, with no feedback at all. What could have possibly gone wrong?

 

Cheers,

Furai

 

What's on it? 

 

In the EFI partition, Clover r4332 compiled with GCC and minimal config.plist, compatible for use in VMware and VirtualBox.

 

In macOS HFS partition, startosinstall.command script, which assembles the Installer App on the macOS target volume and starts the startosinstall utility...

#!/bin/bash
 
 # Change to root folder
 cd /
 
 # Copy "small" Installer app to “macOS” target
 cp -R Install\ macOS\ High\ Sierra.app /Volumes/macOS/
 
 # Copy SharedSupport folder from USB "DATA" to Contents folder in Installer.app on “macOS”
 cp -R /Volumes/DATA/SharedSupport /Volumes/macOS/Install\ macOS\ High\ Sierra.app/Contents/
 
 # Start startosinstall utility to create phase 1 /macOS Install Data
 /Volumes/macOS/Install\ macOS\ High\ Sierra.app/Contents/Resources/startosinstall --volume /Volumes/macOS --converttoapfs NO --rebootdelay 30 --applicationpath /Volumes/macOS/Install\ macOS\ High\ Sierra.app
  • Have you tried rebooting the VM again after the "black screen" (power down, then restart)?
  • What disks are attached to your VM?  Did you attach the provided macOS.vmdk which has Clover preinstalled on it or your own?
  • Is the black screen you are describing the UEFI Shell (eg step 4 in post#73)?
  • What is the version of VirtualBox you are using? 

 

As of the time of writing my guide, VirtualBox does not have the code to find "\macOS Install Data\Locked Files\Boot Files\boot.efi", which is the DATA structure used to natively update/install macOS Sierra and High Sierra.  For the second installation phase to continue, you will either need to boot to Clover as described in step10, post#75,

 

or boot to the UEFI shell and manually restart the installation process by typing the following 2 lines, followed by <Enter> after each line...

FS1:
"\macOS Install Data\Locked Files\Boot Files\boot.efi"

step4, post#73.

 

 

 

Nope, not like UEFI shell, just completely black screen.

 

 

Update:  For VirtualBox 5.2.x, the command for changing screen resolution has changed...

 

VBoxManage setextradata "<MyVM>" VBoxInternal2/EfiGraphicsResolution XxY (where X=Horizontal screen resolution, Y=Vertical screen resolution)

eg

VBoxManage setextradata "<MyVM>" VBoxInternal2/EfiGraphicsResolution 1280x1024

Your "black screen" was most likely due to a mismatch between the value set for VirtualBox's EfiGraphicsResolution (default = 1024x768) and screen resolution set in Clover's config.plist.

Share this post


Link to post
Share on other sites

What's on it? 

 

In the EFI partition, Clover r4332 compiled with GCC and minimal config.plist, compatible for use in VMware and VirtualBox.

 

In macOS HFS partition, startosinstall.command script, which assembles the Installer App on the macOS target volume and starts the startosinstall utility...

#!/bin/bash
 
 # Change to root folder
 cd /
 
 # Copy "small" Installer app to “macOS” target
 cp -R Install\ macOS\ High\ Sierra.app /Volumes/macOS/
 
 # Copy SharedSupport folder from USB "DATA" to Contents folder in Installer.app on “macOS”
 cp -R /Volumes/DATA/SharedSupport /Volumes/macOS/Install\ macOS\ High\ Sierra.app/Contents/
 
 # Start startosinstall utility to create phase 1 /macOS Install Data
 /Volumes/macOS/Install\ macOS\ High\ Sierra.app/Contents/Resources/startosinstall --volume /Volumes/macOS --converttoapfs NO --applicationpath /Volumes/macOS/Install\ macOS\ High\ Sierra.app

 

Yeah, I've seen it when I've mounted the vmdk to the system using nbd kernel module.

 

  • Have you tried rebooting the VM again after the "black screen" (power down, then restart)?

Yes, multiple times. All the time just pure black screen is visible.

 

 

  • What disks are attached to your VM?  Did you attach the provided macOS.vmdk which has Clover preinstalled on it or your own?

 

There was only provided by you macOS.vmdk attached to it, no optical drives.

 

 

  • Is the black screen you are describing the UEFI Shell (eg step 4 in post#73)?

 

Nope, not like UEFI shell, just completely black screen.

 

 

  • What is the version of VirtualBox you are using? 

 

Latest version available right now so I think 5.2.2.

 

As of the time of writing my guide, VirtualBox does not have the code to find "\macOS Install Data\Locked Files\Boot Files\boot.efi", which is the DATA structure used to natively update/install macOS Sierra and High Sierra.  For the second installation phase to continue, you will either need to boot to Clover as described in step10, post#75,

 

or boot to the UEFI shell and manually restart the installation process by typing the following 2 lines, followed by <Enter> after each line...

FS1:
"\macOS Install Data\Locked Files\Boot Files\boot.efi"
step4, post#73.

 

I'll give it a try with UEFI shell. Thanks for all the help and time taken to write it. :)

 

If anything, I'm sitting now every day on IRC, if by any chance you're using it. We might chat there, find a solution and post it here afterwards.

 

EDIT: I've just tried UEFI shell, it works but for some reason it erases command I type in random fashion. Like I start typing something and then the cursor gets moved to the beginning of the line and I'm inserting text over.

Tried putting in commands until I finally managed changing directory to the one with boot.efi file and run it from there. It worked and now I'm installing macOS. I'm really puzzled why UEFI shell behaves like this.

 

EDIT#2: Installed, configured. Can run it without problems. Usual stuff not work like audio is distorted and what not.

Share this post


Link to post
Share on other sites

I followed the guide to create an installation from scratch without access to a Mac or the App store.

 

I used your macOs.vmdk and created a BaseSystem.vmdk accodring to your guide. However, I get another issue. I think its possible due to the fact that I have a Intel HD graphics 630:

 

WARNING: IOPlatformPluginUtil : getCPUIDinfo: this is an unknown CPU model 0x9e

 

(See attachment for a screenshot)

 

Here is a post discussing it on another website:

https://www.tonymacx86.com/threads/getcpuidinfo-this-is-an-unknown-cpu-model-0x5e.222321/#post-1506955

 

I tried spoofing the CPU model but it does not seem to do any difference in my case.

 

So, I am wondering if its possible to troubleshoot this issue?

 

 

Share this post


Link to post
Share on other sites

 

8)  The Apple Software Licence will appear in the terminal window.  Type A to agree ---> install files will be placed in /Volumes/macOS/macOS Install Data ---> System will reboot after 30 seconds...

 

 

When I try, I'm getting "Error: could not get license agreement." I initially thought this could be because I was behind a proxy, but when I tried with a direct Internet connection, I'm getting the same.

 

Does anyone have any hints as to what the issue might be?

Share this post


Link to post
Share on other sites
Posted (edited)

Update for Mojave Beta
The El Capitan Settings from post#1 still work for macOS Mojave Beta, but with newer VirtualBox 5.2.xx releases, USB3/xHCI should be enabledOS version of guest should also be set to macOS High Sierra 10.13 64 bit (or newer).


Note - Clover is also required since the Mojave installer automatically converts target HD to apfs and VirtualBox does not presently support apfs.  Unfortunately installation may take a long time (hours) on a spinning HD using apfs.
Tested below with ≥ 2GB RAM Base Memory allocated for the guest macOS and EfiGraphicsResolution set to 1024x768 (to match resolution in Clover's config.plist GUI section)...

cd "C:\Program Files\Oracle\VirtualBox\"
VBoxManage setextradata "<MyVM>" VBoxInternal2/EfiGraphicsResolution 1024x768

To prepare the Mojave Beta ISO on your Mac or Hack:
1.  On your Mac or Hack with SIP disabled, download/copy "Install macOS Mojave Beta.app" into your Applications folder.
2.  Download and unzip the CMJI.tool.zip (attached to this post) into your ~/Downloads folder.  Note: you will need approx 16GB of free space on your hard disk for the script to complete.
3.  Open OS X terminal, then run the following commands to execute the script:

cd ~/Downloads
chmod +x CMJI.tool
./CMJI.tool

4.  At the end of the process, you will have a Mojave.iso on your desktop - copy this onto an exFAT formatted USB for use on the PC Host later.
5.  Attach Mojave.iso and supplied macOS_apfs.vmdk (preformatted blank 50GB apfs volume with Clover r4599 installed in EFI) to the Virtual Machine and proceed to run the installation.

 

Installation
1)  Boot the VM to macOS Utilities screen. 

 

Spoiler

VB_Mojave3.png.545ff626ea2e29277ddd0002b029cc4c.png

 

Select Reinstall macOS, choosing the macOS volume as the target ---> install files will be placed in /Volumes/macOS/macOS Install Data ---> System will reboot.
2)  Power off the VM when you see the message "MACH Reboot".  Then go to the VM Storage settings to detach the Mojave.iso (since it is no longer required).
3)  Power on the VM again and you will be greeted with the Clover Main Menu --->  select "Boot macOS Install Prebooter from Preboot" + press <Enter>  ---> will see "Installing on "macOS"" and time remaining, as the pkg files are extracted to their final locations ---> Power off the VM when you see the message "MACH Reboot"...


 

Spoiler

 

VB_Mojave6b.thumb.png.b60056eb6a08cc5ea853774c628ad81f.png

 

VB_Mojave7.thumb.png.1c30f846cba33846272c50c22e079a3a.png

 

VB_Mojave8.thumb.png.e02b5fbc7855d4187fa67682732df374.png

 

VB_Mojave9.thumb.png.651101e11ccdadd8aa132caaa69b53f4.png

 

 

 


4)  Power on the VM a final time to finish installation and setup.  At the Clover Main Menu, select "Boot FileVault Prebooter from Preboot" + press <Enter> ---> rebuild kext caches and setup new user account...


 

Spoiler

 

VB_Mojave10.thumb.png.d99396d4dcaa34c4a6b8e03eb902845d.png

 

VB_Mojave11.thumb.png.2dba687682b6ea217877fc7336e5e4c9.png

 

VB_Mojave12.thumb.png.c7d9cd29de2f8ba62c3383a05105d311.png

 

VB_Mojave13.thumb.png.207d6da8d38131abbdf3b95062784fea.png

 

 

 

 

CMJI.tool.zip

macOS_apfs.vmdk.zip

Edited by fusion71au
clarify OS version of guest should also be set to macOS High Sierra

Share this post


Link to post
Share on other sites
Posted (edited)

For me tutorial for mojave don't work, i try many times, but clover bootloader never start anyway

 

sx.jpg

Edited by Lian1975

Share this post


Link to post
Share on other sites
2 hours ago, Lian1975 said:

For me tutorial for mojave don't work, i try many times, but clover bootloader never start anywaysx.thumb.jpg.41e1d1f03c5263d6f2083787d3548e0c.jpg

 

I fixed this issue creating a new VM with choose OS version High Sierra

 

Now clover bootloader start perfectly.

 

Thanks for tutorial !

 

1111096345_OSVersion.jpg.ec3335662ef8c45f1d2515598ae60d28.jpg

 

Share this post


Link to post
Share on other sites
Posted (edited)

I have another issue

 

When I change the screen resolution for custom size with this code: 

VBoxManage setextradata "<MyVM>" VBoxInternal2/EfiGraphicsResolution 1280x1024

Screen gets bug ( See the Picture )

 

What is the right way to change the screen resolution of VM ?

 

screen.thumb.jpg.461a5205bf8ee99c489a5f956bf94aa8.jpg

 

Edited by Lian1975

Share this post


Link to post
Share on other sites
2 hours ago, Lian1975 said:

What is the right way to change the screen resolution of VM ?

 

As I said a few posts above, this is due to a mismatch between the value set for VirtualBox's EfiGraphicsResolution and the screen resolution set in Clover's config.plist.

 

Mount the EFI System Partition (sudo diskutil mount disk0s1), and edit the GUI section of Clover's config.plist to match the custom resolution you set with VBoxManage...

		<key>ScreenResolution</key>
		<string>1280x1024</string>

 

 

Share this post


Link to post
Share on other sites
Posted (edited)
11 hours ago, Lian1975 said:

fusion71au You have a tutorial how you create a preformatted blank vmdk or vdi partition with clover bootloader pre installed ?

 

 

  1. Start VirtualBox
  2. Select existing VM with installed macOS eg High Sierra
  3. Under Settings, Storage, SATA Controller, click Add Hard Drive icon
  4. Create new disk, type VMDK, Dynamically allocated, name eg "macOS.apfs.vmdk", size=50GB
  5. Boot VM to High Sierra.  Initialize new disk with Disk Utility, Erase Disk, format as apfs named drive eg "macOS"
  6. Download EFI_Clover for VMware while running inside your High Sierra VM.  Mount iso and copy EFI folder to EFI System Partition of new macOS disk
  7. Shutdown VM.  Copy macOS.apfs.vmdk eg found in C:\Users\UserName\VirtualBox VMs\macOS High Sierra to external USB or where ever.
Edited by fusion71au

Share this post


Link to post
Share on other sites
11 hours ago, fusion71au said:
  1. Start VirtualBox
  2. Select existing VM with installed macOS eg High Sierra
  3. Under Settings, Storage, SATA Controller, click Add Hard Drive icon
  4. Create new disk, type VMDK, Dynamically allocated, name eg "macOS.apfs.vmdk", size=50GB
  5. Boot VM to High Sierra.  Initialize new disk with Disk Utility, Erase Disk, format as apfs named drive eg "macOS"
  6. Download EFI_Clover for VMware while running inside your High Sierra VM.  Mount iso and copy EFI folder to EFI System Partition of new macOS disk
  7. Shutdown VM.  Copy macOS.apfs.vmdk eg found in C:\Users\UserName\VirtualBox VMs\macOS High Sierra to external USB or where ever.

Thank you fusion71au

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Cyberdevs
      Please read me:
      Ever since macOS Mojave came out (I mean the first DP) Apple removed the support for Atheros based WiFi Adapters from the IO80211Family.kext, so to fix it we need to add the AirPortAtheros40.kext to the Extensions manually.
      After each clean install the AirPortAtheros40.kext needs to be installed and after clean installing Mojave DPs after few times I decides to create this app to save some time.
       
      How to use it:
      This application will install the missing AirPortAtheros40.kext into /System/Library/Extensions and after the installation is done and once you reboot your computer the Atheros based WiFi adapters will be enabled.
      The installation is the first step of the process and it is fast but the next steps which are repairing the permission on /System/Library/Extensions and rebuilding the system caches might take a while so please wait until you were asked to reboot your computer.
       
      I'm using a TP-Link WDN4800 with an Atheros chipset and it works on other similar hardware.
       




       
    • By thomaspetersen
      Hi All
       
      I'm trying to start a Hackintosh High Sierra 10.13.5 installation:
      - MSI B350 PC Mate
      - Ryzen 5 - 2600
      - Radeon Pro 580 GPU
      - 4 x 8GB DDR4
      (Have a working clover bootloader for HS 10.13.3 - but for some reason, I can't use that setup with the 10.13.5) 
       
      Have tried different bootloader setup, with different outcomes...
      ATM. I get this error/hang - "Unknown CPU: family = 0x17, model = 0x8, Stepping = 0x2"
      Have search google, and can see that the threads ppl. are getting this, is when they look at "About this mac", I haven't yet installed the OSX.
       
      So can someone help...

      I'm running the newest Kexts: AppleALC, FakeSMC, Lilu, RealtekRTL8111, USBInjectAll and WhateverGreen.
      In Bootloader setup, i'm running: -v, -s, -f, -no_compat_check, busratio=34, PCIRootUID=1, npci=0x2000, dart=0 and nv_disable=1
      In SMBIOS i'm using the iMac18,2 and in RT i'm using BooterConfig: 0x28 and CsrActiveConfig: 0x67
      In installed drivers i'm using: AptioMemoryFix, EmuVariableUefi-64, OsxAptioFixDrv-64 (Have tried Fix2 as well)
       
      But i'm, keep getting the Unknown CPU hang/error, can someone help...
      Or do someone have a setup with the same CPU and GPU, that can show me his/her setup for Bootloader/Kexts...
    • By Badruzeus
      OPENSTEP was an operating system created by NeXT Software Inc. It served as the basis for Mac OS X after Steve Jobs came back to Apple after Apple acquired NeXT. This is simply to show computer history.
       
      Guest OS: (Next) OpenSTEP 4.2
      Virtualization: VirtualBox 5.2.18
      Host OS: Mac OS X El Capitan 10.11.6 (15G22010)
      Credit for installation guide: http://openstep.bfx.re/
       
       
       
    • By Thereman
      Hello, I'm a noob at installing MacOS on my current PC (which is running Windows 10 x64 Pro).
      Can I do a dual boot with windows 10 and MacOS Mojave? I already have windows 10 installed and I would like to put and MacOS Mojave, can it? If not, should I reinstall from 0 MacOS Mojave and after Windows 10?
       
      P.S: I have already make a topic about "Can I run MacOS" and the export boys on the forum said to me I can run it.
    • By Teress
      I get a lot of questions about HOW TO BACKUP A HACKINTOSH. So I decided to create Complete Guide with 5 methods described in detail, how to easily make bootable clones of Hackintosh system disks, or backup your data. Full step by step tutorial is here:
       
       
×