Skip to content
This repository has been archived by the owner on Feb 15, 2024. It is now read-only.

macOS 12 Monterey and macOS 11 Big Sur #547

Closed
myspaghetti opened this issue Nov 1, 2021 · 17 comments
Closed

macOS 12 Monterey and macOS 11 Big Sur #547

myspaghetti opened this issue Nov 1, 2021 · 17 comments
Assignees
Labels
enhancement New feature or request

Comments

@myspaghetti
Copy link
Owner

The issue with installing macOS 12 Monterey is almost identical to issue #254 regarding installing macOS 11 Big Sur.

Apple packaged the file structure of the bootable installer in a xar archive (more accurately a pkg archive), so unpacking the installer for Big Sur and Monterey requires a xar-supporting archiver. This is available on macOS but rarely available as a binary package on other operating systems. Compiling the free and open-source xar is not difficult, but requiring compilation will impose many more dependencies on the script.

People familiar with compiling software can easily compile xar and use it to create a bootable installer from InstallAssistant.pkg the same way the script does. Meanwhile people who don't want to compile software can use the script to install earlier versions of macOS and use Software Update to create bootable installers of Monterey and Big Sur.

@rhoehener suggested using an existing macOS VM to create a Big Sur bootable installer, which would work all the same on Monterey and as an upgrade as well as a bootable installer.

This would work, and I think it's better to have it as a separate script which can be daisy-chained from this script if desired or applied to an existing macOS VM.

Currently I don't plan on implementing this, but it shouldn't be more or less straightforward to use tesseract similar to how it's used in the current script to detect the macOS VM state according to on-screen text and send the appropriate keystrokes.

Others have suggested using 7zip; it does not correctly extract this type of xar archives. Others have suggested using Docker; Docker on Windows uses Hyper-V and in general cannot be run concurrently with a VirtualBox macOS guest.

