macOS 10.14 Mojave Guest and APFS Support

Discussions about using Mac OS X guests (on Apple hardware) in VirtualBox.
Alex_
Posts: 10
Joined: 12. Jun 2018, 12:34

Re: macOS 10.14 Mojave Guest and APFS Support

Post by Alex_ »

Alex_ wrote:However, after invoking /System/Library/CoreServices/boot.efi the process hangs somewhere in the middle.
Actually, modifying the configuration slightly (I guess it was specifying the drive as SSD) I can boot macOS 10.14 Mojave in VirtualBox by using Clover: https://d.pr/free/i/mOFeg2

The full script for an automated setup: https://gist.github.com/AlexanderWillne ... aca2a0ae7a
leogdion
Posts: 5
Joined: 22. Feb 2018, 21:45

Re: macOS 10.14 Mojave Guest and APFS Support

Post by leogdion »

thanks

What's the exact process of using Clover? I'm not exactly familiar with it.
Alex_
Posts: 10
Joined: 12. Jun 2018, 12:34

Re: macOS 10.14 Mojave Guest and APFS Support

Post by Alex_ »

leogdion wrote:What's the exact process of using Clover? I'm not exactly familiar with it.
It's automated in the linked script. Basically, it's an ISO image to boot from (within VirtualBox) to be able to boot macOS Mojave. It's a workaround until VirtualBox supports APFS in their UEFI bootloader. However, you've to modify a few parameters and add the APFS support manually, so you can't just use the plain iso images from http://www.sourceforge.net/projects/cloverefiboot/.
leogdion
Posts: 5
Joined: 22. Feb 2018, 21:45

Re: macOS 10.14 Mojave Guest and APFS Support

Post by leogdion »

Thanks Alex, That worked like a charm. I changed a few things in the script like the hard drive size and the destination directory.
My only problem now is when I try to extract a large file the machine freezes. I'm going to keep troubleshooting this.
Again Thanks.
leogdion
Posts: 5
Joined: 22. Feb 2018, 21:45

Re: macOS 10.14 Mojave Guest and APFS Support

Post by leogdion »

I changed the setting from 1 to 2 CPUs and updated the Ram to 8GB. After that I could easily installed Xcode 10 beta 2 as well as update the OS to 10.14 beta 2. I'd think about forking your repo and making those settings part of a dialog in your script along with hard drive size and vm destination.

Thanks
Alex_
Posts: 10
Joined: 12. Jun 2018, 12:34

Re: macOS 10.14 Mojave Guest and APFS Support

Post by Alex_ »

leogdion wrote:I'd think about forking your repo and making those settings part of a dialog in your script along with hard drive size and vm destination.
Go ahead, I'll merge the changes. Setting these values via CLI parameters would probably be better than using a dialog.
ABotelho
Posts: 1
Joined: 2. Oct 2018, 06:27

Re: macOS 10.14 Mojave Guest and APFS Support

Post by ABotelho »

Has there been progress with Virtualbox and Mojave? It's no longer in beta, and has similar issues.

APFS still appears to be the issue. I can boot into the installer, but once it reboots, I get thrown to the EFI shell.

I can force it to boot the Recovery partition to continue the install, but then again when it reboots it's back at the EFI shell, but this time with no boot options available.

Clover is no help, even patched. It just gives me a bunch of video artifacts and seizes up.
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: macOS 10.14 Mojave Guest and APFS Support

Post by socratis »

ABotelho wrote:Has there been progress with Virtualbox and Mojave?
Nope. Nothing yet. Not a peep. Zilch. Nada. Niente. Null...
ABotelho wrote:APFS still appears to be the issue.
Absolutely true. The VirtualBox EFI part doesn't know how to parse an APFS volume so that it can point to, and continue the boot process. No ETA as of today.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Alex_
Posts: 10
Joined: 12. Jun 2018, 12:34

Re: macOS 10.14 Mojave Guest and APFS Support

Post by Alex_ »

