[Support] SpaceinvaderOne - Macinabox


Recommended Posts

Hi everyone,

 

I've setup a catalina vm using macinabox. Thank you spaceinvaderone for that stuff.

I have some problems.

1- when editing xml some things change automatically : the path of ovmf files which i set in to /mnt/user/domains/catalina

when i edit the xml it changes to something in /usr/share/... and /etc/libvirt/... for the other. When i start the vm with this path the display becomes weird and it enter in a bootloop. So i have to change the path every time i edit the xml. 

Apparently it's normal; forget that

 

2- i have no audio device in the vm. I try with or without passing through the host soundcard.

3- for now i have no gpu to passtrough. I use realvncviewer as standard vnc from unraid can't connect. I tried nomachine but keyboard mapping is buggy and it connects once in ten times. I also tried splashtop but it eats cpu and the vm is unsable.

 

here is my xml file:

<?xml version='1.0' encoding='UTF-8'?>
<domain type='kvm' id='15' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
  <name>MacinaboxCatalina</name>
  <uuid>ff4e1131-1ab6-4271-832e-2b2aebc48432</uuid>
  <description>MacOS Catalina</description>
  <metadata>
    <vmtemplate xmlns="unraid" name="Windows 10" icon="default.png" os="Catalina"/>
  </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='18'/>
    <vcpupin vcpu='2' cpuset='3'/>
    <vcpupin vcpu='3' cpuset='19'/>
    <vcpupin vcpu='4' cpuset='4'/>
    <vcpupin vcpu='5' cpuset='20'/>
    <vcpupin vcpu='6' cpuset='5'/>
    <vcpupin vcpu='7' cpuset='21'/>
  </cputune>
  <resource>
    <partition>/machine</partition>
  </resource>
  <os>
    <type arch='x86_64' machine='pc-q35-3.1'>hvm</type>
    <loader readonly='yes' type='pflash'>/mnt/user/domains/MacinaboxCatalina/ovmf/OVMF_CODE.fd</loader>
    <nvram>/mnt/user/domains/MacinaboxCatalina/ovmf/OVMF_VARS.fd</nvram>
  </os>
  <features>
    <acpi/>
    <apic/>
  </features>
  <cpu mode='host-passthrough' check='none'>
    <topology sockets='1' cores='4' threads='2'/>
  </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='writeback'/>
      <source file='/mnt/cache/domains/MacinaboxCatalina/Clover.qcow2' index='3'/>
      <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='raw' cache='writeback'/>
      <source file='/mnt/cache/domains/MacinaboxCatalina/Catalina-install.img' index='2'/>
      <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='writeback'/>
      <source file='/mnt/cache/domains/MacinaboxCatalina/macos_disk.qcow2' index='1'/>
      <backingStore/>
      <target dev='hde' bus='sata'/>
      <alias name='sata0-0-4'/>
      <address type='drive' controller='0' bus='0' target='0' unit='4'/>
    </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='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='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:98:7c:28'/>
      <source bridge='br0'/>
      <target dev='vnet3'/>
      <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/3'/>
      <target type='isa-serial' port='0'>
        <model name='isa-serial'/>
      </target>
      <alias name='serial0'/>
    </serial>
    <console type='pty' tty='/dev/pts/3'>
      <source path='/dev/pts/3'/>
      <target type='serial' port='0'/>
      <alias name='serial0'/>
    </console>
    <channel type='unix'>
      <source mode='bind' path='/var/lib/libvirt/qemu/channel/target/domain-15-MacinaboxCatalina/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>
    <graphics type='vnc' port='5903' autoport='yes' websocket='5703' listen='0.0.0.0' keymap='fr'>
      <listen type='address' address='0.0.0.0'/>
    </graphics>
    <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='0x03' 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=redacted'/>
    <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>

 

Edited by caplam
Link to comment
On 2/21/2020 at 12:24 PM, bjornatic said:

Hi guys ! And welcome to another question...

....

 

So, just to answer myself (and maybe help some other lost people), i solved my problem with this comment : 

 

I had a look at my syslog (yeah, I know : "look there first") and I saw :

