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

MacOS Ventura get stuck at the final step of install #937

Closed
SnartFridge opened this issue Feb 18, 2024 · 10 comments
Closed

MacOS Ventura get stuck at the final step of install #937

SnartFridge opened this issue Feb 18, 2024 · 10 comments

Comments

@SnartFridge
Copy link

Expected behaviour

MacOS Ventura to complete the final step of installation and be presented with an the out-of-the-box first-start wizard.

Actual behaviour

MacOS Ventura gets stuck on the Less than a minute remaining... after the first reboot at installation. (I have left it for over 24 hours in case it just takes a while, and it does not finish)

Steps to reproduce the behaviour

I don't know how to reproduce it, I am hoping that the logs I copied help

Please read

I did see in the logs that running sudo tee /sys/module/kvm/parameters/ignore_msrs might solve the issue, but I did not do it because it said use it if you are unable to run macOS, and it was running great until this point? Would this parameter help?

Quick emu output

Quickemu 4.9.1 using /usr/bin/qemu-system-x86_64 v8.2.1
 - Host:     "EndeavourOS Linux" running Linux 6.(COMPUTER_NAME)
 - CPU:       Intel(R) Core(TM) i5-10300H CPU @ 2.50GHz
 - CPU VM:   1 Socket(s), 2 Core(s), 2 Thread(s), 8G RAM
 - MSR:      WARNING! Ignoring unhandled Model-Specific Registers is disabled.

             echo 1 | sudo tee /sys/module/kvm/parameters/ignore_msrs

             If you are unable to run macOS or Windows VMs then run the above 👆
             This will enable ignoring of unhandled MSRs until you reboot the host.
             You can make this change permanent by running: 'quickemu --ignore-msrs-always'
 - BOOT:     EFI (macOS), OVMF (OVMF_CODE.fd), SecureBoot (off).
 - Disk:     macos-ventura/disk.qcow2 (96G)
 - Display:  SDL, qxl-vga, GL (on), VirGL (off)
 - Sound:    intel-hda
 - ssh:      On host:  ssh user@localhost -p 22220
 - 9P:       On guest: sudo mount_9p Public-smart___fridge
 - 9P:       On host:  chmod 777 /home/smart___fridge/Public
             Required for macOS integration 👆
 - Network:  User (virtio-net)
 - Monitor:  On host:  nc -U "macos-ventura/macos-ventura-monitor.socket"
             or     :  socat -,echo=0,icanon=0 unix-connect:macos-ventura/macos-ventura-monitor.socket
 - Serial:   On host:  nc -U "macos-ventura/macos-ventura-serial.socket"
             or     :  socat -,echo=0,icanon=0 unix-connect:macos-ventura/macos-ventura-serial.socket
qemu-system-x86_64: -no-hpet: warning: -no-hpet is deprecated, use '-machine hpet=off' instead
qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.07H:EBX.hle [bit 4]
qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.07H:EBX.rtm [bit 11]
qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.07H:EBX.hle [bit 4]
qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.07H:EBX.rtm [bit 11]
qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.07H:EBX.hle [bit 4]
qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.07H:EBX.rtm [bit 11]
qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.07H:EBX.hle [bit 4]
qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.07H:EBX.rtm [bit 11]
 - Process:  Starting macos-ventura.conf as macos-ventura (6385)

Linux Distribution & Kernel

LSB Version:    n/a
Distributor ID: EndeavourOS
Description:    EndeavourOS Linux
Release:        rolling
Codename:       rolling
Linux COMPUTER_NAME 6.7.4-arch1-1.1-g14 #1 SMP PREEMPT_DYNAMIC Wed, 07 Feb 2024 13:01:49 +0000 x86_64 GNU/Linux
@TuxVinyards
Copy link
Contributor

There has been a bit of behind the scenes development work on MacOS and getting Sonoma to work. While reviewing the proposed changes, I found that there were a few things wrong with quickemu already.

Of note:

  1. Do use ignore msrs as standard.

  2. The installer will halt at various points. For me it showed the less than a minute screen for about half an hour or so, but it did resolve itself. On various points, if it did get fully stuck and I rebooted, the installer picked itself back up part the way through without problems.

  3. You do need to have a host CPU with avx2 capabilities. Test at the terminal with the following command:

lscpu | grep "Flags" | grep -o avx2

This should return the word 'avx2' if your CPU is capable. If not, it will be blank.

Now there are a few tweaks that you can do. They are fairly simple, even if you are not used to using the command line:

Firstly, in the macos-ventura.conf file add

mouse="virtio"
keyboard="usb"

The next thing is make a back up copy of quickemu and to tweak a line or two. Full details are here: #886 (comment)

This is the step-by-step procedure:

In your file manager, make a folder for the files. Then right click and open in terminal. Make two copies. One to edit and one to keep as backup.

xxx@System-X:/media/xxx/Files/VMQs/QE.Custom$ cp /usr/bin/quickemu "quickemu-4.9.2-orig"
xxx@System-X:/media/xxx/Files/VMQs/QE.Custom$ cp /usr/bin/quickemu "quickemu-4.9.2-mac-edit"

Open the 'mac-edit' file in a text editor and find the line 'Haswell'

mac-edit

Change that line to read

CPU="-cpu Broadwell-noTSX-IBRS,kvm=on,vendor=GenuineIntel,+sse,+sse4.1,+avx,+avx2,+hypervisor,+popcnt,+aes,+xsave,+xsavec,+xsaveopt,+xgetbv1,+bmi1,+bmi2,+smep,+fma,+movbe,+invtsc"

