Problem:
The definition of a created vm for use with virt-manager fails. Error message:
"error: Failed to define domain from macOS.xml
error: unsupported configuration: CPU topology doesn't match maximum vcpu count"
Background:
Hardware information:
CPU: Intel Core i5 9400F
RAM: 32 GB DDR4
GPU1 (Host): AMD Radeon R9 270X
GPU2 (Windows Passthrough): GTX 1050
GPU3 (macOS Passthrough planned): GT 710
Software Information:
Host: Ubuntu 20.04
QEMU version: 4.2.0
macOS Guest version: 10.15 Catalina
I followed this guide for my Windows VM:
https://mathiashueber.com/pci-passthrough-ubuntu-2004-virtual-machine/
This works very well.
I then followed this guide for my macOS VM: https://passthroughpo.st/new-and-improved-mac-os-tutorial-part-1-the-basics/
The installation and all went fine and I got stuck on the part "Increasing CPU/Memory". For passing all CPU cores to the guest system you have to define the thread, core, die and socket counts. For my 9400F it should be relatively easy, because it is a consumer platform with 1 socket, 1 die, 6 cores and 1 thread per core.
So the correct parameter for qemu-system-x86_64 should be as follows (amongst omitted others):
-snp cpus=6,cores=6,threads=1,sockets=1
I also validated these values using lscpu.
If I start my VM with these settings, it gets stuck after selecting the correct boot device in Clover.
With these settings it boots up correctly with all 6 cores:
-snp cpus=6
Now when using virt-mananger you have to import (or "define") the VM there. That needs an XML file with (amongst other things) topology information.
That should look like this for my CPU:
<cpu>
<topology cores='6' sockets='1' threads='1'/>
</cpu>
Did I make any mistake with my CPU topology? What futher steps can I try to get this to work?
I believe that the problem lies with the first -snp option not working in basic.sh, because that is (or should be) the correct representation of the CPU's tpoplogy.
I will try reinstalling macOS, but I'm not very confident that will work.
-smp
option (so all three of cores, threads, and sockets), you do not need to provide acpus=
value. Not sure if that is actually what's causing your issue or not, but might be worth trying withoutcpus=
but with the rest of the info and seeing if that works.