kernel: vfio-pci 0000:09:00.0: BAR 3: can't reserve [mem 0xe0000000-0xe1ffffff 64bit pref]

as I was trying to GT 710... So I search, and found the comment above. And voilà !

(still do not know what I'm doing)

Link to comment

Passthrough GPU and new kvm issues.

 

After passthrough of the AMD GPU to a Windows kvm for testing, the MacOS kvm no longer see the AMD GPU. It used to work fine before. The MacOS kvm starts fine with AMD passthrough,  but no GPU visible. Tried to enabling graphics and sound device in VFIO-PCI Config, no change.

 

Then I kind of gave up, deleted the kvm and ran Macinabox from the beginning. First startup with Disk Utility showed the disk from the deleted kvm. And another with the same name + "Data" ending. First start up was fine. Second startup after cpu pinning etc. I had this screen:

670129751_Screenshot2020-02-28at18_07_30.png.63cd69b2080991a209150f32985c9249.png

 

 

Connecting with RealVNC (installed at first startup) was fine, but just 800x600 resolution.

Passing through AMD GPU, the kvm started fine but no visible GPU.

 

Sorry for a long post. I have two question:

 

1) How to install a fresh macOS Catalina Macinabox without old files luring in the system?

 

2) Is there a way to reset the AMD Card?

Says graphics is reset compatible. 

2067252471_Screenshot2020-02-28at18_50_22.png.cee63b28d17400883fb72c62b8a5fe80.png

 

 

Cheers,

 

 

Frode

 

Asus C621E Sage/BMC | dual Xeon Silver 4116 | Samsung 4 x 32GB DDR4-2933 RDIMM | 4 x Corsair Force MP510 (960GB) NvME ssd on Asus Hyper M.2 Card V2 l | 4 x WD and Seagate hdd l Sapphire Pulse Radeon RX 580 8GB as Mac WS l ASUS GeForce RTX 2080 Ti ROG Strix Advance in gaming kvm l Quadro RTX4000 for Plex docker l Samsung 970 Pro in M.2 port for gaming kvm  l Asmedia PCIe USB card

Catalina in a box xml.rtf maxx-diagnostics-20200228-1404.zip

Link to comment
On 10/25/2019 at 4:12 PM, SpaceInvaderOne said:

However your server's hardware must be 'fairly' modern to run a macOS VM. You are going to need a CPU that supports SSE 4.2 & AVX2 for macOS Mojave and above to work. Both Intel and AMD processors are fine to use.

Which macOS version can I install on an old AMD Phenom™ II X4 965 @ 3400 MHz. I don't need anything fancy, I just need macOS for XCode to run iOS for a little translation job.

Thank you for your help.

 

Draven

Link to comment
On 11/12/2019 at 5:36 PM, SpaceInvaderOne said:

 

Ok so I didnt realise that you are having the issue when the vm is using the GPU.

What the problem is is that I you are using a Nvidia gpu.I thought you had gone back to vnc.

An nvidia GPU this needs web drivers to make work.

 

So 3 things you will need to do.

 

1. Boot back into the vm without passthrough using vnc. Install splashtop desktop personal streamer (free) https://www.splashtop.com/streamer

on the vm. And the Spalashtop desktop on your computer.

2. Open the clover configurator and goto system parameters and check nvidia web

then on smbios make sure you have product imac 14,1 (see pics)

993133966_ScreenShot2019-11-12at16_27_09.thumb.png.08438dd6b18550df79b1ec128c177251.png

599833274_ScreenShot2019-11-12at16_27_40.thumb.png.0ba81226b8f9ffd91070147a01e1a96e.png

 

3. Stop then vm. passthrough the graphics card again, then boot. (you will still see the garbled screen)

Use splashtop to connect to the screen. It will be very small screen but don't worry.

Open terminal and run this 


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

That will install the webdrivers for the gpu easily.

After that reboot and you should have a workable vm !! ....hopefully 😃

Thanks for this guide, I am trying to do the same thing. I have now used Clover configurator and changed to Mac14,1 and filled in all the above info.
I have also clicked in nvidiaweb.
I have followed your steps and installed splashtop and downloaded nvidia drivers with the bash command you had, I am getting this error message when trying to install:

"

Installing new drivers...
installer: Package name is NVIDIA Web Driver 387.10.10.10.40.134
installer: Installing at base path /
installer: The install failed. (The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance. The package is attempting to install content to the system volume.)"
 

What can I do to make the driver not fail to install? I am running Catalina with a Nvidia 1060GTX and have it passthrouged (with a lot of small unreadable screens, same problem as the writer)
 

I also have an AMD RX 580 in my computer, can I make that working in Catalina? 

I can use either my 1060GTX or my RX 580, doesn't matter which one. 
But currently I can't install the nvidia drivers as I wrote above :(
Please help!

Link to comment
2 hours ago, ghost82 said:

webdrivers are not available for Catalina.

You need lilu and whatevergreen kexts and clover kexts injection, and try if that work.

Ah okey, I see. Will look for that. In the video it looked so easy to get it working, just pass a card through.. 

Is it easier with AMD-cards? As said, I have a RX 580 in the server as well. 

 

Link to comment
17 minutes ago, widdefmh said:

Ah okey, I see. Will look for that. In the video it looked so easy to get it working, just pass a card through.. 

Is it easier with AMD-cards? As said, I have a RX 580 in the server as well. 

 

@widdefmh it’s definitely easier with AMD cards, though a lot of them suffer from the reset bug which can be a pain. 

Link to comment
6 minutes ago, swallace said:

@widdefmh it’s definitely easier with AMD cards, though a lot of them suffer from the reset bug which can be a pain. 

Okey, I don't think my RX 580 suffer from it because I have powered up and shut down vms with that card set to passthrough without any problems at all. 

How do I enable it in Macinabox? Just pass through it did not work, did not got any picture on the screen.. Tried to boot up my Win 10 vm right after and it worked. 

Link to comment

I’ve successfully setup a Catalina VM using macinabox and it all works great. My host is running on a 3950X with a GTX 1080 for a Windows VM, and a Sapphire Pulse RX 580 configured for macOS pass through. 
 

I’m having an issue related to GPU psd through. The GPU functions perfectly, except that hardware acceleration seems to be completely botched. The RX580 shows up in system info no problem, but does not have metal acceleration listed. Chrome (and chromium based apps like discord, Spotify, etc) all exhibit very odd graphical errors unless hardware acceleration is turned off. I used a video editing program called Video Proc, which has a setting page for easily checking hardware acceleration status, and everything showed up as blank. 
 

I’ve rebuilt the VM from scratch several times and the same issue always comes up, even as the rest of the VM works flawlessly. I’ve tried changing the smbios to iMac Pro 1,1, and verified that I’m running the latest versions of Lilu and WEG kexts in clover configuration. I’m really not sure what else to try at this point. Any ideas would be appreciated. 
 

I don’t currently have access to my VM’s XML template, I’ll be updating this post with it shortly. 

Link to comment
2 minutes ago, widdefmh said:

Okey, I don't think my RX 580 suffer from it because I have powered up and shut down vms with that card set to passthrough without any problems at all. 

How do I enable it in Macinabox? Just pass through it did not work, did not got any picture on the screen.. Tried to boot up my Win 10 vm right after and it worked. 

Double check your XML. If it’s just a black screen, you likely forgot to remove the CPU topology line when you modified the VM in the GUI. Easy mistake. If it’s not that, or a failure to manually make the couple other changes you have to make to the XML every time you change a setting in the VM manager GUI, I’m not sure. 

Link to comment
10 minutes ago, swallace said:

Double check your XML. If it’s just a black screen, you likely forgot to remove the CPU topology line when you modified the VM in the GUI. Easy mistake. If it’s not that, or a failure to manually make the couple other changes you have to make to the XML every time you change a setting in the VM manager GUI, I’m not sure. 

 

Can maybe be that, tried it last night and might have missed something. Will try again. Got yellow warning/errors in the log but got the same warning/errors with nvidia and started anyway but with weird graphics. 

  • Like 1
Link to comment
11 hours ago, swallace said:

Double check your XML. If it’s just a black screen, you likely forgot to remove the CPU topology line when you modified the VM in the GUI. Easy mistake. If it’s not that, or a failure to manually make the couple other changes you have to make to the XML every time you change a setting in the VM manager GUI, I’m not sure. 

Checked with the AMD card again and did pass through on it for a couple of minutes ago. Worked like a charm! Worked out of the box in mac os 👍👍  A little weird startup screen (several small windows) but when it had started i got correct resolution and everything is fast. Chrome / brave works perfectly as well without weird graphic bugs 👍🙂

Link to comment

@SpaceInvaderOne Thanks for the wonderful context you have uploaded to Youtube. I have a quick question regarding Catalina and slow speed I'm experiencing. 

System Information:

Dell R710xd with Intel Xeon E5-2680 x2 @2.7 GHz

32 GB DDR3

 

Successfully installed Catalina per Youtube video. Below is my XML file. How can I increase the speed on the system. I ran Geekbench Browser and I am getting extremely low number, subpar 1,000 for both single and multi core. Want would you suggest I do? 

Quote

<?xml version='1.0' encoding='UTF-8'?>
<domain type='kvm' id='2' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
  <name>MacinaboxCatalina</name>
  <uuid>dd60f325-6d05-48e0-9588-ed49b3d0c5c2</uuid>
  <description>MacOS Catalina</description>
  <metadata>
    <vmtemplate xmlns="unraid" name="Windows 10" icon="/mnt/user/domains/MacinaboxCatalina/icon/catalina.png" os="Catalina"/>
  </metadata>
  <memory unit='KiB'>8388608</memory>
  <currentMemory unit='KiB'>8388608</currentMemory>
  <memoryBacking>
    <nosharepages/>
  </memoryBacking>
  <vcpu placement='static'>16</vcpu>
  <cputune>
    <vcpupin vcpu='0' cpuset='0'/>
    <vcpupin vcpu='1' cpuset='16'/>
    <vcpupin vcpu='2' cpuset='1'/>
    <vcpupin vcpu='3' cpuset='17'/>
    <vcpupin vcpu='4' cpuset='2'/>
    <vcpupin vcpu='5' cpuset='18'/>
    <vcpupin vcpu='6' cpuset='3'/>
    <vcpupin vcpu='7' cpuset='19'/>
    <vcpupin vcpu='8' cpuset='4'/>
    <vcpupin vcpu='9' cpuset='20'/>
    <vcpupin vcpu='10' cpuset='5'/>
    <vcpupin vcpu='11' cpuset='21'/>
    <vcpupin vcpu='12' cpuset='6'/>
    <vcpupin vcpu='13' cpuset='22'/>
    <vcpupin vcpu='14' cpuset='7'/>
    <vcpupin vcpu='15' cpuset='23'/>
  </cputune>
  <resource>
    <partition>/machine</partition>
  </resource>
  <os>
    <type arch='x86_64' machine='pc-q35-3.1'>hvm</type>
    <loader readonly='yes' type='pflash'>/mnt/user/domains/MacinaboxCatalina/ovmf/OVMF_CODE.fd</loader>
    <nvram>/mnt/user/domains/MacinaboxCatalina/ovmf/OVMF_VARS.fd</nvram>
  </os>
  <features>
    <acpi/>
    <apic/>
  </features>
  <cpu mode='host-passthrough' check='none'>
    <topology sockets='1' cores='8' threads='2'/>
  </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='writeback'/>
      <source file='/mnt/user/domains/MacinaboxCatalina/Clover.qcow2' index='3'/>
      <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='raw' cache='writeback'/>
      <source file='/mnt/user/domains/MacinaboxCatalina/Catalina-install.img' index='2'/>
      <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='raw' cache='writeback'/>
      <source file='/mnt/user/domains/MacinaboxCatalina/macos_disk.img' index='1'/>
      <backingStore/>
      <target dev='hde' bus='sata'/>
      <alias name='sata0-0-4'/>
      <address type='drive' controller='0' bus='0' target='0' unit='4'/>
    </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='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='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>
    <interface type='bridge'>
      <mac address='52:54:00:a8:6c:cb'/>
      <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-2-MacinaboxCatalina/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>
    <graphics type='vnc' port='5900' autoport='yes' websocket='5700' listen='0.0.0.0' keymap='en-us'>
      <listen type='address' address='0.0.0.0'/>
    </graphics>
    <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='0x03' 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='************************'/>
    <qemu:arg value='-smbios'/>
    <qemu:arg value='type=2'/>
    <qemu:arg value='-cpu'/>
    <qemu:arg value='X,kvm=on,vendor=GenuineIntel,+invtsc,vmware-cpuid-freq=on,+pcid,+ssse3,+sse4.2,+popcnt,+avx,+avx2,+aes,+xsave,+xsaveopt,vmware-cpuid-freq=on,check'/>
  </qemu:commandline>
</domain>
 

 

Link to comment
51 minutes ago, widdefmh said:

Checked with the AMD card again and did pass through on it for a couple of minutes ago. Worked like a charm! Worked out of the box in mac os 👍👍  A little weird startup screen (several small windows) but when it had started i got correct resolution and everything is fast. Chrome / brave works perfectly as well without weird graphic bugs 👍🙂

@widdefmh glad to hear it! Hoping to get my issues worked out sometime soon. I think it may be related to power draw. I have one PCI power cable coming out of my PSU with 2 4 pin power headers on it. I believe it’s meant to power a single card with an 8 pin connector, not two cards each with a 4 pin connector. Both GPU’s work and drive screens at full res,  but I think it’s affecting performance under the hood. Gotta dig up the modular cables for my PSU and give both cards a dedicated cable. Really hoping this is it, because software wise everything seems perfect. 

Edited by swallace
Typo
Link to comment
18 minutes ago, infinitycell said:

@SpaceInvaderOne Thanks for the wonderful context you have uploaded to Youtube. I have a quick question regarding Catalina and slow speed I'm experiencing. 

System Information:

Dell R710xd with Intel Xeon E5-2680 x2 @2.7 GHz

32 GB DDR3

 

Successfully installed Catalina per Youtube video. Below is my XML file. How can I increase the speed on the system. I ran Geekbench Browser and I am getting extremely low number, subpar 1,000 for both single and multi core. Want would you suggest I do? 

 

@infinitycell unless I’m misinterpreting your XML, it looks to me like you’re allocating all 16 of your cores (and all their hyper threads) to your macOS VM? If that’s the case, you have no performance because you need to leave some leftover for unraid as your hypervisor. Try leaving a single whole core (both threads) left over for unraid and I bet the VM preforms much better. Also be sure to leave unraid some RAM too. 

  • Thanks 1
Link to comment
3 hours ago, swallace said:

@infinitycell unless I’m misinterpreting your XML, it looks to me like you’re allocating all 16 of your cores (and all their hyper threads) to your macOS VM? If that’s the case, you have no performance because you need to leave some leftover for unraid as your hypervisor. Try leaving a single whole core (both threads) left over for unraid and I bet the VM preforms much better. Also be sure to leave unraid some RAM too. 

Exactly correct. When you are virtualizing, the host machine is creating the motherboard and basic services the guest machine is using. When you tell the host to give all your CPU power to the guest, you are in essence forcing your guest to run on a motherboard with no processor power left to manage it.

 

Each configuration is somewhat unique, and is going to have its own specific recipe for best performance. Honestly, I'd recommend allocating 1 core with its hyperthread and 8GB RAM to the VM guest, see how it runs. Don't bother with synthetic benchmarks, they don't work well inside VM guests. Instead, run tasks typical to the usage you are planning. Now, add a second core with its hyperthread, run the same set of tasks, and see how it acts. If performance improves, add another core and try again.

 

You will probably find the best real world performance with very few threads dedicated to the VM, and most of the machine resources used to create the fastest possible environment for the guest to run in.

  • Like 1
  • Thanks 1
Link to comment
2 hours ago, jonathanm said:

Exactly correct. When you are virtualizing, the host machine is creating the motherboard and basic services the guest machine is using. When you tell the host to give all your CPU power to the guest, you are in essence forcing your guest to run on a motherboard with no processor power left to manage it.

 