ABotelho wrote:Clover is no help, even patched. It just gives me a bunch of video artifacts and seizes up.
We would "just" need to have an APFS.efi driver in the EFI of VirtualBox. But it's not there yet. However, the script linked above it's working for me and others. The video artifacts are due to a mismatch of the screen resolution in Clover/EFI and macOS. The script above uses 1680x1050 in both.
MrQuickFX
Posts: 2
Joined: 25. Oct 2018, 14:29

Re: macOS 10.14 Mojave Guest and APFS Support

Post by MrQuickFX »

I'm using "Clover-less" option to boot Mojave, by simply loading needed drivers in UEFI (from ESP partition) using startup.nsh script.

I've copied 3 drivers to ESP partition, EFI\driver folder that I load, reload maps and start boot.efi from now readable partition.
Downside is that I need to wait 5s for script to execute and I see verbose load.

If there's any OS update this script can be modified not to load boot.efi, to exit back to UEFI GUI where proper update EFI file can be selected as boot option (boot from file).
All volumes should be readable.

Driver source: https://github.com/acidanthera/AppleSupportPkg.

startup.nsh

Code: Select all

echo -off
load fs0:\EFI\driver\AppleImageLoader.efi
load fs0:\EFI\driver\AppleUiSupport.efi
load fs0:\EFI\driver\ApfsDriverLoader.efi
map -r
BLK3:
cd System\Library\CoreServices\
boot.efi
Last edited by MrQuickFX on 26. Oct 2018, 15:00, edited 1 time in total.
Alex_
Posts: 10
Joined: 12. Jun 2018, 12:34

Re: macOS 10.14 Mojave Guest and APFS Support

Post by Alex_ »

MrQuickFX wrote:I'm using "Clover-less" option to boot Mojave, by simply loading needed drivers in UEFI (from ESP partition) using startup.nsh script.
Interesting. Any idea how to automate and include this to https://github.com/AlexanderWillner/run ... VirtualBox ?
MrQuickFX
Posts: 2
Joined: 25. Oct 2018, 14:29

Re: macOS 10.14 Mojave Guest and APFS Support

Post by MrQuickFX »

I didn't check in depth what steps does your program do, but from my point of view you could incorporate steps (at some point after initial MacOS install step - when everything is created on virtual drive) to mount EFI partition, copy needed drivers and script, restart and let the script take over. You can even place calls to specific boot.efi images (Install phase, normal phase). If there's install phase, it will boot file and continue with update/upgrade. If it's not install phase, it will show error but continue to next boot image you specify (that exists).

In short, boot process would go like this:

Call install efi file from MacOS Install map on destination drive. If it's there, it will start upgrade process (most of the time it's 2nd phase) and ignore rest of the script.
If it's not, it will say no map/file to execute and continue to next step where you call regular boot.efi as usual.

It's "dirty" solution but I think it might work. Even if there's some update when you have OS up and running on next boot it will update OS without digging through UEFI GUI to select proper file.
Last edited by socratis on 25. Oct 2018, 21:33, edited 1 time in total.
Reason: Removed unnecessary verbatim quote of the whole previous message.
img2tab
Posts: 2
Joined: 23. Nov 2018, 16:43

Re: macOS 10.14 Mojave Guest and APFS Support

Post by img2tab »

I've automated the installation of the drivers provided by acidanthera in this Bash script that creates a macOS Mojave guest:

[ModEdit; URL removed]
Last edited by img2tab on 6. Jan 2019, 13:44, edited 1 time in total.
Alex_
Posts: 10
Joined: 12. Jun 2018, 12:34

Re: macOS 10.14 Mojave Guest and APFS Support

Post by Alex_ »

Interesting - created an issue to integrate this: https://github.com/AlexanderWillner/run ... /issues/37
Last edited by socratis on 24. Nov 2018, 17:34, edited 1 time in total.
Reason: Removed unnecessary verbatim quote of the whole previous message.
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: macOS 10.14 Mojave Guest and APFS Support

Post by socratis »

Just a warning people; if you start posting about Hackintosh related software/workarounds/solutions, you'll get a warning. Then a ban.

This is the "warning" part...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Locked