MacOS Monterey as VM on TrueNAS Scale

Nicholas Flamy

Dabbler
Joined
Feb 25, 2023
Messages
28
Yeah, I did.
4 things might be the issue:
  1. Single space in front of `command_line_args:`
  2. It should not all be in one line. (Though it should automatically split it into multiple lines so that's probably not the issue)
  3. Your config might have some things in the wrong order, also, I wouldn't use CPU set to host when you first set it up because I couldn't get it working and others seemed to struggle, try my config first. Also, your keyboard config might not work.
  4. You forgot to hit enter and have a line after it.
 

marshes

Cadet
Joined
Jun 25, 2023
Messages
4
Yeah, I did.
If not mistaken, every time you go into the service menu, it by default comments out the lines. But! Any changes you make by uncommenting, editing, and saving do stick. Just, it seems when you reopen the service menu they get commented out.

As a sanity check, you can change one of the lines that shows up in the GUI like number of cores and see it reflected in the GUI.

Tripped me up a few times too as it seemed like my changes weren’t saving, but they are, just need to remove the hashtag commenting out the line each time you renter the menu and make a change.
 

eseanq

Dabbler
Joined
Mar 25, 2019
Messages
39
If not mistaken, every time you go into the service menu, it by default comments out the lines. But! Any changes you make by uncommenting, editing, and saving do stick. Just, it seems when you reopen the service menu they get commented out.

As a sanity check, you can change one of the lines that shows up in the GUI like number of cores and see it reflected in the GUI.

Tripped me up a few times too as it seemed like my changes weren’t saving, but they are, just need to remove the hashtag commenting out the line each time you renter the menu and make a change.
Okay, glad that this was mentioned! I kept going in and checking and was seeing that it comments the lines again.

I'll have to do some more tests cause it still kept hanging at the apple logo
 

Nicholas Flamy

Dabbler
Joined
Feb 25, 2023
Messages
28
Did you edit the TrueNAS config?



Edit 1:
You start by going to TrueNAS shell, then enter the CLI:
`sudo cli`

Then we'll first get to the vm service:
`service vm`

Then check what VMs you have, we need the id, if this is the first ever vm created on the machine it will be 1 I think:
`query`

Then now that we have the id we cane edit the config (I put the number pne for this command, if your id for your MacOS VM is different then put that number instead):
`update 1`

Now you'll be in the text editor. Look around this topic and you'll find the info you need. I can provide more if you need it. Also, you have to delete the hashtags in front of whatever you change for it to save. Then hit escape and then select yes to save and hit enter.


Edit 2:
So in my screenshots I blurred out the osk. It's the same for every Mac so Google how to find it, it can be found anywhere, technically Apple could get mad about it being shared so that's why I redacted it.

Here's what worked for me:
```
command_line_args: -device isa-applesmc,osk="<redacted>"
-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
-cpu Haswell-noTSX,kvm=on,vendor=GenuineIntel,+kvm_pv_unhalt,+kvm_pv_eoi,+hypervisor,+invtsc
```

I took some example screenshots:
(Notice in the screenshots I deleted the hashtags to edit the config. I hit backspace 3 times for each one, deleting 2 spaces and the hashtag. Not sure if deleting the two spaces is necessary but doing this every time has worked every time for editing this correctly.)
You might wanna check this comment I made if you havent seen the edits. I edited it twice (sorry.)
 

eseanq

Dabbler
Joined
Mar 25, 2019
Messages
39
You might wanna check this comment I made if you havent seen the edits. I edited it twice (sorry.)
Okay so I setup a new VM to start with a clean slate and was able to use these exact settings. I have 2 RAW files attached to the VM, 1 being the OC iso, the other being the installer IMG. Upon trying to start the VM I get a call error
 

Attachments

  • Screen Shot 2024-02-05 at 3.20.56 PM.png
    Screen Shot 2024-02-05 at 3.20.56 PM.png
    24.5 KB · Views: 46

Nicholas Flamy

Dabbler
Joined
Feb 25, 2023
Messages
28
Okay so I setup a new VM to start with a clean slate and was able to use these exact settings. I have 2 RAW files attached to the VM, 1 being the OC iso, the other being the installer IMG. Upon trying to start the VM I get a call error
This is what my set up looks like. (Also, what are your specs, primarily concerned about what CPU you have?)

My boot disk is a VirtIO disk that is a Zvol. The Opencore ISO is a raw file as AHCI.
 

Attachments

  • Screenshot_20240205_152916_Chrome.jpg
    Screenshot_20240205_152916_Chrome.jpg
    39.4 KB · Views: 54
  • Screenshot_20240205_153126_Chrome.jpg
    Screenshot_20240205_153126_Chrome.jpg
    45.8 KB · Views: 36
  • Screenshot_20240205_153212_Chrome.jpg
    Screenshot_20240205_153212_Chrome.jpg
    42.6 KB · Views: 41

eseanq

Dabbler
Joined
Mar 25, 2019
Messages
39
Host CPU is Intel Xeon L5640, and I'm trying to get Monterey to be installed.
 

eseanq

Dabbler
Joined
Mar 25, 2019
Messages
39
Okay, that version should be easier. Also, I forgot to explain the installer config. That has to be a raw file as AHCI.
Any reccomendations for the config? When I try to start the VM I get the same message about the call error
 

Nicholas Flamy

Dabbler
Joined
Feb 25, 2023
Messages
28
Maybe changing to host from Haswell?
We may also have to try Penryn.
The correct thing is probably in a Proxmox tutorial somewhere.


```
command_line_args: -device isa-applesmc,osk="<redacted>"
-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
-cpu host,kvm=on,vendor=GenuineIntel,+kvm_pv_unhalt,+kvm_pv_eoi,+hypervisor,+invtsc
```
 

eseanq

Dabbler
Joined
Mar 25, 2019
Messages
39
Maybe changing to host from Haswell?
We may also have to try Penryn.
The correct thing is probably in a Proxmox tutorial somewhere.


```
command_line_args: -device isa-applesmc,osk="<redacted>"
-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
-cpu host,kvm=on,vendor=GenuineIntel,+kvm_pv_unhalt,+kvm_pv_eoi,+hypervisor,+invtsc
```
Ayyyy. This is working (so far). Installing now!
 

eseanq

Dabbler
Joined
Mar 25, 2019
Messages
39
Not sure what's causing it but the installation seems to lock up with ~10 or so minutes remaining (prior to all of the reboots). Might give it a go with a different OS version or something
 

Nicholas Flamy

Dabbler
Joined
Feb 25, 2023
Messages
28
Not sure what's causing it but the installation seems to lock up with ~10 or so minutes remaining (prior to all of the reboots). Might give it a go with a different OS version or something
Pretty sure it's just failing to reboot on its own. What I did is I'd wait like 30 minutes after it seems to freeze up then reboot it. Then the next time I needed to do that wait a little while before manually rebooting.
 

Nicholas Flamy

Dabbler
Joined
Feb 25, 2023
Messages
28
Also, be mindful that the web spice client seems to lock up after a few minutes of inactivity. Refreshing the page and logging into the client works.
 

luuk

Cadet
Joined
Jan 4, 2024
Messages
3
so are all of you running the MacOS VM without any GPU passthrough?
I can only fit 1 GPU. TNS currently runs fine without any GPU (on a Ryzen 5600x). But if I add 1 GPU, it is not possible to passthrough it because TNS suddenly needs one.

There are 3 options:

  1. do some trickery in TNS, with the risk of having to redo it for each TNS update, as described in https://www.truenas.com/community/t...single-gpu-for-passthrough.100390/post-691678
  2. buy a different CPU with integrated graphics, such as the Ryzen Pro (so I don't loose ECC support)
  3. run Proxmox as main OS and MacOS (and TNS) in a virtual machine
 
Top