I deleted the previous issue (#476) to avoid the Google results that lead people to post about general issues with Docker and macOS here.

@myspaghetti myspaghetti added the enhancement New feature or request label Nov 1, 2021
@myspaghetti myspaghetti self-assigned this Nov 1, 2021
@haphaeu
Copy link

haphaeu commented Nov 18, 2021

I'm willing to give it a try to a xar dependent fork of this project, for the people that want to compile xar themselves. Unless someone has already done that?

I'm however stuck where to find URLs for the sucatalogs for Big Sur and Monterey?

@myspaghetti
Copy link
Owner Author

Simple - they're found on working systems with Big Sur and Monterey! 😉

Big Sur software update catalog URL: https://swscan.apple.com/content/catalogs/others/index-11-10.15-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog

Monterey software update catalog URL: https://swscan.apple.com/content/catalogs/others/index-12-10.16-10.15-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog

@thispsj
Copy link
Contributor

thispsj commented Mar 4, 2022

Hi @myspaghetti ,

I read in #254 about 7zip. You said that it's only able to extract a single payload file.

I just wanted to let you know that 7zip can also extract the payload. I have attached a clip below for the same. Let me know if I am wrong 😅

monterey.mp4

@myspaghetti
Copy link
Owner Author

Oh nice, I never thought of trying to extract Payload~

@thispsj
Copy link
Contributor

thispsj commented Mar 10, 2022

Oh nice, I never thought of trying to extract Payload~

I know this from the time I installed Big Sur the last year but had never read all of #254 😅 .

@nmonti
Copy link

nmonti commented Apr 25, 2022

I initially ran into an infinite boot loop on upgrading from Catalina to Monterey using System Update. This solution on #484 worked for me courtesy of FlorianLeMenn: #484 (comment).

TLDR in the host, with the macOS vm off:

VBoxManage setextradata "macos" "VBoxInternal/Devices/smc/0/Config/GetKeyFromRealSMC" 1
VBoxManage setextradata "macos" "VBoxInternal/TM/TSCMode" "RealTSCOffset"

You don't need a fresh Catalina install to fix the boot loop. Stop the VM, run those commands, and it should complete the upgrade.

Note that the script sets GetRealFromSMC to 0 https://github.com/myspaghetti/macos-virtualbox/blob/master/macos-guest-virtualbox.sh#L753. It must remain 1 after Monterey is installed.

@thispsj
Copy link
Contributor

thispsj commented Apr 26, 2022

I initially ran into an infinite boot loop on upgrading from Catalina to Monterey using System Update. This solution on #484 worked for me courtesy of FlorianLeMenn: #484 (comment).

TLDR in the host, with the macOS vm off:

VBoxManage setextradata "macos" "VBoxInternal/Devices/smc/0/Config/GetKeyFromRealSMC" 1
VBoxManage setextradata "macos" "VBoxInternal/TM/TSCMode" "RealTSCOffset"

You don't need a fresh Catalina install to fix the boot loop. Stop the VM, run those commands, and it should complete the upgrade.

Note that the script sets GetRealFromSMC to 0 https://github.com/myspaghetti/macos-virtualbox/blob/master/macos-guest-virtualbox.sh#L753. It must remain 1 after Monterey is installed.

@nmonti you're absolutely right. Even I was facing the same issue but it took me 2 days before I could figure out the problem.

Putting this here will ensure that others don't have to waste so much of time like me😅

@R3D347HR4Y
Copy link

R3D347HR4Y commented May 6, 2022

@nmonti Your solution worked and Monterey is currently working on my VM, there is one issue however:
My Display memory is at 7MB and graphical performance is insanely slow, tried installing VBox GAs and the install failed...
Tried with the VMWare ones and it doesn't change anything from what I can see...
I'll dial down the resolution for the time being but I'd like to know if someone found a solution to get better graphical performance on Monterey
image

EDIT: I got the video memory to be recognized by installing the VMWare Tools, then using those commands on the host computer (with the guest turned off)

VBoxManage setextradata "VBoxNAME" VBoxInternal2/EfiGraphicsResolution "1920x1080"
VBoxManage modifyvm "VBoxNAME" --vram 256

I then changed the Graphics Controller setting in VirtualBox to VMSVGA (do it in the settings preview pane and not in the settings of the machine, it reverts for some reason)
You'll need to run this command at every login to make sure the resolution is corrrect btw:

echo "your mac password" | sudo -S /Library/Application\ Support/VMware\ Tools/vmware-resolutionset 1920 1080

You can automate it as shown in this video: https://www.youtube.com/watch?v=gDwFdGUsBOo
Performance is still sluggish though that might be CPU driven, will try to change the CPU ID

@nmonti
Copy link

nmonti commented May 6, 2022 via email

@myspaghetti
Copy link
Owner Author

The best solution by far is to use QEMU/KVM instead of VirtualBox.

@leiless
Copy link

leiless commented May 9, 2022

The best solution by far is to use QEMU/KVM instead of VirtualBox.

Hi, @myspaghetti. How can I run macOS 11/12 in QEMU/KVM under a Linux host? is there any documentation?

@myspaghetti
Copy link
Owner Author

There's a very nice tutorial by Nicholas Sherlock. You can export an existing VirtualBox image instead of creating a new installation. You can install OpenCore on the existing image or on a separate image. QEMU/KVM also works surprisingly well on Windows through WSL2 or WSLg, you don't even need to compile any kernel modules, it works out of the box (test with kvm-ok).

@REVENGE977
Copy link

There's a very nice tutorial by Nicholas Sherlock. You can export an existing VirtualBox image instead of creating a new installation. You can install OpenCore on the existing image or on a separate image. QEMU/KVM also works surprisingly well on Windows through WSL2 or WSLg, you don't even need to compile any kernel modules, it works out of the box (test with kvm-ok).

wait so you can make a macos kvm on wsl2 ? will it run as smoothly as a normal kvm ?

@mr-gosh
Copy link

mr-gosh commented Nov 16, 2022

I just did the updates via system upgrade up to Monterey - worked like a charm.

Not testing Ventura for now.

@duyleekun
Copy link

duyleekun commented Dec 20, 2022

The script works with minor modifications to install from internet recovery. You can always duplicate/snapshot machines so keeping the file for reusing later won't be useful I suppose.
Monterey worked without updating from catalina

@Tim-Cao
Copy link

Tim-Cao commented Sep 9, 2023

VBoxManage setextradata "macos" "VBoxInternal/Devices/smc/0/Config/GetKeyFromRealSMC" 1
VBoxManage setextradata "macos" "VBoxInternal/TM/TSCMode" "RealTSCOffset"
This way doesn't work with upgrade to Ventura
image

@BrianHotopp
Copy link

BrianHotopp commented Dec 9, 2023

I initially ran into an infinite boot loop on upgrading from Catalina to Monterey using System Update. This solution on #484 worked for me courtesy of FlorianLeMenn: #484 (comment).
TLDR in the host, with the macOS vm off:

VBoxManage setextradata "macos" "VBoxInternal/Devices/smc/0/Config/GetKeyFromRealSMC" 1
VBoxManage setextradata "macos" "VBoxInternal/TM/TSCMode" "RealTSCOffset"

You don't need a fresh Catalina install to fix the boot loop. Stop the VM, run those commands, and it should complete the upgrade.
Note that the script sets GetRealFromSMC to 0 https://github.com/myspaghetti/macos-virtualbox/blob/master/macos-guest-virtualbox.sh#L753. It must remain 1 after Monterey is installed.

@nmonti you're absolutely right. Even I was facing the same issue but it took me 2 days before I could figure out the problem.

Putting this here will ensure that others don't have to waste so much of time like me😅

legend - this worked for me

@myspaghetti myspaghetti closed this as not planned Won't fix, can't repro, duplicate, stale Feb 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests