If you have a Virtual Host in Virtual Machine Manager that is not responding, and forcing a manual refresh returns an error like this:
Error (2910)
VMM does not have appropriate permissions to access the resource C:\Windows\system32\qmgr.dll on the server.
Access is denied (0x80070005)
It can often be remedied by one of the following: Re-install the VMM agent, restart the virtual machine manager agent and WMI services or restart the virtual host. It is also worth making sure your hosts are all up to date as well.
Occasionally I see a host where this doesn’t work and no matter what it, remains as “not responding” in VMM. For me the case appears to be a broken winrm configuration. You can be fooled into thinking winrm is setup correctly as a “winrm /quickconfig” returns as already setup, and the winrm service is running.
It looks like all the “winrm /quickconfig” command does is check that winrm has been enabled, it wont reset other possibly incorrect configurations or broken settings.
Comparing the winrm configuration and registry of a working identical host to a “not responding” host I have found the following commands will correct the deviated settings and usually results in a host that now responds to VMM.
reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v LocalAccountTokenFilterPolicy /t REG_DWORD /d 1 /f
winrm set winrm/config/service/auth @{CredSSP=”True”}
winrm set winrm/config/winrs @{AllowRemoteShellAccess=”True”}
winrm set winrm/config/winrs @{MaxMemoryPerShellMB=”2048″}
winrm set winrm/config/client @{TrustedHosts=”*”}
winrm set winrm/config/client/auth @{CredSSP=”True”}
Be sure to run these on the effected host in an admin command prompt.
RE: Compacting / shrinking a VHDX
Hey Robin, I couldn’t find any way to post a comment directly to that particular article so I thought I’d try here. I figured out a way to compact a VHD without having to take the VM offline. I tried to doing some Googling to see if anyone else had posted it but so far I haven’t found anything. Feel free to add this to your post if you want.
To compact it online, it has to be a Dynamically Expanding type VHD (or VHDX, works with both) and you zero out the free space as you mentioned in your article. To do the actual compacting, you simply have to do a ‘Move’ command and just move the Storage to another location, even on the same volume. Doing this causes the system to rebuild the entire file as if it were doing a compact operation at the destination path, leaving it smaller if free space was there. Works pretty slick when you have something important you can’t take down but you need to compact it. I was able to do this in both a CSV and non CSV setup. I only did it on 2012 R2 but it may work in 2012 as well.
Anyway, just wanted to let someone know and hopefully get it out there. Take care!