myspaghetti / macos-virtualbox

Push-button installer of macOS Catalina, Mojave, and High Sierra guests in Virtualbox on x86 CPUs for Windows, Linux, and macOS
GNU General Public License v2.0
13.51k stars 1.12k forks source link

macOS 11.0 Big Sur #254

Closed myspaghetti closed 3 years ago

myspaghetti commented 4 years ago

Big Sur boots on VirtualBox but crashes when accessing the secure keychain. Anybody having the same issue?

myspaghetti commented 4 years ago

Works with USB version set to 1.1 instead of 3.0 and network adapters disabled. USB can be set to 3.0 and network adapters can be enabled after the initial setup is complete.

bigsur

tcab commented 4 years ago

This is great news!

How do we refer to Big Sur in the script? I tried macOS_release_name="Bigsur" and macOS_release_name="BigSur" but Mojave keeps getting downloaded.

Also how do we make the USB and network changes you describe? Are these somewhere in the script, or more likely, in the VirtualBox VM settings? At which point in the script lifecycle can we alter the VM settings and restart the VM, without the script being interrupted?

myspaghetti commented 4 years ago

The script doesn't support Big Sur at the moment. There are no current plans for the script to support the current installer of Big Sur since it needs to be unpacked from a pkg file, and such unpacking software is not available by default on most systems' package managers. There are macOS-host-only scripts that unpack the pkg file automatically.

The USB and network settings are done through VBoxManage or the VirtualBox graphical interface. Currently, with Big Sur version 20A4299v the system's secure keychain AppleKeyStore crashes occasionally when networking or USB 3.0 is enabled.

If you want to manually install Big Sur you can follow these steps:

  1. Install Catalina
  2. Download Big Sur InstallAssistant.pkg version 20.0.4299.22 (this link will be dead when a new version comes out) either inside the virtual machine or on the host on a disk image that will be mounted on the virtual machine. Windows can create and mount VHD disk images through Disk Management, which can then be unmounted and attached to the virtual machine.
  3. Use VirtualBox to create an additional disk image that has at least 60GB of storage space. Attach it to the virtual machine and erase it with Disk Utility, formatting it to APFS.
  4. Run InstallAssistant.pkg which creates the app "Install macOS Beta.app" in the /Applications folder
  5. Run "Install macOS Beta.app", when prompted select "Show All Disks..." and select the new empty disk.
  6. Allow the installer to complete, it will automatically boot into macOS Big Sur. When the macOS initial setup starts, shut down macOS with Command-Q
  7. Set the virtual machine's USB version to 1.1 and disable all network adapters from the VirtualBox settings (AppleKeyStore, the system's secure keychain, crashes otherwise)
  8. Boot macOS Big Sur and complete the initial setup
  9. After initial setup is complete the USB settings and network adapters can be restored, but this will make AppleKeyStore crash occasionally.
tcab commented 4 years ago

Above procedure works! A few observations:

alienpenguin commented 4 years ago

my applekeystore keeps crashing no matter what, i tried switching to usb 1.1 and no network to no avail.

myspaghetti commented 4 years ago

@alienpenguin during initial setup or after?

alienpenguin commented 4 years ago

I did not read your guide before installing, so after the install was completed and i was presented the login screen for the first time I noticed that i could not login. After googling about the applekeystore message i found your post about network and usb: i turned off vbox, changed the vm settings and restarted, but nothing changed, so i am stuck at login screen.

myspaghetti commented 4 years ago

The workaround only works for a new install where there isn't an existing user account, doesn't work for upgrades.

alienpenguin commented 4 years ago

thanks @myspaghetti re-installing on a new disk it worked.

Va1a commented 4 years ago

not an issue or anything but myspaghetti i want to give you a fat wet kiss for this godlike tool you have made. <3 <3

myspaghetti commented 4 years ago

Please maintain social distancing.

ghost commented 4 years ago

I have finally got Big sur to work... big sur in windows - rare until this happens... or not Grr! Stupid kernel panic has ravaged the os! 😬😬😬

myspaghetti commented 4 years ago

Big Sur works fine under QEMU so if you create a vmdk installation you can (with some manual configuration) pop it into QEMU.

ghost commented 4 years ago

Oh oK! [removed HTML formatting -myspaghetti]

ghost commented 4 years ago

