Category Archives: System Center Virtual Machine Manager

SCVMM 2012 R2 – Dynamic Optimization Cannot Be Performed At This Time

When trying to run the Optimize Hosts wizard within SCVMM 2012 R2 I received the error “Dynamic Optimization Cannot Be Performed At This Time” and “Object reference not set to an instance of an object”.

The Application Event Log on the SCVMM server contained a Windows Error Reporting event from the same time.  Opening the event showed a link to the error log.



Opening the error log showed that the error was related to a logical network issue on the cluster.  This cluster has a converged network switch to which all virtual machines (VMs) connect.  However, two additional logical networks are mapped to the switch to enable the migration of VMs which were connected to logical networks of a different name on a legacy cluster.


What I found is that some VMs were connected to the “Hyper-V External Access ” logical networks, rather than the ConvergedNetworkSwitch.  Changing the network mapping of the affected VMs to ConvergedNetworkSwitch enabled me to run the Dynamic Optimization wizard.



New Book System Center 2012 R2 Virtual Machine Manager

I had the privilege of being a technical review on this great new book from Alessandro Cardoso.  If you work with SCVMM 2012 R2 take a look.

Covering : Windows 2012 R2 and Hyper-V new features, System Center 2012 R2 VMM, Operations Manager, App Controller and Azure integration as well the Veeam Management Pack.

  • Plan and design a VMM architecture for real-world deployment
  • Configure network virtualization, gateway integration, storage integration, resource throttling, and availability options
  • Integrate Operations Manager (SCOM) with VMM to monitor your infrastructure
  • Integrate SC APP Controller (SCAC) with VMM to manage private and public clouds (Azure)
  • Deploy clusters with VMM Bare Metal
  • Create and deploy virtual machines from templates
  • Deploy a highly available VMM Management server
  • Manage Hyper-V, VMware, and Citrix from VMM
  • Upgrade from previous VMM versions

Unable To Live Migrate A Virtual Machine – “There currently are no network adapters with network optimization available on host”

Having moved a virtual machine (VM) from a Hyper-V cluster where network optimization was available, to a cluster where it isn’t I was unable to live migrate the VM because “There currently are no network adapters with network optimization available on host”.


As network optimizations aren’t available on the host cluster, the tick box to disable virtual switch optimizations isn’t available.


On the original Hyper-V cluster where network optimization is available you can see a check box to “Enable virtual switch optimizations”.


Luckily, PowerShell can help. Running the command below from the SCVMM PowerShell console lists the properties of the VM’s network adapter.

$VM = Get-SCVirtualMachine -Name “VMNAME”
Get-SCVirtualNetworkAdapter -VM $VM

VMNetworkOptimizationEnabled is set to true.


You can use PowerShell to disable VM Network Optimization.

$VM = Get-SCVirtualMachine -Name “VMNAME”
$Adapter = Get-SCVirtualNetworkAdapter -VM $VM
Set-SCVirtualNetworkAdapter -VirtualNetworkAdapter $Adapter -EnableVMNetworkOptimization $false

You can now live migrate the VM.

Improve Virtual Machine Migration Performance

During the migration from a Windows Server 2008 R2 Hyper-V cluster to one based on Windows Server 2012 R2 I have had to migrate a lot of virtual machines.  The migration speed was lower than I expected given the available source and destination disk performance.  On a 1 Gbps network connection, the migration was only using about 25% of the available bandwidth.

In order to improve the performance I disabled TCP Connection Offload (TOE) on the source hosts.  This is because TOE can slow down the VM migration process, which takes place over BITS using HTTPS.  The screenshot below shows the setting in the Broadcom software.  Having disabled TOE the migration used anything up to 80% of the available bandwidth, significantly improving the migration times.




Event ID 17140 & 15030 On Windows Server 2012 R2 Hyper-V

Looking through the Event Logs on a Windows Server 2012 R2 Hyper-V host I could see multiple entries for event IDs 17140 & 15030 as below

17140 – The specified account name is not valid: ‘%USER SID%’.

15030 – ‘%SERVER NAME%’ failed to modify settings. (Virtual machine ID %VM ID%)

These errors can occur if you’re using System Center Virtual Machine Manager (SCVMM).  In the SCVMM console, open Settings -> Security -> User Roles.  Right-click on each user role and choose Properties.  Open the Members tab and look for the user SID you see in event ID 17140.


Highlight the SID and click Remove.

Create A Dedicated Account To Join Computers To A Domain

This is a quick post to describe the process of creating a dedicated account for joining machines to an Active Directory (AD) domain.  This is useful for things like System Center Configuration Manger task sequences and System Center Virtual Machine Manager templates.

First create a standard Windows user account.  Next, right-click on the Computers Organisation Unit (OU) within your AD domain.  From the menu choose Delegate Control…



On the next screen (Users or Groups) choose Add and select the user account you just created.  Click Next.  Choose “Create a custom task to delegate” on the next screen.



Next, choose to only delegate control to computer objects and tick Create and Delete selected objects in this folder.  Click Next.



On the next screen choose to show general permissions and from the list select:

  • Reset password
  • Read and write account restrictions
  • Validated write to DNS host name
  • Validated write to service principal name


Click Next and finish to complete the wizard.  Repeat this process for any other OUs where you’ll be joining computers to the domain.

Improving Virtual Server Deployment Time With Unattend.xml

As all the virtual machines I create using Hyper-V have the same hardware I decided to investigate the PersistAllDeviceInstalls option for unattend.xml.

The PersistAllDeviceInstalls setting configures whether the Plug and Play devices are uninstalled during the generalize phase and then reinstalled during the specialize pass of the sysprep process.  As all the virtual machines have the same hardware there’s no need to reinstall the Plug and Play devices and the result is a faster virtual machine deployment.

I created a fresh virtual server template with the PersistAllDeviceInstalls setting set to true and compared the setup time to the same template with PersistAllDeviceInstalls set to false.

With PersistAllDeviceInstalls set to false the setup time was 2:28.  With PersistAllDeviceInstalls set to true the setup time was 1:54, a small, but 23% saving in setup time.

If you want to add the PersistAllDeviceInstalls setting to unattend.xml here’s my example.



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.