** Hackintosh ** Tips to make a bare metal MacOS


Leoyzen

824 posts in this topic Last Reply

Recommended Posts

  • Replies 823
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

It is time to start a new thread and share my tips, and we can discuss here. For those who don't have much information, see  SpaceInvaderOne's **VIDEO GUIDE** How to Install MacOS Mojave or High

Good news, no more AMD reset bug with RX 6xxx XT series GPUs in macOS 11.4 beta 1 on UnRAID.

Latest release of OVMF_CODE.fd and OVMF_VARS.fd from edk2, v. 202102 published today. Compiled in kali linux with gcc, tested and working. Enjoy edk2-OVMF-202102-Stable-RELEASE-GCC5-Kali.

Posted Images

Big Sur beta 3 20A5323l is out, no particular problems during installation.

 

Current issues I'm experiencing (updated from previous beta 2):

- issue with textedit: some crashes when opening existing txt files (with beta 1 was several crashes)

- preference panel icons of third party applications: not working well, icons disappear if prepane installed in /System/Library

- system preferences --> network: it takes long time to load the network panel (only for the first time after a boot and it seems only if csrutil and authenticated-root are disabled, still not too clear what triggers the delay)

- control center: somehow slow when clicking on the control center icon

- Cannot change menu bar clock settings (all is greyed out)

- AM/PM - 24h clock not working

- Languages: some strings are only in English

- System preference panel not working well: some settings shows as greyed out but can be enabled, some graphical glitches

- Opencore shows in bootpicker "Preboot" instead of the Mac OS volume name (Scanpolicy=0, no Mac OS volume name is shown)

- Cannot mount / for read/write anymore with SIP disabled: sudo mount -uw /

Edited by ghost82
Link to post
  • 5 weeks later...

OK so I decided to take the plunge after reading all 21 pages. My assumption was that I could take a perfectly working Catalina vm made with macinabox, mount the clover qcow2 image, trash the clover efi folder, replace with the one from @Leoyzen's github and stand a decent chance of it booting, even with no alternations to the xml. Well that didn't happen. 

 

IMG_7629.thumb.jpg.1d17f4ed3a178225246d02997570fc7d.jpg

 

I am able to get to the oc boot selector, but regardless of what is selected, the result is the same. This happens almost instantaneously after the boot selector. I also tried another OC.qcow2 image that was uploaded in this thread and the result was the same.  Not sure where to go from here. Maybe I'm missing something obvious? Anything I can provide to help in troubleshooting?

Edited by 1812
Link to post
47 minutes ago, 1812 said:

Anything I can provide to help in troubleshooting?

Yes, are you able to mount the qcow2 image in unraid, modify the config.plist and set target to 83? Shutdown the vm first, mount the qcow2, set target in EFI/OC/config.plist, unmount the qcow2 start the vm (it will give the same error), force shutdown the vm, mount again the qcow2 and you will find the bootloader log in the root of the EFI folder. That should help a bit to understand.

 

Or use the clover qcow2, boot the vm, mount the EFI folder in the vm, replace with opencore and set in the config.plist target=83 (maybe this is faster).

 

Ops, one important thing, you need opencore DEBUG version (not the RELEASE version), do you know if you have it?

 

Edited by ghost82
Link to post
5 hours ago, ghost82 said:

 

Ops, one important thing, you need opencore DEBUG version (not the RELEASE version), do you know if you have it?

 

 

I only have what was pulled of of Leoyzen's GitHub page. Just now I attempted to locate it on the web but apparently my google-fu is a bit weak today...

Link to post
41 minutes ago, 1812 said:

 

I only have what was pulled of of Leoyzen's GitHub page. Just now I attempted to locate it on the web but apparently my google-fu is a bit weak today...

Tomorrow I will try to pack a qcow2 image for you; in the meantime you could pm me sensitive data of your system, serial number, smbios data, uuid, etc. so that I can pack properly the image.

Config.plist of clover should be enough to have all the data including all customizations.

Otherwise I could pack a general image with the latest versions of oc and kexts.

