12 December 2013

Resolution for Error (2927) in SCVMM 2012 R2 when creating a clone

Had this issue on a environment where everything was working perfectly other than creating a clone.

Error (2927)
A Hardware Management error has occurred trying to contact server HYPERV03.domain.com  .

WinRM: URL: [http://hyperv03.woolworths.co.za:5985], Verb: [INVOKE], Method: [FilteredHardDriveScout], Resource: [http://schemas.microsoft.com/wbem/wsman/1/wmi/root/scvmm/P2VServerJob]

Unknown error (0x80338043)

Recommended Action
Check that WinRM is installed and running on server HYPERV03.woolworths.co.za. For more information use the command "winrm helpmsg hresult" and http://support.microsoft.com/kb/2742275 .

The Fix for this was to restart the System Centre Virtual Machine manager Agent on the Hyper-V Host.

Ref: http://blogs.technet.com/b/scvmm/archive/2012/12/13/vmm-support-tip-adding-hosts-fails-with-error-2927.aspx

Use PowerShell to conditionally add VM's to a VMM cloud

I've had a few instanced where I needed to add a whole bunch of existing VM's to an existing cloud in SCVMM.  I wanted to only add the machines where the VM name matched a certain naming convention.

The easiest way to do this was to pipe the details together PowerShell

Set the Variable to the Cloud's Name - in this case "Service Management"

$Cloud = Get-SCCloud -VMMServer scvmmc01.fixmyitsystem.com | where {$_.Name -eq "Service Management"}

I wanted to add all the machine that contained "CAA" in the machine name

Check that the correct list of VM's will be added

Get-SCVirtualMachine -VMMServer scvmmc01.fixmyitsystem.com | where {$_.Name -Match "CAA"} | select name

Once I was happy, the command pipe below added the machines to the cloud

Get-SCVirtualMachine -VMMServer scvmmc01.fixmyitsystem.com | where {$_.Name -Match "CAA"} | ForEach-Object {Set-SCVirtualMachine -VM $_.Name  -Cloud $Cloud }

You can use this method to use any of the virtual machine properties and you can use any of the conditional operators. As an example you could add all machines where the owner is someone, or even move all machines from one cloud to another.

Some of the VM Properties:


To get a full list of the available properties you can use

Get-SCVirtualMachine |gm

The compare or evaluate the property to your query you can use the Conditional Operators

 -eq             Equal
 -ne             Not equal
 -ge             Greater than or equal
 -gt             Greater than
 -lt             Less than
 -le             Less than or equal
 -like           Wildcard comparison
 -notlike        Wildcard comparison
 -match          Regular expression comparison
 -notmatch       Regular expression comparison
 -replace        Replace operator
 -contains       Containment operator
 -notcontains    Containment operator

02 December 2013

Manage Windows Network Bandwidth with native QOS

By default Windows process will use as much of the network as it can to complete a task as fast as possible. This is great when there is only one thing happening at a time.  If however you have a server that is handling different workloads you might want to prevent once kind of traffic from hogging all of the bandwidth and starving the others.

As an example we have a single server that hosts a HTTP site and a File Share.  When files are not being copied form the file share the Web site is responsive and works well.  When someone copies content from the file share the Web site performance deteriorates.   I ideally we want to prevent this from happening.

Lets look at the transfer rate and therefore network usage of the file copy

On this network, the speed at which the file can be copied is around 40MB/s

If we want to slow down the file copy to consume less bandwidth we can make us of the native Windows QOS Packet Scheduler.  The Quality Of Service scheduler allows us to prioritize  and limit traffic to ensure that one process does not starve another.

QOS functionality is covered by policies.  these policies  mostly lives on the group policy.  You can make QOS policy change in the group policy directly or through PowerShell using the NetQosPolicy noun

Step 1 - Check for existing policies
First up check if there are any existing policies that could conflict or override your intended policy.


Step 2 - Create a new policy
Next up we are going to create a new Policy  that applies to SMB traffic and we are going the throttle or limit the throughput to 2MB/s.

New-NetQosPolicy -Name "FileCopy" -SMB -ThrottleRateActionBitsPerSecond 2MB

At this stage we can start a file copy and see that the network usage is much lower.  

Step 3 - Adjust an existing policy
Once nice ting about QOS policies are that they apply almost immediately without any need for restarting a process or rebooting.
You can now adjust the limit with.

Set-NetQosPolicy -Name "FileCopy" -ThrottleRateActionBitsPerSecond 10MB

I ran this with a few different values and you can tell form the "steps" when they started and stopped.  You can increase or decrease the values, there is not restriction on it from that perspective.

Step 4 - Removing rules (optional)
Ultimately if you are done you can simply remove the policy with

Remove-NetQosPolicy -Name "FileCopy"

You can confirm that there are no policies left by running


The one limitation.to be aware of when starting out is that QOS only applies to OUTBOUND traffic.  Any file copy to the server would still consume the full network that is available.

Before you start looking for other tools to help shape your network traffic, look at what is possible with Windows QOS.  This barely scratches the surface but it shows just how easy and effective it can be.  For more information check out http://technet.microsoft.com/en-us/library/hh967469.aspx