[Support] SpaceinvaderOne - Macinabox


Recommended Posts

Thanks for all of your hard work SpaceInvaderOne - great stuff!

 

Just a quick question to fix a niggling issue (everything else is working perfectly) - when I boot it up my Logitech bluetooth keyboard and mouse (using the supplied USB dongle passed through) don't work on the boot screen so I can't select the boot partition.  If I plug a USB keyboard in I can use it to boot and then the Logitech peripherals work fine within Big Sur.

 

Is there a way I can either get the keyboard working in the boot screen or get it to auto boot straight into Big Sur?

Edited by nug
Link to comment

Is anyone besides me experiencing troubles with network file transfert (from the Unraid file server to the VM) ?

 

I'm using e1000-82545em as the script dictates, but on large file transfert I get a Kernel panic and it reboots... Using Vmxnet3 is ok for file transfert, but I'm having other troubles with it (like losing the network conenction).

 

I have a Catalina (Clover) VM running with the same hardware and no problems with it.

Link to comment
7 minutes ago, bjornatic said:

I'm using e1000-82545em as the script dictates, but on large file transfert I get a Kernel panic and it reboots... Using Vmxnet3 is ok for file transfert, but I'm having other troubles with it (like losing the network conenction).

It seems you are in the same boat with me..

With Big Sur I'm experiencing smb issue (hangs or kernel panics), and yes I'm using e1000-82545em; not possible for me to use vmxnet3 because, as you also may experience it partially hangs on uploads/downloads.

 

See here also:

This refers to another machine I have (look at the last comments):
https://discussions.apple.com/thread/252079374

 

NFS instead of smb seems to work better in big sur.

This is one of the reasons I still didn't update to big sur, Catalina has no issue.

Edited by ghost82
  • Like 1
Link to comment

OH!! GOD!! I think I solved the problem of Missing GOP in GPU passthrough on my PC.

I am very excited at this monment, So let me talk about what I did

  1. My MB is MSI B450m Motar MAX, it's doesn't need to close CSM, just boot unraid in UEFI mode :)
  2. My GPU is RX5500 XT so i add agdpmod=pikera in the NVRAM boot-args of the config.plist
    i have add the vbios in the xml config(but i don't think so it's the reason) from TechpowerUP
    image.png.f01fa3617f9e201a4e0eebd3dc4cb3d8.png 
  3. I append video=efifb:off to syslinux.cfg and reboot, it's like:
    kernel /bzimage
    append vfio_iommu_type1.allow_unsafe_interrupts=1 pcie_acs_override=downstream,multifunction video=efifb:off initrd=/bzroot
    Without this, you will encounter this error message with white apple logo (vfio: unable to power on device stuck in d3)
  4. When I finished the configuration, I found a progress bar under the white apple logo, and then! I can enter the MacOS

1.thumb.jpeg.c62db472bad020c9b6a59fb7f6c445f2.jpeg

Finally, attach my xml config

