macos-virtualbox-vm
macos-virtualbox-vm copied to clipboard
Sierra 10.12.4 hangs during boot, stuck at gIOScreenLockState
Hey, I'm trying to get this to boot the first time. After following the README directions it just hangs about 30 seconds into starting up. The last log lines when it hangs are shown below. Any idea what the issue is?
I'm on Virtualbox 5.1.18 r114002 (Qt5.6.2) and MacOS 10.12.4 on an early 2015 Macbook Pro, and in Virtualbox I'm using 4GB RAM, 128MB video memory, 2 CPUs, and I've tried marking the ISO as Live CD/DVD
![screen shot 2017-04-01 at 5 37 14 pm](https://cloud.githubusercontent.com/assets/708904/24583556/0e06b8b2-1703-11e7-91da-9d83688c06d8.png)
I downloaded the latest El Capitan installer from the mac store and that works fine. So it seems like there's an issue with the latest macOS Sierra version.
Can confirm, latest macOS Sierra stops at gIOScreenLockState
@dcosson How did you download the El Capitan installer? I get a "the version of macOS is too new" error.
Link: https://itunes.apple.com/us/app/os-x-el-capitan/id1147835434?mt=12
Same issue here.
@andrewschreiber I was able to download from purchases list in my app store. I got this machine in ~ October 2015 so it came with El Capitan originally, is yours newer possibly?
Here's a tutorial on how to download the El Capitan pkg and trick the App Store into installing it, instead of Sierra, by hosting it locally.
https://7labs.heypub.com/tips-tricks/el-capitan-direct-download.html#El_Capitan8211_Single_Download_Multiple_Installations
I can also reproduce this issue. Why would it be that 10.12.4 raises this issue?
I'm also stuck on the gIOScreenLockState
error. I've tried everything with tweaking the settings.
I believe it has something to do with 10.12.4 I was able to install 10.12.3 (had a previous install downloaded already) and upgrade to 10.12.4 without issue.
I can confirm the same issue, stuck on gIOScreenLockState
booting OS X Sierra 10.12.4
It worked for OS X El Capitan without issues.
So according to this: https://github.com/timsutton/osx-vm-templates#issue-with-10124
The Sierra 10.12.4 installer seems to no longer support including custom packages as part of the installer, unless they are signed by Apple.
I think until a hack is found this will no longer be possible.
I've the same issue with 10.12.4.
I'd also like to point out that Parallels lets you create a virtual machine image from the recovery drive that works, also with 10.12.4. Not sure how this is achieved though.
I tried the procedure described in this repo just in the days when 10.12.4 came out, and I can confirm that this is not working with the new version. I did not have the oportunity to try it with 10.12.3, but I checked back in that day for any issues related and could not find anything. I also tried running it in vmware 7 (an old version compared to toady's) on my MacbookPro but it hung up on the Apple Logo screen. So I believe this is related to the latest Installer. Probably Apple made some breaking changes. Probably the only solution would be to install with 10.12.3, and then upgrade? If someone has this kind of setup please report it. Thank you all!
@LaloLoop as I commented 10 hours ago, I was able to install with 10.12.3 and upgrade to 10.12.4
Does anyone know how/where to download 10.12.3? I am also stuck when trying to install 10.12.4
@tcurdt I'm facing this same issue - I don't think there's any way to get the previous installer unless you know someone who already has it. I ended up redownloading El Capitan from the App Store and I'm using it now
@nathanhleung I am doing the very same thing. Still need Sierra at some point though.
Is http://osxdaily.com/2016/09/27/allow-apps-from-anywhere-macos-gatekeeper/ any help?
Sorry, not really a subject matter expert; I'm probably conflating Apps with the pkg, and I've no idea whether it's possible to even run commands before the pkg is used?
@tcurdt I downloaded the Sierra installer on my El Capitan VM and have gone through the install/restart process a few times but it doesn't seem to be working - by any chance have you taken that route in trying to install Sierra?
@nathanhleung no, I never tried that as I assume the download will have the same problem. I just found an old Sierra USB stick ready to install though. I might try to turn that into an iso and see if that works. That's about all the options I see at the moment.
I am wondering if this works for vmware/parallels - then switching away virtualbox could be another option.
I was having the same issue and unfortunately I didn't have any copy of an older installer either, and in my desperate search for a solution I found this thread. I wanted to try AutoDMG + vfuse but I wanted to use virtualbox for now, so I wrote a modified version of Tim Sutton's prepare_iso.sh https://github.com/timsutton/osx-vm-templates/pull/82 which does the same as AutoDMG + vfuse but using Virtualbox's tools, which generates a vdi with a fresh install.
The idea more less of what this script is doing is:
IMAGE_SIZE=32
IMAGE_SIZE_BYTES=$(($IMAGE_SIZE * 1024 * 1024 * 1024))
sudo hdiutil attach -noverify -mountpoint /tmp/installesd /Applications/Install\ macOS\ Sierra.app/Contents/SharedSupport/InstallESD.dmg
sudo hdiutil create -size "${IMAGE_SIZE}g" -type SPARSE -fs HFS+J -volname "Macintosh HD" -uid 0 -gid 80 -mode 1775 sierra.dmg
MOUNTOUTPUT=$(sudo hdiutil attach -noverify -mountpoint /tmp/os -owners on sierra.dmg)
sudo installer -verboseR -dumplog -pkg /tmp/installesd/Packages/OSInstall.mpkg -target /tmp/os
DISK_DEV=$(grep GUID_partition_scheme <<< "$MOUNTOUTPUT" | cut -f1 | tr -d '[:space:]')
sudo cat "$DISK_DEV" | VBoxManage convertfromraw stdin ~/Documents/output.vdi "$IMAGE_SIZE_BYTES"
hdiutil detach /tmp/os
hdiutil detach /tmp/installesd
I hope that it helps :-)
Will Sierra 10.12.5 fix this? Did some of you tried already?
Just tried today, same issue with 10.12.5.
@jonanh that looked very promising at first - but now it's just doing:
...
May 16 18:38:18 installer[63714] <Alert>: client 0x7f84b6d163d0: phaseName = "OS Installer"
May 16 18:39:18 installer[63714] <Alert>: client 0x7f84b6d163d0: phaseName = "OS Installer"
May 16 18:40:18 installer[63714] <Alert>: client 0x7f84b6d163d0: phaseName = "OS Installer"
May 16 18:41:18 installer[63714] <Alert>: client 0x7f84b6d163d0: phaseName = "OS Installer"
May 16 18:42:18 installer[63714] <Alert>: client 0x7f84b6d163d0: phaseName = "OS Installer"
May 16 18:43:18 installer[63714] <Alert>: client 0x7f84b6d163d0: phaseName = "OS Installer"
May 16 18:44:18 installer[63714] <Alert>: client 0x7f84b6d163d0: phaseName = "OS Installer"
May 16 18:45:18 installer[63714] <Alert>: client 0x7f84b6d163d0: phaseName = "OS Installer"
May 16 18:46:18 installer[63714] <Alert>: client 0x7f84b6d163d0: phaseName = "OS Installer"
May 16 18:48:18 installer[63714] <Alert>: client 0x7f84b6d163d0: phaseName = "OS Installer"
May 16 18:49:18 installer[63714] <Alert>: client 0x7f84b6d163d0: phaseName = "OS Installer"
May 16 18:50:18 installer[63714] <Alert>: client 0x7f84b6d163d0: phaseName = "OS Installer"
May 16 18:51:18 installer[63714] <Alert>: client 0x7f84b6d163d0: phaseName = "OS Installer"
May 16 18:52:18 installer[63714] <Alert>: client 0x7f84b6d163d0: phaseName = "OS Installer"
...
@tcurdt this is the output I get after running the prepare_vdi.sh from https://github.com/timsutton/osx-vm-templates/pull/82
@jonanh oh, I was trying your script from above. Will give that a try.
I finally got it working like this:
sudo prepare.sh ~/Desktop/Install\ macOS\ Sierra.app
#!/bin/sh
set -x
set -e
IMAGE_SIZE=32
IMAGE_SIZE_BYTES=$(($IMAGE_SIZE * 1024 * 1024 * 1024))
echo "attaching input OS X installer image"
hdiutil attach \
-noverify \
-nobrowse \
-owners on \
-mountpoint /tmp/installesd \
"$1/Contents/SharedSupport/InstallESD.dmg"
echo "creating empty read-write DMG"
hdiutil create \
-size "${IMAGE_SIZE}g" \
-type SPARSE \
-fs HFS+J \
-volname "Macintosh HD" \
-uid 0 \
-gid 80 \
-mode 1775 \
/tmp/sierra.dmg
echo "mounting empty read-write DMG"
MOUNTOUTPUT=$(hdiutil attach -noverify -mountpoint /tmp/os -nobrowse -owners on /tmp/sierra.dmg.sparseimage)
echo "installing macOS"
installer \
-verboseR \
-dumplog \
-pkg "/tmp/installesd/Packages/OSInstall.mpkg" \
-target "/tmp/os"
echo "exporting vdi to /tmp"
DISK_DEV=$(grep GUID_partition_scheme <<< "$MOUNTOUTPUT" | cut -f1 | tr -d '[:space:]')
echo "DISK_DEV=$DISK_DEV"
cat "$DISK_DEV" | pv -s $IMAGE_SIZE_BYTES | VBoxManage convertfromraw stdin /tmp/macos-10.12.vdi "$IMAGE_SIZE_BYTES"
echo "done"
hdiutil detach /tmp/os
hdiutil detach /tmp/installesd
In case you don't have pv
installed you have to remove the pv -s $IMAGE_SIZE_BYTES |
of course.
But be aware - updating to 10.12.5 after the install broke the booting similar to what I saw on the former install attempts. So it doesn't seem to be the final solution. Maybe I'll try again after increasing the memory of the vm. Or I just cave and shell out the money for an upgrade of the old vmware/parallels license :-/
@tcurdt these are settings that are working for me
VM="macOS"
HARDDRIVE="macOS.vdi"
VBoxManage createvm --name "$VM" --ostype "MacOS_64" --register
VBoxManage storagectl "$VM" --name "SATA Controller" --add sata --controller IntelAHCI
VBoxManage storageattach "$VM" --storagectl "SATA Controller" --port 0 --device 0 --type hdd --medium "$HARDDRIVE"
VBoxManage modifyvm "$VM" --audiocontroller "hda"
VBoxManage modifyvm "$VM" --chipset "ich9"
VBoxManage modifyvm "$VM" --firmware "efi"
VBoxManage modifyvm "$VM" --cpus "2"
VBoxManage modifyvm "$VM" --hpet "on"
VBoxManage modifyvm "$VM" --keyboard "usb"
VBoxManage modifyvm "$VM" --memory "4096"
VBoxManage modifyvm "$VM" --mouse "usbtablet"
VBoxManage modifyvm "$VM" --vram "128"
Here is the full script :-) https://github.com/jonanh/osx-vm-templates/commit/09787cde8024f88e3c604b16e64dfea4f93407d8#diff-041cfff4cd15513c0a368cbab35aeb1e
@tcurdt BTW, I would umount and mount again the sparse DMG before exporting it, sometimes it was failing for me. Maybe it doesn't flush everything before the export starts:
https://github.com/jonanh/osx-vm-templates/blob/2097e6cb60ac12a404ff18bb0ebb81ca4ced1e45/prepare_iso/prepare_vdi.sh#L256
Pretty much the same setup I have :) Except with only 3GB memory. Will give it a try with 4GB. Thanks for the pointers, @jonanh