AlexanderWillner / runMacOSinVirtualBox

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

Mojave VM stuck in a start/reset loop just early in boot loop #109

Open petenish opened 4 years ago

petenish commented 4 years ago
    I'm a newbie at VirtualBox on a Macbook (10.14.6), trying to create a 
    Mojave VM.  I've gotten as far as the VM gets created, but the
    VM is stuck in a loop as it appears that the boot to Mojave fails
    early in it's initial boot of the OS.  I've tried this with
    10.14.4 and 10.14.6

    And, it might possibly because I'm not quite understanding the
    runMacOSVirtualBox script.

    What I had to do was
        - run 'installinstallmacos.py' to build the 10.14.x .dmg installer
        - mounted (via hdiutil) the .dmg
        - create /Applications/Install macOS Mojave
        - create a symbolic link from the mounted 
          .dmg/Install Mac Mojave.app/Contents to 
          /Applications/Install macOS Mojave
        - execute runMacOSVirtualBox.sh

    At this point, the various macOS-VM files/directories are created
    and the VM is started and booted and I get into the loop.

    Of course, the script prompts to eject the installer medium, and
    I do so, and I just get stuck at the Shell prompt because it can't
    find any bootable device.

    Maybe I'm doing something very wrong/dumb (as I thought that I
    wouldn't have to manually mount the .dmg/create the link to Contents),
    or maybe something in my VirtualBox is setup incorrectly.
    Any help/pointers greatly appreciated.

    I've attached a VBox log (VBox.log.2) which seems to show that I'm getting
    repeated "xHCI: Hardware resets" (maybe this is a clue?).

VBox.log

    My runMacOSVirtualbox.log:

[2020-06-04 13:00:03] Running checks (around 1 second)... [2020-06-04 13:00:03] . [2020-06-04 13:00:04] Creating image '/Users/peten/VirtualBox VMs/macOS-VM.dmg' (around 20 seconds, version 14.6.06, will need sudo)... [2020-06-04 13:00:04] . created: /Users/peten/VirtualBox VMs/macOS-VM.dmg /dev/disk4 Apple_partition_scheme
/dev/disk4s1 Apple_partition_map
/dev/disk4s2 Apple_HFS /Volumes/macOS-VM WARNING: "--applicationpath" is deprecated in macOS 10.14 and greater. Please remove it from your invocation. Erasing disk: 0%... 10%... 20%... 30%... 100% Copying to disk: 0%... 100% Making disk bootable... Copying boot files... Install media now available at "/Volumes/Install macOS Mojave" "disk4" ejected. [2020-06-04 13:00:29] Creating iso '/Users/peten/VirtualBox VMs/macOS-VM.iso.cdr' (around 25 seconds)... [2020-06-04 13:00:29] . Reading Driver Descriptor Map (DDM : 0)… Reading Apple (Apple_partition_map : 1)… Reading (Apple_Free : 2)… Reading disk image (Apple_HFS : 3)… Elapsed Time: 24.719s Speed: 414.2Mbytes/sec Savings: 0.0% created: /Users/peten/VirtualBox VMs/macOS-VM.iso.cdr [2020-06-04 13:00:54] Creating VM HDD '/Users/peten/VirtualBox VMs/macOS-VM.vdi' (around 1 minute)... [2020-06-04 13:00:54] . created: /Users/peten/VirtualBox VMs/macOS-VM.sparseimage Converting from raw image file="/dev/disk4" to file="/Users/peten/VirtualBox VMs/macOS-VM.vdi"... Creating dynamic image with size 137438953472 bytes (131072MB)... Disk /dev/disk4 ejected [2020-06-04 13:08:53] Adding APFS drivers to EFI in '/Users/peten/VirtualBox VMs/macOS-VM.efi.vdi' (around 5 seconds)... [2020-06-04 13:08:53] . created: /Users/peten/VirtualBox VMs/macOS-VM.efi.sparseimage Volume EFI on /dev/disk4s1 mounted Volume EFI on disk4s1 unmounted Converting from raw image file="/dev/disk4" to file="/Users/peten/VirtualBox VMs/macOS-VM.efi.vdi"... Creating dynamic image with size 1048576 bytes (1MB)... Disk /dev/disk4 ejected [2020-06-04 13:08:55] Creating VM 'macOS-VM' (around 2 seconds)... [2020-06-04 13:08:56] . Virtual machine 'macOS-VM' is created and registered. UUID: d3175efa-d00a-430b-ab3a-aa02274d4f24 Settings file: '/Users/peten/VirtualBox VMs/macOS-VM/macOS-VM.vbox' [2020-06-04 13:08:56] Adding installer DVD for VM 'macOS-VM'... [2020-06-04 13:08:56] . [2020-06-04 13:08:57] Adding APFS drivers to EFI in '/Users/peten/VirtualBox VMs/macOS-VM.efi.vdi' (around 5 seconds)... [2020-06-04 13:08:57] . Volume EFI on /dev/disk4s1 mounted Volume EFI on disk4s1 unmounted Converting from raw image file="/dev/disk4" to file="/Users/peten/VirtualBox VMs/macOS-VM.efi.vdi"... Creating dynamic image with size 1048576 bytes (1MB)... VBoxManage: error: VDI: cannot create image '/Users/peten/VirtualBox VMs/macOS-VM.efi.vdi' VBoxManage: error: Error code VERR_ALREADY_EXISTS at /Users/vbox/tinderbox/6.1-mac-rel/src/VBox/Storage/VDI.cpp(691) in function int vdiImageCreateFile(PVDIIMAGEDESC, unsigned int, PVDINTERFACEPROGRESS, unsigned int, unsigned int) VBoxManage: error: Cannot create the disk image "/Users/peten/VirtualBox VMs/macOS-VM.efi.vdi": VERR_ALREADY_EXISTS Disk /dev/disk4 ejected [2020-06-04 13:08:58] Starting VM 'macOS-VM' (3 minutes in the VM)... [2020-06-04 13:08:58] . Waiting for VM "macOS-VM" to power on... VM "macOS-VM" has been successfully started. [2020-06-04 13:09:03] Press enter to stop the VM and to eject the installer medium (to avoid an installation loop)... [2020-06-04 13:09:03] . 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100% [2020-06-04 14:02:20] Ejecting installer DVD for VM 'macOS-VM'... [2020-06-04 14:02:20] . [2020-06-04 14:02:20] Starting VM 'macOS-VM' (3 minutes in the VM)... [2020-06-04 14:02:20] . Waiting for VM "macOS-VM" to power on... VM "macOS-VM" has been successfully started.

petenish commented 4 years ago

May be related to bug #103.
A bit more info and a video of the failure

Vbox : Version 6.1.8 r137981 (Qt5.6.3) Extension Pack : 6.1.8r137981 Host : Mojave 10.14.6 Installer : Mojave 10.14.4

10.14.4 reboot loop.mov.zip

petenish commented 4 years ago

Sorry, hit the wrong button - didn't mean to close it

tigeryu8900 commented 4 years ago

Try downloading the Mojave installer again and start over. A corrupted installer may cause this issue.

AlexanderWillner commented 3 years ago

Is this issue still valid?

petenish commented 3 years ago

Yes, it's still fails into a reboot loop. I'm on Catalina now (wanted to try a VB, but gave up waiting) and running vbox 6.1.12 r139181 (Qt5.6.3). I pulled down -master.zip again, ran ./installinstallmacros.py and selected '4' (10.14.4 Mojave), ran './runMacOSVirtualbox.sh all' and the resultant VB image just gets into the same reboot loop. Is there something more that I can provide, or help debug this problem? Anyone else having this problem?

petenish commented 3 years ago

Hit wrong button. DIdn't mean to close this.