Please paste also the xml of the vm.

Which version of Catalina are you running?

Edited by ghost82
Link to post
1 hour ago, ghost82 said:

Tomorrow I will try to pack a qcow2 image for you; in the meantime you could pm me sensitive data of your system, serial number, smbios data, uuid, etc. so that I can pack properly the image.

Config.plist of clover should be enough to have all the data including all customizations.

Otherwise I could pack a general image with the latest versions of oc and kexts.

Please paste also the xml of the vm.

Which version of Catalina are you running?

 

 

xml (had to copy from the running vm) 

<?xml version='1.0' encoding='UTF-8'?>
<domain type='kvm' id='34' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
  <name>Desktop</name>
  <uuid>9e8e043c-3cfd-8a45-aeac-d80f5cbd234f</uuid>
  <metadata>
    <vmtemplate xmlns="unraid" name="MacOS" icon="/mnt/user/domains/MacinaboxCatalina/icon/catalina.png" os="Catalina"/>
  </metadata>
  <memory unit='KiB'>101187584</memory>
  <currentMemory unit='KiB'>101187584</currentMemory>
  <memoryBacking>
    <nosharepages/>
  </memoryBacking>
  <vcpu placement='static'>24</vcpu>
  <cputune>
    <vcpupin vcpu='0' cpuset='4'/>
    <vcpupin vcpu='1' cpuset='20'/>
    <vcpupin vcpu='2' cpuset='5'/>
    <vcpupin vcpu='3' cpuset='21'/>
    <vcpupin vcpu='4' cpuset='6'/>
    <vcpupin vcpu='5' cpuset='22'/>
    <vcpupin vcpu='6' cpuset='7'/>
    <vcpupin vcpu='7' cpuset='23'/>
    <vcpupin vcpu='8' cpuset='8'/>
    <vcpupin vcpu='9' cpuset='24'/>
    <vcpupin vcpu='10' cpuset='9'/>
    <vcpupin vcpu='11' cpuset='25'/>
    <vcpupin vcpu='12' cpuset='10'/>
    <vcpupin vcpu='13' cpuset='26'/>
    <vcpupin vcpu='14' cpuset='11'/>
    <vcpupin vcpu='15' cpuset='27'/>
    <vcpupin vcpu='16' cpuset='12'/>
    <vcpupin vcpu='17' cpuset='28'/>
    <vcpupin vcpu='18' cpuset='13'/>
    <vcpupin vcpu='19' cpuset='29'/>
    <vcpupin vcpu='20' cpuset='14'/>
    <vcpupin vcpu='21' cpuset='30'/>
    <vcpupin vcpu='22' cpuset='15'/>
    <vcpupin vcpu='23' cpuset='31'/>
  </cputune>
  <resource>
    <partition>/machine</partition>
  </resource>
  <os>
    <type arch='x86_64' machine='pc-q35-3.1'>hvm</type>
    <loader readonly='yes' type='pflash'>/mnt/scratch/vm/Desktop/ovmf/OVMF_CODE.fd</loader>
    <nvram>/mnt/scratch/vm/Desktop/ovmf/OVMF_VARS.fd</nvram>
  </os>
  <features>
    <acpi/>
    <apic/>
    <ioapic driver='qemu'/>
  </features>
  <cpu mode='host-passthrough' check='none'>
    <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='qcow2' cache='none' io='native' discard='unmap'/>
      <source file='/mnt/user/vm/Desktop/Clover.qcow2' index='4'/>
      <backingStore/>
      <target dev='hdc' bus='sata'/>
      <boot order='1'/>
      <alias name='sata0-0-2'/>
      <address type='drive' controller='0' bus='0' target='0' unit='2'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='none' io='native' discard='unmap'/>
      <source file='/mnt/scratch/vm/Desktop/macos_disk.qcow2' index='3'/>
      <backingStore/>
      <target dev='hdd' bus='sata'/>
      <alias name='sata0-0-3'/>
      <address type='drive' controller='0' bus='0' target='0' unit='3'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='none' io='native' discard='unmap'/>
      <source file='/mnt/scratch/vm/Scratch and Apps Disk/Scratch.qcow2' index='2'/>
      <backingStore/>
      <target dev='hde' bus='sata'/>
      <alias name='sata0-0-4'/>
      <address type='drive' controller='0' bus='0' target='0' unit='4'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='writeback'/>
      <source file='/mnt/disks/MacBackup/Backup/vdisk1.qcow2' index='1'/>
      <backingStore/>
      <target dev='hdf' bus='sata'/>
      <alias name='sata0-0-5'/>
      <address type='drive' controller='0' bus='0' target='0' unit='5'/>
    </disk>
    <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>
    <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='0x8'/>
      <alias name='pci.1'/>
      <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'/>
      <alias name='pci.2'/>
      <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'/>
      <alias name='pci.3'/>
      <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'/>
      <alias name='pci.4'/>
      <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'/>
      <alias name='pci.5'/>
      <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'/>
      <alias name='pci.6'/>
      <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'/>
      <alias name='pci.7'/>
      <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'/>
      <alias name='pci.8'/>
      <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'/>
      <alias name='pci.9'/>
      <address type='pci' domain='0x0000' bus='0x07' slot='0x00' function='0x0'/>
    </controller>
    <controller type='pci' index='10' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='10' port='0x10'/>
      <alias name='pci.10'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0' multifunction='on'/>
    </controller>
    <controller type='pci' index='11' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='11' port='0x11'/>
      <alias name='pci.11'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x1'/>
    </controller>
    <controller type='virtio-serial' index='0'>
      <alias name='virtio-serial0'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:0a:24:44'/>
      <source bridge='br0'/>
      <target dev='vnet0'/>
      <model type='vmxnet3'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
    </interface>
    <serial type='pty'>
      <source path='/dev/pts/0'/>
      <target type='isa-serial' port='0'>
        <model name='isa-serial'/>
      </target>
      <alias name='serial0'/>
    </serial>
    <console type='pty' tty='/dev/pts/0'>
      <source path='/dev/pts/0'/>
      <target type='serial' port='0'/>
      <alias name='serial0'/>
    </console>
    <channel type='unix'>
      <source mode='bind' path='/var/lib/libvirt/qemu/channel/target/domain-34-Desktop/org.qemu.guest_agent.0'/>
      <target type='virtio' name='org.qemu.guest_agent.0' state='connected'/>
      <alias name='channel0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
    <input type='mouse' bus='ps2'>
      <alias name='input0'/>
    </input>
    <input type='keyboard' bus='ps2'>
      <alias name='input1'/>
    </input>
    <input type='keyboard' bus='ps2'>
      <alias name='input2'/>
    </input>
    <input type='keyboard' bus='ps2'>
      <alias name='input3'/>
    </input>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x47' slot='0x00' function='0x0'/>
      </source>
      <alias name='hostdev0'/>
      <rom file='/mnt/user/domains/vbios/580.dump'/>
      <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x41' slot='0x00' function='0x0'/>
      </source>
      <alias name='hostdev1'/>
      <rom file='/mnt/user/domains/vbios/580a.dump'/>
      <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x09' slot='0x00' function='0x0'/>
      </source>
      <alias name='hostdev2'/>
      <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x0a' slot='0x00' function='0x0'/>
      </source>
      <alias name='hostdev3'/>
      <address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x0b' slot='0x00' function='0x0'/>
      </source>
      <alias name='hostdev4'/>
      <address type='pci' domain='0x0000' bus='0x08' slot='0x00' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x0c' slot='0x00' function='0x0'/>
      </source>
      <alias name='hostdev5'/>
      <address type='pci' domain='0x0000' bus='0x0a' slot='0x00' function='0x0'/>
    </hostdev>
    <memballoon model='none'/>
  </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=theysayonceyougomacyounevergoback'/>
    <qemu:arg value='-smbios'/>
    <qemu:arg value='type=2'/>
    <qemu:arg value='-cpu'/>
    <qemu:arg value='IvyBridge,kvm=on,vendor=GenuineIntel,+invtsc,vmware-cpuid-freq=on,+pcid,+ssse3,+sse4.2,+popcnt,+avx,+aes,+xsave,+xsaveopt,check'/>
    <qemu:arg value='-set'/>
    <qemu:arg value='device.sata0-0-2.rotation_rate=1'/>
    <qemu:arg value='-set'/>
    <qemu:arg value='device.sata0-0-3.rotation_rate=1'/>
    <qemu:arg value='-set'/>
    <qemu:arg value='device.sata0-0-4.rotation_rate=1'/>
  </qemu:commandline>
</domain>

 

running Catalina 10.15.4

 

sending you the config.plist now

 

 

much appreciated!

Link to post

Sent in pm.

 

Big Sur beta 5 20A5354i tested:

- issue with textedit: some crashes when opening existing txt files (with beta 1 was several crashes)

- preference panel icons of third party applications: not working well, icons disappear if prepane installed in /System/Library

- system preferences --> network: it takes long time to load the network panel: partially solved, now there's no more delay once booted but during Mac OS boot there are several messages like "IOKit Daemon (kernelmanagerd) stall[0], (60s): 'ISA'" and boot takes like 4-5 minutes (same messages happen during installation) Solved: if you have AppleLPCInjector kext disable it

- control center: somehow slow when clicking on the control center icon

- Clicking on top clock menu bar opens the widget (not Sur but shouldn't it open clock settings?)

- AM/PM - 24h clock not working

- Languages: some strings are only in English

- System preference panel not working well: some settings shows as greyed out but can be enabled, some graphical glitches

- Opencore shows in bootpicker "Preboot" instead of the Mac OS volume name (Scanpolicy=0, no Mac OS volume name is shown)

- Cannot mount / for read/write anymore with SIP disabled: sudo mount -uw /

 

Opencore latest master fixes the recovery boot without the need of hotplug.

Edited by ghost82
Link to post

brothers and sisters, I'm here to testify! thanks to this thread and specifically to @ghost82 I am a a redeemed clover convert and a believer in opencore. not only is the vm booting faster, but I'm benchmarking 10% higher than the same os image on clover. And free performance is worth a lot. THANKS!

Edited by 1812
Link to post

Gentlemen,

 

Can you recommend a way to convert/migrate an already working super-duper OpenCore config over to unRAID?

 

Can I package my config in a docker image? Should I just keep my EFI folder, reinstall and use migration assistant?

I am using the latest OC 0.6.0 debug

Link to post
38 minutes ago, Van said:

Can you recommend a way to convert/migrate an already working super-duper OpenCore config over to unRAID?

Can you explain better what you want to do?

You want to boot unraid from opencore?Or you want to trasnfer an existing opencore efi to another mac os vm?

Docker image... 🤔 ?

Edited by ghost82
Link to post
21 hours ago, ghost82 said:

Can you explain better what you want to do?

You want to boot unraid from opencore?Or you want to trasnfer an existing opencore efi to another mac os vm?

Docker image... 🤔 ?

Second,

I want to take my current OpenCore install, (if possible, containerise it, a bit like Macinabox, otherwise) install unRAID on bare metal, and install a VM with my current OpenCore build. Essentially I want to avoid redoing my whole OS, and I want to avoid using Clover.  

Link to post
11 hours ago, Van said:

Second,

I want to take my current OpenCore install, (if possible, containerise it, a bit like Macinabox, otherwise) install unRAID on bare metal, and install a VM with my current OpenCore build. Essentially I want to avoid redoing my whole OS, and I want to avoid using Clover.  

You can't containerise a bootloader, usually the bootloader is in its own qcow2 or img file, with a EFI partition in which there are all the files (including settings) of the bootloader.

In another case (not preferred) apple efi is overwritten with opencore/clover EFI, so these files are on the EFI partition of the mac os disk.

So you only need to copy the qcow2/img file for the first case and let point the new vm to this file as the first boot option.

Edited by ghost82
Link to post
  • 2 weeks later...

Big Sur beta 6 20A5364e tested:

- issue with textedit: some crashes when opening existing txt files (with beta 1 was several crashes) Still some issues with the search functionality

- preference panel icons of third party applications: not working well, icons disappear if prepane installed in /System/Library (probably it will not be fixed since you can't install in /System with a sealed system)

- system preferences --> network: it takes long time to load the network panel

- during Mac OS boot there are several messages like "IOKit Daemon (kernelmanagerd) stall[0], (60s): 'ISA'" and boot takes like 4-5 minutes (same messages happen during installation with 240s stall time); Solved: if you have AppleLPCInjector kext disable it

- control center: somehow slow when clicking on the control center icon

- Clicking on top clock menu bar opens the widget (not sure but shouldn't it open clock settings?)

- AM/PM - 24h clock not working, in beta 6 it's also not possible (again) to change clock settings from pref pane

- Languages: some strings are only in English

- System preference panel not working well: some settings shows as greyed out but can be enabled, some graphical glitches

- Opencore shows in bootpicker "Preboot" instead of the Mac OS volume name (Scanpolicy=0, no Mac OS volume name is shown)

- Cannot mount / for read/write anymore with SIP disabled: sudo mount -uw / (not an issue related to Mac OS since it's supposed to work as it is, the seal must be broken to be able to write into /)

- Cannot connect to SMB (workaround load manually kext with "sudo kextload /System/Library/Extensions/smbfs.kext")

Edited by ghost82
Link to post
21 minutes ago, david279 said:

I just booted up dev beta six and the only issue i had at first was no sound after the first boot.

Strange! Do you use latest lilu/applealc?

My sound is working, take into account that (in my case) audio output is set to hdmi if you have a monitor attached to hdmi (but I have a dedicated sound card and no speakers to hdmi), so make also sure to setup proper settings in pref pane.

 

Can you share your full xml?Apparently the stall issue is only mine :(

Edited by ghost82
Link to post

Yeah i have the latest release from lilu/weg. My sound started working after rebooting. I pass through my built-in audio to my VM and it works very well. 

 

<?xml version='1.0' encoding='UTF-8'?>
<domain type='kvm' id='8' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
  <name>Big Sur Dev GPU</name>
  <uuid>-----</uuid>
  <metadata>
    <vmtemplate xmlns="unraid" name="Linux" icon="OSX.png" os="linux"/>
  </metadata>
  <memory unit='KiB'>8388608</memory>
  <currentMemory unit='KiB'>8388608</currentMemory>
  <memoryBacking>
    <nosharepages/>
  </memoryBacking>
  <vcpu placement='static'>8</vcpu>
  <cputune>
    <vcpupin vcpu='0' cpuset='4'/>
    <vcpupin vcpu='1' cpuset='12'/>
    <vcpupin vcpu='2' cpuset='5'/>
    <vcpupin vcpu='3' cpuset='13'/>
    <vcpupin vcpu='4' cpuset='6'/>
    <vcpupin vcpu='5' cpuset='14'/>
    <vcpupin vcpu='6' cpuset='7'/>
    <vcpupin vcpu='7' cpuset='15'/>
  </cputune>
  <resource>
    <partition>/machine</partition>
  </resource>
  <os>
    <type arch='x86_64' machine='pc-q35-5.0'>hvm</type>
    <loader readonly='yes' type='pflash'>/usr/share/qemu/ovmf-x64/OVMF_CODE-pure-efi.fd</loader>
    <nvram>/etc/libvirt/qemu/nvram/----_VARS-pure-efi.fd</nvram>
  </os>
  <features>
    <acpi/>
    <apic/>
  </features>
  <cpu mode='host-passthrough' check='none'/>
  <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='qcow2' cache='none'/>
      <source file='/mnt/cache/domains/Big Sur/opencore.bigsurv063.qcow2' index='2'/>
      <backingStore/>
      <target dev='hdc' bus='usb'/>
      <boot order='1'/>
      <alias name='usb-disk2'/>
      <address type='usb' bus='0' port='1'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='none' io='native' discard='unmap'/>
      <source file='/mnt/disks/MKNSSDRE500GB_MK170901100386B42/Hackintosh/Sir.img' index='1'/>
      <backingStore/>
      <target dev='hdd' bus='sata'/>
      <alias name='sata0-0-3'/>
      <address type='drive' controller='0' bus='0' target='0' unit='3'/>
    </disk>
    <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>
    <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='0x8'/>
      <alias name='pci.1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0' multifunction='on'/>
    </controller>
    <controller type='pci' index='2' model='pcie-to-pci-bridge'>
      <model name='pcie-pci-bridge'/>
      <alias name='pci.2'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
    </controller>
    <controller type='pci' index='3' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='3' port='0x9'/>
      <alias name='pci.3'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
    </controller>
    <controller type='pci' index='4' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='4' port='0xa'/>
      <alias name='pci.4'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
    </controller>
    <controller type='pci' index='5' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='5' port='0xb'/>
      <alias name='pci.5'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x3'/>
    </controller>
    <controller type='pci' index='6' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='6' port='0xc'/>
      <alias name='pci.6'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x4'/>
    </controller>
    <controller type='pci' index='7' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='7' port='0xd'/>
      <alias name='pci.7'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x5'/>
    </controller>
    <controller type='pci' index='8' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='8' port='0xe'/>
      <alias name='pci.8'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x6'/>
    </controller>
    <controller type='pci' index='9' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='9' port='0xf'/>
      <alias name='pci.9'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x7'/>
    </controller>
    <controller type='pci' index='10' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='10' port='0x10'/>
      <alias name='pci.10'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </controller>
    <controller type='virtio-serial' index='0'>
      <alias name='virtio-serial0'/>
      <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:b9:78:55'/>
      <source bridge='br0'/>
      <target dev='vnet1'/>
      <model type='e1000-82545em'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
    </interface>
    <serial type='pty'>
      <source path='/dev/pts/1'/>
      <target type='isa-serial' port='0'>
        <model name='isa-serial'/>
      </target>
      <alias name='serial0'/>
    </serial>
    <console type='pty' tty='/dev/pts/1'>
      <source path='/dev/pts/1'/>
      <target type='serial' port='0'/>
      <alias name='serial0'/>
    </console>
    <channel type='unix'>
      <source mode='bind' path='/var/lib/libvirt/qemu/channel/target/domain-8-Big Sur Dev GPU/org.qemu.guest_agent.0'/>
      <target type='virtio' name='org.qemu.guest_agent.0' state='connected'/>
      <alias name='channel0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
    <input type='mouse' bus='ps2'>
      <alias name='input0'/>
    </input>
    <input type='keyboard' bus='ps2'>
      <alias name='input1'/>
    </input>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x0a' slot='0x00' function='0x0'/>
      </source>
      <alias name='hostdev0'/>
      <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x0' multifunction='on'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x0a' slot='0x00' function='0x1'/>
      </source>
      <alias name='hostdev1'/>
      <address type='pci' domain='0x0000' bus='0x05' slot='0x00' function='0x1'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
      </source>
      <alias name='hostdev2'/>
      <address type='pci' domain='0x0000' bus='0x07' slot='0x00' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x06' slot='0x00' function='0x0'/>
      </source>
      <alias name='hostdev3'/>
      <address type='pci' domain='0x0000' bus='0x08' slot='0x00' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x07' slot='0x00' function='0x0'/>
      </source>
      <alias name='hostdev4'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x0c' slot='0x00' function='0x3'/>
      </source>
      <alias name='hostdev5'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </hostdev>
    <memballoon model='none'/>
  </devices>
  <seclabel type='dynamic' model='dac' relabel='yes'>
    <label>+0:+100</label>
    <imagelabel>+0:+100</imagelabel>
  </seclabel>
  <qemu:commandline>
    <qemu:arg value='-set'/>
    <qemu:arg value='device.sata0-0-3.rotation_rate=1'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='isa-applesmc,osk=mybuddymybuddywhereeverigohegoes'/>
    <qemu:arg value='-smbios'/>
    <qemu:arg value='type=2'/>
    <qemu:arg value='-cpu'/>
    <qemu:arg value='Skylake-Client,vendor=GenuineIntel,+hypervisor,-erms,-pcid,-hle,-invpcid,-rtm,kvm=on,+topoext,+svm,+invtsc,+fma,+mmxext,+avx,+avx2,+aes,+xsave,+xsaveopt,+ssse3,+sse4_2,+popcnt,+sse4a,+bmi1,+bmi2,+arat,+abm,+3dnowprefetch,+adx,+clflushopt,+cr8legacy,+fsgsbase,+fxsr_opt,+misalignsse,+movbe,+osvw,+pclmuldq,+pdpe1gb,+rdrand,+rdseed,+rdtscp,+sha-ni,+smap,+smep,+vme,+xgetbv1,+xsavec,+perfctr-core,check'/>
  </qemu:commandline>
</domain>

 

Link to post
On 9/4/2020 at 1:53 PM, ghost82 said:

IOKit Daemon (kernelmanagerd) stall[0], (60s): 'ISA'

Yess! I found the culprit!

Big Sur >= beta 5 doesn't like my AppleLPCInjector kext.

By disabling it no more stall messages and boot and shutdown a lot faster.

 

Update: My injector kext was injecting pci8086,2918; to load again AppleLPC without stall messages now I'm injecting without any injector kext but simply in opencore pci8086,2916.

 

	<key>DeviceProperties</key>
	<dict>
		<key>Add</key>
		<dict>
			<key>PciRoot(0x1)/Pci(0x1F,0x0)</key>
			<dict>
				<key>compatible</key>
				<string>pci8086,2916</string>
				<key>device-id</key>
				<data>FikA</data>
				<key>name</key>
				<string>pci8086,2916</string>
			</dict>
		</dict>

 

Edited by ghost82
Link to post

Hi everyone,

 

I'm about to build my first Unraid box and am looking into getting an OSX VM up and running. I've successfully completed this with Proxmox in the past and although the overall process seems similar, not being familiar with UnRaid, I am unsure of a few things. I would really appreciate any help as I am trying to get everything planned so I can get it all up and running fast.

 

  1. General steps would be to obtain the OSX Catalina image and convert to iso (I'll start with this and move to Big Sur when stable) install image. This would be as per the instructions on the OSX KVM site.
  2. Using the EFI disk from the GitHub link in the first post, set up a VM, pass through the graphics card (RX570). At this stage, configure the CPU and the flags to pass to the VM. I'm not 100% sure here how or what to do: 
    1. Previously, I used Penryn but in those case, OSX won't be able to identify the supported flags so I need to pass them though?
    2. If so, is it just the ones in the list on the first page?
    3. Does Unraid support nested virtualization so I can run docker inside OSX?
    4. Or, can I pass through the host CPU which would be an AMD 3600XT? I saw SpaceInvader1's advanced video mention you can pass host first and then put Penryn at the bottom of the XML?
  3. After setup, start the VM, install OSX onto disk. When complete, unmount the iso and hopefully it boots OSX.
  4. At this point, I can look to forward some USB ports so I can connect a bluetooth adaptor and other peripherals (mouse etc.). Has anyone had any experience passing a Bluetooth adaptor and using it for pairing with a Bluetooth speaker?
  5. Finally, when Big Sur is ready, the general upgrade process would be to do the update through the OS and swap for a new EFI disk.

 

Any help would be very appreciated!

 

Thanks,

 

Link to post
45 minutes ago, paulmorabi said:

General steps would be to obtain the OSX Catalina image and convert to iso (I'll start with this and move to Big Sur when stable) install image. This would be as per the instructions on the OSX KVM site.

Not sure iso will work, but if it won't work use .img; just create from a working mac os with disk utility a blank dmg file of 16Gb (mac os journaled, GUID),  and run the folliwing command:

sudo /Path/to/mac/os/install/application.app/Contents/Resources/createinstallmedia --volume /Volumes/NameOfMountedDmgVolume

Unmount the dmg and rename from dmg to img.

This will be a 100% working installation image.

 

45 minutes ago, paulmorabi said:
  • Previously, I used Penryn but in those case, OSX won't be able to identify the supported flags so I need to pass them though?
  • If so, is it just the ones in the list on the first page?

Penryn gives you more compatibility to run the vm, you can use host-passthrough in the xml of the vm and use -cpu host as a custom qemu arg; you will need amd patches in the bootloader. If you want to pass flags you need to know which flags your cpu supports, if you input a flag which is not supported there will be no particular problem, qemu will issue a warning. For cpu host-passthrough these flags are recommended:

<qemu:arg value='host,vendor=GenuineIntel,+hypervisor,+invtsc,kvm=on,+fma,+avx,+avx2,+aes,+ssse3,+sse4_2,+popcnt,+sse4a,+bmi1,+bmi2'/>

In my case I'm using these (intel 2x e5-2687w):

<qemu:arg value='host,ucode_rev=0x513,+hypervisor,migratable=no,-erms,kvm=on,+invtsc,+topoext,+avx,+aes,+xsave,+xsaveopt,+ssse3,+sse4_2,+popcnt,+arat,+pclmuldq,+pdpe1gb,+rdtscp,+vme,+umip,check'/>

My advice is starting with Penryn, then tune that setting once the vm is up and running.

 

45 minutes ago, paulmorabi said:

Does Unraid support nested virtualization so I can run docker inside OSX?

I think this is not possible with amd; it's working on intel (I'm running vmware inside the vm with nested virtualization); this only works with cpu host-passthrough.

 

45 minutes ago, paulmorabi said:

Or, can I pass through the host CPU which would be an AMD 3600XT? I saw SpaceInvader1's advanced video mention you can pass host first and then put Penryn at the bottom of the XML?

Not sure about this, but I think it's seen as Penryn; because if I use host-passthrough in the xml and I add a qemu arg with Penryn nested virtualization is not working. So if you use host-passthrough you need to have -cpu host as the custom arg.

 

45 minutes ago, paulmorabi said:

At this point, I can look to forward some USB ports so I can connect a bluetooth adaptor and other peripherals (mouse etc.). Has anyone had any experience passing a Bluetooth adaptor and using it for pairing with a Bluetooth speaker?

I'm successfully passing through a bluetooth dongle to be paired with my phone.

 

45 minutes ago, paulmorabi said:

Finally, when Big Sur is ready, the general upgrade process would be to do the update through the OS and swap for a new EFI disk.

If you have 2 different EFI, and the first EFI is not compatible to boot the new os, I'm not sure it will work, unless you swap the EFI during the upgrading process.

If the EFI are incompatible I would create a new vm with the newer os, a clean installation, and use migration assistant to migrate data.

However, currently (big sur beta 6), the 2 EFI are compatible (same efi able to boot both os).

 

Advice: use opencore

Edited by ghost82
Link to post

@ghost82 thanks for the details.

 

Regarding the iso, I did as per this how to and used dmg2img (which technically made a disk image rather than iso).  Then added that as a disk to the VM and booted from it.

 

Noted on the CPU arguments. I'll stick with Penryn and pass through the recommended flags. Not too fussed about nested virtualization so I'll leave it for now.

 

About the EFI disk change whn upgrading to Big Sur. I did this successfully when upgrading the VM from the above install. After first reboot of the upgrade, at the point opencore bootloader appeared, I shut down the VM and swapped the EFI disks to use the latest OpenCore with Big Sur support. Everything worked from there. Originally, I considered to move this install from Proxmox but I suspect a clean install is more straightforward. And yes, will definitely be using OpenCore.

 

BTW when you said the two EFI are compatible, which did you mean? The one in the Github link on the first page? If so, you should be able to upgrade to Big Sur without any EFI change?

 

Edited by paulmorabi
Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.