<?xml version='1.0' encoding='UTF-8'?>
<domain type='kvm' id='1' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
  <name>Macinabox BigSur</name>
  <uuid>787b7168-23ac-4d73-8789-eb5786b331c3</uuid>
  <description>MacOS Big Sur</description>
  <metadata>
    <vmtemplate xmlns="unraid" name="Windows 10" icon="BigSur.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='2'/>
    <vcpupin vcpu='1' cpuset='8'/>
    <vcpupin vcpu='2' cpuset='3'/>
    <vcpupin vcpu='3' cpuset='9'/>
    <vcpupin vcpu='4' cpuset='4'/>
    <vcpupin vcpu='5' cpuset='10'/>
    <vcpupin vcpu='6' cpuset='5'/>
    <vcpupin vcpu='7' cpuset='11'/>
  </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/787b7168-23ac-4d73-8789-eb5786b331c3_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/user/domains/Macinabox BigSur/macos_disk.img' index='1'/>
      <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>
    <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='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='0xc'/>
      <alias name='pci.3'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x4'/>
    </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='0xa'/>
      <alias name='pci.5'/>
      <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'/>
      <alias name='pci.6'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
    </controller>
    <controller type='pci' index='7' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='7' port='0xb'/>
      <alias name='pci.7'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x3'/>
    </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='sata' index='0'>
      <alias name='ide'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:86:4c:fc'/>
      <source bridge='br0'/>
      <target dev='vnet0'/>
      <model type='e1000-82545em'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x03' 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-1-Macinabox BigSur/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='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>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x28' slot='0x00' function='0x0'/>
      </source>
      <alias name='hostdev0'/>
      <rom file='/mnt/user/isos/vbios/Sapphire.RX5500XT.8192.191127.rom'/>
      <address type='pci' domain='0x0000' bus='0x06' slot='0x01' function='0x0' multifunction='on'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x28' slot='0x00' function='0x1'/>
      </source>
      <alias name='hostdev1'/>
      <address type='pci' domain='0x0000' bus='0x06' slot='0x02' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='usb' managed='no'>
      <source>
        <vendor id='0x046d'/>
        <product id='0xc08b'/>
        <address bus='1' device='2'/>
      </source>
      <alias name='hostdev2'/>
      <address type='usb' bus='0' port='2'/>
    </hostdev>
    <hostdev mode='subsystem' type='usb' managed='no'>
      <source>
        <vendor id='0x0a12'/>
        <product id='0x0001'/>
        <address bus='1' device='3'/>
      </source>
      <alias name='hostdev3'/>
      <address type='usb' bus='0' port='3'/>
    </hostdev>
    <hostdev mode='subsystem' type='usb' managed='no'>
      <source>
        <vendor id='0x0c45'/>
        <product id='0x7603'/>
        <address bus='1' device='5'/>
      </source>
      <alias name='hostdev4'/>
      <address type='usb' bus='0' port='4'/>
    </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='************************'/>
    <qemu:arg value='-smbios'/>
    <qemu:arg value='type=2'/>
    <qemu:arg value='-cpu'/>
    <qemu:arg value='Penryn,kvm=on,vendor=GenuineIntel,+invtsc,vmware-cpuid-freq=on,+pcid,+ssse3,+sse4.2,+popcnt,+avx,+aes,+xsave,+xsaveopt,check'/>
  </qemu:commandline>
</domain>

 

image.png

Thank you for helping me.

Edited by WeiYanZhen
  • Like 1
Link to comment
17 minutes ago, WeiYanZhen said:

I am very excited at this monment

ahah I can understand well...I remember when I was able to do my first gpu passthrough to my vm in high sierra :D

when there wasn't whatevergreen because lilu didn't work for vm and all was a lot more difficult :P

 

Btw, the gop error probably means that a card lacks support for uefi, or that the system is booted in legacy bios mode: no need to disable cms, just boot unraid in uefi mode.

CMS disable disables at all legacy bios at the bios level, so if you have other os installed in mbr you may not able to see them at boot.

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

ahah I can understand well...I remember when I was able to do my first gpu passthrough to my vm in high sierra :D

when there wasn't whatevergreen because lilu didn't work for vm and all was a lot more difficult :P

 

Btw, the gop error probably means that a card lacks support for uefi, or that the system is booted in legacy bios mode: no need to disable cms, just boot unraid in uefi mode.

CMS disable disables at all legacy bios at the bios level, so if you have other os installed in mbr you may not able to see them at boot.

I have confirm that, it's doesn't need to close CSM, just boot unraid in UEFI mode :)

I found some error with open the CSM, when try to restart macos it will show GOP Missing agin with CSM open

And the vbios is needed, or can't passthroug GPU again when reboot macos

now i used vbios is Sapphire.RX5500XT.8192.191111.rom

Edited by WeiYanZhen
Link to comment
20 hours ago, SpaceInvaderOne said:

nvidia gt 710 works out the box and you can get on ebay for about $30 to $40

Thanks. I found one for a reasonable price and bought it... Have to find a way to double-connect my monitor now though.. Forgot abaout that :-)

 

