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


Recommended Posts

 

 

Probably a very slim chance. Unless you put unRAID to sleep as well, there really isn't much power saving putting a VM to sleep.

 

Thanks archedraft.

 

Ok next mission, have you tried getting it to boot with clover using  waschbenzin's clover image from insanelymac?

 

I tried everything and all i'm getting is +++++++++ from clover when I'm booting from the HDD.

 

No I have not messed with clover, @peter_sm is using it however. I have nothing against clover but "if it ain't broke"... Maybe @peter_sm would post a how-to on how he is using clover with unRAID? Seems to have a lot of interest.

Link to comment

Oh that's right, here is the snippet of it:

 

danofun says:

October 29, 2015 at 5:56 pm Edit

I was able to successfully upgrade to El Capitan using these steps.

– Followed the above to successfully install Yosemite

– Once installed, boot into Yosemite then download Clover EFI bootoader

– Install without UEFI (choose setting install boot0af in MBR)

– after the installation completes, copy /EFI/Clover/config.plist to ~/Desktop

– download and open Clover Configurator

– within Clover Configurator open ~/Desktop/config.plist

– in the RT Variables section change CsrActiveConfig to 0x3

– in the ACPI section uncheck FixLAN

– in the SMBIOS section run the wizard and select an appropriate template (for me 14.1)

– I am using a PowerColor R9 270 video card and had to inject a fakeid of 0x68101002 in the Devices section -> Fake ID -> ATI

– save ~/Desktop/config.plist

– replace /EFI/Clover/config.plist with the config.plist you just modified

– shutdown the VM

– in the unRAID OSX VM xml, delete the chameleon line

– boot your VM and it should load the Clover bootloader

– once booted back into Yosemite using the Clover bootloader, download Install OS X El Capitan Application from the Mac App Store. When complete, the app will open. Please note, the Application will disappear after use.

– Choose Yosemite system drive for install (Example: Macintosh HD). When complete, the computer will automatically reboot.

– When Clover boot screen appears, choose Boot OS X Install option (Example: Boot OS X Install from Macintosh HD). Choosing your system drive will go back to your previous installation without updating.

– Complete the OS X installation process. When complete, the computer will automatically reboot.

– When Clover boot screen appears, choose Boot Mac OS X option (Example: Boot Mac OS X from Macintosh HD). The computer will then complete the update.

– copy /EFI/Clover/config.plist to ~/Desktop

– in the RT Variables section change CsrActiveConfig to 0x67

– save ~/Desktop/config.plist

– replace /EFI/Clover/config.plist with the config.plist you just modified

– reboot and you’re done

Link to comment

Howto shutdown a remote host

 

Please try this and let me know if changes needed

 

 

 

Step One - Generate your public keys  on unRAID

 

ssh-keygen

You'll see three prompts; you can hit return for the default save location, and leave the passphrase empty

Enter file in which to save the key (/root/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again: 

 

Step Two - Set up the remote machine

 

Copy the public key to remote machine

 

 cd /root/.ssh

 ssh-copy-id -i id_rsa.pub [email protected]

Enter password for OSX

Password:

 

Login to remote-host without entering the password

 

ssh [email protected]

 

Check to make sure that only the key(s) you wanted were added.  Should be 

.ssh/authorized_keys

 

Modify /etc/sudoers on remote.host with visudo

sudo visudo

Adding the line below to that file. ( You need to handle vi command to edit/save the file)

 

yourusername ALL=(ALL) NOPASSWD: /sbin/shutdown

 

It could looks like this with several command added, see line started with peter

## User privilege specification
##
root ALL=(ALL) ALL
%admin ALL=(ALL) ALL
peter ALL=(ALL) NOPASSWD: /sbin/poweroff, /sbin/reboot, /sbin/shutdown

Done

 

On unRAID side to shutdown OSX

ssh [email protected] sudo shutdown -h now

Link to comment

Works! Great job BTW!

 

A few comments:

 

[*]The user must enable "Remote Login" under sharing in order for SSH to work (sort of a duh but someone is going to ask why it isn't working if we don't add that step)

[*]For those who like editing with Nano instead of Vi, here is what I did https://bbs.archlinux.org/viewtopic.php?pid=1162051#p1162051

[*]Don't we have to copy the .ssh files back to /root/.ssh on every unRAID boot? See below for what I am doing

 

I have the powerdown plugin installed so I created a S00.sh script that copies back our .ssh folder on boot. First copy our .ssh folder and files to somewhere on your flash drive (mine is /boot/custom/)

rsync -aqX /root/.ssh /boot/custom/

 

Now lets create the start script that will copy back of the folders on boot

cd /boot/config/plugins/powerdown/rc.unRAID.d

nano S00.sh



rsync -aqX /boot/custom/.ssh /root/
chmod 600 /root/.ssh/id_rsa
chmod 644 /root/.ssh/id_rsa.pub
chmod 644 /root/.ssh/known_hosts

 

Also I created a K00.sh file that will shutdown my Mac OS X when the server gets turned off

cd /boot/config/plugins/powerdown/rc.unRAID.d

nano K00.sh

ssh MacUserName@IP_ADDRESS sudo shutdown -h now

Link to comment

Works! Great job BTW!

 

A few comments:

 

[*]The user must enable "Remote Login" under sharing in order for SSH to work (sort of a duh but someone is going to ask why it isn't working if we don't add that step)

[*]For those who like editing with Nano instead of Vi, here is what I did https://bbs.archlinux.org/viewtopic.php?pid=1162051#p1162051

[*]Don't we have to copy the .ssh files back to /root/.ssh on every unRAID boot? See below for what I am doing

 

1 : Need to be added to the guide

3: Nano is easier :-)