Each configuration is somewhat unique, and is going to have its own specific recipe for best performance. Honestly, I'd recommend allocating 1 core with its hyperthread and 8GB RAM to the VM guest, see how it runs. Don't bother with synthetic benchmarks, they don't work well inside VM guests. Instead, run tasks typical to the usage you are planning. Now, add a second core with its hyperthread, run the same set of tasks, and see how it acts. If performance improves, add another core and try again.

 

You will probably find the best real world performance with very few threads dedicated to the VM, and most of the machine resources used to create the fastest possible environment for the guest to run in.

I removed half the core and it improve slightly. I'll continue working on it tomorrow. I appreciate the help!

  • Like 1
Link to comment
On 2/28/2020 at 6:52 PM, frodr said:

670129751_Screenshot2020-02-28at18_07_30.png.63cd69b2080991a209150f32985c9249.png

 

 

 

I have the same problem.

 

MacOS VM works fine while using VNC default settings. But when I passthrough my AMD RX580 the screen looks like this:

11-EF97-E2-3-C40-4-EFD-8-CCB-0-A606947-D

 

Passthrough to my Windows and Linux VM works just fine. Not sure what else to check. My config file looks like this:

 

<?xml version='1.0' encoding='UTF-8'?>
<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
  <name>MacinaboxCatalina</name>
  <uuid>dd5f26a3-5a0d-44d9-9808-5a2d71a25cfa</uuid>
  <description>MacOS Catalina</description>
  <metadata>
    <vmtemplate xmlns="unraid" name="MacOS" icon="/mnt/user/domains/MacinaboxCatalina/icon/catalina.png" os="Catalina"/>
  </metadata>
  <memory unit='KiB'>8388608</memory>
  <currentMemory unit='KiB'>8388608</currentMemory>
  <memoryBacking>
    <nosharepages/>
  </memoryBacking>
  <vcpu placement='static'>4</vcpu>
  <cputune>
    <vcpupin vcpu='0' cpuset='2'/>
    <vcpupin vcpu='1' cpuset='6'/>
    <vcpupin vcpu='2' cpuset='3'/>
    <vcpupin vcpu='3' cpuset='7'/>
  </cputune>
  <os>
    <type arch='x86_64' machine='pc-q35-3.1'>hvm</type>
    <loader readonly='yes' type='pflash'>/mnt/user/domains/MacinaboxCatalina/ovmf/OVMF_CODE.fd</loader>
    <nvram>/mnt/user/domains/MacinaboxCatalina/ovmf/OVMF_VARS.fd</nvram>
  </os>
  <features>
    <acpi/>
    <apic/>
  </features>
  <cpu mode='host-passthrough' check='none'>
    <topology sockets='1' cores='2' threads='2'/>
  </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='writeback'/>
      <source file='/mnt/user/domains/MacinaboxCatalina/Clover.qcow2'/>
      <target dev='hdc' bus='sata'/>
      <boot order='1'/>
      <address type='drive' controller='0' bus='0' target='0' unit='2'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source file='/mnt/user/domains/MacinaboxCatalina/Catalina-install.img'/>
      <target dev='hdd' bus='sata'/>
      <address type='drive' controller='0' bus='0' target='0' unit='3'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source file='/mnt/user/domains/MacinaboxCatalina/macos_disk.img'/>
      <target dev='hde' bus='sata'/>
      <address type='drive' controller='0' bus='0' target='0' unit='4'/>
    </disk>
    <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>
    <controller type='sata' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pcie-root'/>
    <controller type='pci' index='1' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='1' port='0x10'/>
      <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'/>
      <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'/>
      <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'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x3'/>
    </controller>
    <controller type='virtio-serial' index='0'>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x00' function='0x0'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:66:f2:d3'/>
      <source bridge='br0'/>
      <model type='vmxnet3'/>
      <address type='pci' domain='0x0000' bus='0x01' 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'/>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
      </source>
      <rom file='/mnt/user/isos/vbios/Asus.RX580.8192.170301.rom'/>
      <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='0x01' slot='0x00' function='0x1'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x1'/>
    </hostdev>
    <hostdev mode='subsystem' type='usb' managed='no'>
      <source>
        <vendor id='0x046d'/>
        <product id='0x0a4d'/>
      </source>
      <address type='usb' bus='0' port='2'/>
    </hostdev>
    <hostdev mode='subsystem' type='usb' managed='no'>
      <source>
        <vendor id='0x046d'/>
        <product id='0xc07d'/>
      </source>
      <address type='usb' bus='0' port='3'/>
    </hostdev>
    <hostdev mode='subsystem' type='usb' managed='no'>
      <source>
        <vendor id='0x046d'/>
        <product id='0xc330'/>
      </source>
      <address type='usb' bus='0' port='4'/>
    </hostdev>
    <memballoon model='none'>
    </memballoon>
  </devices>
  <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=***'/>
    <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>

