thenickdude / KVM-Opencore

OpenCore disk image for running macOS VMs on Proxmox/QEMU

Home Page:https://www.nicksherlock.com/2021/10/installing-macos-12-monterey-on-proxmox-7/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

problems when installing ventura on unraid kvm

Bradley-Liu opened this issue · comments

I've completed the installation process on a unraid vm. But, when i try to boot into the system for the first time. It gives me a error (IOUSBHost Inteface 0x10000023c: matching deferred by IOUSBHostHIDDevice).
The system booting process halted and then give a prohibted sign and a line that says support.apple.com/mac/startup.

What can i do to solve it? Please help. By the way, I am using v19.

I don't think that last message would be the cause, can you show the full shot of the end of the log?

ok.
无标题

Can you share your VM config file? I've never used Unraid but I think that's in /etc/libvirt/qemu.

ok. pasting it in the comment area will render it unreadable. I uploaded a txt file which contains the content of the vm config file.

xml.txt

(Nick: Edited to add it inline):

<?xml version='1.0' encoding='UTF-8'?>
<domain type='kvm' id='98' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
  <name>Ventura</name>
  <uuid>11d3e0b1-7582-240f-a010-3e528ca03be7</uuid>
  <metadata>
    <vmtemplate xmlns="unraid" name="Linux" icon="linux.png" os="linux"/>
  </metadata>
  <memory unit='KiB'>4194304</memory>
  <currentMemory unit='KiB'>4194304</currentMemory>
  <memoryBacking>
    <nosharepages/>
  </memoryBacking>
  <vcpu placement='static'>4</vcpu>
  <cputune>
    <vcpupin vcpu='0' cpuset='0'/>
    <vcpupin vcpu='1' cpuset='6'/>
    <vcpupin vcpu='2' cpuset='1'/>
    <vcpupin vcpu='3' cpuset='7'/>
  </cputune>
  <resource>
    <partition>/machine</partition>
  </resource>
  <os>
    <type arch='x86_64' machine='pc-q35-6.1'>hvm</type>
    <loader readonly='yes' type='pflash'>/mnt/user/system/custom_ovmf/Macinabox_CODE-pure-efi.fd</loader>
    <nvram>/mnt/user/system/custom_ovmf/Macinabox_VARS-pure-efi.fd</nvram>
  </os>
  <features>
    <acpi/>
    <apic/>
  </features>
  <cpu mode='host-passthrough' check='none' migratable='on'>
    <topology sockets='1' dies='1' cores='2' threads='2'/>
    <cache mode='passthrough'/>
  </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/local/sbin/qemu</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source file='/mnt/disks/S4EWNC0N901171J/Ventura/OpenCore-v19.img' index='3'/>
      <backingStore/>
      <target dev='hdc' bus='virtio'/>
      <boot order='1'/>
      <alias name='virtio-disk2'/>
      <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source file='/mnt/user/isos/Olarila Ventura.img' index='2'/>
      <backingStore/>
      <target dev='hdd' bus='virtio'/>
      <alias name='virtio-disk3'/>
      <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source file='/mnt/disks/S4EWNC0N901171J/Ventura/vdisk3.img' index='1'/>
      <backingStore/>
      <target dev='hde' bus='virtio'/>
      <alias name='virtio-disk4'/>
      <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
    </disk>
    <controller type='sata' index='0'>
      <alias name='ide'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pcie-root'>
      <alias name='pcie.0'/>
    </controller>
    <controller type='pci' index='1' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='1' port='0x10'/>
      <alias name='pci.1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0' multifunction='on'/>
    </controller>
    <controller type='pci' index='2' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='2' port='0x11'/>
      <alias name='pci.2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x1'/>
    </controller>
    <controller type='pci' index='3' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='3' port='0x12'/>
      <alias name='pci.3'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x2'/>
    </controller>
    <controller type='pci' index='4' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='4' port='0x13'/>
      <alias name='pci.4'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x3'/>
    </controller>
    <controller type='pci' index='5' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='5' port='0x14'/>
      <alias name='pci.5'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x4'/>
    </controller>
    <controller type='pci' index='6' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='6' port='0x15'/>
      <alias name='pci.6'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x5'/>
    </controller>
    <controller type='pci' index='7' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='7' port='0x16'/>
      <alias name='pci.7'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x6'/>
    </controller>
    <controller type='virtio-serial' index='0'>
      <alias name='virtio-serial0'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
    </controller>
    <controller type='usb' index='0' model='qemu-xhci' ports='15'>
      <alias name='usb'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:ac:ea:3f'/>
      <source bridge='br0'/>
      <target dev='vnet94'/>
      <model type='virtio-net'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
    </interface>
    <serial type='pty'>
      <source path='/dev/pts/18'/>
      <target type='isa-serial' port='0'>
        <model name='isa-serial'/>
      </target>
      <alias name='serial0'/>
    </serial>
    <console type='pty' tty='/dev/pts/18'>
      <source path='/dev/pts/18'/>
      <target type='serial' port='0'/>
      <alias name='serial0'/>
    </console>
    <channel type='unix'>
      <source mode='bind' path='/var/lib/libvirt/qemu/channel/target/domain-98-Ventura/org.qemu.guest_agent.0'/>
      <target type='virtio' name='org.qemu.guest_agent.0' state='disconnected'/>
      <alias name='channel0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
    <input type='tablet' bus='usb'>
      <alias name='input0'/>
      <address type='usb' bus='0' port='1'/>
    </input>
    <input type='mouse' bus='ps2'>
      <alias name='input1'/>
    </input>
    <input type='keyboard' bus='ps2'>
      <alias name='input2'/>
    </input>
    <graphics type='vnc' port='5901' autoport='yes' websocket='5701' listen='0.0.0.0' keymap='en-us'>
      <listen type='address' address='0.0.0.0'/>
    </graphics>
    <audio id='1' type='none'/>
    <video>
      <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1' primary='yes'/>
      <alias name='video0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
    </video>
    <memballoon model='virtio'>
      <alias name='balloon0'/>
      <address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0'/>
    </memballoon>
  </devices>
  <seclabel type='dynamic' model='dac' relabel='yes'>
    <label>+0:+100</label>
    <imagelabel>+0:+100</imagelabel>
  </seclabel>
  <qemu:commandline>
    <qemu:arg value='-usb'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='usb-kbd,bus=usb-bus.0'/>
    <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='Penryn,kvm=on,vendor=GenuineIntel,+kvm_pv_unhalt,+kvm_pv_eoi,+hypervisor,+invtsc,+pcid,+ssse3,+sse4.2,+popcnt,+avx,+avx2,+aes,+fma,+bmi1,+bmi2,+xsave,+xsaveopt,+rdrand,check'/>
  </qemu:commandline>
</domain>

Finally someone who has the same AppleKeyStoreTest issue
unraid.txt

-cpu Penryn in the qemu:commandline section is wrong for Ventura, for AMD CPUs the best option is -cpu Haswell-noTSX,vendor=GenuineIntel,+invtsc,+hypervisor,kvm=on,vmware-cpuid-freq=on, and for Intel -cpu host,vendor=GenuineIntel,+invtsc,+hypervisor,kvm=on,vmware-cpuid-freq=on.

Also add a parameter:

<qemu:arg value='-global'/>
<qemu:arg value='ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off'/>

@NeariX67 We have almost the same conifg and the same issue. What doest AppkeyStoreTest do when booting. I've never encounted this issue before. I've installed high sierra catalina big sure and monterery on unraid without any problems.

I only get this issue when booting with a dGPU however

@NeariX67 I didn't even get that far to a passthrough my dGPU . I am using vnc now.

What doest AppkeyStoreTest do when booting

It does nothing, it isn't the issue, that warning is present even on successful boots.

@NeariX67

I only get this issue when booting with a dGPU however

Passthrough devices won't work unless you add this argument:

<qemu:arg value='-global'/>
<qemu:arg value='ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off'/>

<qemu:arg value='-cpu'/> <qemu:arg value='host,kvm=on,vendor=GenuineIntel,+kvm_pv_unhalt,+kvm_pv_eoi,+hypervisor,+invtsc,+pcid,+ssse3,+sse4.2,+popcnt,+avx,+avx2,+aes,+fma,+bmi1,+bmi2,+xsave,+xsaveopt,+rdrand,check,vmware-cpuid-freq=on'/> <qemu:arg value='-global'/> <qemu:arg value='ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off'/>

I modified my config and merged yours and the other flags. I don't know if i should keep those flags or i need to delete them and only use (-cpu host,vendor=GenuineIntel,+invtsc,+hypervisor,kvm=on,vmware-cpuid-freq=on.)
I am using intel

Delete them and use my suggestion, with -cpu host it already passes through all the features your CPU has, so you only have to turn on the ones that QEMU emulates itself.

Finally, I get into the system. But I can't use my mouse. Can I add a mouse using the qemu args?

@Bradley-Liu switch from qxl/SPICE video to VMWare video

I don't know how to configure it in GUI I only get video mode "QXL best" and "cirrus" to choose. There is option called vmvga, but this option is grayed out. Can I change it manually in the xml config file? I think comparing to Proxmox, unraid's GUI is limited.

@NeariX67 does this(<qemu:arg value='-global'/>
<qemu:arg value='ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off'/>) solved your passing through issue?

I think you can edit this:

<model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1' primary='yes'/>

To:

<model type='vmware' ram='65536' vram='65536' vgamem='16384' heads='1' primary='yes'/>

Actually maybe vmvga there would work

@NeariX67 does this(<qemu:arg value='-global'/>
<qemu:arg value='ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off'/>) solved your passing through issue?

Will test this evening

@thenickdude
it says "unsupported configuration: unknown video model 'vmware'"

@NeariX67 does this(<qemu:arg value='-global'/>
<qemu:arg value='ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off'/>) solved your passing through issue?

Will test this evening

Please comment here if you get it work.

@thenickdude I change to this( <model type='vmvga' vram='65536' heads='1' primary='yes'/>) And it let me through. But when i boot into the system, still no luck. no mouse

@thenickdude @NeariX67
I added this(<qemu:arg value='-global'/>
<qemu:arg value='ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off'/>)to my xml file.
I can't boot my macos when passing through my dgpu.
There is no video output.

If you never even see the Proxmox boot logo on the guest's monitor then this is not a macOS problem, your card has failed to be initialized by the guest's UEFI before OpenCore even started loading.

If this is the only GPU in your system then you likely have to supply a clean vBIOS file for it.

I have a monterey installed on my unraid kvm system. I have no problmes using it. I pass throught the same dgup(rx560) to this newly installed ventura. I use the same nvram file that monterey use. Are there any other tasks that I may need to do before I pass through the dgup to avoid the issue. Thank you.

I attached the xml files of both systems to this comment for you
monterey.pdf
ventura.pdf

On Monterey do you see the Proxmox/Tianocore boot logo on the screen? If not, both VMs have the same problem.

On monterery i see tinacore sign when i start the vm. I can't figure out why I can't see it on ventura. They are almost the same configuration.

@thenickdude I copied the monterey config xml to ventura and made changes for disks and uuid. It worked. I can now have video output and functioning ventura system. But I wonder why. They are almost the same file. I included both files in the atachment. Does it has anything to do with pci bus ids? Because the most significant differences between the files are pci bus ids.
failed.pdf
worked.pdf

They're using two completely different EFI "code" files which will surely impact device initialization. This file is equivalent to the UEFI ROM on the motherboard. (The VARS file is okay)

image
So you think this was the issue?

Nah not the VARS file (that'll only contain the values that the booted firmware wrote itself), only the CODE file

@thenickdude I installed a vm on my friends unraid server with the almost the same config. This time I can't pass through my usb devices. I've got the pci devices (amd video included)worked. All the usb devices passed throught are not wroking. Would you please help me on this issue?

I just learned that ventura dropped the usb1.1 support. So my bluetooth, mouse and keyboard are not functioning. Do we some workaround to cope with issue?

You can explicitly add a USB 2 controller and attach the emulated USB tablet to that instead. This is what I have in Proxmox, and no idea how to convert that to what you're using:

-device 'usb-tablet,id=tablet,bus=ehci.0,port=1'
[device "ehci"]
  driver = "ich9-usb-ehci1"
  multifunction = "on"
  bus = "pcie.0"
  addr = "1d.7"

Do I have to add a emulated usb tablet for my mouse, keyboard and bluetooth to work? What's the function of this emulated usb tablet?

The emulated tablet is only for VNC access. If you have real USB passthrough devices, try attaching them to an ehci controller.

unraid adds usb controllers for the code is as follow

 <controller type='usb' index='0' model='ich9-ehci1'>
      <alias name='usb'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x7'/>
    </controller>


    <controller type='usb' index='0' model='ich9-uhci1'>
      <alias name='usb'/>
      <master startport='0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0' multifunction='on'/>
    </controller>


    <controller type='usb' index='0' model='ich9-uhci2'>
      <alias name='usb'/>
      <master startport='2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x1'/>
    </controller>


    <controller type='usb' index='0' model='ich9-uhci3'>
      <alias name='usb'/>
      <master startport='4'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x2'/>
    </controller>

And I attached 4 USB devices to this controller: web cam(speed:480M) ,a mouse(speed:up to 12M) ,a keyboard(speed:up to 12M), a bluetooth controller(speed: up to 12M) the code is as follow

<hostdev mode='subsystem' type='usb' managed='no'>
      <source>
        <vendor id='0x05ac'/>
        <product id='0x024f'/>
        <address bus='1' device='9'/>
      </source>
      <alias name='hostdev5'/>
      <address type='usb' bus='0' port='2'/>
    </hostdev>


    <hostdev mode='subsystem' type='usb' managed='no'>
      <source>
        <vendor id='0x05ac'/>
        <product id='0x828d'/>
        <address bus='1' device='16'/>
      </source>
      <alias name='hostdev6'/>
      <address type='usb' bus='0' port='3'/>
    </hostdev>


    <hostdev mode='subsystem' type='usb' managed='no'>
      <source>
        <vendor id='0x0bda'/>
        <product id='0x58b0'/>
        <address bus='1' device='2'/>
      </source>
      <alias name='hostdev7'/>
      <address type='usb' bus='0' port='4'/>
    </hostdev>


    <hostdev mode='subsystem' type='usb' managed='no'>
      <source>
        <vendor id='0x2717'/>
        <product id='0x5013'/>
        <address bus='1' device='3'/>
      </source>
      <alias name='hostdev8'/>
      <address type='usb' bus='0' port='5'/>
    </hostdev>

Only the webcam showed up in hackintool and the three other three didn't. In Monterey, they are all fine.
Uploading Screenshot 2022-11-12 at 11.33.15.png…