Installing macOS Mojave 10.14 on Proxmox 5.4

With the release of macOS Catalina 10.15, this tutorial is now obsolete! Please check out the new Catalina tutorial here.

This tutorial for installing macOS Mojave has been adapted for Proxmox 5.4 from Kholia’s GitHub project for installing into vanilla KVM. There is more documentation there which will help out with enabling extra features and diagnosing problems!

Requirements

I’ll assume you already have Proxmox 5.4 installed. You also need a real Mac available in order to fetch the OSK key.

Your Proxmox host computer’s CPU must support SSE 4.2, so for Intel your CPU must be at least as new as Nehalem, which was the first CPU generation to bear the “Core” i5/i7 branding. Older CPUs will cause the finder to repeatedly crash after installation completes (with an Illegal Instruction exception in the graphics code).

Apparently modern AMD CPUs also support SSE 4.2 and can be used with this guide without any modification (maybe Bulldozer and certainly Ryzen), but I haven’t tested this myself.

First step: Create an installation ISO

On a Mac machine, download and run fetch-macOS.py in a terminal to download the Mojave recovery image from the Apple software distribution server:

This results in a ~460MB “BaseSystem.dmg” file in the current directory. Convert that dmg into an “iso” like so:

hdiutil convert BaseSystem.dmg -format RdWr -o Mojave-installer.iso
mv Mojave-installer.iso.img Mojave-installer.iso

This is actually a raw disk image, not a true ISO, but Proxmox has better tools for picking and re-using ISO images than disk images. Upload the “ISO” to your Proxmox server’s ISO store (typically /var/lib/vz/template/iso).

It is possible to run this download script on Linux instead. In that case, you need to install the “dmg2img” package on your system, and replace the “hdiutil” command invocation with:

dmg2img BaseSystem.dmg Mojave-installer.iso

Prepare a Clover image

We’ll be using Clover as a bootloader for Mojave.

Download this Clover disk image (that I built using kholia’s build script from Clover r4920), unpack it, and upload it to Proxmox’s ISO store at /var/lib/vz/template/iso. Although it has a .iso file extension, this is actually a hard disk image.

Fetch the OSK authentication key

macOS checks that it is running on real Mac hardware, and refuses to boot on third-party hardware. You can get around this by reading an authentication key out of your real Mac hardware (the OSK key). Run the first bit of C code from this page (you’ll need XCode installed) and it’ll print out the 64 character OSK for you. Make a note of it.

Every Mac uses the same OSK, so don’t be surprised if it doesn’t look like a random string!

Create the VM

From the Proxmox web UI, create a new virtual machine as shown below.

In the Options page for the VM, ensure that “use tablet for pointer” is set to “Yes”.

In the Hardware page for the VM, add a second DVD drive at IDE0, set it to use your Mojave-installer.iso.

Don’t try to start the VM just yet. First, SSH into your Proxmox server so we can make some edits to the configuration files.

Edit /etc/pve/qemu-server/YOUR-VM-ID-HERE.conf (with nano or vim). Add this line, being sure to substitute the OSK you extracted earlier into the right place:

args: -device isa-applesmc,osk="THE-OSK-YOU-EXTRACTED-GOES-HERE" -smbios type=2 -cpu Penryn,kvm=on,vendor=GenuineIntel,+invtsc,vmware-cpuid-freq=on,+pcid,+ssse3,+sse4.2,+popcnt,+avx,+aes,+xsave,+xsaveopt,check -device usb-kbd,bus=ehci.0,port=2

We’re telling macOS that the CPU is Penryn (it doesn’t seem to like booting otherwise), but we’re enabling all the new CPU features found in Nehalem which macOS will require, plus some optional features found in later generations (AVX/AES).

Find the line that define the two “ISOs” (ide0 and ide2), and remove the “,media=cdrom” part from them. Add “,cache=unsafe” in its place. This will treat these as hard disks rather than DVD drives.

Save your changes, return to the Options tab, and change the boot order to put IDE2 (the Clover image) first. Your final VM configuration file should resemble this:

args: -device isa-applesmc,osk="..." -smbios type=2 -cpu Penryn,kvm=on,vendor=GenuineIntel,+invtsc,vmware-cpuid-freq=on,+pcid,+ssse3,+sse4.2,+popcnt,+avx,+aes,+xsave,+xsaveopt,check -device usb-kbd,bus=ehci.0,port=2
balloon: 0
bios: ovmf
boot: cdn
bootdisk: ide2
cores: 4
cpu: Penryn
efidisk0: vms:vm-144-disk-1,size=128K
ide0: isos:iso/Mojave.iso,cache=unsafe
ide2: isos:iso/clover-r4920.iso,cache=unsafe
machine: q35
memory: 8192
name: mojave
net0: vmxnet3=xx:xx:xx:xx:xx:xx,bridge=vmbr0,firewall=1
numa: 0
ostype: other
sata0: vms:vm-144-disk-0,cache=unsafe,size=64G
smbios1: uuid=xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx
sockets: 1
vga: vmware

Configure Proxmox

On Proxmox, run “echo 1 > /sys/module/kvm/parameters/ignore_msrs” to avoid a bootloop during macOS boot. To make this change persist across Proxmox reboots, run:

echo "options kvm ignore_msrs=Y" >> /etc/modprobe.d/kvm.conf && update-initramfs -k all -u

You must now installpatched version of Proxmox’s OVMF library in order to be able to boot Mojave.

Install Mojave

Now start up your VM.

Go to the Console tab, quickly hit Escape or F2 at the Proxmox logo to enter the OVMF configuration. If your keyboard doesn’t work, leave the Console tab, stop the VM, start the VM, then re-enter the console tab.

Follow the steps above to set the screen resolution to 1920×1080 and “reset” to apply the new settings (not “continue”). This step is required to avoid scrambled graphics on boot and a hang (Clover resolution must match OVMF resolution, or else the Apple logo will be off-centre and the progress bar will be smeared across the screen, resulting in a lockup).

Note that in future you may find that when initially started, your VM doesn’t properly apply the the 1920×1080 screen resolution until you hit “Restart Computer” in Clover when the Clover menu appears (or “Reset” on the VM). You’ll notice this happening when the “Proxmox” logo fills a large area of the screen on boot due to the low resolution.

It should now boot into Clover.

Press enter to boot the “Boot macOS Install from macOS Base System” entry and the installer should appear. Choose your language.

Our virtual hard drive needs to be erased/formatted before we can install to it, so select the Disk Utility option. Follow the steps below to format the disk:

Now we’re ready to begin installation!

After the first stage of installation, the VM should reboot itself and automatically continue installation by booting from the hard drive, then reboot itself a second time and automatically boot from “filevault prebooter”. Note that an Internet connection is required during installation, as macOS needs to download Mojave.

Answer the initial install questions, and you’ll be logged on! (Note that you’ll probably want to hold off on logging into your iCloud account until you’ve configured your SMBIOS to your liking in Clover Configurator)

Make the Clover install permanent

We’re currently booting using Clover from the attached Clover ISO. Let’s install that to the hard drive instead. Pop open Terminal and run “diskutil list” to see what drives we have available.

Use “sudo dd if=<source> of=<dest>” to copy the “EFI” partition from the Clover CD and overwrite the EFI partition on the hard disk. The Clover CD is the small disk with the “linux filesystem” on it, and the main hard disk is the one with the large Apple_APFS “Container” partition on it.

In my case these EFI partitions ended up being called disk1s1 and disk0s1 respectively, so I ran “sudo dd if=/dev/disk1s1 of=/dev/disk0s1” (N.B. if you get these names wrong, you will erase the wrong disk and you’ll have to start the installation over again!).

Now shut down the VM, and remove both the Clover and the Mojave installer drives from the Hardware tab. On the Options tab, edit the boot order to place SATA0 as the first disk. Boot up. If everything went well, you should see the Clover boot menu, and you can select “Boot macOS from Main” to boot Mojave.

Choose “boot macOS from Main”

Sleep management

I found that I was unable to wake Mojave from sleep using my mouse or keyboard. You can either disable system sleep in Mojave’s Energy Saver settings to avoid this, or you can manually wake the VM up from sleep from Proxmox by running:

qm monitor YOUR-VM-ID-HERE 
system_wakeup
quit

“Prohibited” sign on boot

On a regular Hackintosh this is typically a sign that the boot drive can’t be read, but that situation is difficult to encounter with this VM setup. Nevertheless, I receive a “prohibited” sign during boot in perhaps 1 out of 20 system boots at random (maybe a timing bug?) If this happens, just hit “reset” for the VM to retry  (no need to stop and start).

If you get it persistently, something is going wrong with the boot. You can boot macOS in “verbose” mode by hitting space on the macOS option in Clover and ticking the verbose option. This’ll give you a log during booting that can narrow down when the problem occurs.

Editing your Clover/EFI settings

You can use the Clover Configurator tool (Global Edition) to edit your Clover “config.plist” configuration file, which is stored in the hard drive’s EFI partition. This tool should mount the EFI partition for you. If you want to mount it without using Clover Configurator, first check the device name of the EFI partition in the terminal:

~$ diskutil list
/dev/disk0 (external):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme 512.1 GB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_HFS Main 511.8 GB disk0s2

Then you can mount it like so:

sudo mkdir /Volumes/EFI
sudo mount -t msdos /dev/disk0s1 /Volumes/EFI

Video performance

Because there is no guest video acceleration available for macOS, video performance is poor.

In Google Chrome in the guest you will need to toggle off the setting to “use hardware acceleration when available” to improve issues with elements not being drawn or flickering (especially video). Safari may be a better choice.

macOS’s built in “Screen Sharing” feature offers dramatically better framerates and latency than Proxmox’s browser-based VNC console, so if you have a real Mac to act as a viewing console, you can enable that in the VM’s “Sharing” settings and connect to the VM using the Screen Sharing app from your Mac instead:

Apparently Screen Sharing is also compatible with VNC clients like RealVNC, so you should be able to connect to it from Linux or Windows consoles using RealVNC.

VMWare Fusion for Mac includes macOS guest drivers that support the VMWare video adapter that QEMU emulates. After installing Fusion, you can find these by right-clicking Fusion, clicking “show package contents”, then browsing to “Contents/Library/isoimages”. Double click “darwin.iso” to open it, then run the “Install VMWare Tools” option to install the driver, and restart. You can check that the driver has loaded by running “kextstat | grep -v com.apple”.

Unfortunately installing these VMWare drivers appears to offer little or no improvement in video performance – they may just be designed to provide basic framebuffer functionality.

The real magic bullet for video performance is to pass through a compatible video card using PCIe passthrough (though presently Mojave does not support most NVidia cards). This offers near-native performance. You can read more about how I’m using PCIe passthrough on my own installation here.

USB passthrough

Since I want to use this as my primary computer, I want to use a USB keyboard and mouse plugged directly into Proxmox, rather than sending my input through the web VNC console.

Proxmox has good documentation for USB passthrough. Basically, run “qm monitor YOUR-VM-ID-HERE”, then “info usbhost” to get a list of the USB devices connected to Proxmox:

qm> info usbhost
Bus 3, Addr 12, Port 6, Speed 480 Mb/s
Class 00: USB device 8564:1000, Mass Storage Device
Bus 3, Addr 11, Port 5.4, Speed 12 Mb/s
Class 00: USB device 04d9:0141, USB Keyboard
Bus 3, Addr 10, Port 5.1.2, Speed 12 Mb/s
Class 00: USB device 046d:c52b, USB Receiver
Bus 3, Addr 9, Port 14.4, Speed 12 Mb/s
Class 00: USB device 046d:c227, G15 GamePanel LCD
Bus 3, Addr 8, Port 14.1, Speed 1.5 Mb/s
Class 00: USB device 046d:c226, G15 Gaming Keyboard

In this case I can add my keyboard and mouse to USB passthrough by quitting qm, then running:

