Category Archives: VMware

How to restrict the amount of Physical CPUs presented to ESXi

Issue:
There are times when you might want or need to limit the amount of Physical CPUs (PCPU) presented to ESXi.  It can be either a licensing issue or perhaps you just need to run some testing.  For whatever reason, physically removing the CPUs is not an option so you need a way to tell ESXi to ignore the excess Physical CPUs.

Resolution:

  1. Modify the VMkernel.Boot.maxPCPUS setting
  2. This is listed under Configuration -> Software -> Advanced Settings ->VMKernel -> Boot
  3. The number you put here depends on your configuration.  For instance, if you have a 4 proc by 4 core system and you want to reduce the number of physical processors to 2 and maximize the logical processors, you would put 8 as the number. 2×4.
  4. If you have a 4 proc by 2 core system and you want to reduce the number of physical processors to 2 and maximize the logical processors, you would put 4 as the number. 2×2

 

Search terms followed:

  • make server use less processors
  • vmware utilize fewer sockets
  • only want vmware to use two sockets
  • only want server to use 2 processor sockets
  • how to turn off a processor socket
  • esx server has too many sockets
  • esx server mask cpu socket
  • limit cpu cores
  • vmware limit cpu
  • Multiple cpu limit in VMware
  • vmware limit pcpu
  • vmware limit physical cpu

ESXi host becomes disconnected after offlining shared LUN

Issue:
A backup is run on a VM to an attached drive on shared storage which is thin provisioned.  That storage has not been monitored closely and runs out of space which forces the LUN offline.  Suddenly the ESXi hosts start randomly disconnecting from Virtual Center.  You cannot connect directly to the host through the client, but you can access the host through SSH.  You attempt to connect the host to Virtual Center, but it also fails.

Resolution

  1. Connect to host through SSH and run /sbin/services.sh restart.
  2. Now run /sbin/services.sh restart again
  3. Once again, run /sbin/services.sh restart
  4. You will now be able to connect the host to Virtual Center.