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.

SCVMMDO0

 

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.

SCVMMDO1

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.

SCVMMDO2

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”.

MigrateVM1

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

MigrateVM2

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

MigrateVM2a

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.

MigrateVM3

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.

VMMigrationSpeed

 

 

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.

SCVMM SID

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…

DJA1

 

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.

DJA2

 

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

DJA3

 

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

DJA4

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.

Unattend_xml