qm set YOUR-VM-ID-HERE -usb1 host=04d9:0141
qm set YOUR-VM-ID-HERE -usb2 host=046d:c52b

This saves the devices to the VM configuration for you. It’s possible to hot-add USB devices, but I just rebooted my VM to have the new settings apply.

You can also pass through USB devices by passing through an entire USB controller using Proxmox’s PCIe passthrough feature.

381 thoughts on “Installing macOS Mojave 10.14 on Proxmox 5.4”

  1. Proxmox 5.4-13
    Started the VM
    Got to Clover, pressed return (on the drive icon)
    Got an apple logo and half-way through the progress bar .. reset and back to proxmox
    any ideas please?

    1. Press space on the icon and choose verbose mode and boot, this’ll let you see what happens just before the reboot. You can also tick the option for no reboot on panic.

  2. Hi @ll,
    hi Nicholas!
    I stuck on rebulid the VM. Some *.conf’s were deleted on one of my Proxmox-Hosts.
    I rebuilt an conf for my allready running macOS14 VM, machine. I was take the old efi and disk (with clover included) and put them in the new conf. Clover is running fine, i choose the macOS14-vm-disk to run with “-v” (verbose-mode) and the startup hangs at:
    “End RandomSeed
    +++++++++++++++++++++++++++++++++++++++…”
    – pve-version 5.4-13
    – RAM is on 4096
    – the echo command from above was run
    – the patch with a debian 9 LXC was already installed (“make”)

    i’ve no more ideas about solving this :/ may anybody else ๐Ÿ˜‰

    NICHOLAS, THANK YOU FOR THE COOL TUTORIAL !!
    cheers
    Andrew

    1. That’s exactly the symptom you get if the patched pve-edk2-firmware package wasn’t installed – double check that you ran “dpkg -i” on that built package on the Proxmox host (and not accidentally inside the LXC container).

  3. Hi Nicholas

    I followed your great tutorial but I wasn’t able to boot in to the installer.
    Everything was fine on the first look, but I always got an error during boot of the installer.

    Here’s a Screenshot of the last message:
    https://postimg.cc/dkJd5ndD

    And here you can see the whole boot process:
    https://postimg.cc/fVX9Z1fJ

    Does you’ve any idea what’s going wrong?

    Here’s also an output of my config file:
    https://pastebin.com/gH8sxVXE

    Thanks in advance for your time!

    1. In your OSK it looks like your editor has converted the “(c)” into a Unicode copyright symbol – you’ll need to switch that back.

      1. Hm… I’ve installed 10.14.6 (it took approx. 20-25 minutes on my ssd).
        After final reboot there’s no “Macintosh HD”. Only the initial installer is visible. What I’m doing wrong?

  4. You should update your tutorial to use VirtIO block instead of SATA. Latest Mojave version added support for it and it’s MUCH faster.

    1. Did you get a chance to test this yourself?

      Does it work?

      There were other reports online that it only works in “legacy” mode, whatever that means. (SeaBIOS?)

  5. Hi,
    I installed mojave with the mentioned args. Later I tried to set some other args, more depending on my CPU. I can not measure any performance advantages.
    Is it necessary to start the mojave installation process again with the new args?

  6. Hi,

    been reading through this post and comments…
    I’d like to create a High Sierra VM on proxmox 6 with GPU and USB passthrough, BUT I’m a total noob…
    Can i just use this guide with no prior knowledge or can you point me to a step-by-step guide for dummies.
    I only have one GPU (vega 64), so i guess i need a second one for the host, right ?
    Thanks for any help

    1. The host doesn’t need a GPU because Proxmox runs headless anyway.

      I don’t have a guide for passthrough on my blog, but you can check out the Proxmox wiki for PCIe passthrough, and my post that shows my passthrough config:

      https://www.nicksherlock.com/2018/11/my-macos-vm-proxmox-setup/

      Note that Vega GPUs currently have a problem where your host will need to be power-cycled before the GPU can be used a second time. (“Vega reset bug”)

      1. so basically, could i already your your tut here as a copy-paste method to get things rolling and afterwards tweaking it by adding the passthrough method by trial or error or is this wishful thinking ?
        PS : how much time takes your tut to implement as such ?

        1. BTW I realised after I posted my last reply that the Vega reset bug is likely to be a problem for you if you only have one GPU – since your system will initialise your Vega during boot, it won’t be able to be reset for the VM to use afterwards. I’m not certain if this is fatal on Vega, it could be that because Proxmox will only be running it in text mode, it’s not an issue. If your motherboard/CPU has inbuilt graphics, you can set your host to use that instead which solves that issue.

          This tutorial for installing macOS is complete as far as I know, so all the instructions you need are right here on this page. For passthrough you’ll need other resources.

  7. ok, thanks for clearing up that issue.
    From where should I expect a solution for this bug : AMD themselves or the proxmox community ?
    In the meantime, would it be safer to get a second ‘cheap’ GPU for the host ? If so, what budget cards would you recommend ?

  8. @nicksherlock I want to send my appreciation for your time and work. I am running Proxmox 6.0-1 on a Dell T620 with dual 2.0ghz Xeon’s for a total of 24 logical cores and as of now only using onboard graphics. I have followed each step of the guide and am able to boot into clover as well as see the OSX installer after changing said disk back to media=cdrom. What I am experiencing is a kernel panic at AppleSMBusPCI::start failed to get acpi path for provider, which then boot loops me. I have applied QEMU patch, first by downloading it and installing, then after many failed attempts to boot as well as reading this error could be a QEMU issue, I also patched by compiling from source. Both times I hardened the patch so it would persist after reboot as your post suggests. I also ran systemctl restart daemon to make sure all settings took effect. To my dismay I am still unable to boot into the installer. Have you any idea what else might cause this type of kernel panic? I have tried to boot with every flag in clover as well as made sure my display was set to the correct aspect ratio. If you have time to reply to this thread I would greatly appreciate it, either way thanks for the work man.

    1. Most likely your OSK in your args is incorrect. Double check it and make sure that the quotes around it haven’t been replaced with curly-quotes by your text editor, and the (c) hasn’t been replaced by a Unicode copyright symbol.

      No QEMU patch is required – pve-edk2-firmware is the one to install, which is a patch to the OVMF firmware, not QEMU.

  9. Hello, my configuration file is like this, but it doesn’t load even 50% of the initial load and it goes back to clover.
    With verbose enabled returns error ** AppleSMBusPCI :: start failed to get acpi path for provider

    {{{
    args: -device isa-applesmc,osk=”ourhardworkbyt*********l(c)AppleComputerInC” -smbios type=2 -cpu Penryn,kvm=on,vendor=GenuineIntel,+invtsc,vmware-cpuid-freq=on,+pcid,+ssse3,+sse4.2,+popcnt,+avx,+aes,+xsave,+xsaveopt,check -device usb-kbd,bus=ehci.0,port=2
    balloon: 0
    bios: ovmf
    boot: cdn
    bootdisk: ide2
    cores: 4
    cpu: Penryn
    ide0: local:iso/Mojave-installer.iso,cache=unsafe
    ide2: local:iso/clover-r4920.iso,cache=unsafe
    machine: q35
    memory: 4096
    name: mojave
    net0: vmxnet3=0A:EA:A4:6E:B0:5E,bridge=vmbr0,firewall=1
    numa: 0
    ostype: other
    sata0: local-zfs:vm-102-disk-0,cache=unsafe,size=64G
    smbios1: uuid=4c6f2641-5629-4199-8a27-a05ef845af5e
    sockets: 1
    vga: vmware
    vmgenid: 79388567-7321-4dde-83da-081460e367f5
    }}}

    1. Your osk ends in “C” but it should be “c”. Also in your comment the quotes around the OSK are curly quotes, but they need to be straight ones. This might just be WordPress’s fault though.

        1. I did the first part of the installation, got to install 6gb on the disk, but on reboot was on the glover screen. Could you tell me what it can be? I didn’t find anything in the comments

  10. Hi,
    First, thank you,I successfully installed macOS on my Proxmox!

    But now I have a problem about GPU passthrough.

    I have a vega64 GPU works well with another Windows10 VM in the same host Proxmox.

    But when I add it into the macOS VM and try to boot it,it failed and showed status like this:
    kvm: warning: host doesn’t support requested feature: CPUID.01H:ECX.pcid [bit 17]
    kvm: warning: host doesn’t support requested feature: CPUID.01H:ECX.pcid [bit 17]
    kvm: warning: host doesn’t support requested feature: CPUID.01H:ECX.pcid [bit 17]
    kvm: warning: host doesn’t support requested feature: CPUID.01H:ECX.pcid [bit 17]
    kvm: warning: host doesn’t support requested feature: CPUID.01H:ECX.pcid [bit 17]
    kvm: warning: host doesn’t support requested feature: CPUID.01H:ECX.pcid [bit 17]
    kvm: warning: host doesn’t support requested feature: CPUID.01H:ECX.pcid [bit 17]
    kvm: warning: host doesn’t support requested feature: CPUID.01H:ECX.pcid [bit 17]
    kvm: -device vfio-pci,host=46:00.0,id=hostpci1.0,bus=ich9-pcie-port-2,addr=0x0.0,multifunction=on: vfio 0000:46:00.0: device is already attached
    TASK ERROR: start failed: command ‘/usr/bin/kvm -id 101 -name macos -chardev ‘socket,id=qmp,path=/var/run/qemu-server/101.qmp,server,nowait’ -mon ‘chardev=qmp,mode=control’ -chardev ‘socket,id=qmp-event,path=/var/run/qmeventd.sock,reconnect=5’ -mon ‘chardev=qmp-event,mode=control’ -pidfile /var/run/qemu-server/101.pid -daemonize -smbios ‘type=1,uuid=3cf7f740-bf7e-4f5e-ab53-d7cf127a64d5’ -drive ‘if=pflash,unit=0,format=raw,readonly,file=/usr/share/pve-edk2-firmware//OVMF_CODE.fd’ -drive ‘if=pflash,unit=1,format=raw,id=drive-efidisk0,file=/dev/zvol/hackintosh/vm-101-disk-1’ -smp ‘8,sockets=1,cores=8,maxcpus=8’ -nodefaults -boot ‘menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg’ -vnc unix:/var/run/qemu-server/101.vnc,password -cpu ‘Penryn,+kvm_pv_unhalt,+kvm_pv_eoi,enforce,kvm=off,vendor=GenuineIntel’ -m 12288 -device ‘vmgenid,guid=d858d21f-340b-4b54-8dd3-873e7d725f44’ -readconfig /usr/share/qemu-server/pve-q35-4.0.cfg -device ‘usb-tablet,id=tablet,bus=ehci.0,port=1’ -device ‘vfio-pci,host=46:00.0,id=hostpci0.0,bus=ich9-pcie-port-1,addr=0x0.0,multifunction=on’ -device ‘vfio-pci,host=46:00.1,id=hostpci0.1,bus=ich9-pcie-port-1,addr=0x0.1’ -device ‘vfio-pci,host=46:00.0,id=hostpci1.0,bus=ich9-pcie-port-2,addr=0x0.0,multifunction=on’ -device ‘vfio-pci,host=46:00.1,id=hostpci1.1,bus=ich9-pcie-port-2,addr=0x0.1’ -device ‘vmware-svga,id=vga,bus=pcie.0,addr=0x1’ -iscsi ‘initiator-name=iqn.1993-08.org.debian:01:e3ec6572e06c’ -device ‘ahci,id=ahci0,multifunction=on,bus=pci.0,addr=0x7’ -drive ‘file=/dev/zvol/hackintosh/vm-101-disk-0,if=none,id=drive-sata0,format=raw,cache=none,aio=native,detect-zeroes=on’ -device ‘ide-hd,bus=ahci0.0,drive=drive-sata0,id=sata0,bootindex=100’ -netdev ‘type=tap,id=net0,ifname=tap101i0,script=/var/lib/qemu-server/pve-bridge,downscript=/var/lib/qemu-server/pve-bridgedown’ -device ‘vmxnet3,mac=AE:09:8F:13:DA:E7,netdev=net0,bus=pci.0,addr=0x12,id=net0,bootindex=200’ -machine ‘type=q35’ -device ‘isa-applesmc’ -smbios ‘type=2’ -cpu ‘Penryn,kvm=on,vendor=GenuineIntel,+invtsc,vmware-cpuid-freq=on,+pcid,+ssse3,+sse4.2,+popcnt,+avx,+aes,+xsave,+xsaveopt,check’ -device ‘usb-kbd,bus=ehci.0,port=2” failed: exit code 1

      1. Oh,yes!
        My vega64 is 4,6:00.0 ,and 46:00.1 is theVEGA’s HD audio controller. But in the webUI,when I add both them into my windows10 VM,the hardware shows 46:00.0 for GPU and 46:00.1 for AUDIO controller.And it works fine.

        However, in the Hardware of macOS VM, both of them shows as 46:00(hotpci1 is “46:00,pcie=1,x-vga=1” , hotpci2 is “46:00,pcie=1”).
        I try delete the second one and add it again / delete both of them and add both of them ,all failed.Every time they both 46:00 and unable to boot.

        1. Don’t use the UI, just edit the VM config file in /etc/pve/qemu-server. You only need one entry for the card (46:00), that automatically includes both the sub devices (.0 and .1)

          1. Yes, I try edit vm_id.conf and add line “hostpci0: 46:00,pcie=1,x-vga=1”.
            Boot is OK but nothing show in the screen and still

            kvm: warning: host doesn’t support requested feature: CPUID.01H:ECX.pcid [bit 17]
            kvm: warning: host doesn’t support requested feature: CPUID.01H:ECX.pcid [bit 17]
            kvm: warning: host doesn’t support requested feature: CPUID.01H:ECX.pcid [bit 17]
            kvm: warning: host doesn’t support requested feature: CPUID.01H:ECX.pcid [bit 17]
            kvm: warning: host doesn’t support requested feature: CPUID.01H:ECX.pcid [bit 17]
            kvm: warning: host doesn’t support requested feature: CPUID.01H:ECX.pcid [bit 17]
            kvm: warning: host doesn’t support requested feature: CPUID.01H:ECX.pcid [bit 17]
            kvm: warning: host doesn’t support requested feature: CPUID.01H:ECX.pcid [bit 17]
            TASK OK

            1. Did you try resetting the host to avoid the Vega Reset Bug?

              Did you set “vga: none” to disable the emulated graphics?

        2. I try only add 46:00.0 to VM but still shows 46:00,pcie=1,x-vga=1
          not 46:00.1.
          And this time VM can boot,but no signal to screen.Also something wrong:

          kvm: warning: host doesn’t support requested feature: CPUID.01H:ECX.pcid [bit 17]
          kvm: warning: host doesn’t support requested feature: CPUID.01H:ECX.pcid [bit 17]
          kvm: warning: host doesn’t support requested feature: CPUID.01H:ECX.pcid [bit 17]
          kvm: warning: host doesn’t support requested feature: CPUID.01H:ECX.pcid [bit 17]
          kvm: warning: host doesn’t support requested feature: CPUID.01H:ECX.pcid [bit 17]
          kvm: warning: host doesn’t support requested feature: CPUID.01H:ECX.pcid [bit 17]
          kvm: warning: host doesn’t support requested feature: CPUID.01H:ECX.pcid [bit 17]
          kvm: warning: host doesn’t support requested feature: CPUID.01H:ECX.pcid [bit 17]
          TASK OK

          1. “46:00,pcie=1,x-vga=1” is perfect, that’s exactly what you want. That includes both 46:00.0 and 46:00.1.

            Vega cards suffer from the Vega Reset Bug, have you tried restarting the host?

            Those warnings ending in “pcid” are just telling you that you tried to pass that CPU feature but your CPU doesn’t support it. You can ignore that. That’s a Meltdown bug mitigation feature.

  11. Sorry I miss one of your reply and during that time.
    try use UI to add only 46:00.0,its failed
    also try edit conf to add 46:00,also failed.

    Now I first change setting by edited conf and then reboot the host,
    same wrong massage appeared again.

    1. Those warnings aren’t causing a problem and you can ignore them.

      “hostpci0: 46:00,pcie=1,x-vga=1” is the correct line and it sounds like you already have that.

      Do you see the Proxmox boot logo on the screen at least? Try one of the other connectors on the card too.

      Post your VM config.

      1. I have two monitor and they always pluged into the two HDMI port of VEGA64, both them shows nothing.
        Then I try only No.1 HDMI port with monitor1,
        only No1 hdmi port with monitor2,
        No2 with Monitor1,
        No2 with Monitor2.
        All of them failed, by the way can’t see Proxmox boot logo on the screen.

        Since I remember have another GT710 card on board(when I was use ESXI I need it).I tried add it to macOS VM(use UI,with out audio controller),and try boot VM.(with HDMI to monitor1)
        Then,it works,still shows those pcid massage ,but can see Proxmox logo and also see the CLOVER BOOT MANAGER.
        So,what wrong with the VEGA card?

      2. First, the conf of use GT710
        args: -device isa-applesmc,osk=”…” -smbios type=2 -cpu Penryn,kvm=on,vendor=GenuineIntel,+invtsc,vmware-cpuid-freq=on,+pcid,+ssse3,+sse4.2,+popcnt,+avx,+aes,+xsave,+xsaveopt,check -device usb-kbd,bus=ehci.0,port=2
        balloon: 0
        bios: ovmf
        boot: cn
        bootdisk: sata0
        cores: 8
        cpu: Penryn
        efidisk0: hackintosh:vm-101-disk-1,size=128K
        hostpci0: 43:00,pcie=1,x-vga=1
        machine: q35
        memory: 12288
        name: macos
        net0: vmxnet3=AE:09:8F:13:DA:E7,bridge=vmbr0,firewall=1
        numa: 0
        ostype: other
        sata0: hackintosh:vm-101-disk-0,size=195G
        smbios1: uuid=3cf7f740-bf7e-4f5e-ab53-d7cf127a64d5
        sockets: 1
        usb0: host=7-3
        usb1: host=7-2
        vga: none
        vmgenid: d858d21f-340b-4b54-8dd3-873e7d725f44

        Second the conf of use VEGA 64
        only 43:00 changed to 46:00 other conf is the same.

        1. Fixed the problem by switched the vega64 from PCIEx16_1 to PCIEx
          16_3,and plug my gt710 into PCIEx16_1,and now it works fine.I have my vega64 hardtube watecooled,it hard for me to make such a decision,but it worth.Only one thing strange(Before,pcie_1 with vega=41:00,and pcie_3 with gt710=42:00.After,pcie_1 with gt710=41:00,but pcie_3 with vega=0b:00 instead of 42:00).

  12. Hi and thanks for the tutorial. I’m having trouble booting beyond the installer. Clover boots fine, and the installer boots just fine as well. Disk utility sees the disk and I install to it correctly APFS.

    After it reboots, clover only has the installer option and not anything on the new drive installed. Thoughts?

  13. Hi,

    I just tried to build a new Mojave instance, using the instructions here.

    This is on Proxmox 6.0-7.

    However, I am getting this weird graphical glitch, where the MacOS desktop appears as a tiny pixelated box, and it’s duplicated many times horizontally:

    https://i.imgur.com/fDQgAWY.png
    https://i.imgur.com/bs3zMkB.png

    Here is my QEMU conf file:
    “`
    args: -device isa-applesmc,osk=”…” -smbios type=2 -cpu Penryn,kvm=on,vendor=GenuineIntel,+invtsc,vmware-cpuid-freq=on,+pcid,+ssse3,+sse4.2,+popcnt,+avx,+aes,+xsave,+xsaveopt,check -device usb-kbd,bus=ehci.0,port=2
    balloon: 0
    bios: ovmf
    boot: cdn
    bootdisk: sata0
    cores: 4
    cpu: Penryn
    efidisk0: fast_vm_storage:vm-504-disk-1,size=128K
    machine: q35
    memory: 8192
    name: mojave-base
    net0: vmxnet3=DA:D6:D8:03:B6:2E,bridge=vmbr0,firewall=1
    numa: 0
    ostype: other
    sata0: fast_vm_storage:vm-504-disk-0,cache=unsafe,size=64G
    smbios1: uuid=7fd4562e-ab74-4df2-903d-197ece0fa680
    sockets: 1
    vga: vmware
    vmgenid: f1234491-8337-4441-89f9-9fd8a44ab35b
    “`
    Any idea what’s going on, or how to fix this please?

    Thanks,
    Victor

    1. That’s the symptom you get if your resolution set in the guest UEFI settings doesn’t match the resolution that Clover is configured for.

      Note that you will probably have to hit “reset” the first time you reach the Clover menu for the resolution to actually get applied. You can tell if the resolution has been applied properly by looking at the size of the Proxmox logo on boot – if the higher resolution hasn’t been applied yet, the logo will fill most of the screen.

  14. Hello, and thank you so much for this excellent guide!

    I have two different machines running Proxmox. I am running into a stubborn problem that is prevent this from working on the first box (Older hardware, new Proxmox 6.0 install). I went through the guide three or four times on the first box (After getting past user-error), with the same result: on the Proxmox boot screen, it hangs about 2/3 of the way through the progress bar, displays the following message for a minute or two, and then dumps to the UEFI shell:

    BdsDxe: failed to load Boot0001 “UEFI qemu harddisk qm00013 ” from PciRoot (0x0)/Pci(0x1E,0x0)/Pci(0x1,0x0)/Pci(0x7,0x0)/Sata(0x0,0xFFFF,0x0): Not Found’

    Since I had another box available (Newer hardware, but still on Proxmox 5.4), I went ahead and tried it on there – So far so good, I have a working MacOS Mojave VM. I’m thinking the issue comes down to one of three things:

    1. first box has incompatible hardware (my best guess)
    2. there is an issue with this on Proxmox 6 (I personally doubt that’s what is going on)
    3. I did something wrong (Normally I’d assume this, except for the same process worked on box #2. It’s certainly still possible though).

    I saw the requirements at the very beginning (CPU must support SSE 4.2) – From what I can see, this should be good – http://www.cpu-world.com/CPUs/Xeon/Intel-Xeon%20E5-2670.html

    I also had a look through Kholia’s guide which you referenced at the beginning – They also had requirements listed, which seemed to mostly check out – They did indicate that AVX2 is required for Mojave, which doesn’t seem to be listed on the cpu-world info for those Xeon E5-2670s, but I got the same behavior out of High Sierra (Which this system did appear to meet all of Kholia’s listed requirements), so I’m not sure that’s what is going on

    My hardware is this:

    Box #1 (Unable to get working):
    Motherboard: Asus Z9PA-D8
    CPU: 2x Intel Xeon E5-2670
    RAM: 64GB DDR3

    Box #2 (This guide worked like a charm):
    Motherboard: Supermicro X11SSW-F
    CPU: Intel Xeon E3-1240V6
    RAM: 16GB DDR4

    The availability of RAM, as well as some other conditions such as the location of the boxes makes it preferable for me to host this on box #1

    Finally, I just want to thank you again for providing an awesome guide on how to get a working MacOS VM on Proxmox. This is seriously going to be a lifesaver when I have to send my Macbook in for a warranty request, so thanks again!

    1. Avx2 is a bonus, not a requirement. I have the same CPU as you.

      Check out the comments above about the boot manager. It seems like the UEFI boot entries don’t get updated properly on some Proxmox 6 and must be manually selected.

    2. It could also relate to CPU flags and CPU topology (threads, cores, SMP, NUMA)… So my settings (same motherboard, but dual E2680V2) I have:

      -smp 32,sockets=2,cores=8,threads=2

      -cpu Penryn,kvm=on,vendor=GenuineIntel,+invtsc,vmware-cpuid-freq=on,+pcid,+ssse3,,+sse4.2,+popcnt,+avx,+aes,+xsave,+xsaveopt,check

      And that is working perfectly side by side with a few containers and a few servers – and a Win10 gaming PC (a GTX 1060 for the Windows machine, and a RX580 for the mac ๐Ÿ™‚

  15. So I followed the instructions, including the patch, but when I hit enter on the Clover screen, the Apple logo shows a for a few seconds, then it loops back to the Proxmox screen. Any idea as to why this might be happening?

      1. Yeah turns out it did get cut off, and part of the -smbios argument was cut off too, but even after fixing it, it still does the exact same thing ๐Ÿ™

          1. rgs: -device isa-applesmc,osk=”ourโ€ฆInc” -smbios type=2 -cp$
            balloon: 0
            bios: ovmf
            boot: cdn
            bootdisk: ide2
            cores: 3
            cpu: Penryn
            efidisk0: local:100/vm-100-disk-1.raw,size=128K
            ide0: local:iso/Mojave-installer.iso,cache=unsafe,size=2085568K
            ide2: local:iso/clover-r4920.iso,cache=unsafe
            machine: q35
            memory: 8192
            name: MacOS-Mojave
            net0: vmxnet3=E6:B8:62:26:62:50,bridge=vmbr0,firewall=1
            numa: 0
            ostype: other
            sata0: local:100/vm-100-disk-0.raw,cache=unsafe,size=64G
            smbios1: uuid=4a464962-5177-4015-94d1-e0907604aaed
            sockets: 1
            vga: vmware
            vmgenid: b403d8fa-cc1a-42eb-b464-5bb9f9374497

            1. Cores: 3 is very unlikely to work, try 2 or 4 instead. Make sure the osk=”” doesn’t use curly quotes (they were curly in your quote but it may just have been WordPress messing that up for you).

  16. Is it possible to get a working macOS KVM installation from proxmox and back it up then send it to someone else and they restore it? Would seem much easier than all the steps taken by this tutorial.

    1. Yep it sure is, but it’d be even more of a copyright violation than this. Also you should avoid running 10GB of binaries from strangers that you can’t possibly verify…

  17. My attempt to install VMware Tools failed: VNC got flaky until becoming unresponsive, and the machine became unreachable via SSH. Apparently the network stopped working, or so I guess. Uninstalling VMware Tools improved the situation, VNC and general network connectivity is back again. Nonetheless, I am still unable to connect via screen sharing from another Mac (despite enabling it, obviously). Any ideas on that?

    1. MacOS already has built in drivers for all the hardware, installing VMWare tools is neither necessary nor recommended.

      Check that you can ping it from your other Mac, and try connecting by IP address rather than hostname.

      1. Considering my experience I’d suggest to explicitly mention in the post that VMware Tools are not recommended — they do more harm than good. I somehow read the text like it may be worth it. My screen sharing issue is probably unrelated, I’ll post here in case I lean otherwise.

        BTW, I am blown away how fast you replied. Your work here is totally awesome, many, many thanks!

  18. Hi,

    After installation, the machine reboots to Clover but it reproposes to reinstall MacOS.

    I formatted the hard disk well as indicated and after installation it has occupied space.
    Any ideas?

    Thank you ๐Ÿ™‚

    1. Hit F2 at the start of boot and use the Boot Manager to pick a different option. The reason why this should make the hard disk appear in Clover is a total mystery.

  19. args: -device isa-applesmc,osk=”[โ€ฆ]” -smbios type=2 -cpu Penryn,kvm=on,vendor=GenuineIntel,+invtsc,vmware-cpuid-fre
    bios: ovmf
    bootdisk: ide2
    cores: 4
    cpu: Penryn
    efidisk0: local:100/vm-100-disk-1.raw,size=128K
    ide0: local:iso/Mojava-installer.iso,cache=unsafe
    ide2: local:iso/clover-r4920.iso,cache=unsafe
    machine: q35
    memory: 8192
    name: Mojave
    net0: vmxnet3=9E:16:3F:56:5A:20,bridge=vmbr2
    numa: 0
    ostype: other
    sata0: local:100/vm-100-disk-0.raw,cache=unsafe,size=64G
    smbios1: uuid=a0d6a3f5-43de-40be-93ec-54de66a1d368
    sockets: 1
    vga: vmware
    vmgenid: 5dd7e530-793c-4611-9f8d-ec9b367aacc8

  20. I’m a bit newbie to Proxmox and can’t find a way how to give internet to this VM in order to complete the setup. So far I reached the installer setup which isn’t allowing me to complete showing an error message “Install Requires Internet Connection”. I tried to give it internet from the BIOS by setting a dedicated IP with Gateway but this didn’t work, also I tried using terminal to use “ifconfig and ipconfig” to give internet access setting also a dedicated IP but also this didn’t work. Any solution how to give internet to this VM so I can continue the Installer Process?

  21. Even if setup the IP address, dns server and gateway on my network, the setup gives “the recovery server could not be contacted”… Any ideas?

      1. Hi. Using ifconfig in the builtin terminal, but I realised the OS ignored my edit to resolv.conf (the nameserver line), so I had connection (ping to any IP) but no name resolution. So, I ended up setting up a quick dnsmasq in an LXC container. All good now…

        1. Hi, I’m facing the same issue I can ping an IP however I can’t ping a hostname. When I continue I get โ€œthe recovery server could not be contactedโ€. If you google it they say it’s related time however our case is different related to hostname. Can you explain more about quick dnsmasq in an LXC container? I’m a newbie in that.

          1. Create an LXC container with a static IP from the subnet you will give over DHCP. Install dnsmasq (I use CentOS 7, so “yum install dnsmasq”. Then move /etc/dnsmasq.conf to /etc/dnsmasq.conf.bak and create a new file /etc/dnsmasq.conf with this content (replace 192.168.0.XXX with your subnet) and restart dnsmasq:
            # Disable DNS and enable DHCP
            port=0
            dhcp-range=192.168.0.50,192.168.0.150,255.255.255.0,12h
            # Set the gateway for this range
            dhcp-option=3,192.168.0.1
            # Set resolver
            dhcp-option=6,8.8.8.8,8.8.4.4

            1. Note that you’d only have to do this if your network doesn’t already have a DHCP server on it which is handing out a valid DNS configuration, which is unusual.

          2. I found the solution using isc-dhcp-server and this saved my day. Now I care about performance as I’m gonna use the MAC for development purposes thus CPU and RAM matters it’s easy to manage RAM however when I’ve upgrade CPU from Penryn to Haswell from UI and also from .conf file the OS didn’t start, any one had such issue?

            1. You can’t pass a CPU type higher than Penryn, but you can still pass through all of the individual CPU features that exist on newer generations and get the same performance. Just add new +features to the -cpu argument in the args line. You can run “cat /proc/cpuinfo | grep flags” on the host to see what features your CPU supports. e.g. you could add +avx2 for your Haswell CPU.

              If your workload is interactive then the absolute sticking point for performance is still the GPU – you need to PCIe passthrough a real GPU to get GUI performance that is remotely acceptable, check out some of the details of my setup https://www.nicksherlock.com/2018/11/my-macos-vm-proxmox-setup/

  22. Does spice console work for macOS as guest on Proxmox? Did anyone tried? Would like to have USB forward to the remote macOS guest.

  23. Do you know of any way to increase the hard disk size? Increasing the size in Proxmox does not change the size that the Mac see’s.

      1. I’ve tried while booting into boot recovery mode as well as with Mac OS up and running.
        Disk Utility see’s the added space (ie. 200GB (Orig) – 300GB(new)) but resizing has no effect.

  24. Problem with another disk:
    Hi, I installed catalina macOS. MacOS shows an orange destination drive while installation process. After the installation, there is still the orange drive on my desktop. The system works great so far.

    I tried to add another drive to the vm. The new drive is also an orange one.

    On my real mac, I have also 2 drives: one for the main macOS system and one for the users home directories. I tried to do that on the proxmox vm too.

    On proxmox I have the 2 orange drives now. Adding a user, and change it’s home directory to the second drive, failed. Sometimes the owner of the second drives directories switches to “_unknown” or the administrator name and I can not change it with “sudo chown” to the user name nor something else!

    What can be wrong with that?
    This is my current configuration of the 2 drives:
    sata0: sandisk:vm-100-disk-0,size=256G,ssd=1
    sata1: wdred:vm-100-disk-0,size=500G

    1. I have switched to using virtio instead of sata, now the mentioned problems are solved ๐Ÿ™‚

      After a few tests there is a lot of screen flickering and sometimes everything goes black for a short moment (GPU pass-through from NVidia GT710). For this I am still looking for a solution…

  25. Thanks for sharing this! Worked flawlessly for me. I already had MacOs running natively on this hardware but now I can transition to ProxMox.

    One thing was not working for me – nested virtualization (based onApple’s hypervisor.framework). It took me a lot of time to work this out. Since MacOS wouldn’t boot with cpu=host no matter what I’ve tried (even played with tons of Clover settings, incl. fake CPUID) so I had to stay with Penryn. I’ve painstakingly compared CPU flags with what can be enabled and came up with a set that allows to run stuff like Docker for Mac and Parallels without a problem. Additionally the extra CPU instructions provide a performance boost in some workloads what can be clearly seen in geekbench.

    I’m on i7-8700 which has 6C/12T but macos won’t boot if I assign more than 8C in ProxMox. Even tried with enabling SMT via `-smp` switch to mirror the topology of the host processor 1:1 and it doesn’t work (works in Ubuntu flawlessly though). Anyway as this are threads anyway the performance difference between bare metal and virt is negligible and seen only in synthetic benchmarks. Difference in Geekbench 4 is 28k vs 24k points – bare metal vs VM.

    PS I recommend disabling all CPU bug mitigations using kernel cmdline since cross-vm security is not that important on a workstation setup usually (https://make-linux-fast-again.com/).

    For other’s having the same problems, my `-cpu` parameter:
    -cpu Penryn,kvm=on,+kvm_pv_unhalt,+kvm_pv_eoi,+invtsc,+pcid,+ssse3,+sse4.1,+sse4.2,+popcnt,+avx,+aes,+xsave,+xsaveopt,+vmx,+msr,+pae,+pdpe1gb,+pse,+pse36,+f16c,+fma,+pclmulqdq,+rdrand,+rdtscp,+ss,+smep,+bmi1,+bmi2,+avx,+avx2,+invpcid,+erms,+clflush,+rtm,+mpx,+adx,+abm,+nx,+movbe,check

    1. BTW I don’t need nested virt in theory, as I’ve even got a second ProxMox “server” and plenty of resources to run any number of VMs I need, however, I am developing various solutions for local MacOs web-dev and I need to be able to test them like they were run on a Mac.

    2. CAVEAT: Of course this will not work on non-Intel CPUs. MacOs native hypervisor features (also Windows Hyper-V I gather) works only Intel VT-d)

    3. Interesting, I thought that required cpu=host, I’ve never seen that done based on passing individual features!

      For your core problem, try:

      -smp '12,sockets=3,cores=2,threads=2'

      Apparently macOS is fine with odd socket counts. Another option is:

      -smp '12,sockets=1,cores=8,threads=2,maxcpus=16'

      (4 threads will appear to be hot-unplugged at boot time)

      1. Thanks! The first topology (3 sockets) has worked for me, second one wouldn’t boot. I can see near bare-metal performance in Geekbench now ๐Ÿ™‚

        Still, one thing that bugs me is the inability to shutdown the machine cleanly from HV. This seems to be a problem with OVMF since I cannot shutdown any UEFI VM without QEMU Guest Agent – neither Ubuntu nor Windows. I will post the info if I happen to find a solution.

Leave a Reply to Emil Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.