Cannot deploy Virtual Machines via App controller or virtual machine manager

I found myself unable to deploy Virtual Machine templates via App controller or virtual machine manager.  The detailed error was available when attempting via VMM and stated:

“The projected CPU utilization exceeds the CPU utilization of 0% specified at the host reserve level”

All the hosts had zero stars and I couldn’t continue.  Normally this is a useful message as it is preventing me from putting too many virtual machines on my hosts and stretching them too far, however in this instance I knew that we should be OK – we need to have 50 or so VMs on each host and they don’t use much CPU.  It was possible to manually make more virtual machine in hyper-v and then manage them post deployment in VMM but that defeats the point of having a scripted template deployment and app controller setup so users can deploy their own Test VMs?

I found that there is a somewhat hidden option in the host reserve settings available only in PowerShell.  You can have a look at what yours are configured to use with the Get-SCHostReserve” PowerShell command.  The setting you need to change to bypass CPU reserves is the “CPUReserveOff” parameter.

get-schostreserve

So as you can see I have my CPU reserve level set to 0% but when VMM evaluates the deployment if it believes there will be less than 0% CPU available it says no.

You can change this with the Set-SCHostReserve command.

Get-SCHostReserve -VMHostGroup “your host group here” | Set-SCHostReserve -CPU -Enabled $false

fix-get-schostreserve

“The projected CPU utilization exceeds the CPU utilization of 0% specified at the host reserve level” but it lets you continue and deploy anyway.

 

Delegate rights to unlock accounts in AD

To delegate the right right to unlock user accounts in ADUC:

Right-click the OU or domain in Active Directory Users and Computers and select Delegate Control from the context menu
Click Next on the Welcome dialog
Click Add to select the user or group and click OK
Click Next
Select Create a custom task to delegate and click Next
Select Only the following objects in the folder. In the list, check User objects and click Next
Clear the General checkbox and check the Property-specific box
Check both the Read lockoutTime and Write lockoutTime boxes and press Next
Click Finish