MacOS as a VM on TrueNAS

Where do you updated this?

In the shell

Interesting errors with that.

admin@Odin[~]$ sudo cli -c “service vm update id=59 machine_type=q35 arch_type=x86_64
usage: cli [-h] [–url URL] [–user USER] [–password PASSWORD] [–timeout TIMEOUT] [-c COMMAND] [-i] [–menu] [–menu-item MENU_ITEM] [-m MODE] [–pager] [–print-template] [–stacks]
cli: error: unrecognized arguments: vm update id=59 machine_type=q35 arch_type=x86_64
admin@Odin[~]$ sudo cli
[Odin]> cli -c “service vm update id=59 machine_type=q35 arch_type=x86_64
Namespace cli not found
[Odin]> -c “service vm update id=59 machine_type=q35 arch_type=x86_64
Namespace -c not found
[Odin]>

Sorry there was an " missing at the end

You’ll want to replace the curly quotes with a standard " too

2 Likes

Can this be done for the comand line arguments as well?

-device isa-applesmc,osk="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc"
-smbios type=2 -device '{"driver":"usb-kbd","id":"input1","bus":"usb.0","port":"2"}'
-global nec-usb-xhci.msi=off -global ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off

This didnt work

sudo cli -c “vm update id=59 comand_line_args: -device isa-applesmc,osk=“ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc” -smbios type=2 -device ‘{“driver”:“usb-kbd”,“id”:“input1”,“bus”:“usb.0”,“port”:“2”}’ -global nec-usb-xhci.msi=off -global ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off”

I have to say, I followed the guide and it worked first try!

I have this in mine:

  machine_type: q35
  arch_type: x86_64

Both work fine, no errors, works. You probably forgot, again, the leading spaces? Note there are exactly 2 leading spaces before each of those lines.

1 Like

Well that’s encouraging!

It is 2 spaces not 3 or 4. Ill try again

This is actually really neat. Who needs OpenZFS on OSX when you can build a virtual hackintosh on TrueNAS with full PCI-E passthru :stuck_out_tongue:

I’m going to favorite the link OP posted.

2 Likes

Yes it is just more manual than it should be. Ix systems wink wink

3 Likes

So, I wanted to Chime in that I have MacOS Sonoma 14.2.1 which is still working to this day on TrueNAS Scale Dragonfish 24.04.2.3.
This post could be useful, as it and my above posts connect some of the older posts to make Sonoma work:

2 Likes

Okay, so I am having an issue with the CLI. It is not keeping the CLA, arch, and VM types uncommented. I save the file and then open it again to verify that it took the changes, but those changes are still uncommented with a #; I can’t seem to get rid of the #

Can I even remove it?

Others have had success with TNS and MacOS what am I doing wrong any ideas?

It is supposed to be uncommented. When you add stuff or make changes you have to uncomment it before you save. Then when you exit and save or whatever and run it, it should comment those lines, but your changes will show up. If your changes show up but are commented that is good. If you have to change an existing commented line, you have to uncomment it before saving, otherwise your changes won’t apply.

Okay, so this is before I exit the yaml


I am not getting an error when trying to save or start the VM I am getting stuck at the UEFI Screen with no FS0 to select.

I try hitting exit and go to the bios device to choose the opencore v21 ISO but I don’t see it.

Pretty sure the issue is what I told you in DMs.

Did you remove the Raw File device with the Opencore iso? If so you need to add it back.


My working setup with the Raw File for Opencore and the disk for the install:

So, you need 2 storage devices like this:


1 Like

From DM:

Let me know if it works.

1 Like

I have two isos mounted as raw files now

First is Open Core
Second is Sequoia

I am trying to boot off of Sequoia and its thinking

As an ISO? What guide are you following?

For my installation, I had a file BaseSystem.img as a raw file for installing MacOS. I obtained it through the official Apple servers using OSX-KVM and used dmg2img to convert it to a .img:

I had previously installed MacOS on proxmox but wanted it working on truenas.

I was loosely trying to do it the same way I did before.