Description of problem: When trying to start a VM with vCPU count of 31 with a single socket and thread causes the maximum vCPU calculation to be more than the maximum supported by the machine type. Version-Release number of selected component (if applicable): 4.4.5 How reproducible: 100% Steps to Reproduce: 1. Create a VM with total vCPU count = 31 (1 socket, 31 cores per vsocket, 1 thread per core) 2. Try to start the VM 3. It fails with: VM <vm-name> is down with error. Exit message: unsupported configuration: Maximum CPUs greater than specified machine type limit 240. Actual results: VM fails to start Expected results: VM starts Additional info: There is some issue with how maximum vCPU is calculated. Here are some examples: 30 vCPU (1 socket, 30 cores, 1 thread) 1:30:1 [root@dell-r430-02 ~]# virsh -r vcpucount amashah-vcputest maximum config 240 maximum live 240 current config 30 current live 30 32 vCPU (8:4:1) [root@dell-r430-02 ~]# virsh -r vcpucount amashah-vcputest maximum config 64 maximum live 64 current config 32 current live 32 32 (8:2:2) [root@dell-r430-02 ~]# virsh -r vcpucount amashah-vcputest maximum config 240 maximum live 240 current config 32 current live 32 With 31 (1:31:1) it fails to start, but the XML is created with 248 (max of machine type is 240). <vcpu current="31">248</vcpu> There seems to be an issue with the maximum CPU calculation as you can see above. I would also expect that 32 vCPU (8:2:2) vs 32 vCPU (8:4:1) have the same max count, but they do not.
There are no logs attached to this case but it's most probably a VM that is set with an i440fx chipset: [root@ocelot03 ~]# virsh qemu-monitor-command 2 '{"execute":"query-machines"}' {"return":[{"hotpluggable-cpus":true,"name":"pc-i440fx-rhel7.0.0","numa-mem-supported":true,"default-cpu-type":"qemu64-x86_64-cpu","cpu-max":240,"deprecated":false,"default-ram-id":"pc.ram"},{"hotpluggable-cpus":false,"name":"none","numa-mem-supported":false,"cpu-max":1,"deprecated":false,"default-ram-id":"ram"},{"hotpluggable-cpus":true,"name":"pc-i440fx-rhel7.5.0","numa-mem-supported":true,"default-cpu-type":"qemu64-x86_64-cpu","cpu-max":240,"deprecated":false,"default-ram-id":"pc.ram"},{"hotpluggable-cpus":true,"name":"pc-i440fx-rhel7.3.0","numa-mem-supported":true,"default-cpu-type":"qemu64-x86_64-cpu","cpu-max":240,"deprecated":false,"default-ram-id":"pc.ram"},{"hotpluggable-cpus":true,"name":"pc-q35-rhel8.3.0","numa-mem-supported":false,"default-cpu-type":"qemu64-x86_64-cpu","cpu-max":710,"deprecated":false,"default-ram-id":"pc.ram"},{"hotpluggable-cpus":true,"name":"pc-q35-rhel7.6.0","numa-mem-supported":true,"default-cpu-type":"qemu64-x86_64-cpu","cpu-max":710,"deprecated":false,"default-ram-id":"pc.ram"},{"hotpluggable-cpus":true,"name":"pc-i440fx-rhel7.1.0","numa-mem-supported":true,"default-cpu-type":"qemu64-x86_64-cpu","cpu-max":240,"deprecated":false,"default-ram-id":"pc.ram"},{"hotpluggable-cpus":true,"name":"pc-q35-rhel8.1.0","numa-mem-supported":true,"default-cpu-type":"qemu64-x86_64-cpu","cpu-max":710,"deprecated":false,"default-ram-id":"pc.ram"},{"hotpluggable-cpus":true,"name":"pc-q35-rhel7.4.0","numa-mem-supported":true,"default-cpu-type":"qemu64-x86_64-cpu","cpu-max":710,"deprecated":false,"default-ram-id":"pc.ram"},{"hotpluggable-cpus":true,"name":"pc-i440fx-rhel7.6.0","numa-mem-supported":true,"default-cpu-type":"qemu64-x86_64-cpu","is-default":true,"cpu-max":240,"deprecated":false,"default-ram-id":"pc.ram","alias":"pc"},{"hotpluggable-cpus":true,"name":"pc-q35-rhel8.4.0","numa-mem-supported":false,"default-cpu-type":"qemu64-x86_64-cpu","cpu-max":710,"deprecated":false,"default-ram-id":"pc.ram","alias":"q35"},{"hotpluggable-cpus":true,"name":"pc-i440fx-rhel7.4.0","numa-mem-supported":true,"default-cpu-type":"qemu64-x86_64-cpu","cpu-max":240,"deprecated":false,"default-ram-id":"pc.ram"},{"hotpluggable-cpus":true,"name":"pc-q35-rhel8.2.0","numa-mem-supported":true,"default-cpu-type":"qemu64-x86_64-cpu","cpu-max":710,"deprecated":false,"default-ram-id":"pc.ram"},{"hotpluggable-cpus":true,"name":"pc-q35-rhel7.5.0","numa-mem-supported":true,"default-cpu-type":"qemu64-x86_64-cpu","cpu-max":710,"deprecated":false,"default-ram-id":"pc.ram"},{"hotpluggable-cpus":true,"name":"pc-i440fx-rhel7.2.0","numa-mem-supported":true,"default-cpu-type":"qemu64-x86_64-cpu","cpu-max":240,"deprecated":false,"default-ram-id":"pc.ram"},{"hotpluggable-cpus":true,"name":"pc-q35-rhel8.0.0","numa-mem-supported":true,"default-cpu-type":"qemu64-x86_64-cpu","cpu-max":710,"deprecated":false,"default-ram-id":"pc.ram"},{"hotpluggable-cpus":true,"name":"pc-q35-rhel7.3.0","numa-mem-supported":true,"default-cpu-type":"qemu64-x86_64-cpu","cpu-max":255,"deprecated":false,"default-ram-id":"pc.ram"}],"id":"libvirt-72651"} We have increased the limit from 240 to 288 in 4.1 [1] and now even higher, without taking into account that the limit for i440fx remains 240. A workaround for this issue would be to use q35 instead. [1] https://github.com/oVirt/ovirt-engine/blob/ovirt-engine-4.2/packaging/dbscripts/upgrade/pre_upgrade/0000_config.sql#L387-L389
Indeed, it seems the limit for i440fx is 240 rather than the currently assumed 255. I'll fix it in my current max vCPUs patch series.
verified on ovirt-engine-4.4.8.4-0.7.el8ev.noarch host topology: [root@intel-knm-03 ~]# lscpu Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian CPU(s): 288 On-line CPU(s) list: 0-287 Thread(s) per core: 4 Core(s) per socket: 72 Socket(s): 1 NUMA node(s): 2 VM with type I440FX and Q35 Chipset successfully starts with topology: cores per socket 31, virtual socket 1, threads per core 1 for VM I440FX: # virsh -r vcpucount 3 maximum config 217 maximum live 217 current config 31 current live 31 for VM Q35 (the same topology) virsh -r vcpucount 4 maximum config 496 maximum live 496 current config 31 current live 31
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (RHV Manager (ovirt-engine) [ovirt-4.4.8]), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2021:3460