3: yes, I copied the /root/.ssh folder to my flash (/boot/custom), then in the go file I copy the folder to the original place

 

and this is important.



chmod 600 /root/.ssh/id_rsa
chmod 644 /root/.ssh/id_rsa.pub
chmod 644 /root/.ssh/known_hosts

 

You can add 

chmod 700 /root/.ssh

 

I have done this several times, some steps was forgotten :-) but you find them ;-)

 

Please feel free to set up a guid on your blog, now you know how to do it ;-)

 

Need to look into the K0x.sh file, I have it in there but need to verify if that is the proper way to do this from?

 

//Peter

 

Link to comment

Give it a try an let us know if any issues coming up :-)

 

There are always issue with what we do :)

 

I can't seem to get clover to boot for the life of me, are you using the VMF-pure-efi.fd bios Peter?

 

If i use the EFI/Clover:

 

<target dev='hdb' bus='virtio'/>

Clover stops booting, I'm guessing it doesn't know about the virtio driver

 

 

and if I set it as SATA, ie:

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

EFI Bios doesn't see the disk.

 

Cheers.

Link to comment

... Hmmm

Maybe there is a solution to this , look a this hook script !

 

https://libvirt.org/hooks.html

 

//Peter

 

Do you understand the part about when the libvirt daemon is shut down, this script is called as:/etc/libvirt/hooks/daemon - shutdown - shutdown? I am trying to understand how to make it so that the script is only called when libvirt is getting shutdown but I am not sure how to make the script a shutdown only script??

Link to comment

Give it a try an let us know if any issues coming up :-)

 

There are always issue with what we do :)

 

I can't seem to get clover to boot for the life of me, are you using the VMF-pure-efi.fd bios Peter?

 

If i use the EFI/Clover:

 

<target dev='hdb' bus='virtio'/>

Clover stops booting, I'm guessing it doesn't know about the virtio driver

 

 

and if I set it as SATA, ie:

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

EFI Bios doesn't see the disk.

 

Cheers.

 

I don't have anything in my xml that pointing to clover, follow the guide same pages back, that I use.

 

//Peter

Link to comment

 

I don't have anything in my xml that pointing to clover, follow the guide same pages back, that I use.

 

//Peter

 

Wow, Thanks for your help peter. It's all happening, I even passed the GPU and the GTX 970 is happy with OSX. :)

 

I'm having a problem with the USB though, I'm passing the entire controller.

But when I'm passing the controller through the keyboard is working at Clover, but I'm getting a kernel panic on boot.

 

 

"unable to find driver for this platform: \"ACPI\".../IOPlatformExpert.cpp:1665"

 

Does my passthrough look ok to you guys? I've also tried USBBusFix=Yes but it doesn't seem to help.

 

Thanks guys.

<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
  <name>OSX-Guide-1-Current</name>
  <uuid>0aa39626-7ba1-2d41-9602-e2968b2fe36d</uuid>
  <metadata>
    <type>None</type>
  </metadata>
  <memory unit='KiB'>4194304</memory>
  <currentMemory unit='KiB'>4194304</currentMemory>
  <vcpu placement='static'>2</vcpu>
  <cputune>
    <vcpupin vcpu='0' cpuset='1'/>
  </cputune>
  <resource>
    <partition>/machine</partition>
  </resource>
  <os>
    <type arch='x86_64' machine='pc-q35-2.3'>hvm</type>
    <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/user/ssd/ElCapitan.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'/>key here'/>
    <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=2,chassis=1,id=root.1'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=01:00.0,bus=pcie.0,multifunction=on,x-vga=on'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=01:00.1,bus=pcie.0'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=00:1a.0,bus=pcie.0'/>
  </qemu:commandline>
</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.