MERGED BY AUTOMATIC PROGRAM - CREATED ORIGINALLY AT 1594921435 - EDITED AT 1594925035 @myspaghetti what is the command to put into qemu? i booted and said no bootable device. I have this code: qemu-system-x86_64.exe -L pc-bios -boot c -m 4096 ^ -hdd macos.vmdk ^ -hda macos_1.vmdk ^ -sdl ^ -netdev user,id=network01 -device rtl8139,netdev=network01 ^ -device VGA,edid=on but it's stuck on booting from hard disk.. @myspaghetti I get what you are saying about the vmdk. How do you exactly convert a pkg into a bootable vmdk so it will boot and install, within qemu for windows? Sorry for bugging you. I will try this in about another hour or two.

  1. Allow the installer to complete, it will automatically boot into macOS Big Sur. When the macOS initial setup starts, shut down macOS with Command-Q Bolded in your instructions on 6, how do you shut down an os, if it has the apple logo and says x minutes remaining? I dont want to interrupt it, as it will cause the whole os to go back to catalina. and also, how do you merge the two hard disks into one disk? Thanks! Sorry for asking too many questions, just want my street view thing working in Mac Big Sur. 😖 END OF AUTOMATIC PROGRAM MERGER
myspaghetti commented 4 years ago

Sorry, no support is offered for QEMU. You get the vmdk by creating an empty vmdk and installing Big Sur onto it as described in the thread. Don't interrupt the installer, the initial setup loads after the installer completes.

ghost commented 4 years ago

Ohhhh. Ok. Now I know how this works. You just run the setup with catalina, then download the files for big sur, and then create the second hdd and install big sur. when that completes and gets to the language screen, do i just exit the vbox (big sur) or did i go past it? Now one more question @myspaghetti , how do you get the two hard drives into qemu without saying, HDD1 already exists, when placing hdd0(catalina) and hdd1(bigsur) into the hdd slot? ^ i understand that you cant give advice on qemu. see the comment on which drive do i boot in.

ghost commented 4 years ago

And one more thing. Which is the vmdk, the catalina, or the big sur? Because when i boot into just one in vbox, it goes to the uefi shell. cat is hdd0 and bgs is hdd1 for reference. and also, do you make the vmdk for both cat and bgs, or just bgs?

ghost commented 4 years ago

Thanks so much @myspaghetti for clearing this confusion up significantly. You deserve (with social distancing practices) a big hug and a kiss! 😘😘😘

myspaghetti commented 4 years ago

You could just shut down VirtualBox and continue on QEMU, that seems reasonable. You could even go back a little and run Catalina on QEMU and upgrade to Big Sur or install it on an empty APFS-formatted virtual disk image. Main point is that the script is used to bootstrap a working macOS virtual machine. You could make a Catalina vmdk or a Big Sur vmdk, but if you're gonna use QEMU I'd suggest both, saves time not having to go back-and-forth between QEMU and VirtualBox.

I've mentioned this on other issues, I mainly use the script to create bootable macOS installers to use on Macs with a failing recovery environment. VirtualBox is slow and kinda painful, but it works everywhere and with little to no manual configuration, which is why the script is designed for VirtualBox and not QEMU, even though QEMU is better.

ghost commented 4 years ago

Ok thank you for the recomenndations.

ghost commented 4 years ago

Still stuck on still stuck on booting

myspaghetti commented 4 years ago

From a bootable BaseSystem.vdi, the Terminal command pkgutil --expand-full InstallAssistant.pkg /Volumes/path/to/new/folder successfully extracts the file SharedSupport.dmg and the installer app, which means Big Sur installation be automated in the script.

dfuentes03 commented 4 years ago
  1. Download Big Sur InstallAssistant.pkg version 20.0.4299.22 (this link will be dead when a new version comes out) either inside the virtual machine or on the host on a disk image that will be mounted on the virtual machine. Windows can create and mount VHD disk images through Disk Management, which can then be unmounted and attached to the virtual machine.

Do you happen to have the link to the most recent InstallAssistant.pkg? The link is indeed dead.

myspaghetti commented 4 years ago

You can get the latest beta download URL from the software update catalog. This is the latest URL: http://swcdn.apple.com/content/downloads/46/56/001-34223-A_QIYG1DL7MO/igh8xp5qsam7ounuabziajlktg8nhoptis/InstallAssistant.pkg This link will break when a new version is released.

alienpenguin commented 4 years ago

@myspaghetti do you have any insights on upgrading? i tried upgrading to beta2 and now beta4 but i am stuck at login screen with the usual applekeystore crash. Except from re-installing on a new disk is there anything that can be done?

myspaghetti commented 4 years ago

I haven't tested Big Sur any further. I suspect solving the bug requires a conscious effort from the VirtualBox devs to debug it. Since Oracle can't legally provide cloud-hosted macOS virtual machines, I doubt debugging macOS guests is a priority. Then again they completely overhauled NVRAM, which improved macOS compatibility, so maybe another similar design overhaul will positively impact macOS guests.

alienpenguin commented 4 years ago

just an update: updating to beta 8 solves the applekeystore crash :D

DX37 commented 4 years ago