I gave the VM 4 of my 8 cores, cannot say its "quick' though.. but still fine fo find out how macos works..

Link to comment
18 hours ago, SpaceInvaderOne said:

After installing Big Sur next goto the docker template and choose Catalina, goto the bottom of the template click apply and it will then install catalina.

Thanks, that worked great!  But I don't seem to be able to create a second Catalina VM.  Can this only be used to create a single instance of each OS or do I have to do something special to have multiple Catalina VMs?

Link to comment
2 hours ago, jamesy829 said:

@SpaceInvaderOne I notice a bug, where I specified the size of physical disk is 500G, but when everything is up and running, the total storage size is actually 536.87GB? I wanted to be 500G as I want to convert the img to a physical disk so it would be running off my SSD instead of using the cache drive. Should this be consider a bug and is there a simple way to resize the img?

It's not a bug. It's the difference between calculating drive space as decimal (1x10^3 = 1000) vs powers of 2 (2^10 = 1024).

Eg is 1 kilobyte = 1000 bytes or 1024 bytes.
In your case specifically, 500*1024*1024*1024= 536.870912GB

There are many sites on the internet that discuss this age old problem.

http://www.disk-space-guide.com/size-units.aspx

  • Like 1
Link to comment
1 hour ago, cat2devnull said:

It's not a bug. It's the difference between calculating drive space as decimal (1x10^3 = 1000) vs powers of 2 (2^10 = 1024).

Eg is 1 kilobyte = 1000 bytes or 1024 bytes.
In your case specifically, 500*1024*1024*1024= 536.870912GB

There are many sites on the internet that discuss this age old problem.

http://www.disk-space-guide.com/size-units.aspx

Thanks @cat2devnull! I figured that was the issue so I looked up after I posted, but I forgot to update the post. Now I need to know the magical number to create the img so I can dd into a ssd.

Link to comment
13 hours ago, nlash said:

Using High Sierra and intending to pass through a 1080ti...what needs to be done to the config.plist in OpenCore to allow pass through?

You shouldnt need to do anything on the opencore config

You will just need to download the nvidia drivers once booted into osx.

Run this in terminal and it will download the correct nvidia drivers in high sierra

