[Support] SpaceinvaderOne - Macinabox


Recommended Posts

3 hours ago, Formal said:

Hi all, anyone successfully used an AMD EPYC Rome CPU, aiming to build a machine that will host 6 MacOS VM's, the EPYC provides more than I can get anywhere else all VM's with 128GB ram. Thanks in advance for any pointers

Just a question out of curiosity, do you plan to add also 6 graphic cards? because the macOS experience without it is really bad and I see you are putting A LOT of resources to it.

Edited by mSedek
  • Like 1
Link to comment
2 minutes ago, Formal said:

Hi, yes 6x 5700XT on water

Nice, advice you to also passthrough 1 nvme drive for each vm and use a pcie usb controller for each vm too. 

 

You just need to create 6 machines with macinabox naming each for your desired name and then following the guides right here in the post to get all working

 

Also advice you to wait a little bit until @SpaceInvaderOne updates the container with the new changes like being able to installl everything with opencore from the start, so everything is easier and rock stable from the beginning.

 

Thats a thing thats about to happen once apple releases big sur 

Link to comment
17 hours ago, Formal said:

Hi all, anyone successfully used an AMD EPYC Rome CPU, aiming to build a machine that will host 6 MacOS VM's, the EPYC provides more than I can get anywhere else all VM's with 128GB ram. Thanks in advance for any pointers

Sounds like that will be a fun build but given the complex nature I would recommend that you take the time to learn how to build the VMs without the reliance on Macinabox. It's great in that it dropped the bar to entry, and is a good learning/intro tool but it has a number of really annoying dependencies (Clover, Penryn CPU, custom OVMF, old QEMU Q35 architecture, etc) that make it difficult to get working, unstable, slow and very brittle to changes.

It may be worth looking at the new version of Macinabox when that arrives as it will fix a number of these but I still think learning to build it yourself, is worth the investment of time and effort given what you are trying to achieve.

I would recommend you start with OpenCore and forget Clover even exists.
It's not as hard as it seems at first. Just work your way step by step.
Look at Dortania's OpenCore Install Guide https://dortania.github.io/OpenCore-Install-Guide/
You need to get a copy of the Mac OS that you want to use. You don't need to burn it to a flash drive, just keep a copy on your HDD.
Then creating a simple Mac .img file and build your EFI inside that as per the guide. You don't need the added complexity of working with a qcow2 image. Unraid/OpenCore will happily boot from a .img image file.
Then create a generic VM in Unraid. Point it at your disks and away you go.
Here is an example of what the VM code for the disks look like. First boot drive is the EFI image, then the Mac OS installer, then the virtual drive that it will be installed into.

    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source file='/mnt/user/domains/OpenCoreVM/EFI.img'/>
      <target dev='hdc' bus='virtio'/>
      <boot order='1'/>
      <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source file='/mnt/user/domains/OpenCoreVM/MacOS-install.dmg'/>
      <target dev='hdd' bus='virtio'/>
      <boot order='2'/>
      <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source file='/mnt/user/domains/OpenCoreVM/vdisk1.img'/>
      <target dev='hde' bus='virtio'/>
      <boot order='3'/>

Of course any of these can be replaced with actual physical SSD/NVME/HDDs depending on your setup.
Once the setup is complete you can obviously remove the now unneeded install image.


You can use the original default OVMF files and not the BlackBox versions that come with Macinabox. Also you can use the latest Q35 architecture. I'm only on Unraid 6.8.3 QEMU v4.2 but Unraid 6.9.x should support QEMU v5.1

  <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>

  <os>
    <type arch='x86_64' machine='pc-q35-4.2'>hvm</type>
    <loader readonly='yes' type='pflash'>/usr/share/qemu/ovmf-x64/OVMF_CODE-pure-efi.fd</loader>
    <nvram>/etc/libvirt/qemu/nvram/19bda48c-b90a-5e65-3bb4-d2f7969b2464_VARS-pure-efi.fd</nvram>
  </os>

This then allows you to switch to a more modern virtualised CPU architecture. Of course we are in weird territory here since we are virtualising Intel CPUs (since that is what MacOS expects) when our underlying physical system is AMD. See https://www.qemu.org/docs/master/system/qemu-cpu-models.html for more details on why this is a bad idea :)
 I have started using Skylake without any issues to so far and gained a 20% performance improvement.

<qemu:arg value='Penryn,kvm=on,vendor=GenuineIntel,+invtsc,vmware-cpuid-freq=on,+pcid,+ssse3,+sse4.2,+popcnt,+avx,+aes,+xsave,+xsaveopt,check'/>

<qemu:arg value='Skylake-Client,kvm=on,vendor=GenuineIntel,+invtsc,+hypervisor,vmware-cpuid-freq=on,+pcid,+popcnt,check'/>

Leoyzen did a lot of work and covered much of this in his Bare Metal MacOS thread.

https://forums.unraid.net/topic/84430-hackintosh-tips-to-make-a-bare-metal-macos/

And if needed you can always grab files from his OpenCore archive.

https://github.com/Leoyzen/KVM-Opencore

 

I wish Dortania had a KVM section in the install guide but for now it seems Leoyzen built using Haswell as a guide. I plan on tinkering with newer architectures at some point in the future. Maybe once Unraid 6.9 comes out of beta and I can use QEMU v5.x

 

Anyway once your are up and running test it until you are 100% happy, then copy the EFI/vdisk for each new VM just updating the necessary EFI config.plist variables (eg serial number etc).

Hope this gets you heading in the right direction. It took me about 2 weeks to build my first Hackintosh with Clover but only about 2 days to get it going on Unraid thanks to the fact that virtualisation takes a lot of the hardware compatibility pain away. Good luck.

Link to comment

Thanks for this great docker and guide. First time setting up a VM so please excuse the basic questions;

 

i have setup a High Sierra VM as I have a Nvidia GTX970, but can I pass this through if I only have the one GPU? I have followed the guidance from one of your other videos on adding the associates sound card and changing the XML to mention multifunction. When I start the VM from the servers GUI I get a black screen. Appreciate I have taken the GPU away from Unraid but was expecting MacOS to appear. Any tips or guidance appreciated

Link to comment
1 minute ago, KuniD said:

Thanks for this great docker and guide. First time setting up a VM so please excuse the basic questions;

 

i have setup a High Sierra VM as I have a Nvidia GTX970, but can I pass this through if I only have the one GPU? I have followed the guidance from one of your other videos on adding the associates sound card and changing the XML to mention multifunction. When I start the VM from the servers GUI I get a black screen. Appreciate I have taken the GPU away from Unraid but was expecting MacOS to appear. Any tips or guidance appreciated

Please post your xml

Link to comment
1 hour ago, mSedek said:

Please post your xml

<?xml version='1.0' encoding='UTF-8'?>
<domain type='kvm'>
  <name>MacinaboxHighSierra</name>
  <uuid></uuid>
  <description>MacOS High Sierra</description>
  <metadata>
    <vmtemplate xmlns="unraid" name="Windows 10" icon="default.png" os="HighSierra"/>
  </metadata>
  <memory unit='KiB'>16777216</memory>
  <currentMemory unit='KiB'>16777216</currentMemory>
  <memoryBacking>
    <nosharepages/>
  </memoryBacking>
  <vcpu placement='static'>8</vcpu>
  <cputune>
    <vcpupin vcpu='0' cpuset='0'/>
    <vcpupin vcpu='1' cpuset='12'/>
    <vcpupin vcpu='2' cpuset='1'/>
    <vcpupin vcpu='3' cpuset='13'/>
    <vcpupin vcpu='4' cpuset='2'/>
    <vcpupin vcpu='5' cpuset='14'/>
    <vcpupin vcpu='6' cpuset='3'/>
    <vcpupin vcpu='7' cpuset='15'/>
  </cputune>
  <os>
    <type arch='x86_64' machine='pc-q35-3.1'>hvm</type>
    <loader readonly='yes' type='pflash'>/usr/share/qemu/ovmf-x64/OVMF_CODE-pure-efi.fd</loader>
    <nvram>/etc/libvirt/qemu/nvram/d1862346-b4b2-4398-b17c-f6e6a82a023a_VARS-pure-efi.fd</nvram>
  </os>
  <features>
    <acpi/>
    <apic/>
  </features>
  <cpu mode='host-passthrough' check='none'>
    <topology sockets='1' cores='4' threads='2'/>
    <cache mode='passthrough'/>
  </cpu>
  <clock offset='utc'>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='pit' tickpolicy='delay'/>
    <timer name='hpet' present='no'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/local/sbin/qemu</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2' cache='writeback'/>
      <source file='/mnt/user/domains/MacinaboxHighSierra/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/MacinaboxHighSierra/HighSierra-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/MacinaboxHighSierra/macos_disk.img'/>
      <target dev='hde' bus='sata'/>
      <address type='drive' controller='0' bus='0' target='0' unit='4'/>
    </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:14:a8:f6'/>
      <source bridge='br0'/>
      <model type='virtio'/>
      <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'/>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x01' 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='0x01' slot='0x00' function='0x1'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x04' slot='0x00' function='0x1'/>
    </hostdev>
    <hostdev mode='subsystem' type='usb' managed='no'>
      <source>
        <vendor id='0x0b05'/>
        <product id='0x180a'/>
      </source>
      <address type='usb' bus='0' port='2'/>
    </hostdev>
    <memballoon model='none'/>
  </devices>
</domain>

 

Edited by KuniD
Link to comment
On 9/21/2020 at 4:07 AM, mSedek said:

Hello, thanks @SpaceInvaderOne for the container.

After few days and reading every post about problems with the 5700XT, I see some of you managed to do it.. I haven no matter what, I have 3 VMS on my UNRAID, Windows 10, Ubuntu 20.04 and madOS Catalina clean installation from macinabox

 

Windows and Ubuntu passthrough the 5700XT no problems at all but macOS just hangs on the the boot screen as I will show in the images, another thing to notice is that in software extensiond info it shows the 5700 as not loaded like you can see in the image too.. 

 

I have tried everything, Im connected via HDMI as some guy found that it wasnt working with the DP.

 

also backed up and changed the EFI folder for the opencore from Liozen https://github.com/Leoyzen/KVM-Opencore  and with that, everything loads but screwed up, very small and like repeated several times the same image across the top screen

 

Tried every single xml from people that claims it is working for them and nothing..

 

Extracted my own .rom from the 5700XT (not downloaded from techpowerup )

 

UPDATE 09/21/2020: Bought a cheap -O- nvidia GT710 and passed it through to macOS catalina and worked OTB.

 

my guess is that I need some kind of args to add to clover.. Would be nice of someone that has succeeded with the 5700XT would share his EFI folder...

 

 

UPDATE 2 09/22/2020 I finally got the card passthrough as you can see in one of the images below it just loading 7mb video memory, UI is choppy and sound does not works... playing yt videos in kinda choppy too.

 

I found out that my motherboard has 2 options for booting, one that refers to the boot device that could be legacy or UEFI only and another one that refers to every other device.. I had it both in legacy and once changed the second option to UEFI the card worked BUT with the problems described, no sound and only 7mb video.. look at the images

 

 

FINAL UPDATE 3 09/22/2020

Upgraded to catalina, changed the XML OS from macinabox for this


  <os>
    <type arch='x86_64' machine='pc-q35-4.2'>hvm</type>
    <!-- We don't need patched OVMF anymore when using latest Opencore, stock one is okay -->
    <loader readonly='yes' type='pflash'>/usr/share/qemu/ovmf-x64/OVMF_CODE-pure-efi.fd</loader>
    <nvram>/etc/libvirt/qemu/nvram/4450a55c-1669-da0e-d0bd-3ab45fef0398_VARS-pure-efi.fd</nvram>
    <boot dev='hd'/>
  </os>

mounted the main disk efi drive and deleted the clover files and replaced those with opencore EFI from Leoyzen Opencore KVM.

 

Replaced the whatevergreen kext in there with the newest version for opencore.

 

changed again all the hardware control and boot from UEFI to legacy and boom. got everything fully working. sound and everything, attaching final images.. how all this helps someone else outthere.

 

Also refreshed the XML with my final version.

 

Cheers

 

 

 

image.png.f44a67c66114096373fb4398f9e0c328.png

 

image.png.d813cade94c41dc7aabb6f6e6c932219.png

  

 

 

XML 

 


<?xml version='1.0' encoding='UTF-8'?>
<domain type='kvm' id='1' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
  <name>MacinaboxCatalina</name>
  <uuid>5d0454ed-e795-4303-aef1-f8ca5fd4176a</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'>16777216</memory>
  <currentMemory unit='KiB'>16777216</currentMemory>
  <memoryBacking>
    <nosharepages/>
  </memoryBacking>
  <vcpu placement='static'>8</vcpu>
  <cputune>
    <vcpupin vcpu='0' cpuset='14'/>
    <vcpupin vcpu='1' cpuset='38'/>
    <vcpupin vcpu='2' cpuset='16'/>
    <vcpupin vcpu='3' cpuset='40'/>
    <vcpupin vcpu='4' cpuset='18'/>
    <vcpupin vcpu='5' cpuset='42'/>
    <vcpupin vcpu='6' cpuset='20'/>
    <vcpupin vcpu='7' cpuset='44'/>
  </cputune>
  <resource>
    <partition>/machine</partition>
  </resource>
  <os>
    <type arch='x86_64' machine='pc-q35-3.1'>hvm</type>
    <loader readonly='yes' type='pflash'>/usr/share/qemu/ovmf-x64/OVMF_CODE-pure-efi.fd</loader>
    <nvram>/etc/libvirt/qemu/nvram/6c08efcb-98ea-945f-40eb-c3a2a2af0546_VARS-pure-efi.fd</nvram>
    <boot dev='hd'/>
  </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='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='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='0x10'/>
      <alias name='pci.1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0' multifunction='on'/>
    </controller>
    <controller type='pci' index='2' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='2' port='0x11'/>
      <alias name='pci.2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x1'/>
    </controller>
    <controller type='pci' index='3' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='3' port='0x12'/>
      <alias name='pci.3'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x2'/>
    </controller>
    <controller type='pci' index='4' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='4' port='0x13'/>
      <alias name='pci.4'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x3'/>
    </controller>
    <controller type='pci' index='5' model='pcie-root-port'>
      <model name='pcie-root-port'/>
      <target chassis='5' port='0x8'/>
      <alias name='pci.5'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
    </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:d4:01:24'/>
      <source bridge='br0'/>
      <target dev='vnet0'/>
      <model type='e1000-82545em'/>
      <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-1-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>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
      </source>
      <alias name='hostdev0'/>
      <rom file='/mnt/user/isos/Sapphire.RX5700XT.rom'/>
      <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0' multifunction='on'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x04' slot='0x00' function='0x1'/>
      </source>
      <alias name='hostdev1'/>
      <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='0xc539'/>
        <address bus='3' device='2'/>
      </source>
      <alias name='hostdev2'/>
      <address type='usb' bus='0' port='2'/>
    </hostdev>
    <hostdev mode='subsystem' type='usb' managed='no'>
      <source>
        <vendor id='0x2516'/>
        <product id='0x0087'/>
        <address bus='5' device='5'/>
      </source>
      <alias name='hostdev3'/>
      <address type='usb' bus='0' port='3'/>
    </hostdev>
    <memballoon model='virtio'>
      <alias name='balloon0'/>
      <address type='pci' domain='0x0000' bus='0x05' 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='Penryn,kvm=on,vendor=GenuineIntel,+invtsc,vmware-cpuid-freq=on,+ssse3,+sse4.2,+popcnt,+avx,+aes,+xsave,+xsaveopt,check'/>
  </qemu:commandline>
</domain>

 

 

VM LOG


-device pcie-root-port,port=0x12,chassis=3,id=pci.3,bus=pcie.0,addr=0x2.0x2 \
-device pcie-root-port,port=0x13,chassis=4,id=pci.4,bus=pcie.0,addr=0x2.0x3 \
-device pcie-root-port,port=0x14,chassis=5,id=pci.5,bus=pcie.0,addr=0x2.0x4 \
-device ich9-usb-ehci1,id=usb,bus=pcie.0,addr=0x7.0x7 \
-device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pcie.0,multifunction=on,addr=0x7 \
-device ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pcie.0,addr=0x7.0x1 \
-device ich9-usb-uhci3,masterbus=usb.0,firstport=4,bus=pcie.0,addr=0x7.0x2 \
-device virtio-serial-pci,id=virtio-serial0,bus=pci.2,addr=0x0 \
-blockdev '{"driver":"file","filename":"/mnt/user/domains/MacinaboxCatalina/macos_disk.img","node-name":"libvirt-1-storage","cache":{"direct":false,"no-flush":false},"auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-1-format","read-only":false,"cache":{"direct":false,"no-flush":false},"driver":"raw","file":"libvirt-1-storage"}' \
-device ide-hd,bus=ide.2,drive=libvirt-1-format,id=sata0-0-2,bootindex=1,write-cache=on \
-netdev tap,fd=35,id=hostnet0 \
-device e1000-82545em,netdev=hostnet0,id=net0,mac=52:54:00:3e:21:a2,bus=pcie.0,addr=0x5 \
-chardev pty,id=charserial0 \
-device isa-serial,chardev=charserial0,id=serial0 \
-chardev socket,id=charchannel0,fd=37,server,nowait \
-device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=org.qemu.guest_agent.0 \
-device usb-tablet,id=input0,bus=usb.0,port=1 \
-vnc 0.0.0.0:0,websocket=5700 \
-k en-us \
-device qxl-vga,id=video0,ram_size=67108864,vram_size=67108864,vram64_size_mb=0,vgamem_mb=16,max_outputs=1,bus=pcie.0,addr=0x1 \
-device usb-host,hostbus=3,hostaddr=2,id=hostdev0,bus=usb.0,port=2 \
-device usb-host,hostbus=5,hostaddr=5,id=hostdev1,bus=usb.0,port=3 \
-device virtio-balloon-pci,id=balloon0,bus=pci.5,addr=0x0 \
-usb \
-device usb-kbd,bus=usb-bus.0 \
-device '************************' \
-smbios type=2 \
-cpu Penryn,kvm=on,vendor=GenuineIntel,+invtsc,vmware-cpuid-freq=on,+ssse3,+sse4.2,+popcnt,+avx,+aes,+xsave,+xsaveopt,check \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on
2020-09-21 02:30:03.582+0000: Domain id=7 is tainted: high-privileges
2020-09-21 02:30:03.582+0000: Domain id=7 is tainted: custom-argv
2020-09-21 02:30:03.582+0000: Domain id=7 is tainted: host-cpu
char device redirected to /dev/pts/0 (label charserial0)
usb_desc_get_descriptor: 1 unknown type 33 (len 10)
usb_desc_get_descriptor: 1 unknown type 33 (len 10)
2020-09-21T02:34:46.691096Z qemu-system-x86_64: warning: guest updated active QH
usb_desc_get_descriptor: 1 unknown type 33 (len 10)
usb_desc_get_descriptor: 1 unknown type 33 (len 10)

 

 

image.thumb.png.78d21c4589134dca45e4d40c7bac1bd2.png

 

image.png.23c48ef693989815310058f1e2b1e607.png

image.png

image.png

 

YOIU ARE A STAR!!!!

 

I was just about to give up, sent the RX5700 XT back and cry into my coffee.  It's drove me crazy since y/day AM - sorted with the above changes.  THANK YOU!

 

I imagine the latest version from @SpaceInvaderOne will sort all of this once Big Sur drops as there are options for multiple types.

 

@SpaceInvaderOne If you want anyone to help beta test with the latest BigSur I'm happy to give it a whirl whilst I am in full on tinkering  mode :)

 

 

 

EDIT.... Spoke too soon, I saw the proper full apple logo popup in the middle of the screen on my monitor (connected to the 5700 via DP) and got excited.  It just stays there though and locks the whole server!

 

It's the GPU that is the culprit, obviously - but I am at a loss now (again!) as to why?  Managed to grab a quick log before it crashes the server and these seem the only relevant lines, right before it locks up:

 

kernel: vfio-pci 0000:67:00.0: vfio_ecap_init: hiding ecap 0x19@0x270
kernel: vfio-pci 0000:67:00.0: vfio_ecap_init: hiding ecap 0x1b@0x2d0
kernel: vfio-pci 0000:67:00.0: vfio_ecap_init: hiding ecap 0x25@0x400
kernel: vfio-pci 0000:67:00.0: vfio_ecap_init: hiding ecap 0x26@0x410
kernel: vfio-pci 0000:67:00.0: vfio_ecap_init: hiding ecap 0x27@0x440

 

That is the GPU.

 

Anyone any other ideas?

Edited by ne10g
it didn't work...
Link to comment
On 4/21/2020 at 3:13 PM, meep said:

 

 

Hi @acosmichippo

 

You don't need to 'passthrough' unRAID shares via XML. like this. 

 

You simply mount them from within the OS, like you would any network volume;

 

Either find the share on your network and double-click it. It will appear on your desktop (if you have finder prefs set to display*), or at the very least will be available in finder;

 

1236297857_Screenshot2020-04-21at14_00_56.png.c2bd6276647aced13a49ec1a45bf1735.png

 

If your server is not showing up under network for some reason, you click Go->Connect To Server in the finder menu, and enter your server and share details;

 

1272470843_Screenshot2020-04-21at14_00_22.png.b04b14b121c8b1228f9a7cddc9cd3149.png

 

Once you have accessed one or more volumes, you can drag them in to login items for your account in users and groups. This will cause those volumes to mount every time you reboot your VM;

 

 1120918892_Screenshot2020-04-21at14_01_38.png.79ba8308f052ee3337ab4f832ab3eb8c.png

 

*Here's how to configure finder preferences to have everything mounted appear on your desktop;
 

1760406640_Screenshot2020-04-21at14_07_43.png.18104aefd5803cf58d1ab5270da405f7.png

 

If you have trouble, you need to search online for 'MacOS Network Volume Mounting' or some such, not unRaid, as what you're doing is the same as if you have a MAC on a LAN and you want to connect to a separate fileserver.

 

Good luck!

 

 

Regarding this...

I will use my macinabox with logic pro x as my DAW and will have hundreds of gigs of plugins and instruments where my plan is to have them located on the array and from within logic set the location of the plugins and instruments pointing at the array location.

What kind of read and write performance will your suggestion above give me? I need it to be as fast as possible, as if the array was directly mounted , as mentioned in the original question.  

Link to comment

Hi, 

 

I have followed @SpaceInvaderOne tutorial on installing osx high sierra  and when I try passing through a strix 1070 and boot I get the following image below via vnc viewer. Before I messed with the GPU, it worked and booted fine. However, when I remove the GPU it still doesn't go back to working and did set everything back to before the issue happened. So what about adding a GPU makes the VM look like the image below either with or without the passthrough? 

 

Screen-Shot-2020-10-31-at-2.27.05-PM.png

 

I'm running unraid 6.9 beta with ryzen 1700x and and I'm trying to passthrough a second GPU (strix 1070) I have a gt 710 on the primary pci slot for unraid, since my MOBO doesn't have integrated graphics. I binded the 1070 together via the new feature in 6.9. Do we still have to do the multifunction bit via xml if binded? might try that.. 

 

This is also an issue for Ubunutu, Popos and any Linux distro (however just black screen) which didn't happen in 6.8. Windows works fine! Not sure what I'm doing right there. I'm not sure what I'm doing wrong now, any help would be greatly appreciated. Thank you. 

 

 

UPDATE: you have to ensure inside your xml it matches the share in domains "/mnt/user/domains/MacinaboxHighSierra/ovmf/OVMF_CODE.fd"  & /mnt/user/domains/MacinaboxHighSierra/ovmf/OVMF_VARS.fd" for some reason it changes to "554ea9d4-6ec9-430d-86eb-e88f5089abef_VARS-pure-efi.fd" i change it to the correct .fd files inside the share and now the apple logo is in the middle and boots.

 

Now I have to try install Nvidia web drivers...just dont update cause you won't be able to. 

Edited by Kevin Marchese
Link to comment

Hey guys, I'm not sure what I did wrong, but after installing & getting everything running I powered off, tried to change the CPUs (4 instead of 2), edited the XML to add back the customized options, and when I try to boot the graphics are broken (the VM seems to boot normally though)

 

image.thumb.png.df258bb979b22db52db2f9084e1dace1.png

Here's my XML config

 

<?xml version='1.0' encoding='UTF-8'?>
<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
  <name>MacinaboxCatalina</name>
  <uuid>554ea9d4-6ec9-430d-86eb-e88f5089abef</uuid>
  <description>MacOS Catalina</description>
  <metadata>
    <vmtemplate xmlns="unraid" name="Windows 10" icon="catalina.png" os="Catalina"/>
  </metadata>
  <memory unit='KiB'>4194304</memory>
  <currentMemory unit='KiB'>4194304</currentMemory>
  <memoryBacking>
    <nosharepages/>
  </memoryBacking>
  <vcpu placement='static'>4</vcpu>
  <cputune>
    <vcpupin vcpu='0' cpuset='1'/>
    <vcpupin vcpu='1' cpuset='7'/>
    <vcpupin vcpu='2' cpuset='3'/>
    <vcpupin vcpu='3' cpuset='9'/>
  </cputune>
  <os>
    <type arch='x86_64' machine='pc-q35-3.1'>hvm</type>
    <loader readonly='yes' type='pflash'>/usr/share/qemu/ovmf-x64/OVMF_CODE-pure-efi.fd</loader>
    <nvram>/etc/libvirt/qemu/nvram/554ea9d4-6ec9-430d-86eb-e88f5089abef_VARS-pure-efi.fd</nvram>
  </os>
  <features>
    <acpi/>
    <apic/>
  </features>
  <cpu mode='host-passthrough' check='none'>
    <topology sockets='1' cores='2' threads='2'/>
    <cache mode='passthrough'/>
  </cpu>
  <clock offset='utc'>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='pit' tickpolicy='delay'/>
    <timer name='hpet' present='no'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/local/sbin/qemu</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='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='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>
    <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:f3:8d:5d'/>
      <source bridge='br0'/>
      <model type='virtio'/>
      <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'/>
    <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>
    <video>
      <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1' primary='yes'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
    </video>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
    </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=???????????????????????????????(c)AppleComputerInc'/>
    <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>

I tried deleting the <topology ... /> section but then it doesn't boot at all. Lastly, I also tried just changing the GPU from VNC to GTX 560ti, but I'm not able to VNC into the machine with that setting either.

 

What did I miss?

Link to comment
17 minutes ago, darthdeus said:

Hey guys, I'm not sure what I did wrong, but after installing & getting everything running I powered off, tried to change the CPUs (4 instead of 2), edited the XML to add back the customized options, and when I try to boot the graphics are broken (the VM seems to boot normally though)

 

image.thumb.png.df258bb979b22db52db2f9084e1dace1.png

Here's my XML config

 


<?xml version='1.0' encoding='UTF-8'?>
<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
  <name>MacinaboxCatalina</name>
  <uuid>554ea9d4-6ec9-430d-86eb-e88f5089abef</uuid>
  <description>MacOS Catalina</description>
  <metadata>
    <vmtemplate xmlns="unraid" name="Windows 10" icon="catalina.png" os="Catalina"/>
  </metadata>
  <memory unit='KiB'>4194304</memory>
  <currentMemory unit='KiB'>4194304</currentMemory>
  <memoryBacking>
    <nosharepages/>
  </memoryBacking>
  <vcpu placement='static'>4</vcpu>
  <cputune>
    <vcpupin vcpu='0' cpuset='1'/>
    <vcpupin vcpu='1' cpuset='7'/>
    <vcpupin vcpu='2' cpuset='3'/>
    <vcpupin vcpu='3' cpuset='9'/>
  </cputune>
  <os>
    <type arch='x86_64' machine='pc-q35-3.1'>hvm</type>
    <loader readonly='yes' type='pflash'>/usr/share/qemu/ovmf-x64/OVMF_CODE-pure-efi.fd</loader>
    <nvram>/etc/libvirt/qemu/nvram/554ea9d4-6ec9-430d-86eb-e88f5089abef_VARS-pure-efi.fd</nvram>
  </os>
  <features>
    <acpi/>
    <apic/>
  </features>
  <cpu mode='host-passthrough' check='none'>
    <topology sockets='1' cores='2' threads='2'/>
    <cache mode='passthrough'/>
  </cpu>
  <clock offset='utc'>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='pit' tickpolicy='delay'/>
    <timer name='hpet' present='no'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/local/sbin/qemu</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='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='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>
    <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:f3:8d:5d'/>
      <source bridge='br0'/>
      <model type='virtio'/>
      <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'/>
    <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>
    <video>
      <model type='qxl' ram='65536' vram='65536' vgamem='16384' heads='1' primary='yes'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
    </video>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
    </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=???????????????????????????????(c)AppleComputerInc'/>
    <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>

I tried deleting the <topology ... /> section but then it doesn't boot at all. Lastly, I also tried just changing the GPU from VNC to GTX 560ti, but I'm not able to VNC into the machine with that setting either.

 

What did I miss?

I think we're in the same boat. I'm trying to install clover on the VM itself before I passthrough my gpu, trying some nvidia injections before hand. Sorry I can be much help but just wanted to say I feel your pain. 

Link to comment
2 hours ago, darthdeus said:

Hey guys, I'm not sure what I did wrong, but after installing & getting everything running I powered off, tried to change the CPUs (4 instead of 2), edited the XML to add back the customized options, and when I try to boot the graphics are broken (the VM seems to boot normally though)

 

What did I miss?

If you are using Macinabox and Clover then the dedicated OVMF config for a start :)

  <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>
  • Like 2
Link to comment
3 hours ago, Kevin Marchese said:

I think we're in the same boat. I'm trying to install clover on the VM itself before I passthrough my gpu, trying some nvidia injections before hand. Sorry I can be much help but just wanted to say I feel your pain. 

Also you have to ensure inside your xml it matches the share in domains "/mnt/user/domains/MacinaboxHighSierra/ovmf/OVMF_CODE.fd"  & /mnt/user/domains/MacinaboxHighSierra/ovmf/OVMF_VARS.fd" for some reason it changes to "554ea9d4-6ec9-430d-86eb-e88f5089abef_VARS-pure-efi.fd" i change it to the correct .fd files inside the shae and now the apple log is in the middle and boots.

 

Now I have to try install Nvidia web drivers...just dont update cause you won't be able to. 

Link to comment
2 hours ago, cat2devnull said:

If you are using Macinabox and Clover then the dedicated OVMF config for a start :)


  <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>

Sorry if I'm being overly dumb, but you mean that my config is correct, or that I have some other config I should share? I didn't change any of the defaults, literally just ran macinabox and installed until it booted, then tried increasing CPU/RAM/GPU, which broke, and here I am :D Is there some resource I missed? From watching the video it seems like all of this works with the default settings, but maybe I'm even more confused than I thought?

Link to comment

Ok I found out one place where I was being dumb 😅Looking at a diff of a before/after config it seems that what you linked is exactly the problem. changing it to the original part in the <loader> and <nvram> section works! I guess now also moving onto the GPU.

 

Any idea why the loader/nvram settings change on save? Or maybe how to keep them from changing?

 

image.thumb.png.7f823d520e9ccf7313eaf2dfa0c188c1.png

Link to comment
1 minute ago, darthdeus said:

Ok I found out one place where I was being dumb 😅Looking at a diff of a before/after config it seems that what you linked is exactly the problem. changing it to the original part in the <loader> and <nvram> section works! I guess now also moving onto the GPU.

 

Any idea why the loader/nvram settings change on save? Or maybe how to keep them from changing?

Because they are non-standard config so if you edit your template using GUI mode they will be overwritten.

The first rule of fight club... I mean the first rule of Unraid with Macinabox is never use GUI mode to edit your XML. :)

Macinabox is amazing and SpacinvaderOne has done great things for this community but it's not without its limitations.
See my earlier post for more thoughts on this.

https://forums.unraid.net/topic/84601-support-spaceinvaderone-macinabox/page/44/?tab=comments#comment-907711

  • Like 1
Link to comment
6 minutes ago, cat2devnull said:

Because they are non-standard config so if you edit your template using GUI mode they will be overwritten.

The first rule of fight club... I mean the first rule of Unraid with Macinabox is never use GUI mode to edit your XML. :)

Macinabox is amazing and SpacinvaderOne has done great things for this community but it's not without its limitations.
See my earlier post for more thoughts on this.

https://forums.unraid.net/topic/84601-support-spaceinvaderone-macinabox/page/44/?tab=comments#comment-907711

Thanks! I'll definitely check it out. Though to be honest I'm still browsing the forum for some more elementary explanation of how to do the GPU passthrough. On the most basic level I noticed that when I switch the "Graphics Card" from "VNC" to my 570ti I can't click on the VM anymore and connect via VNC (which I guess makes sense?). I guess this is as noob of a question as it gets, but how do I actually connect to it then to at least verify that it boots? SpaceinvaderOne mentioned installing SplashtopStreamer to connect remotely, but since that runs as a service in the OS I guess that rules out seeing any boot issues, right? I mean how do I even verify that the thing boots once I change the GPU if SplashtopStreamer is unable to connect?

 

Sorry if this is a super noob question, I've only been using Unraid for about a week and never did any VM management before. I'm happy to read up on anything or watch more videos, but at this point I'm mostly just strugging to find what to read up on hehe.

Link to comment
41 minutes ago, darthdeus said:

On the most basic level I noticed that when I switch the "Graphics Card" from "VNC" to my 570ti I can't click on the VM anymore and connect via VNC (which I guess makes sense?). I guess this is as noob of a question as it gets, but how do I actually connect to it then to at least verify that it boots? SpaceinvaderOne mentioned installing SplashtopStreamer to connect remotely, but since that runs as a service in the OS I guess that rules out seeing any boot issues, right? I mean how do I even verify that the thing boots once I change the GPU if SplashtopStreamer is unable to connect?

As you have discovered, in terms of the VM config, you can either connect via VNC or via a GPU/IGP. You cannot do both at the same time.

That being said, you can use VNC or similar by running it as a service within the OS of the VM and then connection over ethernet.

The way you check if your VM is setup correctly to use your 570ti is to plug a monitor into the back of it and see if the system boots and puts any output to that card. Unfortunately in your case I expect that it won't as Fermi support was dropped in High Sierra.

https://dortania.github.io/GPU-Buyers-Guide/legacy-gpus/legacy-nvidia.html#fermi-series-4xx-5xx

 

Read the following for all the details.

https://khronokernel-3.gitbook.io/gpu-buyers-guide/

 

This is why when I decided to buy a new card (not wanting to play games) I went with the RX550 due to native OOTB support and best modern bang for buck. Otherwise if you want something cheap and cheerful the GTX710 or AMD R7/R9 cards are good options.

Link to comment

Hi there,

 

I'm a noob on this topic.I followed carefully video tutorial and I applied all default settings / parameters.

I launch VM, go to VNC, I can see boot screen, I press "Enter" to initiate installation, but i've got a black screen (no apple logo appears).

 

Config : 6.8.3 Core i7 16 Go GTX1070

 

here my VM logs :

 


-mon chardev=charmonitor,id=monitor,mode=control \
-rtc base=utc,driftfix=slew \
-global kvm-pit.lost_tick_policy=delay \
-no-hpet \
-no-shutdown \
-boot strict=on \
-device pcie-root-port,port=0x10,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x2 \
-device pcie-root-port,port=0x11,chassis=2,id=pci.2,bus=pcie.0,addr=0x2.0x1 \
-device pcie-root-port,port=0x12,chassis=3,id=pci.3,bus=pcie.0,addr=0x2.0x2 \
-device pcie-root-port,port=0x13,chassis=4,id=pci.4,bus=pcie.0,addr=0x2.0x3 \
-device ich9-usb-ehci1,id=usb,bus=pcie.0,addr=0x7.0x7 \
-device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pcie.0,multifunction=on,addr=0x7 \
-device ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pcie.0,addr=0x7.0x1 \
-device ich9-usb-uhci3,masterbus=usb.0,firstport=4,bus=pcie.0,addr=0x7.0x2 \
-device virtio-serial-pci,id=virtio-serial0,bus=pci.2,addr=0x0 \
-blockdev '{"driver":"file","filename":"/mnt/user/domains/MacinaboxCatalina/Clover.qcow2","node-name":"libvirt-3-storage","cache":{"direct":false,"no-flush":false},"auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-3-format","read-only":false,"cache":{"direct":false,"no-flush":false},"driver":"qcow2","file":"libvirt-3-storage","backing":null}' \
-device ide-hd,bus=ide.2,drive=libvirt-3-format,id=sata0-0-2,bootindex=1,write-cache=on \
-blockdev '{"driver":"file","filename":"/mnt/user/domains/MacinaboxCatalina/Catalina-install.img","node-name":"libvirt-2-storage","cache":{"direct":false,"no-flush":false},"auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-2-format","read-only":false,"cache":{"direct":false,"no-flush":false},"driver":"raw","file":"libvirt-2-storage"}' \
-device ide-hd,bus=ide.3,drive=libvirt-2-format,id=sata0-0-3,write-cache=on \
-blockdev '{"driver":"file","filename":"/mnt/user/domains/MacinaboxCatalina/macos_disk.img","node-name":"libvirt-1-storage","cache":{"direct":false,"no-flush":false},"auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-1-format","read-only":false,"cache":{"direct":false,"no-flush":false},"driver":"raw","file":"libvirt-1-storage"}' \
-device ide-hd,bus=ide.4,drive=libvirt-1-format,id=sata0-0-4,write-cache=on \
-netdev tap,fd=36,id=hostnet0,vhost=on,vhostfd=37 \
-device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:6e:06:d1,bus=pci.1,addr=0x0 \
-chardev pty,id=charserial0 \
-device isa-serial,chardev=charserial0,id=serial0 \
-chardev socket,id=charchannel0,fd=38,server,nowait \
-device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=org.qemu.guest_agent.0 \
-device usb-tablet,id=input0,bus=usb.0,port=1 \
-vnc 0.0.0.0:0,websocket=5700 \
-k fr \
-device qxl-vga,id=video0,ram_size=67108864,vram_size=67108864,vram64_size_mb=0,vgamem_mb=16,max_outputs=1,bus=pcie.0,addr=0x1 \
-device virtio-balloon-pci,id=balloon0,bus=pci.3,addr=0x0 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on
2020-11-01 12:23:18.457+0000: Domain id=8 is tainted: high-privileges
2020-11-01 12:23:18.457+0000: Domain id=8 is tainted: host-cpu
char device redirected to /dev/pts/0 (label charserial0)

could you please help?

thanks

Edited by neuk34
Link to comment
3 minutes ago, neuk34 said:

Hi there,

 

I'm a noob on this topic.I followed carefully video tutorial and I applied all default settings / parameters.

I launch VM, go to VNC, I can see boot screen, but i've got a black screen (no apple logo appears) when I press "Enter" to initiate installation.

 

Config : 6.8.3 Core i7 16 Go GTX1070

 

