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

Unable to boot #124

Open
mtbykn opened this issue Sep 24, 2024 · 16 comments
Open

Unable to boot #124

mtbykn opened this issue Sep 24, 2024 · 16 comments
Assignees
Labels
Help Wanted Extra attention is needed Investigating The reported issue is under investigation Need More Info Further information is requested

Comments

@mtbykn
Copy link

mtbykn commented Sep 24, 2024

Unable to boot on
Vendor: LENOVO Lenovo Legion 5 15ARH05 laptop
Crashes during boot with errors on Ventura, Monterey , Sequoia.
Errors 152 service cannot load in current environment for launchd

@mtbykn
Copy link
Author

mtbykn commented Sep 24, 2024

Also looked at Big Sur and Sonoma get same error the autopilot script worked without error messages in the log file and screen said success.

@eversiege
Copy link
Collaborator

Hello! Can I ask you to provide your system specifications and autopilot logs if possible?

@mtbykn
Copy link
Author

mtbykn commented Sep 26, 2024

Ubuntu 24.10
Lenovo Legion 5 15ARH05
8gb RAM
AMD Ryzen 5 4600H
APC_RUN_26-09-2024_09-34-17.log

@mtbykn
Copy link
Author

mtbykn commented Sep 26, 2024

Hello, please let me know if you need anything else for resolving this boot issue!

@eversiege eversiege added Help Wanted Extra attention is needed Need More Info Further information is requested Investigating The reported issue is under investigation labels Sep 26, 2024
@eversiege
Copy link
Collaborator

Hello, might need something else too - run the script back, go to Compatibility Checks... and then run System Profiler, and send the .log that it gives, please. For now can't figure out the root of the cause...

@mtbykn
Copy link
Author

mtbykn commented Sep 26, 2024

Results
All checks have been completed
Please see the second log file below this one for System Profiler,
──────────────────────────────────────────────────────────────
READY ━━━━━━━━━━ 100%
──────────────────────────────────────────────────────────────

SPT_26-09-2024_11-37-09.log
Please see attached

@eversiege
Copy link
Collaborator

So we are starting to piece some some stuff together and we see maybe this is about memory? But in order to verify that, I will (for last time I hope) ask you for your generated vm-script. It should be somewhere in your project's root directory (aka where you launch main.py at)

@mtbykn
Copy link
Author

mtbykn commented Sep 26, 2024

boot.txt

@eversiege
Copy link
Collaborator

eversiege commented Sep 26, 2024

Ah. In the boot script, you've tried to specify 4 threads on 2 cores - but QEMU multiplies the amounts together for total thread count, so think of your virtual machine using literally 8 cores. For it to launch, you will need to change this value to:

CPU_THREADS="2"

Please tell me if this fix has worked for you. Cheers!

@eversiege
Copy link
Collaborator

eversiege commented Sep 26, 2024

TODO: Write this in the GOTCHAS page

@mtbykn
Copy link
Author

mtbykn commented Sep 26, 2024

Changed to 2 threads and still get the same issue, it's nice of you for taking the effort, thanks.

@eversiege
Copy link
Collaborator

Does it straight up not boot or gets to some point on macOS bootloader?

@mtbykn
Copy link
Author

mtbykn commented Sep 27, 2024

When I run the boot.sh the system will either reboot or just stop and gives the error code listed above.

@eversiege
Copy link
Collaborator

the system will either reboot

...wait, like, the entire host system?

@SimekVlad
Copy link

SimekVlad commented Feb 3, 2025

I have exactly the same machine and it will crash everytime when i use more then 1 core 1 thread. But is not problem on this macos-kvm but on all kvm macs.

Working :
CPU_SOCKETS="1"
CPU_CORES="1"
CPU_THREADS="1"

@citkane
Copy link

citkane commented Feb 14, 2025

Edit:
The cause of and solution to this issue (as experienced by me) is reported in #163
@SimekVlad @mtbykn @eversiege


I am experiencing the same trying to install "Sonama". The installer only runs if all cpu options are "1".

  • Debian 12 64-bit
  • AMD Ryzen™ 5 3400G with Radeon™ Vega Graphics × 8

The bootloader shows up in the VM, but proceeding to "install", it hangs on the black splash screen with the apple logo and light grey progress bar (which appears to be full). Various attempts at different cpu configurations behave the same, or cause the Apple install process to crash immediately after the black splash screen and go back to the bootloader.

XML with single core
<!--
	 
	    APC-RUN_14-02-2025_17-22-29
 
    THIS FILE WAS GENERATED USING AUTOPILOT.
				 
     To be used with virsh / virt-manager.
	 
	
	/home/michaeladmin/.virtualmachines/mac/boot.xml	
	Created by Coopydood as part of the ultimate-macOS-KVM project.
	
	Profile: https://github.com/Coopydood
	Repo: https://github.com/Coopydood/ultimate-macOS-KVM

-->

<domain xmlns:qemu="http://libvirt.org/schemas/domain/qemu/1.0" type="kvm">
  <name>ultmos-14</name>
  <title>macOS Sonoma (ULTMOS)</title>
  <description>  macOS Sonoma
  Converted from /home/michaeladmin/.virtualmachines/mac/boot.sh 

  This virtual machine was created using ultimate-macOS-KVM, a project by Coopydood.
  Visit https://github.com/Coopydood/ultimate-macOS-KVM for help and support, or provide some feedback!

  DEBUG
  ULTMOS: v0.13.0
  XML: /home/michaeladmin/.virtualmachines/mac/boot.xml
  AP: /home/michaeladmin/.virtualmachines/mac/boot.sh
  APFLOW: Yes
  AUTO: Yes
  USEBLOBS: Yes
  RUNTIME: 17:22:29 14/02/2025
  </description>
  <uuid>3797c99c-4df8-4f33-8c8a-215e33299a2c</uuid>
  <memory unit="KiB">33554432</memory>
  <currentMemory unit="KiB">33554432</currentMemory>
  <vcpu placement="static">16</vcpu>
  <os>
    <type arch="x86_64" machine="pc-q35-4.2">hvm</type>
    <loader readonly="yes" type="pflash">/home/michaeladmin/.virtualmachines/mac/ovmf/OVMF_CODE.fd</loader>
    <nvram>/home/michaeladmin/.virtualmachines/mac/ovmf/OVMF_VARS.fd</nvram>
    <boot dev="hd"/>
  </os>
  <features>
    <acpi/>
    <apic/>
  </features>
  <cpu mode="host-passthrough" check="none" migratable="on">
    <topology sockets="1" dies="1" cores="4" threads="4"/>
  </cpu>
  <clock offset="utc">
    <timer name="rtc" tickpolicy="catchup"/>
    <timer name="pit" tickpolicy="delay"/>
    <timer name="hpet" present="no"/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
    <disk type="file" device="disk">
      <driver name="qemu" type="qcow2"/>
      <source file="/home/michaeladmin/.virtualmachines/mac/boot/OpenCore.qcow2"/>
      <target dev="sda" bus="sata"/>
      <address type="drive" controller="0" bus="0" target="0" unit="0"/>
    </disk>
    <disk type="file" device="disk"> <!-- HDD HEADER -->
      <driver name="qemu" type="qcow2"/>
      <source file="/home/michaeladmin/.virtualmachines/mac/HDD.qcow2"/>
      <target dev="sdb" bus="sata" rotation_rate="1"/>
      <address type="drive" controller="0" bus="0" target="0" unit="1"/>
    </disk> <!-- HDD FOOTER -->

<!--############# REMOVE THESE LINES AFTER MACOS INSTALLATION #############-->

    <disk type="file" device="disk"> 
      <driver name="qemu" type="raw"/>
      <source file="/home/michaeladmin/.virtualmachines/mac/BaseSystem.img"/>
      <target dev="sdc" bus="sata"/>
      <address type="drive" controller="0" bus="0" target="0" unit="2"/>
	  </disk> 

