[Support] SpaceinvaderOne - Macinabox


Recommended Posts

  • 3 weeks later...

Hoping someone might be able to help. I have installed Big Sur using the video instructions and it boots up and works well with VNC.

 

I have been trying to setup passthrough of a 580x for the past few weeks and have had no luck but I feel like I am making progress and am likely close to making it work. Hardware is Asrock x399 Tiachi, Threadripper 1900x. IOMMU and other virtualization features are turned on in the BIOS.

 

I have also enabled the PCIe overide and VFIO unsafe interrupts (both). Seems to be necessary.

 

The GPU (video/audio) is binded to VFIO.

 

I can pass the graphics card through to a Windows 10 VM.

 

I am using the vBIOS for my card here: https://www.techpowerup.com/vgabios/194686/dell-rx580-8192-170301

 

When I try to pass the 580x through to my Mac VM, it hangs on the Mac loading screen at about 25%.

 

My xml is below, hopefully someone knows how to fix this, I am at a bit of a loss:

 

<?xml version='1.0' encoding='UTF-8'?>
<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
  <name>Macinabox BigSur</name>
  <uuid>d28b8bc3-bb06-4370-abf5-66a3bb821127</uuid>
  <description>MacOS Big Sur</description>
  <metadata>
    <vmtemplate xmlns="unraid" name="Windows 10" icon="default.png" os="osx"/>
  </metadata>
  <memory unit='KiB'>16777216</memory>
  <currentMemory unit='KiB'>16777216</currentMemory>
  <memoryBacking>
    <nosharepages/>
  </memoryBacking>
  <vcpu placement='static'>8</vcpu>
  <cputune>
    <vcpupin vcpu='0' cpuset='1'/>
    <vcpupin vcpu='1' cpuset='9'/>
    <vcpupin vcpu='2' cpuset='3'/>
    <vcpupin vcpu='3' cpuset='11'/>
    <vcpupin vcpu='4' cpuset='5'/>
    <vcpupin vcpu='5' cpuset='13'/>
    <vcpupin vcpu='6' cpuset='7'/>
    <vcpupin vcpu='7' cpuset='15'/>
  </cputune>
  <resource>
    <partition>/machine</partition>
  </resource>
  <os>
    <type arch='x86_64' machine='pc-q35-4.2'>hvm</type>
    <loader readonly='yes' type='pflash'>/mnt/user/system/custom_ovmf/Macinabox_CODE-pure-efi.fd</loader>
    <nvram>/etc/libvirt/qemu/nvram/d28b8bc3-bb06-4370-abf5-66a3bb821127_VARS-pure-efi.fd</nvram>
  </os>
  <features>
    <acpi/>
    <apic/>
  </features>
  <cpu mode='host-passthrough' check='none' migratable='on'>
    <topology sockets='1' dies='1' cores='4' threads='2'/>
    <cache mode='passthrough'/>
    <feature policy='require' name='topoext'/>
  </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/cache/VM/Macinabox BigSur/macos_disk.img'/>
      <target dev='hdc' bus='sata'/>
      <boot order='1'/>
      <address type='drive' controller='0' bus='0' target='0' unit='2'/>
    </disk>
    <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='0xb'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x3'/>
    </controller>
    <controller type='pci' index='4' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='4' port='0x13'/>
      <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='0xa'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
    </controller>
    <controller type='pci' index='6' model='pcie-to-pci-bridge'>
      <model name='pcie-pci-bridge'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
    </controller>
    <controller type='virtio-serial' index='0'>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
    </controller>
    <controller type='sata' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
    </controller>
    <controller type='usb' index='0' model='ich9-ehci1'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x7'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <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'>
      <master startport='2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x1'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci3'>
      <master startport='4'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x2'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:57:6d:8b'/>
      <source bridge='br0'/>
      <model type='e1000-82545em'/>
      <address type='pci' domain='0x0000' bus='0x03' slot='0x00' 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>
    <channel type='unix'>
      <target type='virtio' name='org.qemu.guest_agent.0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
    <input type='tablet' bus='usb'>
      <address type='usb' bus='0' port='1'/>
    </input>
    <input type='mouse' bus='ps2'/>
    <input type='keyboard' bus='ps2'/>
    <graphics type='vnc' port='-1' autoport='yes' websocket='-1' 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'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0' multifunction='on'/>
    </video>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x41' slot='0x00' function='0x0'/>
      </source>
      <rom file='/mnt/cache/VM/Macinabox BigSur/Dell.RX580.8192.170301.rom'/>
      <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0' multifunction='on'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x41' slot='0x00' function='0x1'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x1'/>
    </hostdev>
    <memballoon model='none'/>
  </devices>
  <seclabel type='dynamic' model='dac' relabel='yes'/>
  <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='************************'/>
    <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,+fma4,+bmi1,+bmi2,+xsave,+xsaveopt,+rdrand,check'/>
  </qemu:commandline>
</domain>

 

Link to comment

