***GUIDE*** Mac OS X 10.11 El Capitan – VM on unRAID


Recommended Posts

Ok so what I think is going on is as follows... The file does not exist until I start the array, once I start the array I can view it through the console with nano /etc/libvirt/qemu.conf. I tried stopping the array with the file open in nano making the changes and saving before restarting the array but once the array is started i view the file again with nano and my changes are not there. If I again shut down the array and open with nano I get the file with the changes made... Any ideas what is going on?

You have to do that while the array is running and the virtualization is enabled. Just edit the file, save and reboot

Link to comment

Hello all,

 

I've been trying to pass through a GPU on my new server for my OS X VM.

 

I followed the guide: https://macosxvirtualmachinekvm.wordpress.com/guide-mac-os-x-10-11-el-capitan-vm-on-unraid/

 

And have been able to get the system setup and running via VNC, but have had no luck getting a GPU passed through. I only want a GPU, don't need USB passthrough.

 

I have a Radeon 4870 installed (which, if I get this working nicely, I intend to replace with a newer Radeon that's fully supported by OSX.

 

The first thing I did was use the QEMU code included in the guide itself. The only changes I made were to fix the ' that don't copy/paste properly and update the host to the correct ID for my GPU (which I got from SysDevs). When I do this and try to start the VM, I get the following error:

 

internal error: process exited while connecting to monitor: 2016-09-01T20:41:00.125491Z qemu-system-x86_64: -device vfio-pci,host=82:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on: vfio: error opening /dev/vfio/34: Operation not permitted

2016-09-01T20:41:00.125535Z qemu-system-x86_64: -device vfio-pci,host=82:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on: vfio: failed to get group 34

2016-09-01T20:41:00.125554Z qemu-system-x86_64: -device vfio-pci,host=82:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on: Device initialization failed

2016-09-01T20:41:00.125571Z qemu-system-x86_64: -device vfio-pci,host=82:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on: Device 'vfio-pci' could not be initialized

 

Now, I've googled around that error and found this thread: https://lime-technology.com/forum/index.php?topic=36110.0

 

I tried editing my syslinux.cfg and rebooted into the new UnRaid configuration, but it didn't solve my problem. I'm also wary of PCIe ACS Override (Should I be?), and kind of want to avoid that if necessary. I have read through a couple of threads with the syslinux.cfg fix but since it didn't immediately solve my problem, I'm hoping there's another way.

 

I saw this post on page 25: https://lime-technology.com/forum/index.php?topic=43816.msg478749#msg478749

 

Where another guy was using Hostdev to pass through his GPU, and archedraft seems to say that if you don't need USB passthrough that's better than QEMU. If so, where should I drop the hostdev code into my XML? And what should I plug in for my address info?

 

The OTHER possible solution I'm looking at is maybe moving the GPU to a different PCI-E slot, as I'm in a server board with a bunch of them. I'm in the second topmost slot because I didn't want to be right up against my RAM, and apparently that's PCIE6 on this board because it counts up from the bottom rather than down from the top.

 

All of this is fairly new to me, I'm just doing my best to learn as much as I can from existing forum posts.

 

Here's my current unworking XML:

 

<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>

  <name>Mac OS GPU Passthrough</name>

  <uuid>0ba39646-7ba1-4d41-9602-e2968b2fe36d</uuid>

  <metadata>

    <type>None</type>

  </metadata>

  <memory unit='KiB'>57671680</memory>

  <currentMemory unit='KiB'>57671680</currentMemory>

  <vcpu placement='static'>24</vcpu>

  <cputune>

    <vcpupin vcpu='0' cpuset='8'/>

    <vcpupin vcpu='1' cpuset='9'/>

    <vcpupin vcpu='2' cpuset='10'/>

    <vcpupin vcpu='3' cpuset='11'/>

    <vcpupin vcpu='4' cpuset='12'/>

    <vcpupin vcpu='5' cpuset='13'/>

    <vcpupin vcpu='6' cpuset='14'/>

    <vcpupin vcpu='7' cpuset='15'/>

    <vcpupin vcpu='8' cpuset='16'/>

    <vcpupin vcpu='9' cpuset='17'/>

    <vcpupin vcpu='10' cpuset='18'/>

    <vcpupin vcpu='11' cpuset='19'/>

    <vcpupin vcpu='12' cpuset='20'/>

    <vcpupin vcpu='13' cpuset='21'/>

    <vcpupin vcpu='14' cpuset='22'/>

    <vcpupin vcpu='15' cpuset='23'/>

    <vcpupin vcpu='16' cpuset='24'/>

    <vcpupin vcpu='17' cpuset='25'/>

    <vcpupin vcpu='18' cpuset='26'/>

    <vcpupin vcpu='19' cpuset='27'/>

    <vcpupin vcpu='20' cpuset='28'/>

    <vcpupin vcpu='21' cpuset='29'/>

    <vcpupin vcpu='22' cpuset='30'/>

    <vcpupin vcpu='23' cpuset='31'/>

  </cputune>

  <resource>

    <partition>/machine</partition>

  </resource>

  <os>

    <type arch='x86_64' machine='pc-q35-2.3'>hvm</type>

    <kernel>/mnt/cache/Vdisks/Mac OS/enoch_rev2795_boot</kernel>

    <boot dev='hd'/>

    <bootmenu enable='yes'/>

  </os>

  <features>

    <acpi/>

  </features>

  <cpu mode='custom' match='exact'>

    <model fallback='allow'>core2duo</model>

  </cpu>

  <clock offset='utc'/>

  <on_poweroff>destroy</on_poweroff>

  <on_reboot>restart</on_reboot>

  <on_crash>destroy</on_crash>

  <devices>

    <emulator>/usr/bin/qemu-system-x86_64</emulator>

    <disk type='file' device='disk'>

      <driver name='qemu' type='raw'/>

      <source file='/mnt/cache/Vdisks/Mac OS/vdisk1.img'/>

      <target dev='hda' bus='sata'/>

      <address type='drive' controller='0' bus='0' target='0' unit='0'/>

    </disk>

    <controller type='usb' index='0'>

      <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0'/>

    </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='dmi-to-pci-bridge'>

      <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/>

    </controller>

    <controller type='pci' index='2' model='pci-bridge'>

      <address type='pci' domain='0x0000' bus='0x01' slot='0x01' function='0x0'/>

    </controller>

    <interface type='bridge'>

      <mac address='52:54:00:00:20:30'/>

      <source bridge='br0'/>

      <model type='e1000-82545em'/>

      <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x0'/>

    </interface>

    <memballoon model='none'/>

  </devices>

  <seclabel type='none' model='none'/>

  <qemu:commandline>

    <qemu:arg value='-device'/>

    <qemu:arg value='ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1'/>

    <qemu:arg value='-device'/>

    <qemu:arg value='vfio-pci,host=82:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on'/>

    <qemu:arg value='-device'/>

    <qemu:arg value='vfio-pci,host=82:00.1,bus=root.1,addr=00.1'/>

    <qemu:arg value='-device'/>

    <qemu:arg value='usb-kbd'/>

    <qemu:arg value='-device'/>

    <qemu:arg value='usb-mouse'/>

    <qemu:arg value='-device'/>

    <qemu:arg value='isa-applesmc,osk=censored'/>

    <qemu:arg value='-smbios'/>

    <qemu:arg value='type=2'/>

  </qemu:commandline>

</domain>

 

 

 

 

 

Link to comment

When I do this and try to start the VM, I get the following error:

 

internal error: process exited while connecting to monitor: 2016-09-01T20:41:00.125491Z qemu-system-x86_64: -device vfio-pci,host=82:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on: vfio: error opening /dev/vfio/34: Operation not permitted

2016-09-01T20:41:00.125535Z qemu-system-x86_64: -device vfio-pci,host=82:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on: vfio: failed to get group 34

2016-09-01T20:41:00.125554Z qemu-system-x86_64: -device vfio-pci,host=82:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on: Device initialization failed

2016-09-01T20:41:00.125571Z qemu-system-x86_64: -device vfio-pci,host=82:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on: Device 'vfio-pci' could not be initialized

 

You need to add group 34 to qemu.conf with unRAID 6.2

 

@tsouza11

 

On 6.2 rc2 & 3, I had to modify my /etc/libvirt/qemu.conf and update the cgroup_device_acl to include the dev nodes of the vfio/##'s, in the below example, 17 and 13 (that entire property array may have been commented out).  Per your post, you need to use /dev/vfio/26:

 

cgroup_device_acl = [
    "/dev/null", "/dev/full", "/dev/zero",
    "/dev/random", "/dev/urandom",
    "/dev/ptmx", "/dev/kvm", "/dev/kqemu",
    "/dev/rtc","/dev/hpet", "/dev/vfio/vfio",
    "/dev/vfio/17",
    "/dev/vfio/13"
]

 

...so stop the array, modify /etc/libvirt/qemu.conf, then start the array and your VM.

Link to comment

Thanks for the help archedraft!

 

The only qemu file I'm finding is in /flash/config/plugins/dynamix.kvm.manager

 

I'm a bit of a novice, am I looking in the right place? Is the file even supposed to be on the UNRAID flash?

 

The current contents of the qemu file don't look anything like the bit that's in jwegman's example:

 

#!/usr/bin/env php

 

<?php

if (!isset($argv[2]) || $argv[2] != 'start') {

exit(0);

}

 

$strXML = file_get_contents('php://stdin');

 

$doc = new DOMDocument();

$doc->loadXML($strXML);

 

$xpath = new DOMXpath($doc);

 

$args = $xpath->evaluate("//domain/*[name()=qemu:commandline]/*[name()=qemu:arg]/@value");

 

for ($i = 0; $i < $args->length; $i++){

$arg_list = explode(',', $args->item($i)->nodeValue);

 

if ($arg_list[0] !== 'vfio-pci') {

continue;

}

 

foreach ($arg_list as $arg) {

$keypair = explode('=', $arg);

 

if ($keypair[0] == 'host' && !empty($keypair[1])) {

vfio_bind($keypair[1]);

break;

}

}

}

 

exit(0); // end of script

 

 

 

function vfio_bind($strPassthruDevice) {

// Ensure we have leading 0000:

$strPassthruDeviceShort = str_replace('0000:', '', $strPassthruDevice);

$strPassthruDeviceLong = '0000:' . $strPassthruDeviceShort;

 

// Determine the driver currently assigned to the device

$strDriverSymlink = @readlink('/sys/bus/pci/devices/' . $strPassthruDeviceLong . '/driver');

 

if ($strDriverSymlink !== false) {

// Device is bound to a Driver already

 

if (strpos($strDriverSymlink, 'vfio-pci') !== false) {

// Driver bound to vfio-pci already - nothing left to do for this device now regarding vfio

return true;

}

 

// Driver bound to some other driver - attempt to unbind driver

if (file_put_contents('/sys/bus/pci/devices/' . $strPassthruDeviceLong . '/driver/unbind', $strPassthruDeviceLong) === false) {

file_put_contents('php://stderr', 'Failed to unbind device ' . $strPassthruDeviceShort . ' from current driver');

exit(1);

return false;

}

}

 

// Get Vendor and Device IDs for the passthru device

$strVendor = file_get_contents('/sys/bus/pci/devices/' . $strPassthruDeviceLong . '/vendor');

$strDevice = file_get_contents('/sys/bus/pci/devices/' . $strPassthruDeviceLong . '/device');

 

// Attempt to bind driver to vfio-pci

if (file_put_contents('/sys/bus/pci/drivers/vfio-pci/new_id', $strVendor . ' ' . $strDevice) === false) {

file_put_contents('php://stderr', 'Failed to bind device ' . $strPassthruDeviceShort . ' to vfio-pci driver');

exit(1);

return false;

}

 

return true;

}

Link to comment

Thanks for the help archedraft!

 

The only qemu file I'm finding is in /flash/config/plugins/dynamix.kvm.manager

 

I'm a bit of a novice, am I looking in the right place? Is the file even supposed to be on the UNRAID flash?

 

The current contents of the qemu file don't look anything like the bit that's in jwegman's example:

 

#!/usr/bin/env php

 

<?php

if (!isset($argv[2]) || $argv[2] != 'start') {

exit(0);

}

 

$strXML = file_get_contents('php://stdin');

 

$doc = new DOMDocument();

$doc->loadXML($strXML);

 

$xpath = new DOMXpath($doc);

 

$args = $xpath->evaluate("//domain/*[name()=qemu:commandline]/*[name()=qemu:arg]/@value");

 

for ($i = 0; $i < $args->length; $i++){

$arg_list = explode(',', $args->item($i)->nodeValue);

 

if ($arg_list[0] !== 'vfio-pci') {

continue;

}

 

foreach ($arg_list as $arg) {

$keypair = explode('=', $arg);

 

if ($keypair[0] == 'host' && !empty($keypair[1])) {

vfio_bind($keypair[1]);

break;

}

}

}

 

exit(0); // end of script

 

 

 

function vfio_bind($strPassthruDevice) {

// Ensure we have leading 0000:

$strPassthruDeviceShort = str_replace('0000:', '', $strPassthruDevice);

$strPassthruDeviceLong = '0000:' . $strPassthruDeviceShort;

 

// Determine the driver currently assigned to the device

$strDriverSymlink = @readlink('/sys/bus/pci/devices/' . $strPassthruDeviceLong . '/driver');

 

if ($strDriverSymlink !== false) {

// Device is bound to a Driver already

 

if (strpos($strDriverSymlink, 'vfio-pci') !== false) {

// Driver bound to vfio-pci already - nothing left to do for this device now regarding vfio

return true;

}

 

// Driver bound to some other driver - attempt to unbind driver

if (file_put_contents('/sys/bus/pci/devices/' . $strPassthruDeviceLong . '/driver/unbind', $strPassthruDeviceLong) === false) {

file_put_contents('php://stderr', 'Failed to unbind device ' . $strPassthruDeviceShort . ' from current driver');

exit(1);

return false;

}

}

 

// Get Vendor and Device IDs for the passthru device

$strVendor = file_get_contents('/sys/bus/pci/devices/' . $strPassthruDeviceLong . '/vendor');

$strDevice = file_get_contents('/sys/bus/pci/devices/' . $strPassthruDeviceLong . '/device');

 

// Attempt to bind driver to vfio-pci

if (file_put_contents('/sys/bus/pci/drivers/vfio-pci/new_id', $strVendor . ' ' . $strDevice) === false) {

file_put_contents('php://stderr', 'Failed to bind device ' . $strPassthruDeviceShort . ' to vfio-pci driver');

exit(1);

return false;

}

 

return true;

}

 

You have to modify the file using nano either with a monitor and key board connected to the server or through putty on windows or ssh on mac or linux. Type nano /etc/libvirt/qemu.conf in the command line then scroll down to the area arch quoted and make the changes needed. Other have gotten this to work for them hower after making the changes I still get the same error. It is worth a try though. Good luck, let us know if you get it working, or need anymore help.

Link to comment

Thanks Aa617!

 

This worked. I had to do it twice. The first time I added group 34, restarted the array, tried to start the VM, got an error on group 38. Added group 38, restarted the array, BOOM, VM works.

 

Actually, scratch that, I had one other operator error, I had to shut down the server, go into BIOS, and make sure it was configured to use the onboard VGA graphics at startup so as to not conflict with the video card.

 

Once I took care of those two things, my Mac VM and my Windows 10 VM (which I created to confirm I hadn't made an XML error and had also failed to boot) both worked great!

 

Thanks for all your help!

 

Now to get iMessages working...

Link to comment
  • 2 weeks later...

Can someone help me accessing my OS X VM from exterior?

 

I have no problems inside my net but I want to be able to access from outside.

 

I have a static IP on my OS X VM set to 192.168.1.120

I have opened ports 5800 and 5900 on my router and pointed to 192.168.1.120

(for use with Real VNC viewer - https://www.realvnc.com/download/viewer/)

 

When I'm at work and enter "my_home_static_ip:5900" or 5800 on Real VNC under Windows 7 but nothing happens.

 

* I have "Remote Managment" active

 

Any idea of what I'm doing wrong?

 

Thankyou

Gus

 

 

Link to comment

i would recommend using a remote access programme called splashtop desktop. It is cross platform apple, windows, linux and works very well.

 

Thankyou. If I'm not able to find why I can't connect I'll try it.

Is better than Teamviewer?

 

Thankyou

Gus

 

Yes far better than teamviewer. Its the best i have used. Streams sound and video aswell. its good because its one solution for all your osx, windows and linux vms for remote access. No need to open any ports etc either myself i wouldnt like to expose vnc ports to the web.

Do you have screen sharing enabled in the osx vm?

Link to comment

I have done a series of videos on installing osx on unRAID. And converting to OVMF and Clover.

 

First is installing the osx using sea bios and chameleon         

 

The second    Installing with  OVMF and clover                     

 

Hope you guys find them useful!

 

Awesome videos! Have you noticed any difference between seabios/chameleon vs OVMF/clover?

Link to comment

I have done a series of videos on installing osx on unRAID. And converting to OVMF and Clover.

 

First is installing the osx using sea bios and chameleon         

 

The second    Installing with  OVMF and clover                     

 

Hope you guys find them useful!

 

Awesome videos! Have you noticed any difference between seabios/chameleon vs OVMF/clover?

 

Thanks alot archedraft, I learnt a great deal from your work since coming to unRAID!

I havent done a great deal of testing but yes performance is better as yet.

My cpu speed gets reported correctly as 2.4 now instead of 1.8 as with seabios.

 

Geekbench 4 scores for me are as follows using fresh install of osx el capitan.

 

c843772385.jpg

 

 

 

 

 

Link to comment
Yes far better than teamviewer. Its the best i have used. Streams sound and video aswell. its good because its one solution for all your osx, windows and linux vms for remote access. No need to open any ports etc either myself i wouldnt like to expose vnc ports to the web.

I have it up an running but you have to pay if you want exterior access.

 

Do you have screen sharing enabled in the osx vm?

Yes, I have remote management active.

 

 

 

*** Does someone know why my "Alt Gr" key doesn't work under vnc to vm? I can't enter "@" symbol. ***

 

 

 

 

Can someone help me accessing my OS X VM from exterior?

 

I have no problems inside my net but I want to be able to access from outside.

 

I have a static IP on my OS X VM set to 192.168.1.120

I have opened ports 5800 and 5900 on my router and pointed to 192.168.1.120

(for use with Real VNC viewer - https://www.realvnc.com/download/viewer/)

 

When I'm at work and enter "my_home_static_ip:5900" or 5800 on Real VNC under Windows 7 but nothing happens.

 

* I have "Remote Managment" active

 

Any idea of what I'm doing wrong?

 

Thankyou

Gus

Link to comment

gridrunner's guide should, for the most part, work for Sierra as well.  Apple's core2duo devices were cut for Sierra so we'll have to change our emulation to Penryn.  enoch's latest version seems to work well but clover is a little bit of a mess with Penryn.  With the QEMU flag enabled in config.plist the VM runs at 1/4 speed and without the flag at ~10x speed. dreadkopp over at Insanelymac posted a patched Clover 3578 with the appropriate fixes but they have not yet been merged into Clover.  Therefore, you'll have to use dreadkopp Clover version for now. You can follow the Clover ticket here.

 

I did not attempt an upgrade but here's how I installed a new instance of OVMF Sierra with Clover EFI.

 

Create Sierra Image

1. on a working Mac/Hackintosh, download Sierra from the App Store.

2. Create a 8GB file with a name sierra_usb.

mkfile -n 8g sierra_usb

 

3. Mount the file as a disk. After this command you should see where the image is mounted. In this example, it was mounted on /dev/disk2.

hdiutil attach -imagekey diskimage-class=CRawDiskImage -nomount sierra_usb

 

4. Partitition your virtual disk. First we will create a GPT partition map:

gpt create /dev/disk2

 

5. Use Disk Utility to Erase your virtual disk, with a name Untitled

6. Create installer virtual disk from Installer.app

sudo /Applications/Install\ macOS\ Sierra.app/Contents/Resources/createinstallmedia --volume /Volumes/Untitled --applicationpath /Applications/Install\ MacOS\ Sierra.app --nointeraction

 

Install dreadkopp's patched Clover to the Virtual Install Disk

1. Open the Installer and choose the Install disk as the installation location.

2. Choose to customize and select Install for UEFI booting only

3. Select a theme for Clover

4. Under Drivers64UEFI, select DataHubDxe-64 AND OsxAptioFix2Drv

5. Complete the install action and open config.plist and make sure your resolution matches unRAID's OVMF resolution

<key>ScreenResolution</key>
<string>800x600</string>

 

6. Copy your SMBIOS settings from a previous Clover install or use Clover Configurator's SMBIOS wizard.  In this example iMac 14.1.

 

Unmount and Move Virtual Disk Image to unRAID

1. Unmount install disk

diskutil unmount /dev/disk2

 

2. Move virtual disk image to unRAID share. For this example /mnt/user/domains/macOS/sierra_usb

 

Installation

1. Create a virtual disk where we will install Sierra. In this example it's a 90GB virtual disk.

qemu-img create -f raw /mnt/user/domains/macOS/vdisk1.img 90G

 

2. on unRAID, create a new custom VM.  NOTE: You'll need to add in Apple's key per usual. This example is for a GPU passthrough VM so modify for your GPU bios or delete this line altogether.  I've also passed through an entire USB controller (00:1d.0).

<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
  <name>macOS</name>
  <uuid>cf5aa9c4-c70c-4b00-bb27-2125bc8fcedc</uuid>
  <metadata>
    <vmtemplate xmlns="unraid" name="macOS" icon="/mnt/user/domains/macOS/OSX-10.12.png"/>
  </metadata>
  <memory unit='KiB'>8388608</memory>
  <currentMemory unit='KiB'>8388608</currentMemory>
  <vcpu placement='static'>2</vcpu>
  <cputune>
    <vcpupin vcpu='0' cpuset='0'/>
    <vcpupin vcpu='1' cpuset='1'/>
  </cputune>
  <resource>
    <partition>/machine</partition>
  </resource>
  <os>
    <type arch='x86_64' machine='pc-q35-2.5'>hvm</type>
    <loader readonly='yes' type='pflash'>/usr/share/qemu/ovmf-x64/OVMF_CODE-pure-efi.fd</loader>
    <nvram>/etc/libvirt/qemu/nvram/cf5aa9c4-c70c-4b00-bb27-2125bc8fcedc_VARS-pure-efi.fd</nvram>
    <boot dev='hd'/>
  </os>
  <features>
    <acpi/>
  </features>
  <cpu mode='custom' match='exact'>
    <model fallback='allow'>Penryn</model>
  </cpu>
  <clock offset='utc'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw'/>
      
      <source file='/mnt/user/domains/macOS/vdisk1.img'/>
      <backingStore/>
      <target dev='hdc' bus='sata'/>
    </disk>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw'/>
      
      <source file='/mnt/user/domains/macOS/sierra_usb'/>
      <backingStore/>
      <target dev='hda' bus='sata'/>
    </disk>
    <controller type='usb' index='0'>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0'/>
    </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>
    <controller type='pci' index='1' model='dmi-to-pci-bridge'>
      <model name='i82801b11-bridge'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/>
    </controller>
    <controller type='pci' index='2' model='pci-bridge'>
      <model name='pci-bridge'/>
      <target chassisNr='2'/>
      <address type='pci' domain='0x0000' bus='0x01' slot='0x01' function='0x0'/>
    </controller>
    <controller type='virtio-serial' index='0'>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x0'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:00:20:30'/>
      <source bridge='br0'/>
      <target dev='vnet0'/>
      <model type='e1000-82545em'/>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x0'/>
    </interface>
     <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x02' slot='0x07' function='0x0'/>
    </memballoon>
  </devices>
  <seclabel type='none' model='none'/>
  <qemu:commandline>
    <qemu:arg value='-device'/>
    <qemu:arg value='isa-applesmc,osk=OSX_KEY'/>
    <qemu:arg value='-smbios'/>
    <qemu:arg value='type=2'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=01:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on,romfile=/mnt/user/domains/macOS/Powercolor.R9270.2048.131105.rom'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=01:00.1,bus=root.1,addr=00.1'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=00:1d.0,bus=root.1,addr=00.2'/>
  </qemu:commandline>
</domain>

 

3. Start the VM and at the Clover boot screen select Install macOS

4. Once in the installer, Open Disk Utility and Partition the 90GB virtual disk

5. Quit Disk Utility and install as usual

6. After the initial installation in finished the VM will reboot and again select Install macOS

7. The install will resume and reboot once again

8. At the clover boot screen, select your Sierra partition

9. Complete the Sierra installation wizard and arrive at the desktop

 

Post Installation

1. Open the Installer and choose the Sierra disk as the installation location.

2. Choose to customize and select Install for UEFI booting only

3. Select a theme for Clover

4. Under Drivers64UEFI, select DataHubDxe-64 AND OsxAptioFix2Drv

5. Complete the install action and open config.plist and make sure your resolution matches unRAID's OVMF resolution

<key>ScreenResolution</key>
<string>800x600</string>

 

6. Copy your SMBIOS settings from a previous Clover install or use Clover Configurator's SMBIOS wizard.  In this example iMac 14.1

 

 

7. Shutdown the VM

4. In unRAID, 8edit the macOS VM XML and remove the install disk

<disk type='file' device='disk'>
<driver name='qemu' type='raw'
<source file='/mnt/user/domains/macOS/sierra_usb'/>
<backingStore/>
<target dev='hda' bus='sata'/>
</disk>

 

5. Start the VM and you should boot to the Clover Boot screen

 

NOTES:

- I was able to get HDMI audio working with the attached HDMIAudio.kext.

- The patched Clover version is 3578 and is a version where kext injection is broken.  This was fixed in 3585.  Until the fixes are added to Clover builds or we get an updated patched version of Clover we'll have to install kexts to /System/Library/Extensions

 

EDIT 2016-12-21:

email4nickp has patched Clover 3923. It seems to work well after isolating and assigning CPUs to the VM. Alter your syslinux configuration to include the cpus you'd like to isolate

append isolcpus=2,3 initrd=/bzroot

and add an emulator pin to you're VM configuration

  <cputune>
    <vcpupin vcpu='0' cpuset='2'/>
    <vcpupin vcpu='1' cpuset='3'/>
    <emulatorpin cpuset='0'/>
  </cputune>

HDMIAudio.kext.zip

OSX-10_12.png.23ec5eb23c32c39ba77c7b224ec23d13.png

Link to comment

I upgraded from unRAID 6.1.9 to 6.2 and now my El Capitan VM won't start. What can I do to fix this?

 

Look some pages back. I think you must change one parameter in the XML.

 

Gus

 

you must change the machine type to q35-2.5 in 6.2 for it to work

 

<os>
    <type arch='x86_64' machine='pc-q35-2.5'>hvm</type>

 

I've done that and I still can't get it to boot. It won't even boot with the install ISO.

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.