[SOLVED] vCPU don't work after hot plugging vcpus on Ubuntu 22

Jun 7, 2025
3
1
3
I've ran a sysbench cpu test on VM to check performance, and both summary of proxmox, and top were showing (vcpus * 100%) load. but after trying to hotplug vcpus and RAM by API (also resized disk) maixmum load changed, as if were using only 7 of 11 cores, or 3 out of 8 and etc. not only sysbench, other processes were also acting as if "excessive" cpus weren't there. Also it normalises on VM reboot

Here are API calls that lead to that:
/api2/json/nodes/{node}/qemu/{vmid}/config -memory 15574 -vcpus 13

PUT /api2/json/nodes/{node}/qemu/{vmid}/resize -disk scsi0 -size 115G

What can cause such strange behaviour?
 

Attachments

  • 1764096091943.png
    1764096091943.png
    115.3 KB · Views: 3
So, after a bit of digging it appears that problem was in /lib/udev/rules.d/40-vm-hotadd.rules which on ubuntu cloud images were working only for Microsoft and Xen vendor, because of this goto. I changed it to GOTO="vm_hotadd_apply" and it worked after rebooting, or reloading rules
 

Attachments

  • 1764102382565.png
    1764102382565.png
    203.1 KB · Views: 3
  • Like
Reactions: pvps1