Any ideas are greatly appreciated! Thank you. @SpaceInvaderOne

Link to comment
On 2/28/2020 at 6:52 PM, frodr said:

Passthrough GPU and new kvm issues.

 

After passthrough of the AMD GPU to a Windows kvm for testing, the MacOS kvm no longer see the AMD GPU. It used to work fine before. The MacOS kvm starts fine with AMD passthrough,  but no GPU visible. Tried to enabling graphics and sound device in VFIO-PCI Config, no change.

 

Then I kind of gave up, deleted the kvm and ran Macinabox from the beginning. First startup with Disk Utility showed the disk from the deleted kvm. And another with the same name + "Data" ending. First start up was fine. Second startup after cpu pinning etc. I had this screen:

670129751_Screenshot2020-02-28at18_07_30.png.63cd69b2080991a209150f32985c9249.png

 

 

Connecting with RealVNC (installed at first startup) was fine, but just 800x600 resolution.

Passing through AMD GPU, the kvm started fine but no visible GPU.

 

Sorry for a long post. I have two question:

 

1) How to install a fresh macOS Catalina Macinabox without old files luring in the system?

 

2) Is there a way to reset the AMD Card?

Says graphics is reset compatible. 

2067252471_Screenshot2020-02-28at18_50_22.png.cee63b28d17400883fb72c62b8a5fe80.png

 

 

Cheers,

 

 

Frode

 

Asus C621E Sage/BMC | dual Xeon Silver 4116 | Samsung 4 x 32GB DDR4-2933 RDIMM | 4 x Corsair Force MP510 (960GB) NvME ssd on Asus Hyper M.2 Card V2 l | 4 x WD and Seagate hdd l Sapphire Pulse Radeon RX 580 8GB as Mac WS l ASUS GeForce RTX 2080 Ti ROG Strix Advance in gaming kvm l Quadro RTX4000 for Plex docker l Samsung 970 Pro in M.2 port for gaming kvm  l Asmedia PCIe USB card

Catalina in a box xml.rtf 8.78 kB · 0 downloads maxx-diagnostics-20200228-1404.zip 127.91 kB · 0 downloads

I was able to get the RX 580 back when making a new kvm. Still, vnc on the same new kvm have that distorted screen. 

 

// Frode

Link to comment

So I've got my VM setup with Catalina and my gpu passthrough is working. I passed through my USB controller and my mouse skips around and my keyboard has a delay and some keys send multiple keys to the VM.

 

I have a W10 VM with the same GPU and USB controller and everything works properly on that.

 

Edited by solojazz
Replaced video for MP4
Link to comment
1 hour ago, solojazz said:

So I've got my VM setup with Catalina and my gpu passthrough is working. I passed through my USB controller and my mouse skips around and my keyboard has a delay and some keys send multiple keys to the VM.

 

I have a W10 VM with the same GPU and USB controller and everything works properly on that.

 

@solojazz Did you have similar issues when testing using VNC? If so, you might not have enough resources dedicated to the host, causing the whole system to be slow and glitchy like your seeing. Seems weird though. Have you tried a different keyboard and mouse? If it occurs with multiple, that narrows things down a bit potentially. 

Link to comment
18 minutes ago, swallace said:

@pingustar The CPU topology line causes the VM to not boot. Try removing it from your XML and see if it boots up correctly: <topology sockets='1' cores='2' threads='2'/>

 

 

 

 

I removed the line and tried again. No luck, same problem.

 

I have removed the vdisk and vm config multiple times now. Not sure where it goes wrong :(

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.