bash <(curl -s https://raw.githubusercontent.com/Benjamin-Dobell/nvidia-update/master/nvidia-update.sh)

 

Link to comment
On 11/2/2020 at 8:55 AM, cat2devnull said:

This is the offical GPU support documentation.

https://dortania.github.io/GPU-Buyers-Guide/

 

The only issue I am aware of, is that it says the RX550 isn't supported but most do work. See my earlier post.
https://forums.unraid.net/topic/84601-support-spaceinvaderone-macinabox/?do=findComment&comment=908968

Hello Cat,

 

can you please advise how you got you Yeston RX550 to pass through with OS X. I have the same gpu but have been unsuccessful in passing through my macinabox VM.  Thanks.

Link to comment

I'm hitting the same issue that alael is using the default settings. As soon as the docker starts it hits this and fails out. I followed the guide video to make sure I removed the old version, etc before trying to install and run the latest so not sure what would be going wrong.

 

Edit:
It appears that switching to method 2 for downloading in the template does not have this error but instead the logs seem to indicate the download never completes. When I open the macinabox_Big Sur.log file I see

I am going to download BigSur recovery media. Please be poatient!
.
.
Product ID 001-83532 could not be found

 

Edited by aspiziri
Link to comment
2 hours ago, FDA84 said:

Can you please advise how you got you Yeston RX550 to pass through with OS X. I have the same gpu but have been unsuccessful in passing through my macinabox VM.  Thanks.

FYI I've upated the details about the RX550 compatibility as a bug report to Dortania.

As for passing it through to the Mac VM. There is nothing special required.

Just track it down in your PCIe IOMMU group.

IOMMU group 33:	[1002:67ff] 10:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Baffin [Radeon RX 550 640SP / RX 560/560X] (rev ff)
[1002:aae0] 10:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Baffin HDMI/DP Audio [Radeon RX 550 640SP / RX 560/560X]

In my case device 10:00.0 for video and 10:00.1 for audio. Then map that bus 0x10 function 0x0 and 0x1 to a spare bus in the VM. For me, I used bus 0x04 (the next unused bus) and function 0x0 and 0x1. Don't forget to use the multifunction command option to bring both the audio and video together.

    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x10' slot='0x00' function='0x0'/>
      </source>
      <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='0x10' slot='0x00' function='0x1'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x1'/>
    </hostdev>

Spaceinvader One made a video that talks about this in more details.

Do make sure your have a recent Lilu and WhateverGreen kexts installed in clover/opencore.

I find that sometimes the card does not initialise until the OS fires up the GUI so don't stress if you don't get the display turning on immediately, just be patient.

 

See how you go.

  • Like 1
Link to comment

Does USB-passthrough work for anyone?

 

At first I thought my VM crashed, when I switched from VNC to GPU-passthrough. But I noticed that the clock still worked in the system. So I switched back to VNC and I‘ve got the same problem. When using an external mouse and keyboard (USB-passthrough) both stop working after a couple of seconds, controlling using VNC still worked. Did only try Big Sur so far, will try Catalina today.

 

I took a look at the logs and I always get something like this:

 

„usb_device_descriptor 2 unknown type 33 (len 10)“

 

Google sadly wasn’t my friend. I would use a separate USB-card in my Unraid server, guess there wouldn’t be any problems, but I only have an ITX-board and the one PCI slot is needed for the GPU.

Link to comment
On 12/16/2020 at 10:29 PM, alael said:

Any idea what is wrong? @SpaceInvaderOne

 


Traceback (most recent call last):
File "fetch-macos2.py", line 501, in <module>
sys.exit(main())
File "fetch-macos2.py", line 497, in main
action_download(args)
File "fetch-macos2.py", line 236, in action_download
info = get_image_info(session, bid=args.board_id, mlb=args.mlb,
File "fetch-macos2.py", line 147, in get_image_info
headers, output = run_query(url, headers, post)
File "fetch-macos2.py", line 80, in run_query
response = urlopen(req)
File "/usr/lib/python3.8/urllib/request.py", line 222, in urlopen
return opener.open(url, data, timeout)
File "/usr/lib/python3.8/urllib/request.py", line 531, in open
response = meth(req, response)
File "/usr/lib/python3.8/urllib/request.py", line 640, in http_response
response = self.parent.error(

File "/usr/lib/python3.8/urllib/request.py", line 569, in error

return self._call_chain(*args)
File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain
result = func(*args)
File "/usr/lib/python3.8/urllib/request.py", line 649, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 417: Expectation Failed

chmod: /isos/BigSur-install.img: No such file or directory
rm: can't remove '/Macinabox/tools/FetchMacOS/BaseSystem/*': No such file or directory

That is show when i run the container with all setting to default.

 

Thanks!

I have the same issue ?

Link to comment
On 12/17/2020 at 10:03 AM, SpaceInvaderOne said:

You shouldnt need to do anything on the opencore config

You will just need to download the nvidia drivers once booted into osx.

Run this in terminal and it will download the correct nvidia drivers in high sierra


bash <(curl -s https://raw.githubusercontent.com/Benjamin-Dobell/nvidia-update/master/nvidia-update.sh)

 

Yeah, nothing I do will let me use the 1080ti. The only way High Sierra will boot is if I use VNC. I have the GPU passed through and the web drivers installed. If I add the GPU after VNC (meaning both added to the VM template), I can VNC into the OS, see the web drivers loaded and see the 1080ti listed, but if I remove VNC, the OS will not boot. 

 

I'm kind of at a loss. I've had this GPU passed through to various High Sierra vms and cannot get it working with this most recent one. Anyone else out there able to successfully boot into High Sierra with an Nvidia card on this latest Macinabox?

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.