thus:

line-change-mac

Lastlly, I recommend that you replace function 'check_cpu_flag' as this a bit flaky and error prone. I ended up with the Penryn CPU when I tried to install Sonoma, when it should have been Haswell.

check flag replace

 function check_cpu_flag { lscpu | grep "Flags" | grep -q -o "$1" ; }

See #886 (comment)

Save the file and copy it over the original, remembering that you still have the backup with which you can use the same method to restore the old one.

xxx@System-X:/media/xxx/Files/VMQs/QE.Custom$ sudo cp "quickemu-4.9.2-mac-edit" /usr/bin/quickemu

Ventura should now boot without all the errors and warnings. And your mouse and keyboard should work ....

The hpet warning is not critical at present. That can be ignored for now.

ventura up

@SnartFridge
Copy link
Author

SnartFridge commented Feb 20, 2024

Thanks for the response.
I followed the steps you provided, my CPU has avx2 capabilities, I updated the config file, and I changed the lines of code in quickemu. Hut something else is occurring during install that I don't know how to describe. I uploaded A video of quickemu running

Here is the link: https://youtu.be/FeFHRcG38-k

  • During the first boot it promts me back to the boot menu
  • During the second boot it freezes as seen
    Is there anything I can do from here to fix the vm?

Also, sorry for closing this comment. I have never used github before and don't develop code

@SnartFridge SnartFridge closed this as not planned Won't fix, can't repro, duplicate, stale Feb 20, 2024
@SnartFridge SnartFridge reopened this Feb 20, 2024
@TuxVinyards
Copy link
Contributor

@SnartFridge Pleased that you managed that and things installed. I have a feeling that if you keep closing the VM and restarting, then something will eventually trigger.

However, I was interested as to whether your problems were due to the 'old' macOS installer, the one that you are using, or whether you needed the new one that we are working on, or whether it was all down to needing to start and run the whole of the process with the tweaks that you have now installed ....

The Ventura VM that I had was built using the new, under-development, version. So, this morning, in-between reading the news, I ran the old setup plus tweaks, as above and same as you.

It did all the usual stuff, like take half an hour to do the 'less than a minute' section and generally just sit there with core monitors showing only idle status. I went through all the usual stages, erase the main disk and install AppleFS, install the recovery image etc.

ventura-tweaked-old-3

This was followed by an intermediary boot screen. I should probably have made a snapshot of the main drive at this point but I pressed the 'base system' button ...

ventura-tweaked-old-5

I seem to remember that this started the next installer phase, the longer one. I may have restarted the VM? But I was reading the news on my phone at the time ....

ventura-tweaked-old-8-1min-start

After the forever 1 minute, I did make a couple of snapshots so I could easily return to a previous point in time again, using snapshot apply.

ventura-tweaked-old-snapshot-1-min

I closed down, rebooted and got the same as in your video. It chucked me off.

A bit disappointedly, I then closed the VM and restarted. But this time something seemed to take and it all worked. I went through the usual setup screens, refused all the telemetrics and Apple account invitations. The mouse speed needed a speed tweak:

ventura-tweaked-old-9

See how, you get on. You may get things to boot. You may have to delete and retry from scratch.

Let us all know what happens. I am sure that others will want to give it a go too. 🚀

@SnartFridge
Copy link
Author

Hello again, Sorry for the delay. I fell ill a few days ago, I did not get to fixing the VM.

I ended up deleting the old macOS VM and redownloaded it from scratch. The changes from before to Quickemu are still there.

After booting up the VM, it gets stuck immediately as seen:
image

I rebooted it a few times, and it seemed to end on different error messages:
image
image

Similar to the video I sent before, it sometimes boots and loops to the first screen but then after booting again, it freezes like the images above.

image

@TuxVinyards
Copy link
Contributor

TuxVinyards commented Feb 23, 2024

Thank you for testing this all out. You did fine with the code. 👍

Now, what I want you to do is take another little leap of faith and install qqX. I think your problems are due to using quickgui ....

The errors I am seeing appear to be saying about vm_sharing. This is probably due to quickgui using Spicy and smb, which is probably the ntfs etc bit , I am guessing. Your VM disk was formatted with APFS, no?

Take the leap of faith, and then try loading up in SDL mode. You can also try GTK as well to see what it is like.

See #933

The other thing you can do before running, is to refresh your boot variables. This is the qqX [rtv] option, in utils.

There are some other things to try. But try qqX & SDL first, then get back to me.

Edit: Also try a router reset. Mac installs seem to like recording your IP address along with notes of failed or hacked installations

@SnartFridge
Copy link
Author

Sorry that I have not done anything for a while, I have fallen ill which has just drained my energy. I will get back to you tomorrow about the results of qqx and the vm

@TuxVinyards
Copy link
Contributor

Sorry that I have not done anything for a while, I have fallen ill which has just drained my energy. I will get back to you tomorrow about the results of qqx and the vm

Hope it's not my requests making you ill ... Let me know if you are having problems. Here to help.

@SnartFridge
Copy link
Author

Hello, I am back. I am feeling better now, sorry about that. my entire family caught the flu. I recently discovered that there are a few corrupted file on my system that are causing issues across many applications. I am performing a full system reinstall and hopefully this helps the VM boot as well.

@fillumina
Copy link

I managed to make it work by simply repeating the same installation over and over. At the 4th or 5th tentative it finally completed.

@flexiondotorg
Copy link
Member

Using Quickemu from the master (what will become 4.9.3) I have successfully installed Ventura.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants