Docker-OSX icon indicating copy to clipboard operation
Docker-OSX copied to clipboard

An error occurred while preparing the installation. on the OSX installer

Open heli-aviator opened this issue 2 years ago • 23 comments

This is the setup I'm trying to install/run of Monterey:

xhost + to be able to get to the OSX-installation

docker run -i \
  --device /dev/kvm \
  -e RAM=16 \
  -p 50922:10022 \
  -e "DISPLAY=${DISPLAY:-:0.0}" \
  -e EXTRA="-smp 8,sockets=1,cores=8,threads=1" \
  -e GENERATE_UNIQUE=true \
  -v /tmp/.X11-unix:/tmp/.X11-unix \
  -e MASTER_PLIST_URL='https://raw.githubusercontent.com/sickcodes/osx-serial-generator/master/config-custom.plist' \
    sickcodes/docker-osx:monterey

I get to the Mac OSX install screen, I go to disk utilities and erase the 275Gb disk the close out of disk utility and start reinstall Monterey

after agreeing to the agree-on screen, it starts installing and goes all the way from 1hr down to 1 min the all of a sudden it errors out with this message An error occurred while preparing the installation. Try running this application again I have run it again without any luck.

Does anyone have any idea how to get passed this point and actually MacOSX installed?

heli-aviator avatar Jun 27 '22 20:06 heli-aviator

Same issue here

jacobtread avatar Jun 27 '22 22:06 jacobtread

Hopefully someone on here, will know how to fix this.

heli-aviator avatar Jun 28 '22 02:06 heli-aviator

Same here, I don't even know how to give more info or some logs...

TeoConan avatar Jun 29 '22 19:06 TeoConan

Same here, I don't even know how to give more info or some logs...

I'm on the same boat, I'm new to docker.

heli-aviator avatar Jun 29 '22 20:06 heli-aviator

I had the same issue. Then used the BigSur-installation ... that worked for me ... directly after running BigSur installed the upgrade to Monterey without any prblems ... may this helps until a general fix for this issue is available.

nsedat avatar Jun 29 '22 21:06 nsedat

Instead of leaving a comment every time someone encounters this bug, please leave an emoji on this comment. Helps keep the comments clean

LowNightSnack avatar Jun 30 '22 05:06 LowNightSnack

I had the same issue. Then used the BigSur-installation ... that worked for me ... directly after running BigSur installed the upgrade to Monterey without any prblems ... may this helps until a general fix for this issue is available.

This solution worked for me!

jacobtread avatar Jun 30 '22 09:06 jacobtread

The underlying issue from the logs is Unable to setup bless on disk. I wasn't able to fix it, but the preinstalled image is working #432.

gdotdesign avatar Jun 30 '22 12:06 gdotdesign

Apparently the image monterey downloads is an Apple M2 image, not an x86 one!

Skaldebane avatar Jun 30 '22 21:06 Skaldebane

I found that the link that appears in the installer logs matches the second link in this website, which is marked as M2 ONLY. That's super weird.

image

Skaldebane avatar Jun 30 '22 21:06 Skaldebane

Yeah should be fixed now haha... thanks Apple!

sickcodes avatar Jul 04 '22 13:07 sickcodes

we have just hit the same error.. I am not sure if it is exactly the same though.

script (disables X11, enables spice, uses local empty qcow2 image)

#!/bin/sh -eu
DIR=$(dirname $0)
DATADIR=$(realpath ${DIR}/data)
IMG=monterey.img
mkdir -p ${DATADIR}
test -f ${DATADIR}/${IMG} \
  || qemu-img create -f qcow2 ${DATADIR}/${IMG} 64G

exec docker run -it \
  --device /dev/kvm \
  --name monterey1 \
  -v ${DATADIR}:/data \
  -e IMAGE_PATH=/data/${IMG} -e IMAGE_FORMAT=qcow2 \
  -e RAM=8 -e SMP=4 -e CORES=4 \
  -e GENERATE_UNIQUE=true \
  -e HEADLESS=0 -e DISPLAY= \
  -e EXTRA="-monitor telnet::40324,server,nowait -serial null -nographic -display none -spice disable-ticketing=on,port=40323" \
  -e MASTER_PLIST_URL='https://raw.githubusercontent.com/sickcodes/osx-serial-generator/master/config-custom.plist' \
  -p 40322:10022 \
  -p 40323:40323 \
  -p 40324:40324 \
  sickcodes/docker-osx:monterey

