AlexanderWillner / runMacOSinVirtualBox

Run macOS 10.16 Big Sur (and other versions) in VirtualBox on macOS
MIT License
937 stars 125 forks source link

Support for macOS 10.16 (Big Sur) #110

Closed AlexanderWillner closed 4 years ago

AlexanderWillner commented 4 years ago

To Reproduce Steps to reproduce the behavior:

  1. Download macOS 10.16 (Big Sur)
  2. Try to get install it in the VM

Expected behavior Should work.

Additional context

Screen Shot 2020-06-23 at 12 46 33

leogdion commented 4 years ago

I was able to get past this point by setting the BoardID. https://mrmacintosh.com/how-to-install-macos-big-sur-beta-on-vmware-fusion-parallels-desktop/

VBoxManage setextradata macOS-VM "VBoxInternal/Devices/efi/0/Config/DmiBoardProduct" "Mac-E1008331FDC96864"

I'll see how far it goes.

leogdion commented 4 years ago

The only issue I had was getting iCloud setup. I'm wondering if setting up a model number in VirtualBox would fix this. LWScreenShot 2020-06-23 at 3 30 51 PM

Otherwise the VM seems to be working.

Screen Shot 2020-06-23 at 6 36 28 PM
AlexanderWillner commented 4 years ago

The only issue I had was getting iCloud setup. I'm wondering if setting up a model number in VirtualBox would fix this.

For (later) reference for a potential fix:

leogdion commented 4 years ago

Serial number didn't work. I'm going to try model number when I get a chance to restart.

AlexanderWillner commented 4 years ago

Serial number didn't work. I'm going to try model number when I get a chance to restart.

Interesting. "Works for me" ;) Which OS are you using?

leogdion commented 4 years ago

Host:

Screen Shot 2020-06-24 at 11 13 38 AM

Guest:

Screen Shot 2020-06-24 at 11 13 28 AM

VirtualBox:

Screen Shot 2020-06-24 at 11 13 47 AM
AlexanderWillner commented 4 years ago

ok, seems that the command ioreg -c IOPlatformExpertDevice -d 2 | awk -F\" '/IOPlatformSerialNumber/{print $(NF-1)}' works on macOS Mojave but not on Catalina then...

AlexanderWillner commented 4 years ago

@leogdion does the fix at #111 help with your issue?

leogdion commented 4 years ago

No, I'm stilling having issues signing into iCloud. Everything else seems to work fine.

Screen Shot 2020-06-29 at 8 20 41 AM
startergo commented 4 years ago

ioreg -c IOPlatformExpertDevice -d 2 | awk -F\" '/IOPlatformSerialNumber/{print $(NF-1)}'

It works on Catalina. I got iMessage and iCloud working. You need all these values: https://github.com/myspaghetti/macos-virtualbox/blob/master/macos-guest-virtualbox.sh#L33

startergo commented 4 years ago

You can add these in the script:

readonly HOST_SERIAL="$(ioreg -c IOPlatformExpertDevice -d 2 | awk -F\" '/IOPlatformSerialNumber/{print $(NF-1)}')"
HOST_ID=$(ioreg -p IODeviceTree -r -n / -d 1 | grep board-id);HOST_ID=${HOST_ID##*<\"};HOST_ID=${HOST_ID%%\">};
readonly HOST_UUID="$(ioreg -l -p IODeviceTree | awk -F"\<|>" '/"system-id"/{print $(NF-1)}')"
readonly VM_SYSTEM_FAMILY="$(system_profiler SPHardwareDataType |  awk -F": " ' /Model Name/ { print $2 } ')"
readonly VM_SYSTEM_PRODUCT="$(system_profiler SPHardwareDataType |  awk -F": " ' /Model Identifier/ { print $2 } ')"
readonly VM_SYSTEM_UUID="$(system_profiler SPHardwareDataType |  awk -F": " ' /Hardware UUID/ { print $2 } ')"
readonly VM_SYSTEM_REVS="$(system_profiler SPHardwareDataType |  awk -F": " ' /Apple ROM Info/ { print $2 } ')"
readonly VM_SYSTEM_BIOS="$(system_profiler SPHardwareDataType |  awk -F": " ' /Boot ROM Version/ { print $2 } ')"
readonly VM_SYSTEM_SN="$(system_profiler SPHardwareDataType |  awk -F": " ' /Serial Number/ { print $2 } ')"
readonly ROM="$(nvram 4D1EDE05-38C7-4A6A-9CC6-4BCCA8B38C14:ROM |  awk -F" " ' /ROM/ { print $2 } ')"
readonly MLB="$(nvram 4D1EDE05-38C7-4A6A-9CC6-4BCCA8B38C14:MLB |  awk -F" " ' /MLB/ { print $2 } ')"

You are missing the ROM

I am not sure how the VM_ROM can be injected.

AlexanderWillner commented 4 years ago

Nice. Thank you! I'll check.

AlexanderWillner commented 4 years ago

Seems that Apple ROM Info is empty here. Script:

echo "Collecting system information..."
readonly VM_SYSTEM_FAMILY="$(system_profiler SPHardwareDataType |  awk -F': ' ' /Model Name/ { print $2 } ')"
readonly VM_SYSTEM_PRODUCT="$(system_profiler SPHardwareDataType |  awk -F': ' ' /Model Identifier/ { print $2 } ')"
readonly VM_SYSTEM_UUID="$(system_profiler SPHardwareDataType |  awk -F': ' ' /Hardware UUID/ { print $2 } ')"
readonly VM_SYSTEM_REVS="$(system_profiler SPHardwareDataType |  awk -F': ' ' /Apple ROM Info/ { print $2 } ')"
readonly VM_SYSTEM_BIOS="$(system_profiler SPHardwareDataType |  awk -F': ' ' /Boot ROM Version/ { print $2 } ')"
readonly VM_SYSTEM_SN="$(system_profiler SPHardwareDataType |  awk -F': ' ' /Serial Number \(system\)/ { print $2 } ')"
readonly VM_ROM="$(nvram '4D1EDE05-38C7-4A6A-9CC6-4BCCA8B38C14:ROM' |  awk -F' ' ' { print $2 } ')"
readonly VM_MLB="$(nvram '4D1EDE05-38C7-4A6A-9CC6-4BCCA8B38C14:MLB' |  awk -F' ' ' { print $2 } ')"

echo "Collected system information..."
echo "VM_SYSTEM_FAMILY: $VM_SYSTEM_FAMILY"
echo "VM_SYSTEM_PRODUCT: $VM_SYSTEM_PRODUCT"
echo "VM_SYSTEM_UUID: $VM_SYSTEM_UUID"
echo "VM_SYSTEM_REVS: $VM_SYSTEM_REVS" # no output here on my system
echo "VM_SYSTEM_BIOS: $VM_SYSTEM_BIOS"
echo "VM_SYSTEM_SN: $VM_SYSTEM_SN"
echo "VM_ROM: $VM_ROM"
echo "VM_MLB: $VM_MLB"
startergo commented 4 years ago

Seems that Apple ROM Info is empty here. Script:

echo "Collecting system information..."
readonly VM_SYSTEM_FAMILY="$(system_profiler SPHardwareDataType |  awk -F': ' ' /Model Name/ { print $2 } ')"
readonly VM_SYSTEM_PRODUCT="$(system_profiler SPHardwareDataType |  awk -F': ' ' /Model Identifier/ { print $2 } ')"
readonly VM_SYSTEM_UUID="$(system_profiler SPHardwareDataType |  awk -F': ' ' /Hardware UUID/ { print $2 } ')"
readonly VM_SYSTEM_REVS="$(system_profiler SPHardwareDataType |  awk -F': ' ' /Apple ROM Info/ { print $2 } ')"
readonly VM_SYSTEM_BIOS="$(system_profiler SPHardwareDataType |  awk -F': ' ' /Boot ROM Version/ { print $2 } ')"
readonly VM_SYSTEM_SN="$(system_profiler SPHardwareDataType |  awk -F': ' ' /Serial Number \(system\)/ { print $2 } ')"
readonly VM_ROM="$(nvram '4D1EDE05-38C7-4A6A-9CC6-4BCCA8B38C14:ROM' |  awk -F' ' ' { print $2 } ')"
readonly VM_MLB="$(nvram '4D1EDE05-38C7-4A6A-9CC6-4BCCA8B38C14:MLB' |  awk -F' ' ' { print $2 } ')"

echo "Collected system information..."
echo "VM_SYSTEM_FAMILY: $VM_SYSTEM_FAMILY"
echo "VM_SYSTEM_PRODUCT: $VM_SYSTEM_PRODUCT"
echo "VM_SYSTEM_UUID: $VM_SYSTEM_UUID"
echo "VM_SYSTEM_REVS: $VM_SYSTEM_REVS" # no output here on my system
echo "VM_SYSTEM_BIOS: $VM_SYSTEM_BIOS"
echo "VM_SYSTEM_SN: $VM_SYSTEM_SN"
echo "VM_ROM: $VM_ROM"
echo "VM_MLB: $VM_MLB"

I have corrected the parameters. Please re-check my previous post. There were some empty strings upfront which I removed as well. You have some ' ' single quotes which are not supposed to be there. Also check this zsh script (replace zsh in the beginning with bash if you use bash)

#!/usr/bin/env zsh

readonly HOST_SERIAL="$(ioreg -c IOPlatformExpertDevice -d 2 | awk -F\" '/IOPlatformSerialNumber/{print $(NF-1)}')"
HOST_ID=$(ioreg -p IODeviceTree -r -n / -d 1 | grep board-id);HOST_ID=${HOST_ID##*<\"};HOST_ID=${HOST_ID%%\">};
readonly HOST_UUID="$(ioreg -l -p IODeviceTree | awk -F"\<|>" '/"system-id"/{print $(NF-1)}')"
readonly VM_SYSTEM_FAMILY="$(system_profiler SPHardwareDataType |  awk -F": " ' /Model Name/ { print $2 } ')"
readonly VM_SYSTEM_PRODUCT="$(system_profiler SPHardwareDataType |  awk -F": " ' /Model Identifier/ { print $2 } ')"
readonly VM_SYSTEM_UUID="$(system_profiler SPHardwareDataType |  awk -F": " ' /Hardware UUID/ { print $2 } ')"
readonly VM_SYSTEM_REVS="$(system_profiler SPHardwareDataType |  awk -F": " ' /Apple ROM Info/ { print $2 } ')"
readonly VM_SYSTEM_BIOS="$(system_profiler SPHardwareDataType |  awk -F": " ' /Boot ROM Version/ { print $2 } ')"
readonly VM_SYSTEM_SN="$(system_profiler SPHardwareDataType |  awk -F": " ' /Serial Number/ { print $2 } ')"
readonly ROM="$(nvram 4D1EDE05-38C7-4A6A-9CC6-4BCCA8B38C14:ROM |  awk -F" " ' /ROM/ { print $2 } ')"
readonly MLB="$(nvram 4D1EDE05-38C7-4A6A-9CC6-4BCCA8B38C14:MLB |  awk -F" " ' /MLB/ { print $2 } ')"

Echo DmiSystemSerial="'$HOST_SERIAL'" > macos_vm_vars_file
Echo DmiBoardProduct="'$HOST_ID'" >> macos_vm_vars_file
Echo SYSTEM_UUID="'$HOST_UUID'" >> macos_vm_vars_file
Echo DmiSystemFamily="'$VM_SYSTEM_FAMILY'" >> macos_vm_vars_file
Echo DmiSystemProduct="'$VM_SYSTEM_PRODUCT'" >> macos_vm_vars_file
Echo DmiSystemUuid="'$VM_SYSTEM_UUID'" >> macos_vm_vars_file
Echo DmiOEMVBoxRev="'$VM_SYSTEM_REVS'" >> macos_vm_vars_file
Echo DmiBIOSVersion="'$VM_SYSTEM_BIOS'" >> macos_vm_vars_file
Echo DmiBoardSerial="'$VM_SYSTEM_SN'" >> macos_vm_vars_file
echo MLB="'$MLB'" >> macos_vm_vars_file
Echo ROM="'$ROM'" >> macos_vm_vars_file
echo SYSTEM_INTEGRITY_PROTECTION="'77'" >> macos_vm_vars_file

Here is a one line. Just copy/paste enter:

DmiSystemSerial="$(ioreg -c IOPlatformExpertDevice -d 2 | awk -F\" '/IOPlatformSerialNumber/{print $(NF-1)}')";  echo DmiSystemSerial="'$DmiSystemSerial'" > macos_vm_vars_file &&
HOST_ID=$(ioreg -p IODeviceTree -r -n / -d 1 | grep board-id);HOST_ID=${HOST_ID##*<\"};HOST_ID=${HOST_ID%%\">}; echo DmiBoardProduct="'$HOST_ID'" >> macos_vm_vars_file &&
SYSTEM_UUID="$(ioreg -l -p IODeviceTree | awk -F"\<|>" '/"system-id"/{print $(NF-1)}')"; Echo SYSTEM_UUID="'$SYSTEM_UUID'" >> macos_vm_vars_file &&
DmiSystemFamily="$(system_profiler SPHardwareDataType |  awk -F": " ' /Model Name/ { print $2 } ')"; echo DmiSystemFamily="'$DmiSystemFamily'" >> macos_vm_vars_file &&
DmiSystemProduct="$(system_profiler SPHardwareDataType |  awk -F": " ' /Model Identifier/ { print $2 } ')";  echo DmiSystemProduct="'$DmiSystemProduct'" >> macos_vm_vars_file&&
DmiSystemUuid="$(system_profiler SPHardwareDataType |  awk -F": " ' /Hardware UUID/ { print $2 } ')"; echo DmiSystemUuid="'$DmiSystemUuid'" >> macos_vm_vars_file &&
DmiBIOSVersion="$(system_profiler SPHardwareDataType |  awk -F": " ' /Boot ROM Version/ { print $2 } ')"; echo DmiBIOSVersion="'$DmiBIOSVersion'" >> macos_vm_vars_file &&
DmiBoardSerial="$(nvram 4D1EDE05-38C7-4A6A-9CC6-4BCCA8B38C14:MLB |  awk -F" " ' /MLB/ { print $2 } ')"; echo DmiBoardSerial="'$DmiBoardSerial'" >> macos_vm_vars_file &&
ROM="$(nvram 4D1EDE05-38C7-4A6A-9CC6-4BCCA8B38C14:ROM |  awk -F" " ' /ROM/ { print $2 } ')"; echo ROM="'$ROM'" >> macos_vm_vars_file &&
MLB="$(nvram 4D1EDE05-38C7-4A6A-9CC6-4BCCA8B38C14:MLB |  awk -F" " ' /MLB/ { print $2 } ')"; echo MLB="'$MLB'" >> macos_vm_vars_file