Category Archives: System Center Virtual Machine Manager

System Center Virtual Machine Manager 2012 SP1 Permission Issues

I recently had to troubleshoot an issue on a System Center Virtual Machine Manager 2012 (SCVMM) SP1 server.

All the managed hosts were in a state of “Needs Attention”.  When viewing the status screen for the host, the WinRM status was critical.  Pressing refresh in the host status screen resulted in the error message:

VMM does not have appropriate permissions to access the resource  on the %SCVMMSERVER% server.

Also, verify that CredSSP authentication is currently enabled on the service configuration of the target computer %HOSTSERVER%. To enable the CredSSP on the service configuration of the target computer, run the following command from an elevated command line: winrm set winrm/config/service/auth @{CredSSP=”true”}

The event log also contained the error:

The Virtual Machine Manager management server could not copy a required Hyper-V authorization file to %HOSTSERVER%.

After trying many things without success, I attempted a re-install of SCVMM.  This also failed with the message:

VMM does not have appropriate permissions to access the resource  on the %SCVMMSERVER% server.

The SetupWizard.log contained the message:

VMMPostinstallProcessor threw an exception: Threw Exception.Type: Microsoft.Carmine.WSManWrappers.WSManProviderException, Exception.Message: VMM does not have appropriate permissions to access the resource  on the %SCVMMSERVER%

The problem turned out to be caused by the proxy configuration on the SCVMM server.  In order to reset the proxy configuration I opened an elevated command prompt and ran “netsh winhttp reset proxy”. I was then able to re-install SCVMM successfully.


Microsoft System Center Virtual Machine Manager 2012 Cookbook

I was lucky enough to be asked to join the technical review panel for the Microsoft System Center Virtual Machine Manager 2012 Cookbook by Edvaldo Alessandro Cardoso and published by Packt.

This is a fantastic book if you’re already using SCVMM 2012, or thinking about doing so.  It covers aspects of SCVMM 2012 from installation through to creating Hyper-V clusters and managing fabric updates with VMM.  Be sure to give it a look


System Center Virtual Machine Manager 2012 Event ID 19999 and 1

Following an upgrade from System Center Virtual Machine Manager 2008 R2 to System Center Virtual Machine Manager 2012, the System Center Virtual Machine Manager (SCVMMService) service kept crashing a couple of times an hour.

In the Event Log under Applications and Services Logs there’s a VM Manager log.  In this log two events were logged:

System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.VirtualManager.Engine.BitBos.VMRefresherBase.UpdateDVDDrives(IVMComputerSystem vmComputer)
at Microsoft.VirtualManager.Engine.BitBos.VMRefresherBase.UpdateFullVMObjectToCarmine(IVMComputerSystem vmComputer, VMData vmData, UpdateRequired updateRequired, Boolean vmObjectHasChanged)
at Microsoft.VirtualManager.Engine.BitBos.VMRefresherBase.RunOnDemandVmRefresh(Guid vmObjectId, VM tempVM)
at Microsoft.VirtualManager.Engine.BitBos.VMRefresherBase.UpdateHostAndVMs(VMRefresherType refresherType, Guid vmObjectId, VM tempVm)
at Microsoft.VirtualManager.Engine.VmOperations.RefreshVmSubtask.RunSubtask()
at Microsoft.VirtualManager.Engine.TaskRepository.SubtaskBase.Run()
at Microsoft.VirtualManager.Engine.TaskRepository.Task`1.SubtaskRun(Object state)-2147467261

Virtual Machine Manager (vmmservice:1476) has encountered an error and needed to exit the process. Windows generated an error report with the following parameters:

The cause of the error was a virtual server that had an iso file mounted in its DVD drive.  The iso file was held on a share on the old SCVMM server, which no longer existed.  Setting the DVD drive to no media resolved the error.

Hyper-V Virtual Machine Connectivity Issue

Following an issue with the storage used by our Hyper-V cluster, one node in our five node cluster became partially unresponsive.  The virtual machines (VMs) running on the unresponsive node were automatically moved to other cluster nodes and service was resumed withing a couple of minutes.  At first everything appeared to be fine, but within a few minutes our monitoring system started to report connectivity issues to the VMs that had failed over.

I RDP’d onto one of the VMs that was having connectivity issues, but found the connection kept dropping out, so I connected to the console through System Center Virtual Machine Manager (SCVMM).  I found I was unable to ping any server on the physical network.  I took a look at the event log on one of the virtual hosts and saw the error below:

Port ‘BF392932-9AE4-453A-8E13-26671BB556D9′ was prevented from using MAC address ’00-14-22-18-7F-DC’ because it is pinned to port ‘SCVMM-C26227E3-D6AB-4818-B8BF-4CCF923C’.

The error message implied another VM was using the MAC of the VM that was having connectivity issues.  As the VM had a dynamic MAC that was managed by SCVMM I knew that couldn’t be the case.  I decided to reboot the unresponsive cluster node.  After waiting 30 minutes for the node to shutdown I killed the power via a DRAC.  As soon as I killed the power to the node the MAC address errors in the event log disappeared and all the VMs resumed normal connectivity.  I believe the cluster node that became unresponsive was keeping some kind of lock on the MAC addresses of the VMs that were running on the node when it became unresponsive.  Killing the power to the node freed the locks enabling connectivity to resume.

Deleting Hyper-V Snapshots

An important point when deleting a Hyper-V snapshot is that the corresponding AVHD file isn’t merged into the main VHD file until you power down the server.  This means that the disk space used by the snapshot isn’t immediately available when you delete a snapshot.

As far as I’m aware there’s no way to monitor the merge process through System Center Virtual Machine Manager, but you can via the Hyper-V MMC.

If you start a virtual machine during the merge process, the merge process stops and the machine starts instantly.




PXE Boot a Virtual Machine In Hyper-V 2008 R2

PXE boot is not available in Hyper-V 2008 R2 when using a Synthetic Network Adapter.  In order to PXE boot a virtual machine (VM), you need to turn off the VM and add a Legacy Network Adapter.  If the VM is an existing machine with a bootable hard disk, you’ll also need to change the boot order, so PXE Boot is above IDE Hard Drive.

Reporting Virtual Machine Dynamic Disk Space Using PowerShell And System Center Virtual Machine Manager 2008 R2

Dynamically expanding disks enable you to thin provision virtual machines (VMs)  storage.  This means you can pack more VMs onto a given amount of disk, but you need to ensure that if you provision more storage than is physically available, you don’t run out of space on the host.  The PowerShell script below produces a csv file showing the space available for growth on each VM with a dynamically expanding disk.  You can use this script to see how much space could still be used by your VMs and therefore see if you’re likely to run out of space on the host.  It’ll also show you if a dynamic disk is about to reach it’s maximum size.

Load PowerShell from the icon in the SCVMM console

Next copy and paste the code below into the PowerShell console, replacing VMMHOST with the name of your SCVMM host and the path of the csv file as appropriate.

Get-VirtualHardDisk -VMMServer VMMHOST -All | Select-Object @{Label=”VM Host”;Expression={$_.VMHost}},@{Label=”Name”;Expression={$_.Name}},@{Label=”Space To Grow”;Expression={[Math]::Truncate(($_.MaximumSize-$_.Size) / 1GB)}},@{Label=”VHDType”;Expression={$_.VHDType}} | Where-Object {($_.VHDType -Match “DynamicallyExpanding” -And $_.Name -NotMatch “{“)} | Sort-Object “Space To Grow” -Descending |  Export-Csv C:\DiskInformation.csv

Opening the csv in Excel produces


The PowerShell script is a one liner and breaks down as follows:

Get-VirtualHardDisk -VMMServer VMMHOST -All | Gets the virtual disk for the VMMServer specified

Select-Object @{Label=”VM Host”;Expression={$_.VMHost}},@{Label=”Name”;Expression={$_.Name}},@{Label=”Space To Grow”;Expression={[Math]::Truncate(($_.MaximumSize-$_.Size) / 1GB)}},@{Label=”VHDType”;Expression={$_.VHDType}} | Selects the VM host name, disk name, calculates the maximum disk size – current disk size and converts to GB, VHD type

Where-Object {($_.VHDType -Match “DynamicallyExpanding” -And $_.Name -NotMatch “{“)} | Filters the results to only include dynamically expanding disks whose names don’t start {

Sort-Object “Space To Grow” -Descending | Sorts the output by space to grow, descending

Export-Csv C:\DiskInformation.csv Exports the results to a csv file