installation went on for an hour or so, and failed at the end (bootloader installation?) image

last parts of installer log; image

furkanmustafa avatar Jul 06 '22 06:07 furkanmustafa

@sickcodes should I use a different tag to get the fix? :monterey is giving me the same error as @furkanmustafa Screen Shot 2022-07-06 at 1 55 23 PM

JPaulMora avatar Jul 06 '22 19:07 JPaulMora

The underlying issue from the logs is Unable to setup bless on disk. I wasn't able to fix it, but the preinstalled image is working #432.

How to use the preinstalled image?

Burtan avatar Jul 10 '22 17:07 Burtan

Download the image from the link in the issue #432

Then follow the instructions in the Readme https://github.com/sickcodes/Docker-OSX#download-the-image-manually-and-use-it-in-docker

gdotdesign avatar Jul 11 '22 05:07 gdotdesign

Okay that didn't work for me either.

Burtan avatar Jul 11 '22 19:07 Burtan

Update: The preinstalled image is working fine for me, took a while to download but it does the job.

JPaulMora avatar Jul 11 '22 21:07 JPaulMora

this issue is solved by using "macos extended (Journaled)" instead of apfs Ventura issue only

https://github.com/sickcodes/Docker-OSX/issues/571

arjanflac avatar Mar 11 '23 20:03 arjanflac

Thank you @arjanflac, good find

sickcodes avatar May 07 '23 11:05 sickcodes

I'm still having this issue, despite formatting the disk for Macos Extended (journaled) instead of APFS. I also went into the docker contained and did a git pull.

MacDaddy1660B avatar Nov 10 '23 20:11 MacDaddy1660B

I'm still having this issue, despite formatting the disk for Macos Extended (journaled) instead of APFS. I also went into the docker contained and did a git pull.

I think what this ended up was a disk space issue for me. I noticed I had about 70GB left on my disk, freed up some space, and the installation seems to be working now.

I was able to format the virtual drive using APFS and things worked just dandy.

MacDaddy1660B avatar Nov 15 '23 01:11 MacDaddy1660B

I was wondering if this was fixed? I have managed to install Monterey successfully but Ventura has been giving me issues. So far it has always given me the 'try again' error but I will try using the extended partition. Some odd behaviour I have noticed is that if you install Monterey and upgrade to Sonoma, it finishes the install and even manages to boot to the apple logo, before rebooting and getting stuck. However, when you install Ventura, it does not finish the install, instead exiting before the install completes. Any help would be appreciated!

voidarclabs avatar Nov 27 '23 19:11 voidarclabs

Just to throw my "two cents" in as it were:

There are quite a few issues where this is talked about here... 667 511 571 715

...with somewhat related PR's over at OSX-KVM: 218 207

So there may be a few causes for this specific error condition, and I was getting it as well.

I have a bare-metal box with a Ryzen 7 5800H CPU that has the required avx2 extension enabled. Running Windows 11 23H2 Pro build 22631.2715, WSL2 w/ Ubuntu 22.04.2 LTS (Jammy Jellyfish). Plenty of disk space.

My experience:

Straight wsl2 docker run per documentation; Ventura with APFS: failed. Straight wsl2 docker run per documentation; Ventura with extended journaled: failed. Straight wsl2 docker run per documentation; Monterey with APFS: succeeded. (well, it got past that point, and currently it is proceeding through the install; incidentally ran into this issue but I doubt it would completely torpedo an install process)

One thing I noticed in the Installer Log for my Ventura attempts was that the InstallAssistant.pkg that was being downloaded from swcdn.apple.com was noted here as being for M3 iMacs & 14" MBPro's only.

Another thing I noticed in the Installer Log for my Monterey attempt was that the InstallAssistant.pkg that was being downloaded had NO special notes on it as described at the same site.

So my hunch is that maybe those other users who were experiencing this error (but got past them) got the error for other reasons as described in the above PR's & issues, and were using a version of the InstallAssistant.pkg that that hadn't been identified for use strictly for an Apple silicon-based machine (unlike now).

But still, it's just a hunch :)

trifleneurotic avatar Dec 01 '23 20:12 trifleneurotic