I am looking to replace 2 servers with one server and run the original servers as virtual machines. I am looking to use Windows Server 2016 as the hardware server and the VMs also running Windows Server 2016. I am wondering about the math that goes into the amount of memory and CPUs I need for each VM that the hardware server should have. Currently both servers run 8 CPUs and 48GB or RAM. I done some research and they are saying to have 4 extra cores besides each VM to run the hardware server. Many hardware manufacturers only look like I will be able to run 2 or 3 Virtual Servers on them. Is my math or understanding wrong or is there a rule of thumb to calculation the amount of CPUs and RAM to run virtual servers on a hardware server.
The most important factor in this is not what resources the physical machines have but instead what they actually need. Depending on your performance requirement you can move between two extremes:
If you absolutely require the performance of the 8 physical cores, you must reserve an equal amount of cores in a virtualization host (and of course, have some left for the host OS). At that point, you also have to make sure that the virtual cores deliver a similar performance.
The other extreme is that you see you are on average have e.g. 5% CPU utilization. Then you could run 15-20 virtual machines on the same 8 physical cores (again with spares for the host OS) and expect on average similar performance (and a lot worse one if they happen to all peak at the same time).
In reality, you have to find a middle ground that makes sense for your specific application.
Similar calculations can be done for memory requirements.