Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

virtualbox: Mojave box does not boot on 2020 Macbook #61

Open
frankosterfeld opened this issue Jun 30, 2020 · 6 comments
Open

virtualbox: Mojave box does not boot on 2020 Macbook #61

frankosterfeld opened this issue Jun 30, 2020 · 6 comments

Comments

@frankosterfeld
Copy link
Contributor

So far I've created Catalina VMs on a Catalina host, and everything works fine. Now I tried to create a Mojave box inside a Mojave VM (manually installed, VMWare Fusion). The VM creation seems to work fine, but when importing the box on the Catalina host and trying run it, it hangs at boot. The last output is

...
Start InitBootStruct

root device uuid is '396DAA8C-A9B4-4762-98A7-B334C047EACB`
EndInitBootStruct
Start LoadRAMDisk
End LoadRAMDisk
Start FinalizeBootStruct
Start RandomSeed
End RandomSeed

I've created the box as follows:

Downloaded the Mojave installer manually via the "GET" link in the app store page (that's 10.14.6 + latest security fixes). Once the download is completed, I ran

bundle exec macinbox --verbose --box-format virtualbox --no-fullscreen --memory 4096 --disk 256 --name mojave --installer "/Applications/Install macOS Mojave.app"
vagrant box repackage mojave virtualbox 10.14.6

Is this anything already seen before? I'm not sure if the host system matters, I don't have a mojave host available to test with.

@frankosterfeld
Copy link
Contributor Author

The host machine is a MacBook Pro (13-inch, 2020), btw, which might be too new for Mojave, I wonder if there's any CPU/EFI flags etc. passed through by virtualbox that prevent it from booting...

@frankosterfeld
Copy link
Contributor Author

Actually, the VM works on another (windows...) host! So this might be fixable by explicitly setting one or multiple of "VBoxInternal/Devices/efi/0/Config/DmiSystemProduct", "VBoxInternal/Devices/efi/0/Config/DmiSystemVersion", "VBoxInternal/Devices/efi/0/Config/DmiBoardProduct" and so on. I'll investigate. Would that be something to add to the macinbox scripts modifying the base box?

@frankosterfeld
Copy link
Contributor Author

frankosterfeld commented Jun 30, 2020

If I add the following line to my Vagrantfile, the VM boots on the Macbook Pro 2020:

vb.customize ["modifyvm", :id, "--cpuid-set", "00000001", "000306a9", "04100800", "7fbae3ff", "bfebfbff"]

@frankosterfeld frankosterfeld changed the title Mojave box does not boot in virtualbox, hangs in "End RandomSeed" (Catalina host) virtualbox: Mojave box does not boot on 2020 Macbook Jul 14, 2020
@ekaiser-uptycs
Copy link

Would this perhaps enable Mojave building on Catalina if these were set when the vm was being created?

@bacongravy
Copy link
Owner

@frankosterfeld Thanks for investigating this. Its not clear to me how to solve this generally. Presumably we would only want to call cpuid-set with these arguments for a box being run on a MacBook Pro 2020? Since macinbox doesn't know what hardware you're planning to run the box on, how could it properly configure the box? I suppose the Vagrantfile in the box itself could contain logic that determines what hardware it is running on, and passes different arguments?

@frankosterfeld
Copy link
Contributor Author

@ekaiser-uptycs I don't think it would help, the installer is run on the host afaik, where it also checks for the host system.

@bacongravy the ID also makes it work on other hardware and operating systems, so it's not specific to the Macbook 2020. But I'm not sure either if it should be baked into the image, one might not want it when run on actually compatible hardware. I'm not sure what the best solution would be, it could be an option, or just a comment in the documentation about what to do in the Vagrantfile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants