Closed shadowink closed 5 years ago
Can you provide the log file?
[2019-02-14 17:21:58] Running checks (around 1 second)...
[2019-02-14 17:21:58] .
[2019-02-14 17:21:59] Creating image '/Users/alberghi/VirtualBox VMs/macOS-Mojave.dmg' (around 20 seconds, version 14.3.3, will need sudo)...
[2019-02-14 17:21:59] .
created: /Users/alberghi/VirtualBox VMs/macOS-Mojave.dmg
/dev/disk3 Apple_partition_scheme
/dev/disk3s1 Apple_partition_map
/dev/disk3s2 Apple_HFS /Volumes/macOS-Mojave
sudo /Applications/Install macOS Mojave.app/Contents/Resources/createinstallmedia --nointeraction --volume /Volumes/macOS-Mojave --applicationpath /Applications/Install macOS Mojave.app
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%..../runMojaveVirtualbox.sh: line 169: 3814 Killed: 9 sudo "$INST_BIN" --nointeraction --volume "$DST_VOL" --applicationpath "$INST_VER"
"disk3" ejected.
[2019-02-14 17:22:22] Creating iso '/Users/alberghi/VirtualBox VMs/macOS-Mojave.iso.cdr' (around 25 seconds)...
[2019-02-14 17:22:22] .
Reading Driver Descriptor Map (DDM : 0)…
Reading Apple (Apple_partition_map : 1)…
Reading (Apple_Free : 2)…
Reading disk image (Apple_HFS : 3)…
Elapsed Time: 15.550s
Speed: 658.5Mbytes/sec
Savings: 0.0%
created: /Users/alberghi/VirtualBox VMs/macOS-Mojave.iso.cdr
[2019-02-14 17:22:37] Creating VM HDD '/Users/alberghi/VirtualBox VMs/macOS-Mojave.vdi' (around 1 minute)...
[2019-02-14 17:22:37] .
created: /Users/alberghi/VirtualBox VMs/macOS-Mojave.sparseimage
Converting from raw image file="/dev/disk3" to file="/Users/alberghi/VirtualBox VMs/macOS-Mojave.vdi"...
Creating dynamic image with size 34359738368 bytes (32768MB)...
Disk /dev/disk3 ejected
[2019-02-14 17:24:39] Adding APFS drivers to EFI in '/Users/alberghi/VirtualBox VMs/macOS-Mojave.efi.vdi' (around 5 seconds)...
[2019-02-14 17:24:39] .
created: /Users/alberghi/VirtualBox VMs/macOS-Mojave.efi.sparseimage
Volume EFI on /dev/disk3s1 mounted
Volume EFI on disk3s1 unmounted
Converting from raw image file="/dev/disk3" to file="/Users/alberghi/VirtualBox VMs/macOS-Mojave.efi.vdi"...
Creating dynamic image with size 1048576 bytes (1MB)...
Disk /dev/disk3 ejected
[2019-02-14 17:24:41] Creating VM 'macOS-Mojave' (around 2 seconds)...
[2019-02-14 17:24:41] .
Virtual machine 'macOS-Mojave' is created and registered.
UUID: 10e13d0b-923a-45ef-9141-336965b063b8
Settings file: '/Users/alberghi/VirtualBox VMs/macOS-Mojave/macOS-Mojave.vbox'
[2019-02-14 17:24:42] Adding APFS drivers to EFI in '/Users/alberghi/VirtualBox VMs/macOS-Mojave.efi.vdi' (around 5 seconds)...
[2019-02-14 17:24:42] .
Volume EFI on /dev/disk3s1 mounted
Volume EFI on disk3s1 unmounted
Converting from raw image file="/dev/disk3" to file="/Users/alberghi/VirtualBox VMs/macOS-Mojave.efi.vdi"...
Creating dynamic image with size 1048576 bytes (1MB)...
VBoxManage: error: VDI: cannot create image '/Users/alberghi/VirtualBox VMs/macOS-Mojave.efi.vdi'
VBoxManage: error: Error code VERR_ALREADY_EXISTS at /Users/vbox/tinderbox/6.0-mac-rel/src/VBox/Storage/VDI.cpp(680) in function int vdiImageCreateFile(PVDIIMAGEDESC, unsigned int, PVDINTERFACEPROGRESS, unsigned int, unsigned int)
VBoxManage: error: Cannot create the disk image "/Users/alberghi/VirtualBox VMs/macOS-Mojave.efi.vdi": VERR_ALREADY_EXISTS
Disk /dev/disk3 ejected
[2019-02-14 17:24:43] Starting VM 'macOS-Mojave' (3 minutes in the VM)...
[2019-02-14 17:24:43] .
Waiting for VM "macOS-Mojave" to power on...
VM "macOS-Mojave" has been successfully started.
[2019-02-14 17:24:45] Press enter to stop the VM and to eject the installer medium (to avoid an installation loop)...
[2019-02-14 17:24:45] .
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
[2019-02-14 17:25:32] Ejecting installer DVD for VM 'macOS-Mojave'...
[2019-02-14 17:25:32] .
[2019-02-14 17:25:32] Starting VM 'macOS-Mojave' (3 minutes in the VM)...
[2019-02-14 17:25:32] .
Waiting for VM "macOS-Mojave" to power on...
VM "macOS-Mojave" has been successfully started.
Looks good so far. May I assume that you pressed enter immediately, i.e. before you've installed macOS? In this case, you've to add the installer medium again and install macOS first. I created make add
for this just right now.
I have a similar problem, the virtual machine does not recognize the newly-installed OS as a bootable disk. I'm using VirtualBox 6.0.4. Could it be a problem with the UEFI driver caused by different versions of VB? [edit] It seems to be working now, I'll report back in an hour or two.
No, not related to the VirtualBox version. However, VirtualBox can only boot from the CD image or the ESP/EFI disk, that in turn loads an APFS driver to boot from the macOS installation. If you remove the CD and have not yet installed macOS, then there is nothing to start from. But it might be another issue. Keep me updated.
Wait a minute... There is this list of instructions that was written to the log file. I suppose it should have been written to the terminal?
Next steps:
1. Disk Utility: erase the virtual drive using APFS and call it 'Mojave' (it will be converted otherwise)
2. Install macOS: on the erased virtual drive 'Mojave' (around 4 minutes)
3. After the reboot: switch off the VM, remove the virtual macOS installer CD-ROM and restart
4. Start macOS in the Clover boot menu (the initial installation might take a few hours)
After following these steps (note: in step 4, Clover booted MacOS automatically) everything worked almost flawlessly (had to hard-reboot the VM at one point).
This is from a rather old version of the script...
Turns out my problem was due to the command on line 180 of runMojaveVirtualbox.sh failing. The script didn't detect the failure and continued on even though the $DST_VOL was incomplete.
The lines in the log were: Erasing disk: 0%... 10%... 20%... 30%... 100% Copying to disk: 0%...Killed: 9
The failure was because our IT Dept had the Mojave installer flagged, so that when someone ran it, it would pop up a warning window saying "macOS Mojave is not yet supported by IT." As soon as that window popped up, the createinstallmedia command threw the above error. I had IT remove that warning for me (since my laptop is already on Mojave) and the script worked fully.
This is from a rather old version of the script...
The latest release, in fact. I've switched to using HEAD and it works much better.
Hello Alex, What a nice job you did !
I succeeded in installing Mojave in a VBox VM after some tries because I’m not very fluent with the Github environment … and your doc lacks with some details for the newbie :-) When I will be clear about that, I will make some suggestions.
Question: when the VM is installed, all OK, what are the disks which may be deleted ?
thanks for all !
To Reproduce Steps to reproduce the behavior:
Expected behavior Installer should start
Additional context