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

Open
opened 2025-12-29 00:25:38 +01:00 by adam · 23 comments
Owner

Originally created by @heli-aviator on GitHub (Jun 27, 2022).

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?

Originally created by @heli-aviator on GitHub (Jun 27, 2022). 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?
adam added the bug label 2025-12-29 00:25:38 +01:00
Author
Owner

@jacobtread commented on GitHub (Jun 28, 2022):

Same issue here

@jacobtread commented on GitHub (Jun 28, 2022): Same issue here
Author
Owner

@heli-aviator commented on GitHub (Jun 28, 2022):

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

@heli-aviator commented on GitHub (Jun 28, 2022): Hopefully someone on here, will know how to fix this.
Author
Owner

@TeoConan commented on GitHub (Jun 29, 2022):

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

@TeoConan commented on GitHub (Jun 29, 2022): Same here, I don't even know how to give more info or some logs...
Author
Owner

@heli-aviator commented on GitHub (Jun 29, 2022):

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 commented on GitHub (Jun 29, 2022): > 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.
Author
Owner

@nsedat commented on GitHub (Jun 29, 2022):

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 commented on GitHub (Jun 29, 2022): 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.
Author
Owner

@LowNightSnack commented on GitHub (Jun 30, 2022):

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

@LowNightSnack commented on GitHub (Jun 30, 2022): Instead of leaving a comment every time someone encounters this bug, please leave an emoji on this comment. Helps keep the comments clean
Author
Owner

@jacobtread commented on GitHub (Jun 30, 2022):

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 commented on GitHub (Jun 30, 2022): > 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!
Author
Owner

@gdotdesign commented on GitHub (Jun 30, 2022):

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 commented on GitHub (Jun 30, 2022): 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.
Author
Owner

@skaldebane commented on GitHub (Jun 30, 2022):

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

@skaldebane commented on GitHub (Jun 30, 2022): Apparently the image monterey downloads is an Apple M2 image, not an x86 one!
Author
Owner

@skaldebane commented on GitHub (Jun 30, 2022):

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 commented on GitHub (Jun 30, 2022): 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](https://user-images.githubusercontent.com/35589610/176784538-e5c5f34e-a2c8-4121-8a41-f4bfec0cc051.png)
Author
Owner

@sickcodes commented on GitHub (Jul 4, 2022):

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

@sickcodes commented on GitHub (Jul 4, 2022): Yeah should be fixed now haha... thanks Apple!
Author
Owner

@furkanmustafa commented on GitHub (Jul 6, 2022):

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 commented on GitHub (Jul 6, 2022): 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) ```sh #!/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](https://user-images.githubusercontent.com/596741/177480131-e6853340-3d4c-4218-8176-d940859d457b.png) last parts of installer log; ![image](https://user-images.githubusercontent.com/596741/177480170-b7b36799-8073-4c22-82c0-a109fb94a033.png)
Author
Owner

@JPaulMora commented on GitHub (Jul 6, 2022):

@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 commented on GitHub (Jul 6, 2022): @sickcodes should I use a different tag to get the fix? `:monterey` is giving me the same error as @furkanmustafa <img width="1194" alt="Screen Shot 2022-07-06 at 1 55 23 PM" src="https://user-images.githubusercontent.com/8335656/177632215-cdbf8c0b-72c5-4f52-bdd5-0da337776b5b.png">
Author
Owner

@Burtan commented on GitHub (Jul 10, 2022):

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 commented on GitHub (Jul 10, 2022): > 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?
Author
Owner

@gdotdesign commented on GitHub (Jul 11, 2022):

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 commented on GitHub (Jul 11, 2022): 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
Author
Owner

@Burtan commented on GitHub (Jul 11, 2022):

Okay that didn't work for me either.

@Burtan commented on GitHub (Jul 11, 2022): Okay that didn't work for me either.
Author
Owner

@JPaulMora commented on GitHub (Jul 11, 2022):

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

@JPaulMora commented on GitHub (Jul 11, 2022): Update: The preinstalled image is working fine for me, took a while to download but it does the job.
Author
Owner

@arjanflac commented on GitHub (Mar 11, 2023):

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

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

@arjanflac commented on GitHub (Mar 11, 2023): this issue is solved by using "macos extended (Journaled)" instead of apfs Ventura issue only https://github.com/sickcodes/Docker-OSX/issues/571
Author
Owner

@sickcodes commented on GitHub (May 7, 2023):

Thank you @arjanflac, good find

@sickcodes commented on GitHub (May 7, 2023): Thank you @arjanflac, good find
Author
Owner

@MacDaddy1660B commented on GitHub (Nov 10, 2023):

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 commented on GitHub (Nov 10, 2023): 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```.
Author
Owner

@MacDaddy1660B commented on GitHub (Nov 15, 2023):

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 commented on GitHub (Nov 15, 2023): > 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.
Author
Owner

@voidarclabs commented on GitHub (Nov 27, 2023):

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 commented on GitHub (Nov 27, 2023): 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!
Author
Owner

@trifleneurotic commented on GitHub (Dec 1, 2023):

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 commented on GitHub (Dec 1, 2023): Just to throw my "two cents" in as it were: There are quite a few issues where this is talked about here... [667](https://github.com/sickcodes/Docker-OSX/issues/667) [511](https://github.com/sickcodes/Docker-OSX/issues/511) [571](https://github.com/sickcodes/Docker-OSX/issues/571) [715](https://github.com/sickcodes/Docker-OSX/issues/715) ...with somewhat related PR's over at [OSX-KVM](https://github.com/kholia/OSX-KVM): [218](https://github.com/kholia/OSX-KVM/pull/218) [207](https://github.com/kholia/OSX-KVM/pull/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](https://github.com/sickcodes/Docker-OSX/issues/466) 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](https://mrmacintosh.com/macos-ventura-13-full-installer-database-download-directly-from-apple/) 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](https://mrmacintosh.com/macos-12-monterey-full-installer-database-download-directly-from-apple/). 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 :)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Docker-OSX#373