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.46k stars 1.11k forks source link

After executing the script, jam #598

Closed rateyu closed 2 years ago

rateyu commented 2 years ago

image

image

rateyu commented 2 years ago

$ ./macos-guest-virtualbox.sh

Push-button installer of macOS on VirtualBox

This script installs only open-source software and unmodified Apple binaries, and requires about 50GB of available storage, of which 25GB are for temporary installation files that may be deleted when the script is finished.

The script interacts with the virtual machine twice, please do not interact with the virtual machine manually before the script is finished.

Documentation about optional configuration, iCloud and iMessage connectivity, resuming the script by stages, and other topics can be viewed with the following command:

./macos-guest-virtualbox.sh documentation | less -R

Press enter to review the script configuration

vm_name="macOS" macOS_release_name="Catalina" # install "HighSierra" "Mojave" "Catalina" storage_size=80000 # VM disk image size in MB, minimum 22000 storage_format="vdi" # VM disk image file format, "vdi" or "vmdk" cpu_count=2 # VM CPU cores, minimum 2 memory_size=4096 # VM RAM in MB, minimum 2048 gpu_vram=128 # VM video RAM in MB, minimum 34, maximum 128 resolution="1280x800" # VM display resolution

These values may be customized as described in the documentation.

Press enter to continue, CTRL-C to exit Can't find VBoxManage in PATH variable, checking C:\Program Files\Oracle\VirtualBox\VBoxManage.exe Found VBoxManage

The command "VBoxManage list extpacks" either does not list the Oracle VM VirtualBox Extension Pack, or lists one or more extensions as unusable. The virtual machine will be configured without USB xHCI controllers. Locally installing dmg2img dmg2img-1.6.6-win32.zip 100%[===============================================================>] 62.87K 125KB/s in 0.5s Archive: dmg2img-1.6.6-win32.zip inflating: dmg2img.exe

Catalina selected to be downloaded and installed

stage: prompt_delete_existing_vm

stage: create_vm

Error: Could not create virtual machine "macOS". Please delete exising "macOS" VirtualBox configuration files manually.

Error message:

VBoxManage.exe: error: Machine settings file 'C:\Users\myu\VirtualBox VMs\macOS\macOS.vbox' already exists VBoxManage.exe: error: Details: code VBOX_E_FILE_ERROR (0x80bb0004), component MachineWrap, interface IMachine, callee IUnknown VBoxManage.exe: error: Context: "CreateMachine(bstrSettingsFile.raw(), bstrName.raw(), ComSafeArrayAsInParam(groups), bstrOsTypeId.raw(), c reateFlags.raw(), machine.asOutParam())" at line 280 of file VBoxManageMisc.cpp

myu@DESKTOP-CR31MNT /cygdrive/c/Users/myu/Documents/github/macos-virtualbox $ ./macos-guest-virtualbox.sh

Push-button installer of macOS on VirtualBox

This script installs only open-source software and unmodified Apple binaries, and requires about 50GB of available storage, of which 25GB are for temporary installation files that may be deleted when the script is finished.

The script interacts with the virtual machine twice, please do not interact with the virtual machine manually before the script is finished.

Documentation about optional configuration, iCloud and iMessage connectivity, resuming the script by stages, and other topics can be viewed with the following command:

./macos-guest-virtualbox.sh documentation | less -R

Press enter to review the script configuration

vm_name="macOSCatalina" macOS_release_name="Catalina" # install "HighSierra" "Mojave" "Catalina" storage_size=80000 # VM disk image size in MB, minimum 22000 storage_format="vdi" # VM disk image file format, "vdi" or "vmdk" cpu_count=2 # VM CPU cores, minimum 2 memory_size=4096 # VM RAM in MB, minimum 2048 gpu_vram=128 # VM video RAM in MB, minimum 34, maximum 128 resolution="1280x800" # VM display resolution

These values may be customized as described in the documentation.

Press enter to continue, CTRL-C to exit Can't find VBoxManage in PATH variable, checking C:\Program Files\Oracle\VirtualBox\VBoxManage.exe Found VBoxManage

The command "VBoxManage list extpacks" either does not list the Oracle VM VirtualBox Extension Pack, or lists one or more extensions as unusable. The virtual machine will be configured without USB xHCI controllers.

Catalina selected to be downloaded and installed

stage: prompt_delete_existing_vm

stage: create_vm

stage: check_default_virtual_machine

Checking that VirtualBox starts the virtual machine without errors.

Checking that VirtualBox uses hardware-supported virtualization.

stage: prepare_macos_installation_files

Downloading Apple macOS Catalina software update catalog Catalina_sucatalog 100%[===============================================================>] 6.49M 10.1MB/s in 0.6s Trying to find macOS Catalina InstallAssistant download URL Catalina_sucatalog_00_InstallAssis 100%[===============================================================>] 40.05K --.-KB/s in 0.008s Found download URL: http://swcdn.apple.com/content/downloads/26/37/001-68446/r1dbqtmf3mtpikjnd04cq31p4jk91dceh8/

Downloading macOS installation files from swcdn.apple.com Catalina_BaseSystem.chunklist 100%[===============================================================>] 1.97K --.-KB/s in 0s Catalina_InstallInfo.plist 100%[===============================================================>] 1.55K --.-KB/s in 0s Catalina_AppleDiagnostics.dmg 100%[===============================================================>] 3.00M 4.27MB/s in 0.7s Catalina_AppleDiagnostics.chunklis 100%[===============================================================>] 328 --.-KB/s in 0s Catalina_BaseSystem.dmg 100%[===============================================================>] 475.53M 2.00MB/s in 3m 37s Catalina_InstallESDDmg.pkg 100%[====================================================================================================================>] 7.21G 10.6MB/s in 11m 10s

Splitting the several-GB InstallESDDmg.pkg into 1GB parts because VirtualBox hasn't implemented UDF/HFS VISO support yet and macOS doesn't support ISO 9660 Level 3 with files larger than 2GB. creating file 'Catalina_InstallESD.part00' creating file 'Catalina_InstallESD.part01' creating file 'Catalina_InstallESD.part02' creating file 'Catalina_InstallESD.part03' creating file 'Catalina_InstallESD.part04' creating file 'Catalina_InstallESD.part05' creating file 'Catalina_InstallESD.part06' creating file 'Catalina_InstallESD.part07'

Downloading open-source APFS EFI drivers used for VirtualBox 6.0 and 5.2 ...even though VirtualBox version 6.1 or higher is detected. AppleSupport-v2.0.4-RELEASE.zip 100%[====================================================================================================================>] 42.20K --.-KB/s in 0.07s Archive: AppleSupport-v2.0.4-RELEASE.zip inflating: ApfsDriverLoader.efi inflating: AppleImageLoader.efi inflating: AppleUiSupport.efi

stage: create_nvram_files

stage: create_macos_installation_files_viso Creating EFI startup script

Creating VirtualBox 6 virtual ISO containing the installation files from swcdn.apple.com

stage: configure_vm

stage: populate_basesystem_virtual_disk Converting BaseSystem.dmg to BaseSystem.img

dmg2img v1.6.6 (c) vu1tur (to@vu1tur.eu.org)

Catalina_BaseSystem.dmg --> Catalina_BaseSystem.img

decompressing: opening partition 0 ... 100.00% ok opening partition 1 ... 100.00% ok opening partition 2 ... 100.00% ok opening partition 3 ... 100.00% ok opening partition 4 ... 100.00% ok opening partition 5 ... 100.00% ok opening partition 6 ... 100.00% ok opening partition 7 ... 100.00% ok

Archive successfully decompressed as Catalina_BaseSystem.img Converting from raw image file="Catalina_BaseSystem.img" to file="Catalina_BaseSystem.vdi"... Creating dynamic image with size 2138558464 bytes (2040MB)...

stage: create_bootable_installer_virtual_disk Creating Catalina installation media virtual disk image. 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100% Medium created. UUID: a44bf542-6603-45a0-a2e7-cc99dea08af3

stage: populate_bootable_installer_virtual_disk

Creating VirtualBox 6 virtual ISO containing macOS Terminal script for partitioning and populating the bootable installer virtual disk.

Starting virtual machine "macOSCatalina". This should take a couple of minutes. If booting fails, exit the script by pressing CTRL-C then see the documentation for information about applying different CPU profiles in the section CPU profiles and CPUID settings.

Until the script completes, please do not manually interact with the virtual machine.

Attempting automated recognition of virtual machine graphical user interface. Please wait Failed automated recognition of virtual machine graphical user interface. Please press enter as directed.

Press enter when the Language window is ready.

Press enter when the macOS Utilities window is ready.

Press enter when the Terminal command prompt is ready.

Partitioning the bootable installer virtual disk; loading base system onto the installer virtual disk; moving installation files to installer virtual disk; updating the InstallInfo.plist file; and rebooting the virtual machine.

The virtual machine may report that disk space is critically low; this is fine.

When the bootable installer virtual disk is finished being populated, the script will shut down the virtual machine. After shutdown, the initial base system will be detached from the VM and released from VirtualBox.

If the partitioning fails, exit the script by pressing CTRL-C

Otherwise, please wait. Waiting for the VirtualBox GUI to shut off. Please wait Catalina_BaseSystem.vdi successfully detached from the virtual machine and released from VirtualBox Manager.

stage: create_target_virtual_disk Creating target system virtual disk image for "macOSCatalina" 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100% Medium created. UUID: 9f687236-ea64-452e-81f8-6f17484900e1

stage: populate_macos_target_disk

Creating VirtualBox 6 virtual ISO containing macOS Terminal scripts for partitioning and populating the target virtual disk.

The VM will boot from the populated installer base system virtual disk.

Attempting automated recognition of virtual machine graphical user interface. Please waitVBoxManage.exe: error: Machine 'macOSCatalina' is not currently running Please waitVBoxManage.exe: error: Machine 'macOSCatalina' is not currently running

myspaghetti commented 2 years ago

Please see Unsupported features - CPU compatibility