If a large amount of CPUs and memory is added to a VM in a single add operation, some of the CPUs may fail to be brought online automatically.
Output from the command, 'lscpu' will show the added CPUs as present, but some of the CPUs may appear offline.
$> lscpu
CPU(s): 768
On-line CPU(s) list: 0-390,392-400,403-411,413,414,416-419,422-428,431-466,468-477,479,480,482-485,487-492,494-499,501,503-505,507-536,538-564,566-573,575,576,578-583,585,587-589,591-605,607-624,626-642,644,645,648,649,651,652,654-666,670-672,674,675,677,678,680-687,689,690,692-697,700-702,704,706-710,713,715,716,720-725,727-733,735-738,740,743-750,753,755,757-766
Off-line CPU(s) list: 391,401,402,412,415,420,421,429,430,467,478,481,486,493,500,502,506,537,565,574,577,584,586,590,606,625,643,646,647,650,653,667-669,673,676,679,688,691,698,699,703,705,711,712,714,717-719,726,734,739,741,742,751,752,754,756,767
The issue occurs more frequently when memory is also being added to the VM at the same time.
Linux VMs running on ESXi 8.0.3 or later releases
To resolve the issue, manually bring the CPUs online using the command,
echo 1 > /sys/devices/system/cpu/cpuXXX/online XXX will be the cpu number of the CPU that is offline.
For eg.
$> echo 1 > /sys/devices/system/cpu/cpu391/online