Will this work with dual Xeon X5660s? I seem to remember they lacked the instructions in the past but now I'm seeing something about emulation?  I am able to boot the docker-osx images but would prefer a VM.

Link to comment

Is this supposed to be visible in the VM tab of Unraid? Or do we select Web UI in the Docker tab. Sorry new to all of this and can't seem to open this in a VNC. Any help is much appreicated.

Link to comment
1 hour ago, Kilrah said:

It's a docker that runs once and creates a VM that'll be on the VM tab. Follow the instructions.

That's what I figured. For whatever reason after installing macinabox, nothing shows up under my VM tab. I've followed the instructions unless there's something I'm missing.

Link to comment
1 hour ago, gbrl said:

That's what I figured. For whatever reason after installing macinabox, nothing shows up under my VM tab. I've followed the instructions unless there's something I'm missing.

 

You have to watch the video to see how to use the docker w/ the userscripts to install the VM.

Link to comment

Wondering if anyone has any suggestions - think I need to find a GPU to pass through for my VM.  The web/VNC connection is extremely laggy to the point to where it's painful to use the system.

 

I have an older MSI R6450 card laying around (Card Specs) that I could throw in if it would help, although with it's age I'm not sure how much it would really help.

 

My goal is to keep the VM headless, just have it be a bit more responsive via the web/vnc connection.  My other VMs are not nearly this laggy.

Link to comment
1 hour ago, reconstruction said:

MSI R6450

It seems it doesn't support uefi and it's too old, for me it's a no go.

Apple os uses a lot of gpu acceleration, more than any other os, so as you found, no gpu means laggy and near unusable system.

Edited by ghost82
Link to comment

ahhh, that's a great point that I missed.  I'll keep looking for something inexpensive to see if I can boost the performance.  I have a few marked down from reading around:

 

Sapphire RX470 

RX590

RX560

RX6600xt

 

So far, looks like I should avoid:

RX580

RX6700

RX550

XFX RX560

 

No personal experience with any of them - frankly, the only reason I have that MSI card laying around is that I used to use it as a dedicated card to an ESXi VM a LONG time ago to give a physical interface.  

 

my iGPU is passed through Plex and is killing it.  I don't want to take away from that performance, so I'll look to pick something up to help the Mac out a bit.

Link to comment

Having a working gpu passthrough in mac os can be a nightmare.

Have a look at the dortania website about gpu and hackintosh compatibility.

Note also that we have an additional issue in our vms: the amd gpu reset bug.

Unraid should have a patched kernel for this but some gpus may not work correctly when rebooting the vm.

As far as I know only the amd 6000 series has not this bug, I have a 6900 xt that works really well, but hey..it's expensive!

Note also that unless you plan to stick with catalina, or patch the root of the os in newer oses, apple removed the nvidia drivers.

I have no experience with igpu, still running a dual v1 xeon build, but if having a gpu passed through is difficult, having an igpu passed through is VERY difficult.

Edited by ghost82
Link to comment

I appreciate the heads up, I'll look into this a bit more before committing one way or another.

The main use of this VM is going to be syncing a music library across multiple mobile devices.  I have an older Mac mini that I'd like to remove from service if I can get this reliable.

Frankly, the slow interface can be tolerated for the sporadic use this system will get.  I just know it *could* be better.  The OS is currently "Big Sur" and I don't have any plans to upgrade at this point.  I have my laptop for day to day things.

Link to comment
On 2/10/2023 at 5:11 AM, aymanibousi said:

isnt it suppose to be 15gigs?
When  i start the VM, it starts as the apple logo, loads half way then it reboots itself, like in a loop!

eDit: it loads up to option menu where it shows macos base system, uefi and reset nvram. I press on macos base system, it loads a quarter way then errors out and resets to the option menu again!

Edit2: logs of VM shows 2023-02-10T10:14:53.445182Z qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.80000001H:ECX.fma4 [bit 16]

 

I am getting this same experience with AMD Ryzen 9 5950X 16-Core @ 4100 MHz system.  So far I think Big Sur is working though it has not finished installing.

Link to comment

Hey Guys...

 

recently spun up a bigsur vm for the first time and noticed that it was crashing 5-10 minutes into every session requiring a reset.  Then I had activity monitor running when it crashed and noticed the graphs were still working running so it seems like just my mouse and keyboard input break randomly at times.  

 

Tried to do a search since this seems like a common thing but didn't really find any solutions and a few posts of people that ran into similar issues.

 

Does anyone know what's going on?  mouse + keyboard input via VNC just stop working.

 

Thanks!

Link to comment

I am new to the forums and VMs so let me know if this is the wrong place but I am trying to setup a BigSur VM following the video and directions. For some reason the VDISK allocation size is going to 10G instead of 100G and thus I can't install the operating system. I left the docker container to default values (100G) so I am not sure where the VM is choosing to go to 10. Any advice? I have tried deleting the VM, scripts, and rerunning everything but I still ended up in the same spot. Thanks!

Edited by itsagreg
Link to comment

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.