We have recently purchased a server which is running Hyper-V 2008 R2 bare metal. The server has two quad-core Intel Xeon processors with hyperthreading, so if I'm understanding correctly this gives us 16 cores. Within Hyper-V we have created a virtual machine running Windows Server 2008 R2 with 4 virtual processors. The processor settings screen is telling me that this represents 25% of the total system processing power. Does this mean that the remaining 75% can not be tapped into by the virtual OS? We will be running a few other virtual machines, but this one is for SQL Server and we'd like to throw as much horsepower at it as possible.
A vCPU can only be mapped to a single physical CPU. You can't take 4 physical CPUs and make a single vCPU that's 4x faster; it's just not how it works.
Hyper-V is limited to assigning 4 vCPUs to a VM (last I checked). If you need significant CPU power, go physical, there's no sense in adding virtualization overhead to something that CPU intensive and parallel in the first place.
Also, as Holocryptic notes, if you assign 4 vCPUs to a VM, that VM can't run until Hyper-V has acquired 4 physical CPU cores to run them on. Depending on your configuration this could be a major stumbling block (ex, if you have a 6-core machine with a bunch of 4 vCPU VMs, only one will ever run at a time, the other two cores will always go essentially unused). According to Jake Oshins this was not true for any version of Hyper-V. He states that Hyper-V does not use gang scheduling for the CPU; as almost every other hypervisor does. Accordingly, if one phystical CPU core is available, Hyper-V may use it to run a multi-CPU VM. (Also mentioned, Hyper-V may not use all the physical cores available at the time because of NUMA partitioning)
Side note: SQL doesn't necessarily use all the cores you can throw at it in the first place. It really depends on what you're using it for and how parallelizable the load is.
Yep, What Chris said. If you need more then 4 CPU's in a Hyper-V virtual machine then either create two SQL servers in virtual and spread out your databases or go physical. Depending on your SQL server license you may be able to add more SQL servers in virtual (on the same physical host) without occurring more licensing costs, but read the SQL virtual licensing white paper for more info.
I would also agree that if you have SQL running out of CPU power with 4 virtual CPU's then you've either got some serious app utilization or the SQL commands are badly written.
follow this guide
you can locate the vm xml configuration file under the "Virtual Machines" directory of the VM's VHD directory, the configuration file will be named under the VM's id. Below link is a reference.
reference: VM xml configuration file
make sure you edit the VM xml configuration file with notepad/notepad++ opened under administrator privileges