here my VM logs :

 



-mon chardev=charmonitor,id=monitor,mode=control \
-rtc base=utc,driftfix=slew \
-global kvm-pit.lost_tick_policy=delay \
-no-hpet \
-no-shutdown \
-boot strict=on \
-device pcie-root-port,port=0x10,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x2 \
-device pcie-root-port,port=0x11,chassis=2,id=pci.2,bus=pcie.0,addr=0x2.0x1 \
-device pcie-root-port,port=0x12,chassis=3,id=pci.3,bus=pcie.0,addr=0x2.0x2 \
-device pcie-root-port,port=0x13,chassis=4,id=pci.4,bus=pcie.0,addr=0x2.0x3 \
-device ich9-usb-ehci1,id=usb,bus=pcie.0,addr=0x7.0x7 \
-device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pcie.0,multifunction=on,addr=0x7 \
-device ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pcie.0,addr=0x7.0x1 \
-device ich9-usb-uhci3,masterbus=usb.0,firstport=4,bus=pcie.0,addr=0x7.0x2 \
-device virtio-serial-pci,id=virtio-serial0,bus=pci.2,addr=0x0 \
-blockdev '{"driver":"file","filename":"/mnt/user/domains/MacinaboxCatalina/Clover.qcow2","node-name":"libvirt-3-storage","cache":{"direct":false,"no-flush":false},"auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-3-format","read-only":false,"cache":{"direct":false,"no-flush":false},"driver":"qcow2","file":"libvirt-3-storage","backing":null}' \
-device ide-hd,bus=ide.2,drive=libvirt-3-format,id=sata0-0-2,bootindex=1,write-cache=on \
-blockdev '{"driver":"file","filename":"/mnt/user/domains/MacinaboxCatalina/Catalina-install.img","node-name":"libvirt-2-storage","cache":{"direct":false,"no-flush":false},"auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-2-format","read-only":false,"cache":{"direct":false,"no-flush":false},"driver":"raw","file":"libvirt-2-storage"}' \
-device ide-hd,bus=ide.3,drive=libvirt-2-format,id=sata0-0-3,write-cache=on \
-blockdev '{"driver":"file","filename":"/mnt/user/domains/MacinaboxCatalina/macos_disk.img","node-name":"libvirt-1-storage","cache":{"direct":false,"no-flush":false},"auto-read-only":true,"discard":"unmap"}' \
-blockdev '{"node-name":"libvirt-1-format","read-only":false,"cache":{"direct":false,"no-flush":false},"driver":"raw","file":"libvirt-1-storage"}' \
-device ide-hd,bus=ide.4,drive=libvirt-1-format,id=sata0-0-4,write-cache=on \
-netdev tap,fd=36,id=hostnet0,vhost=on,vhostfd=37 \
-device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:6e:06:d1,bus=pci.1,addr=0x0 \
-chardev pty,id=charserial0 \
-device isa-serial,chardev=charserial0,id=serial0 \
-chardev socket,id=charchannel0,fd=38,server,nowait \
-device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=org.qemu.guest_agent.0 \
-device usb-tablet,id=input0,bus=usb.0,port=1 \
-vnc 0.0.0.0:0,websocket=5700 \
-k fr \
-device qxl-vga,id=video0,ram_size=67108864,vram_size=67108864,vram64_size_mb=0,vgamem_mb=16,max_outputs=1,bus=pcie.0,addr=0x1 \
-device virtio-balloon-pci,id=balloon0,bus=pci.3,addr=0x0 \
-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny \
-msg timestamp=on
2020-11-01 12:23:18.457+0000: Domain id=8 is tainted: high-privileges
2020-11-01 12:23:18.457+0000: Domain id=8 is tainted: host-cpu
char device redirected to /dev/pts/0 (label charserial0)

could you please help?

thanks

Post your xml please 

Link to comment

here it comes

 

<?xml version='1.0' encoding='UTF-8'?>
<domain type='kvm'>
  <name>MacinaboxCatalina</name>
  <uuid>d490b74e-3643-4903-8e7a-dcebfece0311</uuid>
  <description>MacOS Catalina</description>
  <metadata>
    <vmtemplate xmlns="unraid" name="Windows 10" icon="default.png" os="Catalina"/>
  </metadata>
  <memory unit='KiB'>4194304</memory>
  <currentMemory unit='KiB'>4194304</currentMemory>
  <memoryBacking>
    <nosharepages/>
  </memoryBacking>
  <vcpu placement='static'>2</vcpu>
  <cputune>
    <vcpupin vcpu='0' cpuset='0'/>
    <vcpupin vcpu='1' cpuset='1'/>
  </cputune>
  <os>
    <type arch='x86_64' machine='pc-q35-3.1'>hvm</type>
    <loader readonly='yes' type='pflash'>/usr/share/qemu/ovmf-x64/OVMF_CODE-pure-efi.fd</loader>
    <nvram>/etc/libvirt/qemu/nvram/d490b74e-3643-4903-8e7a-dcebfece0311_VARS-pure-efi.fd</nvram>
  </os>
  <features>
    <acpi/>
    <apic/>
  </features>
  <cpu mode='host-passthrough' check='none'>
    <topology sockets='1' cores='1' threads='2'/>
    <cache mode='passthrough'/>
  </cpu>
  <clock offset='utc'>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='pit' tickpolicy='delay'/>
    <timer name='hpet' present='no'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/local/sbin/qemu</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='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='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>
    <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:6e:06:d1'/>
      <source bridge='br0'/>
      <model type='virtio'/>
      <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'/>
    <graphics type='vnc' port='-1' autoport='yes' websocket='-1' 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'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'/>
    </video>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
    </memballoon>
  </devices>
</domain>

 

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.