User Tools

Site Tools


proxmox:virtual:monterey

This is an old revision of the document!


Install MacOS as Proxmox Virtual Machine

I have yet to install MacOS on Proxmox from the scratch… I converted the existing Unraid VM to Proxmox. The below steps outline that process and I hope to update this page with instructions for a fresh install. If not, do it on Unraid and then follow the below :D

Proxmox Settings

  • OS
    • Do not use any media (we will move over out existing vdisk
    • Type: Other
  • System
    • Graphic card: VMware compatible (we will add GPU passthrough later)
    • Machine: q35
    • BIOS: OVMF (UEFI)
    • EFI Storage: local-lvm
    • Pre-Enroll keys: UNCHECK
    • SCSI Controller: VirtIO SCSI single
    • Qemu Agent: CHECKED
    • Add TPM: UNCHECKED
  • Disks
    • Just create a small blank disk, we are going to erase and replace with already built disk
  • CPU
    • Sockets: 1
    • Cores: 8
    • Type: Haswell
  • Memory
    • 8192
    • Ballooning Device: UNCHECKED
  • Network
    • Bridge: vmbr0
    • Model: VirtIO (paravirtualized)
  • Confirm
    • Don't start vm after creation
    • Finish

Move virtual disk over

  • Erase old disk
    • Go to Datacenter → node name → osx vm
    • Click on Hardware
    • Select hard disk to remove
    • click Detach
    • click Remove
  • Import new disk
    • move the new disk to a location that proxmox can see it (see adding share in the install proxmox section)
    • ssh into proxmox or open a shell (Datacenter → node name, then click >_ Shell
    • go to the folder of that new disk (cd /mnt/pve/unraid/ for example)
    • rename the image to a .raw file
    • type the import command:
      qm importdisk 201 macos_disk.raw local-lvm --format raw
      • where 201 is the vm id and local-lvm is the location.
    • after complete go to the vm → hardware and double click on the unused disk and click Add
    • go to Options → Boot Order and set the bood order to the top.

Set boot flags etc

  • ssh into proxmox or open a shell (Datacenter → node name, then click >_ Shell
  • edit the file /etc/pve/qemu-server/YOUR-VM-ID-HERE.conf
    • update the args: line to look like this:
    • args: -device isa-applesmc,osk=ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc -smbios type=2 -device usb-kbd,bus=ehci.0 -global nec-usb-xhci.msi=off -global ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off -cpu Haswell-noTSX,vendor=GenuineIntel,+invtsc,+hypervisor,kvm=on,vmware-cpuid-freq=on
    • some sites say to put your OSK instead of that phrase… i've always used phrase
  • final .conf file for me looks like:
    • agent: 1
      args: -device isa-applesmc,osk=ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc -smbios type=2 -device usb-kbd,bus=ehci.0 -global nec-usb-xhci.msi=off -global ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off -cpu Haswell-noTSX,vendor=GenuineIntel,+invtsc,+hypervisor,kvm=on,vmware-cpuid-freq=on
      balloon: 0
      bios: ovmf
      boot: order=ide0
      cores: 8
      cpu: Haswell
      efidisk0: local-lvm:vm-201-disk-0,efitype=4m,size=4M
      hostpci0: 0000:05:00
      hostpci1: 0000:11:00,x-vga=1
      hostpci2: 0000:06:00,pcie=1
      ide0: local-lvm:vm-201-disk-1,size=300G
      ide2: none,media=cdrom
      machine: q35
      memory: 8192
      meta: creation-qemu=9.0.0,ctime=1720659249
      name: sonoma
      net0: virtio=BC:24:11:87:A6:24,bridge=vmbr0,firewall=1
      numa: 0
      onboot: 1
      ostype: other
      scsihw: virtio-scsi-single
      smbios1: uuid=7d279eae-4fb5-43c0-a88e-dbed318fc746
      sockets: 1
      vmgenid: 8317cc90-c5a3-4296-9389-3905ccd0c139
  <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=ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc'/>
    <qemu:arg value='-smbios'/>
    <qemu:arg value='type=2'/>
    <qemu:arg value='-cpu'/>
    <qemu:arg value='host,vendor=GenuineIntel,+invtsc,+hypervisor,kvm=on,vmware-cpuid-freq=on'/>
    <qemu:arg value='-global'/>
    <qemu:arg value='ICH9-LPC.acpi-pci-hotplug-with-bridge-support=off'/>
    <qemu:arg value='-global'/>
    <qemu:arg value='nec-usb-xhci.msi=off'/>
  </qemu:commandline>
  • and if you have an AMD chip like me… change
    <qemu:arg value='-cpu'/>
    <qemu:arg value='host,vendor=GenuineIntel,+invtsc,+hypervisor,kvm=on,vmware-cpuid-freq=on'/>

to

    <qemu:arg value='-cpu'/>
    <qemu:arg value='Haswell-noTSX,vendor=GenuineIntel,+invtsc,+hypervisor,kvm=on,vmware-cpuid-freq=on'/>
  • Now your install media in the boot loader should load. Select it, then your hard drive during each restart until it boots up!

Links: https://github.com/thenickdude/KVM-Opencore/issues/47, https://www.nicksherlock.com/2022/10/installing-macos-13-ventura-on-proxmox/

Update to Sonoma

  • After completing all the steps to get a working copy of Ventura… I updated to Sonoma using the Update feature in system preferences.
  • You can probably follow the steps listed in the above section (Update to Ventura) and just select Sonoma and it will probably upgrade from Monterey to Sonoma… I might check that sometime in the future.
  • I've been running Sonoma all of 10 minutes now and everything “SEEMS” to work. Will update more as we go!
    • Wifi seems to cause everything to crash when you select the network tab (may be the same issue that was present in Ventura with having to hard restart the server to get wifi to not radio kill or whatever.
    • SMB shares are painfully slow to connect / don't work most of the time.
    • bluetooth doesn't work.
  • Installing a fresh copy and going straight from Monterey to Sonoma to see if that helps.
    • Fresh copy going straight from Monterey to Sonoma seems to have been MUCH better.
    • Wifi still has same issue as above (maybe need a newer kext when it comes out)
    • SMB shares work great now.
    • bluetooth still doesn't work but at least you can turn it on and off. Just won't find any devices.

Fixes and Tidy Up

Some of these may not apply to you but here's what I had to do to fix certain things as well as some things I did to tidy up my install

  • GPUs
  • Ultra Wide monitor? (works for Monterey and Ventura and Sonoma)
  • Apple Login (works for Monterey and Ventura and Sonoma)
    • Download hackintool (optional but makes things easier). (https://github.com/headkaze/Hackintool)
    • open it (using same steps as you first used to open OpenCore Configurator) and go to System → Peripherals
    • Network interfaces should have a en0 but the built in is unchecked (mine was actually checked on future installs so i don't know if the following steps were still required but i did them anyway :D / turns out I had to do this to get Documents and Desktop sync to turn on… or just needed a restart… either way I did it and that fixed that part in Ventura)
    • open opencore → mount EFI → open config.plist
    • go to DeviceProperties and select ethernet controller from list of PCI Devices at bottom (if it's not listed already)
    • click the + on the far bottom right of the right box to add a property to the ethernet controller.
      • For “key” use: built-in
      • For “type” use: Data
      • For “value” use: 01
    • save and reboot
    • log in to apple services!
    • The hackintool technically isn't needed but it provides an easy graphical way to see if that “built-in” check box is checked.
  • Intel Bluetooth (only follow these steps for an Intel based Bluetooth card) (works for Monterey and Ventura)
    • Download BrcmPatchRAM-2.6.4-RELEASE from https://github.com/acidanthera/BrcmPatchRAM/releases
    • Download Lilu-1.6.2-RELEASE from https://github.com/acidanthera/Lilu/releases
    • unzip all
    • open opencore → mount EFI → Mount Partition → Open Partition → Go to OC folder
    • copy IntelBTPatcher.kext and IntelBluetoothFirmware.kext from IntelBluetooth zip file into Kext folder
    • copy BlueToolFixup.kext from BrcmPatchRAM zip file into Kext folder
    • copy Lilu.kext from Lilu-1.6.2 zip file into Kext folder
    • open config.plist → go to Kernel
    • drag from Kexts folder the .kext files that are NOT in the list under Kernel.
      • IntelBTPatcher and IntelBluetoothFirmware were the only two not already there for me.
    • Put IntelBTPatcher above IntelBluetoothFirmware above BlueToolFixup
    • Uncheck all the rest of the BCRM ones (not using them… i'm using Intel)
    • Save, reboot, profit.
  • Intel Wireless (works for Monterey and Ventura until the VM is rebooted… then requires server reboot and will work again until VM rebooted… still working on this one. Sonoma seems to suffer similar issues as Ventura but instead of just not working, it crashes the computer when clicking on “network” in settings.)
    • Download Airportitlwm_v2.1.0_stable_Monterey.kext.zip from https://github.com/OpenIntelWireless/itlwm/releases/tag/v2.1.0
    • Unzip folder
    • open opencore → mount EFI → Mount Partition → Open Partition → Go to OC folder
    • copy Airportitlwm.kext from zip into Kext folder
    • open config.plist → go to Kernel
    • drag from Kexts folder the airportitlwm.kext file in the list under Kernel.
    • I put it all the way to the bottom.
    • Go to Misc → Security
    • Change SecureBootModel to Default
    • Save → Shutdown
    • Update VM xml file to passthru the wifi card
          <hostdev mode='subsystem' type='pci' managed='yes'>
            <driver name='vfio'/>
            <source>
              <address domain='0x0000' bus='0x06' slot='0x00' function='0x0'/>
            </source>
            <address type='pci' domain='0x0000' bus='0x07' slot='0x00' function='0x0'/>
          </hostdev>
    • Profit
  • Fix Memory Modules Misconfigured warning (suppress it) (only required when using Ventura and Sonoma with MacPro7,1)
    • Open OpenCore Configurator and go to Kernel
    • Go to Download/Update kexts and drag the RestrictEvents.kext file into that window.
    • Not sure of proper position in the list but I moved it to bottom
    • Go to NVRAM then UUID (at bottom of list) then boot-args
    • Add “revpatch=pci revblock=pci” to the list of boot-args
    • Go to PlatformInfo → DataHub - Generic and check the “AdviseFeatures” block
    • Save and reboot.
  • Move VM disks
    • This one is easy and just puts my mind at ease to create future Mac VMs without overwriting data AND to make everything look the same in my vms folder.
    • copy the vm folder that contains your macos_disk.img file to it's new name.
      cp -r Macinabox\ Monterey/ monterey/
    • make sure you edit the xml file to point to the new location.
    • you can also change permissions to match other folders and edit groups and users.
  • Move NVRAM to normal location.
    • open up XML to get the UUID of the vm.
    • copy the custom NVRAM currently used to the default NVRAM folder for unraid and use that UUID while following the naming convention.
       cp Macinabox_VARS-pure-efi.fd /etc/libvirt/qemu/nvram/the-vms-UUID-number-here_VARS-pure-efi.fd
    • make sure you edit the xml file to point to the new location.
  • Point OVMF to normal location.
    • For this one, you can copy your custom one into the default folder.
      cp Macinabox_CODE-pure-efi-fd /usr/share/qemu/ovmf-x64/
    • OR you can do what I did and use the one that is already in there (unraid's default one) and just follow the next step (make sure you get the one that is the same size).
    • make sure you edit the xml file to point to the new location.
  • csr-active-config
    • This was set to 260F and I changed it to 00000000 to get rid of the error in the OpenCore Validator. I only did this in Sonoma and I haven't yet seen any issues it caused.
    • Will report back!
proxmox/virtual/monterey.1722185460.txt.gz · Last modified: by dirk