1

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.

3
  • If you provide the full topology info to the -smp option (so all three of cores, threads, and sockets), you do not need to provide a cpus= value. Not sure if that is actually what's causing your issue or not, but might be worth trying without cpus= but with the rest of the info and seeing if that works. Commented Aug 14, 2020 at 14:47
  • Hey @AustinHemmelgarn I just tested it with -smp cores=6,sockets=1,threads=1 to no avail. I also tried to reinstall macOS, but the setup froze at the same point the normal boot sequence did. Commented Aug 19, 2020 at 10:36
  • I played around with some other parameters and cpus=6,sockets=6 works.... really weird. I'll try to define this in the XML file and test also. Commented Aug 19, 2020 at 11:44

1 Answer 1

1

The problem was solved by creating the following parameter to the qemu executable:

smp 6,cores=1,sockets=6,threads=1

and using this topology in the XML file as well:

<topology cores='1' sockets='6' threads='1'/>

This is totally weird and I don't know the reason why it works, but it does. I got the macOS VM booted up in virt-manager and won't change this, hoping it runs.

Thanks to Austin, your commend led me in the right direction, just trying out stuff.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .