Today I finally got my macOS Catalina VM working again on Debian Sid. I basically did a complete fresh install using macOS-Simple-KVM, tweaked some settings, imported it to virt-manager then optimised.

Looking at it, what was breaking VFIO on 5.6/5.7/5.8.0 (yes I even compiled 5.8.0-rc5!) was probably the clock/pit settings, as kvm-pit using a lot of CPU was one of the symptons of the crashing, qemu did the whole install fine, then as soon as I imported into virt-manager it crashed. Removing this whole section fixed that:

<clock offset='utc'>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='pit' tickpolicy='delay'/>
    <timer name='hpet' present='no'/>

I also removed this from the features stanza, as we don’t need to hide from Nvidia:

    <hidden state='on'/>

I switched the main drive (not the EFI boot disk) to using virtio-blk instead of sata, and yes it works! macOS doesn’t seem to report much about it like trim support or anything, but it does see it as an SSD instead of HDD without having to apply this workaround that was needed for SATA:

    <qemu:arg value='-set'/>
    <qemu:arg value='device.sata0-0-1.rotation_rate=1'/>

I switched back to qcow2 disk images now that the corruption bug is long dead.

I replaced the e1000 network card driver with vmxnet3 which although isn’t virtio, is designed specifically for emulation so should be faster.

I even managed to squeeze another 100 or so CPU marks from Cinebench (maybe due in part to upgrading to 10.15.6?) which is now running faster than my Win10 VM!


I also seem to have working HDMI audio now, although on firstboot in qemu it was coming out of my host’s speakers instead of the guest’s monitor, so I guess qemu was using pulseaudio instead of HDMI.

I’ve not switched the CPU from Penryn to host-passthrough, so the benchmarks are reporting a core2duo that’s almost as fast as a Xeon E5-2697, which in reality is about right as I’ve allocated essentially one E5-2650v2 to macOS - although not pinned as I found that’s actually detrimental to the speed of the Win10 VM when I tried it, so its got 16 vpcu’s balanced between the 16c/32t of the two sockets.

I’ve closed my bug report, it was no help anyway, like the qemu report, it would have been better to report upstream than to Debian.

I’m keeping the old VM around for a while, just running spice+qxl with no mouse/gpu passthrough, and have backed up this working VM to at least 3 places 😄