In case y'all wanted fresh link to Big Sure - just use gibMacOS. Release type developer shows InstallAssistand.pkg download.

shaqaruden commented 3 years ago

The script doesn't support Big Sur at the moment. There are no current plans for the script to support the current installer of Big Sur since it needs to be unpacked from a pkg file, and such unpacking software is not available by default on most systems' package managers. There are macOS-host-only scripts that unpack the pkg file automatically.

The USB and network settings are done through VBoxManage or the VirtualBox graphical interface. Currently, with Big Sur version 20A4299v the system's secure keychain AppleKeyStore crashes occasionally when networking or USB 3.0 is enabled.

If you want to manually install Big Sur you can follow these steps:

  1. Install Catalina
  2. Download Big Sur InstallAssistant.pkg version 20.0.4299.22 (this link will be dead when a new version comes out) either inside the virtual machine or on the host on a disk image that will be mounted on the virtual machine. Windows can create and mount VHD disk images through Disk Management, which can then be unmounted and attached to the virtual machine.
  3. Use VirtualBox to create an additional disk image that has at least 60GB of storage space. Attach it to the virtual machine and erase it with Disk Utility, formatting it to APFS.
  4. Run InstallAssistant.pkg which creates the app "Install macOS Beta.app" in the /Applications folder
  5. Run "Install macOS Beta.app", when prompted select "Show All Disks..." and select the new empty disk.
  6. Allow the installer to complete, it will automatically boot into macOS Big Sur. When the macOS initial setup starts, shut down macOS with Command-Q
  7. Set the virtual machine's USB version to 1.1 and disable all network adapters from the VirtualBox settings (AppleKeyStore, the system's secure keychain, crashes otherwise)
  8. Boot macOS Big Sur and complete the initial setup
  9. After initial setup is complete the USB settings and network adapters can be restored, but this will make AppleKeyStore crash occasionally.

If Big Sur is not fully support I would recommend switching your screenshot to Catalina or put these instructions in the readme and put a caption on the screenshot. BTW If this script works for me, you will have been a life saver. I have been trying to get a macOS VM up and running for hours now and just came across this repo maybe 30 minutes ago.

myspaghetti commented 3 years ago

I've hidden all the comments addressing the issues with earlier Big Sur betas to make it clear that beta 8 and later can be installed from macOS Software Update without issue.

myspaghetti commented 3 years ago

Closing as won't fix

The public release versions of Big Sur have been out for a while, and it doesn't look like it'll have the same installer distribution that Sierra, High Sierra, Mojave, and Catalina have. It's certainly possible to extract the installer from the InstallAssistant.pkg file but this requires a different implementation. It's easy on macOS, but for a cross-platform solution it requires xar, which is rarely available as a binary package from a package manager. It's not difficult to compile but I don't want to add all the compilation dependencies to the script.

tuxpeople commented 3 years ago

@myspaghetti Jack, sorry for commenting on so many closed issues. I don't want to annoy you.

I was thinking about the xar problem, can't get this off my mind. And it may be solvable, without having dependencies to sources.

What do you think? I agree with the argument it's easy to upgrade to Big Sur manually. But more OSX versions are coming and maybe there will be a point where upgrading from Catalina is not suitable or doable anymore.

myspaghetti commented 3 years ago

sorry for commenting on so many closed issues

So far all of your comments have been helpful, so no apologies necessary!

I'll look into p7zip, it does seem to be commonly available as a binary package.

there will be a point where upgrading from Catalina is not suitable or doable anymore

Big Sur is probably the last x86 macOS, I expect that in a couple of years this script will be at best a curiosity like a Windows 95 installer.

myspaghetti commented 3 years ago

p7zip does not recognize the archived directory structure and only extracts a single file from the payload in InstallAssistant.pkg, so we're back to either finding a trusted binary package for xar or compiling it from source, which isn't difficult but adds a lot of dependencies.

myspaghetti commented 3 years ago

For reference, here are instructions for compiling xar. If anyone wants to maintain a binary package and push it to Ubuntu, Debian, centOS, and other major distros, that'll help people around the world recover their Mac devices if their recovery partition fails to install macOS.

rhoehener commented 3 years ago

How about first creating a temporary Catalina VM just to access the tooling required to extract the Big Sur installer from the pkg file? It would double the install time, and make the script more complex, but remain cross platform and fully automated.

myspaghetti commented 3 years ago

How about first creating a temporary Catalina VM just to access the tooling required to extract the Big Sur installer from the pkg file?

That would work.

It could recognize whether it's on the first-boot setup process or already logged in with tesseract and perform accordingly. I'll reference your suggestion in issue #476 which combines this issue for macOS 11 Big Sur and 12 Monterey.