Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
heli-aviator opened this issue Jun 27, 2022 · 23 comments
Labels
bug Something isn't working

Comments

@heli-aviator
Copy link

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?

@jacobtread
Copy link

Same issue here

@heli-aviator
Copy link
Author

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

@sickcodes sickcodes added the bug Something isn't working label Jun 28, 2022
@TeoConan
Copy link

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

@heli-aviator
Copy link
Author

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.

@nsedat
Copy link

nsedat commented 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.

@LowNightSnack
Copy link

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

@jacobtread
Copy link

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!

@gdotdesign
Copy link

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.

@Skaldebane
Copy link

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

@Skaldebane
Copy link

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

@sickcodes
Copy link
Owner

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

@furkanmustafa
Copy link

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

@JPaulMora
Copy link

@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

@Burtan
Copy link

Burtan commented 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?

@gdotdesign
Copy link

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

@Burtan
Copy link

Burtan commented Jul 11, 2022

Okay that didn't work for me either.

@JPaulMora
Copy link

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

@arjanflac
Copy link

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

#571

@sickcodes
Copy link
Owner

Thank you @arjanflac, good find

@MacDaddy1660B
Copy link

MacDaddy1660B commented 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
Copy link

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.

@voidarclabs
Copy link

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!

@trifleneurotic
Copy link

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests