Picture this, you install a brand new Virtual Machine Manager to manage your Hyper-V cluster and after everything works just fine for a month or so, then you get a request to provision a couple of VMs. You say no problem, because you invested a lot of time in creating a couple of service templates coupled with some PowerShell scripts for post deployment configuration so you can just press a button and do something else right?
You open up the console and you see that the job failed with a very intuitive error
An internal error has occurred trying to contact the * server: *: *.
Unknown error (0x80072f0d)
Check that WS-Management service is installed and running on server *. For more information use the command “winrm helpmsg hresult”. If * is a host/library/update server or a PXE server role then ensure that VMM agent is installed and running. Refer to http://support.microsoft.com/kb/2742275 for more details. Please contact your system administrator with this error ID.
So what do you do in that case? Check the Hyper-V servers, the error clearly states that’s something wrong with the Hyper-V server. After you fiddle around with the event log and try to find out what’s the problem you get several ideas.
1. Something is wrong with the agent.
2. You see that BITS is not working properly
3. Ports are not open
You start re-installing the agents, check if BITS is running and see if port 443 is open and after everything has been taken care of, you restart the job. Did it work? No.
So what gives? What can be so broken? You re-install VMM and find out it’s not working. You delete the self-signed certificates and re-associate the cluster. Still nothing.
You clearly can see how the stress builds up after each iteration of fails and you start going on the web checking if other people stumbled as you did. Some did, their problem got fixed by changing the BITS port and I can say that worked for two days and then it started doing it again.
I can go on forever.
So without further rambling I found everything that needs to be in order for it to properly work.
1. Make sure that the SCVMM computer account is local admin on each member server in the cluster.
2. Check that the agent on the hosts is running on using a domain account and not as local service.
3. Change the BITS port to something else than 443 and open the port in Windows Firewall on all the member servers including the VMM Server.
Set-ItemProperty -Path ‘HKLM:\SOFTWARE\Microsoft\Microsoft System Center Virtual Machine Manager Server\Settings\’ -Name BITSTcpPort -Value <insert value here>
4. Re-Associate the servers using the PowerShell lines below:
Import-Module -Name VirtualMachineManager
$Credential = Get-Credential
Get-VMMManagedComputer | Register-SCVMMManagedComputer -Credential $Credential
And you are ready to go.
Side note: Every time you apply an update rollup, the certificates get out of sync and you need to re-associate the servers.
Hope this solves some problems 🙂