<!--#######################################################################-->

    <controller type="sata" index="0">
      <address type="pci" domain="0x0000" bus="0x00" slot="0x1f" function="0x2"/>
    </controller>
    <controller type="pci" index="0" model="pcie-root"/>
    <controller type="pci" index="1" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="1" port="0x8"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x0" multifunction="on"/>
    </controller>
    <controller type="pci" index="2" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="2" port="0x9"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x1"/>
    </controller>
    <controller type="pci" index="3" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="3" port="0xa"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x2"/>
    </controller>
    <controller type="pci" index="4" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="4" port="0xb"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x3"/>
    </controller>
    <controller type="pci" index="5" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="5" port="0xc"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x4"/>
    </controller>
    <controller type="pci" index="6" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="6" port="0xd"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x5"/>
    </controller>
    <controller type="pci" index="7" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="7" port="0xe"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x6"/>
    </controller>
    <controller type="pci" index="8" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="8" port="0xf"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x7"/>
    </controller>
    <controller type="pci" index="9" model="pcie-to-pci-bridge">
      <model name="pcie-pci-bridge"/>
      <address type="pci" domain="0x0000" bus="0x01" slot="0x00" function="0x0"/>
    </controller>
    <controller type="usb" index="0" model="ich9-ehci1">
      <address type="pci" domain="0x0000" bus="0x00" slot="0x1d" function="0x7"/>
    </controller>
    <controller type="usb" index="0" model="ich9-uhci1">
      <master startport="0"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x1d" function="0x0" multifunction="on"/>
    </controller>
    <controller type="usb" index="0" model="ich9-uhci2">
      <master startport="2"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x1d" function="0x1"/>
    </controller>
    <controller type="usb" index="0" model="ich9-uhci3">
      <master startport="4"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x1d" function="0x2"/>
    </controller>
    <interface type="network">
      <mac address="00:16:cb:00:21:09"/>
      <source network="default"/>
      <model type="vmxnet3"/>
      <address type="pci" domain="0x0000" bus="0x09" slot="0x02" function="0x0"/>
    </interface>
    <serial type="pty">
      <target type="isa-serial" port="0">
        <model name="isa-serial"/>
      </target>
    </serial>
    <console type="pty">
      <target type="serial" port="0"/>
    </console>
    <input type="mouse" bus="ps2"/>
    <input type="keyboard" bus="ps2"/>
    <input type="keyboard" bus="usb">
      <address type="usb" bus="0" port="3"/>
    </input>
    <input type="mouse" bus="usb">
      <address type="usb" bus="0" port="4"/>
    </input>
    <graphics type="spice">
      <listen type="none"/>
    </graphics>
    <sound model="ich9">
	  <address type="pci" domain="0x0000" bus="0x00" slot="0x1b" function="0x0"/>
	</sound>
    <audio id="1" type="none"/>
    <video>
      <model type="vga" vram="16384" heads="1" primary="yes"/>
      <address type="pci" domain="0x0000" bus="0x09" slot="0x01" function="0x0"/>
    </video>
    <!-- VFIO-PCI HEADER -->
    <!-- USB HEADER -->
    <!--<watchdog model="itco" action="reset"/> -->
    <memballoon model="none"/>
  </devices>
  <qemu:commandline>
    <qemu:arg value="-global"/>
    <qemu:arg value="ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off"/>
    <qemu:arg value="-device"/>
    <qemu:arg value="isa-applesmc,osk=ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc"/>
    <qemu:arg value="-smbios"/>
    <qemu:arg value="type=2"/>
    <qemu:arg value="-cpu"/>
    <qemu:arg value="Haswell-noTSX,kvm=on,vendor=GenuineIntel,+invtsc,vmware-cpuid-freq=on,+ssse3,+sse4.2,+popcnt,+avx,+aes,+xsave,+xsaveopt,check"/>
    <qemu:arg value="-global"/>
    <qemu:arg value="nec-usb-xhci.msi=off"/>
    <!-- NVME HEADER -->
  </qemu:commandline>
</domain>

Single core installation succeeds, but is unusable slow. Setting more cpu cores after install causes a boot failure.

The image below shows where the boot-process seems to be hanging:
Image

APC_RUN_14-02-2025_17-13-32.log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Help Wanted Extra attention is needed Investigating The reported issue is under investigation Need More Info Further information is requested
Projects
None yet
Development

No branches or pull requests

5 participants