How To Deploy Free VMM Service Templates and Windows Azure Pack Gallery Resources #VMM #HyperV #SysCtr #SCVMM #WAP

Hello Folks,

As you are familiar with Microsoft® Azure Virtual Machines gallery resources in the public cloud, you can have a similar experience in your own private cloud with System Center Virtual Machine Manager and Windows Azure Pack.

The Windows Azure Pack is a collection of Windows Azure technologies available to Microsoft® customers on-premises for free. Once installed in your private cloud, the Windows Azure Pack integrates with System Center Suite and Windows Server to help provide a self-service portal for managing services such as websites, Virtual Machines, a portal for administrators to manage cloud resources, and a portal for tenants “customers” for self-service.

The feed of Windows Azure Pack Gallery Resources and VMM Service Templates is constantly being updated at the following URL:

How to deploy it?

1.  Download and Install the Microsoft Web Platform Installer 5.0 from here.

2.  Launch the Web Platform Installer.VMM-WAP-Temp01

3.  Select the Options link at the bottom right.VMM-WAP-Temp02

4.  Enter the Feed URL into the Custom Feeds field: 5.  Select the Add feed button.VMM-WAP-Temp046.  Select the OK button.

7.  You will now see a new Service Models link at the upper right of the Web Platform Installer UI.VMM-WAP-Temp05
8.  Select the Service Model you want to download (SCVMM Service Templates or Gallery Resources).

SCVMM Service Templates:VMM-WAP-Temp06

Windows AZURE Pack Gallery Resources:VMM-WAP-Temp07

9.  Select the Add button next to whichever Service Model you would like to download (VMM or WAP).VMM-WAP-Temp08

10. Select the Install button.

11. Select the I Accept button.VMM-WAP-Temp10

12. Select the Continue button.VMM-WAP-Temp11

13. Select the Finish button.

14. Last but not least, Windows Explorer window will open, displaying the contents of the Service Model.
Service Models are extracted into your %SystemDrive% folder, according to both types:
Gallery Resources – %SystemDrive%\GalleryResources\<resourcename>
     SCVMM Service Templates – %SystemDrive\SCVMM Service Templates\<resourcename>
     Follow the directions in the Service Model Readme file that ships with each Gallery Item to complete this procedure.
The Readme file includes the values specific step by step to that particular item.

Next we will move into the import process of the Template.

Copy the VMM Service Template directory into your VMM library server, launch the VMM Console and then refresh the library.VMM-WAP-Temp16

From the Virtual Machine Manager console, launch the import template wizard.



On the Select Package page, click browse, navigate to the location where the service template is saved in my case (Domain Controller Windows Server 2012.1.0), then select the .XML template, click open and then click next in the import wizard.VMM-WAP-Temp17

Note: On the Configure References page, verify that all resources are mapped correctly for you environment. For any reference which is not mapped correctly (or contains a Current Mapping of clip_image002 None), click the clip_image004 icon next to each resource and choose an appropriate resource in your environment in which to map the references:VMM-WAP-Temp18


Complete the import wizard and verify that the template has imported successfully:VMM-WAP-Temp20


Open the service template in the designer and modify any applicable settings to confirm to your standards, for example:
- Virtual machine hardware configuration.
- Computer name pattern.
- Product Key, etc…

Here you go a DC service template instance is ready to be deployed.

Enjoy your weekend!


Posted in System Center, Virtual Machine Manager, Windows Azure Pack

Over 70 recipes to help you design, configure, and manage your own private cloud with VMM 2012 R2 #VMM #HyperV #SysCtr #Cloud @PacktPub @Cloudtidings

Hello Folks,

For all virtualization enthusiasts who need to use Microsoft System Center Virtual Machine Manager in a real-world environment. A New book just been published by Packt Publishing, it’s named “System Center 2012 R2 Virtual Machine Manager Cookbook, Second Edition” authored by Edvaldo Alessandro Cardoso.

The second edition is focused on the recent version of Virtual Machine Manager 2012 R2 while the first edition covered the previous VMM release 2012.

6848EN_System Cookbook

I am happy to announce that I was selected to review the book.

This book has over 70 recipes to help you design, plan, and improve System Center Virtual Machine Manager (SCVMM) deployment; integrate and manage fabric (compute, storage, gateway, and networking), services, and resources; deploy clusters from Bare Metal servers; configure integration with Operations Manager, App Controller and Microsoft® Azure; and carry out vital tasks quickly and easily.

Here is the detailed table of contents and what to expect to learn from this book:

Chapter 1: VMM 2012 Architecture
Understanding each component for a real-world implementation
Planning for High Availability
Designing the VMM server, database, and console implementation
Specifying the correct system requirements for a real-world scenario
Licensing the System Center
Troubleshooting VMM and supporting technologies

Chapter 2: Upgrading from Previous Versions
Reviewing the upgrade options
Checking the VMM system requirements and preparing for the upgrade
Upgrading to VMM 2012 R2
Re-associating hosts after upgrading
Updating the VMM agents
Performing other post-upgrade tasks

Chapter 3: Installing VMM 2012 R2
Creating service accounts
Deploying a Microsoft SQL Server for a VMM implementation
Installing VMM dependencies
Configuring Distributed Key Management
Installing a VMM management server
Installing the VMM console
Connecting to a VMM management server using the VMM console
Creating credentials for a Run As account in VMM
Configuring ports and protocols on the host firewall for each
VMM component

Chapter 4: Installing a High Available VMM Server
Installing a highly available VMM management server
Installing a VMM management server on the additional node of a cluster
Connecting to a highly available VMM management server using the VMM console
Deploying a highly available library server on a file server cluster
Uninstalling a highly available VMM management server

Chapter 5: Configuring Fabric Resources in VMM
Creating host groups
Setting up a VMM library
Configuring networks in VMM
Networking – configuring logical networks
Networking – configuring VM networks and gateways
Networking – configuring logical switches, port profiles, and port classifications
Integrating and configuring the storage
Creating a physical computer profile (host profile)
Provisioning a physical computer as a Hyper-V host – Bare Metal host deployment
Adding and managing Hyper-V hosts and host clusters

Chapter 6: Deploying Virtual Machines and Services
Creating private clouds
Creating hardware, guest OSes, applications, and SQL profiles
Creating user roles in VMM
Creating and deploying virtual machines
Creating virtual machine templates
Creating and deploying service templates
Rapidly provisioning a virtual machine using SAN Copy

Chapter 7: Managing VMware ESXi and Citrix® XenServer® Hosts
Adding VMware vCenter Server to VMM
Adding VMware ESX hosts or host clusters to VMM
Configuring network settings on a VMware ESX host
Configuring host BMC settings
Importing VMware templates
Converting VMware virtual machines to Hyper-V
Managing Citrix® XenServer® hosts and pools
Converting Citrix® virtual machines to Hyper-V

Chapter 8: Managing Hybrid Clouds, Fabric Updates, Resources, Clusters,and the New Features of R2
Creating Hyper-V clusters
Managing fabric updates
Configuring Dynamic Optimization and Power Optimization
Live migrating virtual machines
Managing Linux virtual machines
Configuring availability options and virtual NUMA for VMs
Configuring resource throttling
Integrating with the IPAM server for IP management
Deploying SC App Controller 2012 R2 for hybrid cloud management
Configuring Synthetic Fibre Channel

Chapter 9: Integration with System Center Operations Manager 2012 R2
Installing System Center Operations Manager 2012 R2
Installing management packs
Managing Discovery and Agents
Configuring the integration between Operations Manager 2012
and VMM 2012
Enabling reporting in VMM
Extending monitoring with management packs

Chapter 10: Scripting in Virtual Machine Manager
Introducing VMM PowerShell
Finding the command to automate tasks in VMM
Creating a script from VMM wizards
Storing and running scripts in VMM
Using VMM sample scripts

The book is available for immediate download from Packt Publishing website after registration here.

Grab your copy and enjoy!


Posted in Book, System Center, Virtual Machine Manager

An Attempt to initialize VM saved state failed – Could Not Create or Access Saved State File #HyperV #SCVMM

Hello Folks,

Well, after a few weeks away from work on vacation, I’ve finally managed to sit back and go through all my 30 Hyper-V hosts across different remote sites from a single pane of glass, of course you guessed it? yes, yes… Virtual Machine Manager Smile.

What I’ve come across from browsing through the console one Virtual Machine in a particular remote site is in a Stopped state.

And of course, what is the first thing you want to try to do is to power on that VM!


The unexpected behavior, the VM failed to start with the following error Surprised smile:

Error (12700)
VMM cannot complete the host operation on the server because of the error: ‘DC01′ could not initialize. (Virtual machine ID 7431245E-0FB3-45D3-B2E2-014124480F42)

‘DC01′ could not create or access saved state file D:\VirtualMachines\DC01\Virtual Machines\7431245E-0FB3-45D3-B2E2-014124480F42\7431245E-0FB3-45D3-B2E2-014124480F42.vsv. (Virtual machine ID 7431245E-0FB3-45D3-B2E2-014124480F42)
Unknown error (0×8001)

Recommended Action
Resolve the host issue and then try the operation again.

As we can see in the error above that the Virtual Machine could not access the saved state file .vsv.

The next logical thing is to remote into the Hyper-V host and try to dive deeper.


Again the VM failed to start.


As you can see in the above self-explanatory error that you do not have permission to perform this operation, therefore the issue is security permission.

Two errors are logged in the Event Viewer as well:

Event ID 3040:


Event ID 3080:


Back to basics, what files are used to create a virtual machine in Hyper-V:

  • .XML files
    • These files contain the virtual machine configuration details. There is one of these for each virtual machine and each checkpoint of a virtual machine. They are always named with the GUID used to internally identify the virtual machine
  • .BIN files
    • This file contains the memory of a virtual machine or checkpoint that is in a saved state.
  • .VSV files
    • This file contains the saved state from the devices associated with the virtual machine.
  • .VHD/VHDX files
    • These are the virtual hard disk files for the virtual machine.
  • .AVHD files
    • These are the differencing disk files used for virtual machine checkpoints aka (snapshots).
  • .VFD files
    • These are for virtual floppy disks files and rarely you use them Smile.

What are the symptoms that we observed so far:

  • Powering on the VM in Virtual Machine Manager, Hyper-V Manager or in PowerShell would result in an error  – could not create or access saved state file.
  • Error 3040 and 3080 was logged into the Hyper-V Worker event log.

I will browse into the .vsv and .bin files of the affected virtual machine and check it’s security permission.





If we compare the .vsv and .bin files for a running VM on the same host, we notice something different:


The GUID name of the virtual machine has full control on those files, but not on the affected VM.

One important point to mention that the GUID is the security context that is used to access the various files that make up the VM.  The VM Worker Process (vmwp.exe) will leverage this to work with the files. You can open up task manager or fire up PowerShell and see the VM Worker Process details, the GUID is listed in the user name field:



Let’s grant permissions to the .bin and .vsv files, you can use ICacls.exe from the command prompt (cmd):

The syntax is the following:

D:\VirtualMachines\DC01\Virtual Machine\7431245E-0FB3-45D3-B2E2-014124480F42\ICacls.exe 7431245E-0FB3-45D3-B2E2-014124480F42.bin /grant “NT VIRTUAL MACHINE\7431245E-0FB3-45D3-B2E2-014124480F42″:(F)

D:\VirtualMachines\DC01\Virtual Machine\7431245E-0FB3-45D3-B2E2-014124480F42\ICacls.exe 7431245E-0FB3-45D3-B2E2-014124480F42.vsv /grant “NT VIRTUAL MACHINE\7431245E-0FB3-45D3-B2E2-014124480F42″:(F)

Sure enough you need to adjust and match your GUID including the VM storage location.

Once I set the NTFS security permissions, I tried to power on the VM again!

And… Disappointed smile


Ehhhhh! What security permission is still missing Thinking smile

Let’s browse to the root folder of the affected Virtual Machine and compare the NTFS security permission with another running VM.

To illustrate this, you can fire up PowerShell and compare side by side using my favorite compare-object cmdlet:

PS C:\>$acl = Get-Acl -Path “D:\VirtualMachines\DC01″
PS C:\>$acl.access > C:\DC01.txt
PS C:\>$acl = Get-Acl -Path “D:\VirtualMachines\DHCP01″
PS C:\>$acl.access > C:\DHCP01.txt
PS C:\>Compare-object -referenceobject $(get-content C:\DHCP01.txt) -differenceobject $(get-content C:\DC01.txt)


What you can see in the SideIndicator outputis the NT Virtual Machines\Virtual Machines IdentityReference is available on the left arrow which means on the reference running VM ‘DHCP01’ and not available on the affected VM ‘DC01’.

If you look into NT Virtual Machines\Virtual Machines NTFS advanced security permission using the UI, you can see below:


Let’s grant the missing security permissions to the root DC01 Virtual Machine folder from ‘DHCP01’ using PowerShell.

PS C:\>$acl = Get-Acl -Path “D:\VirtualMachines\DHCP01″
PS C:\>Set-Acl -Path “D:\VirtualMachines\DC01″ -AclObject $acl
PS C:\Start-VM DC01
PS C:\Get-VM DC01

And here you go Smile



The best course of action is to never touch the security permission for the Virtual Machine files once they are working, and don’t change inheritance or modify any of these automatically added items, because when you first build a virtual machine, Hyper-V will set the security permission appropriately.

Hope this helps.

Enjoy your day!


Posted in Hyper-V, Security

Install and Configure VMM Network Builder #SCVMM #SysCtr #Cloud #HyperV

Hello Folks,

Good News! The System Center VMM Team just announced a new UI add-in tool to help customer on creating virtual network in Virtual Machine Manager.

If you are using Virtual Machine Manager in your environment and of course you should if you have more than 3 Hyper-V hosts to manage, then you examine the network fabric was the hardest part to configure Smile.


The interns Program Managers on the System Center VMM team Mr. Anjay Ajodha and Mr. Matt McGlynn spent their summer analyzing the customer pain points regarding networking in VMM and have developed a small tool that should help ease the frustration with setting up VLAN-isolated networks in VMM. To help you get started quickly with networking in VMM and to simplify the process of creating new networks, they have created a new UI add-in in VMM home taskbar:


The entire basic networking setup can be created with this tool that can either be applied to hosts directly or used as a generic networking object base to be modified for customization to your configuration. VMM Network Builder compresses the steps required to build a logical switch. This tool will create networks that utilize VLAN isolation however it is not purposed for creating NVGRE networking configurations!

Let’s jump first into the installation of VMM Network Builder:





When the installation is done, you end up with


Next, we need to import the Add-in, open VMM console and browse to Settings workplace and click on Import Console Add-in.



After the import is completed you can see an extra Icon in the title home bar “Build a Network“.

Let’s create and configure a basic VLAN-isolated network, click on “Build a Network“ and follow the wizard.

The Network Builder will connect to your VMM Server.


The first question is, do you to Create a Management Network?


The second option, do you have a separate Management NIC or all traffic going into the same physical NIC/Team?

In my environment, I am using Converged Network Fabric for (Management, Live Migration, Cluster, Virtual Machines, etc…), therefore I will select No.


Next you want to define the Management Network subnet.


Next step is to define a logical network name:


Now you want to define the Virtual Networks (VLAN ID and IP Pools).


Here a nice diagram showing the network configuration that will be created.

You can select “I would like to create a script to apply this logical switch to hosts”.


Here is the final summary before you create the VLAN-isolated network.

You can save the Script for future use as well.


As you noticed many different options are available in this tool, I recommend to try it and see how it works in your environment.

You can download the VMM Network Builder tool from here.

Enjoy your day!


Posted in Networking, System Center, Virtual Machine Manager

Free New eBook – Explored: 7 Key Areas of Hyper-V By Altaro Software #HyperV #Altaro

Hello Folks,

Here you go with a new free eBook gift from Altaro Software. The eBook is called Explored: 7 Key Areas of Hyper-V and it’s a detailed guide to help improve the core areas of a Hyper-V environment.


The eBook consists of 7 Chapters as the following:

Chapter 1: Seven Keys to Hyper-V Security
Manage Access to Virtual Machine Functions
Group Policy
File, Folder, and Share Security
The Network
The Guests
Patches and Hotfixes

Chapter 2: Hyper-V Manager – An Introduction
How to Acquire Hyper-V Manager
Enabling Hyper-V Manager
Interface Quick Tour
Differences between Hyper-V Manager and System Center Virtual Machine Manager
Hyper-V Cluster Integration
Failover Cluster Manager

Chapter 3: Set Up Native Net work Teams for Hyper-V
The GUI Way
The PowerShell Way
Related Cmdlets
Notes on the Windows Team
Link Aggregation and Bandwidth

Chapter 4: A Quick Guide to Hyper-V’s Virtual Switch
What You Get
The Fine Print

Chapter 5: Hyper-V Virtual CPUs
Physical Processors are Never Assigned to Specific Virtual Machines
Start by Understanding Operating System Processor Scheduling
Taking These Concepts to the Hypervisor
What about Processor Affinity?
How Does Thread Scheduling Work?
What Does the Number of vCPUs I Select Actually Mean?
But Can’t You Assign More Total vCPUs to all VMs than Physical Cores?
What’s The Proper Ratio of vCPU to pCPU/Cores?
What about Reserve and Weighting (Priority)?
But What About Hyper-Threading?

Chapter 6: Proper Use of Hyper-V Dynamic Disks
Terminology Clarification
What Dynamically Expanding Disks Are
How Dynamic VHD s Operate in the Real World
Making Fragmentation Go Away

Chapter 7: Connecting Hyper-V to Storage
Internal/Direct-Attached Disks
Prepare a Local Disk for Usage
Prepare a Storage Spaces Volume for Usage
Fibre Channel
Multi-Path I/O (MPIO)
SMB 3.0
Storage for a Hyper-V Cluster

Grab your free copy now @: ebook

Enjoy your day,


Posted in Altaro, Hyper-V

Hyper-V 2012 R2: Rollup Update, August 2014 #HyperV

Hello Folks,

As you already know that Microsoft pushed the second update this year for Windows 8.1 and Windows Server 2012 R2.

In this blog post I will list the new updates that applies only for Hyper-V Server 2012 R2.

Here you go 3 bug fixes for Hyper-V:

  • KB2972254: Hyper-V virtual machines cannot be connected to sometimes when TCP connections reconnect in Windows Server 2012 R2.

Symptoms: This issue occurs when a node of a failover cluster is removed from active cluster membership.

  • KB2978101: Windows 2012 R2-based Hyper-V host cluster freezes when virtual machines use shared virtual hard disks.

Symptoms: You have a Windows 2012 R2-based Hyper-V host cluster, or you create Hyper-V virtual machines on the cluster, and then you add shared virtual hard disk files (.vhdx) to the virtual machines.

  • KB2976884: “Access denied error” when Hyper-V Replica Broker goes online in a Windows Server 2012 or Windows Server 2012 R2 cluster.

Symptoms: You have a Windows Server 2012 R2 or Windows Server 2012 failover cluster that is in a domain, and the domain has a disjoint namespace.
You set the primary Domain Name Service (DNS) suffix of the Windows Server 2012 failover cluster to the disjoint domain name.
You create a Hyper-V Replica Broker in the failover cluster, and then you bring the Hyper-V Replica Broker online.

For detailed information visit:

Patch, test, wait and then deploy in Production!!!

Happy Patching Smile


Posted in Hyper-V, Updates

What is VLAN Trunk Mode in Hyper-V? #HyperV

Hello Folks,

In today’s blog post we will dive into VLAN trunk mode in Hyper-V 2012 R2.

As you know, If you want to assign virtual machine network traffic to different VLANs, a network adapter that supports VLANs must be installed in the Hyper-V host and assigned to the virtual switch. You can set the VLAN ID for the virtual machine in the settings of the VM. The VLAN ID that is set in the virtual switch is the VLAN ID that will be assigned to the virtual network adapter (vmNIC) assigned to the host Operating System as showing in the following figure:


VLAN ID settings for Virtual Machine. (Image: @CharbelNemnom)

What is VLAN trunk mode?
Hyper-V Virtual Switch also provides support for VLAN trunk mode. Trunk mode provides network services for a Virtual Machine with the ability to see traffic from multiple VLANs, in other words the virtual switch port receives traffic from all VLANs that you configure in an allowed VLAN list. You can also configure a switch port that is connected to a VM, but is not bound to the underlying NIC for trunk mode.

Configuring VLAN trunk mode for a (vmNIC) is not supported from Hyper-V Manager console; only a single VLAN can be configured as shown above.

So, how to do it?

With PowerShell, of course Smile

Set-VMNetworkAdapterVlan –VMName Demo –Trunk –AllowedVlanIdList 100-150 –NativeVlanId 20

In the example, “Demo” VM can send or receive traffic on any VLAN in the allowed list (100-150), and If there is no VLAN specified in the packet, the packet is treated as if it is from VLAN 20.

Note from the field
The NativeVlanId should not be within the scope listed in the AllowedVlanIdList (100-150), in other words if you set the Native VLAN ID to 110 for example, the VLAN 110 will be non functional, the VM itself will not be able to transmit tagged or untagged packets in VLAN ID 110.

Useful case
If you have a virtual machine that requires access to more networks than available virtual adapters, then you can enable VLAN trunk mode by using the Set-VMNetworkAdapterVlan cmdlet.

Enjoy your day!


Posted in Hyper-V, Network

Free Monitoring With Veeam Task Manager For Hyper-V (TMHV) #HyperV #Veeam

Hello Folks,

As you might noticed from the recent news, Veeam just announced and released Veeam Task Manager for Hyper-V (TMHV) free!

Here is quick overview:

As you already now that the default Task Manager built-in to Windows is not useful in a Hyper-V host because the CPU and memory usage shown does not show which VMs are using those resources. Veeam Task Manager for Hyper-V solves that problem with a unique on-demand real-time analysis of key performance counters for Hyper-V hosts and VMs running on these hosts as shown in below figure: 


The system requirements for installation is Windows 7 and above including Hyper-V 2012 or 2012 R2.

The optimal installation is where? sure enough on your RSAT management machine Winking smile and then connect remotely to all your Hyper-V hosts and start monitoring like a PRO. Veeam Task Manager for Hyper-V use port TCP 445, make sure you open this port in the firewall on all hosts.

If you need more information about TMHV, you can find on Veeam’s website just announced by Mr. Mike Resseler here.

Give it a try and make your life easier, just register and download it from here.

Enjoy! Smile


Posted in Hyper-V, Monitoring

Building and Managing a Virtual Environment with Hyper-V Server 2012 R2 Video #HyperV @PacktPub @EricSiron

Hello Folks,

A New Hyper-V video training has been published by Packt Publishing last month, it’s named “Building and Managing a Virtual Environment with Hyper-V Server 2012 R2” authored by Mr. Eric Siron.


I am happy to announce that I was selected to review the training and post my feedback.

What you will learn from this video course:

  • Bring your Hyper-V nodes together into a cluster, remove failed nodes, and add new computer systems.
  • Explore the needs and the variety of storage options for a Hyper-V cluster.
  • Use the built-in graphical tools to manage your nodes and virtual machines.
  • Employ various methods to move virtual machines across nodes and clusters.
  • Use PowerShell and go beyond clustering to manage your nodes and virtual machines.
  • Gain a basic understanding of licensing Windows Server in a virtual environment.
  • Learn how to monitor the performance of your Hyper-V systems and meter virtual machines.
  • Get introduced to the cloud-enabling features of System Center Virtual Machine Manager.

And here is the table of content for your reference:

  1. Preparing the Nodes
    • Installing Hyper-V
    • Installing the Hyper-V PowerShell Module
    • Installing the Hyper-V Manager and Failover Cluster Manager
    • Network Adapter Teaming
    • The Hyper-V Virtual Switch
  2. Building the Cluster
    • Configuring Cluster Networks
    • Connecting to Storage
    • Cluster Validation
    • Cluster Creation
    • Adding Nodes and Storage to an Existing Cluster
  3. Virtual Machine Storage in a Cluster
    • Virtual Machine Files
    • Cluster Shared Volumes
    • Virtual Machines on SMB Shares
    • Storage and Share Permissions
    • Splitting Virtual Machine Storage
  4. Manipulating Virtual Machines in the GUI
    • Creating and Deleting Virtual Machines
    • Adjusting Memory Settings
    • Working with Hard Drives
    • Changing Network Settings
    • Manipulating Automatic Actions
  5. Manipulating Virtual Machines in PowerShell
    • Creating and Deleting Virtual Machines(PowerShell)
    • Adjusting Virtual Machine Memory(PowerShell)
    • Working with Hard Drives(PowerShell)
    • Changing Network Settings(PowerShell)
    • Manipulating Automatic Actions(PowerShell)
  6. Virtual Machine Mobility
    • Live Migrations
    • Quick Migrations
    • Failover
    • Storage Live Migrations
    • Shared Nothing Live Migrations
  7. Cluster Protection
    • Hyper-V Replica Setup
    • Hyper-V Replica Failover and Failback
    • Backup
    • Quality of Service
    • Cluster Aware Updating
  8. Cluster Maintenance
    • Licensing
    • Hyper-V Checkpoints
    • Hyper-V Best Practices Analyzer
    • Hyper-V Monitoring and Metering
    • Microsoft System Center Virtual Machine Manager

If you are novice or experienced Hyper-V, I would recommend you to get a copy of the training since the video course covers level 100 information up to level 300, and the course is 3 and a half hours, I am sure that you might find something interesting here.

Do you want to get a copy and save 15%?

The video course is available to download immediately from Packt Publishing website after registration: here.

Until next time,


Posted in Hyper-V, Video

How To Enable & Configure VMQ/dVMQ on Windows Server 2012 R2 with Below Ten Gig Network Adapters #HyperV #Vmq #vRSS

Hello Folks,

Back to basics: What is Virtual Machine Queue (VMQ), why do you need it and why you should enable it?

Virtual Machine Queue or dynamic VMQ is a mechanism for mapping physical queues in a physical NIC to the virtual NIC (vNIC) or virtual machine NIC (vmNIC) in Parent partition or Guest OS. This mapping makes the handling of network traffic more efficient. The increased efficiency results in less CPU time in the parent partition and reduced latency of network traffic.

VMQ spreads the traffic per vmNIC/vNIC, and each VMQ can use at most one logical CPU in the host, in other words VMQ distributes traffic equally amongst multiple guests (VMs) on a single host with a vSwitch (1 core per vmNIC/vNIC).

Note: The vNIC means a host partition Virtual NIC of the Virtual Switch in the Management OS, and the vmNIC is the synthetic NIC inside a Virtual Machine.    

VMQ is auto enabled by default on Windows Server machines when a vSwitch is created with 10Gig network adapters and above, and it’s useful when hosting many VMs on the same physical host.

The below figure is showing the ingress traffic with VMQ enabled for virtual machines.


[VMQ incoming traffic flow for virtual machines – source Microsoft]

When using 1Gig network adapters VMQ is disabled by default, because Microsoft don’t see any performance benefit to VMQ on 1Gig NICs, and one CPU/Core can keep up with 1Gig network traffic without any problem.

As I mentioned above with VMQ disabled all network traffic for vmNIC has to be handled by a single core/CPU, however with VMQ enabled and configured the network traffic is distributed across multiple CPUs automatically.

Now what happened if you have a large number of Web Servers VMs on a host with 2 eight core processors or more and with large amount of memory but you are limited by the physical NICs with 1Gig only?

The answer is…

VMQ and vRSS better together Smile

As I demonstrated in a previous blog posts, Post I and Post II, Windows Server 2012 R2 introduced a new feature called Virtual Receive Side Scaling (vRSS). This feature works with VMQ to distribute the CPU workload of receive network traffic across multiple (vCPUs) inside the VM. This effectively eliminates the CPU core bottleneck that we experienced with a single vmNIC. To take the full advantage of this feature both the host and the guest need to be Windows Server 2012 R2. As a result VMQ needs to be enabled on the physical host and RSS enabled inside the virtual machine, but until this point in time Microsoft don’t actually enable vRSS for the host vNICs, it’s only for VMs so we are stuck with one processor on the host Management partition with Converged Network environment. The good point is the vNICs on the host side get locked to one processor, but they will still get VMQs assuming you have enough Queues and they get distributed across different processors.  

The requirements to enable VMQ are the following:

1. Windows Server 2012 R2 (dVMQ+vRSS).
2. The Physical network adapters must support VMQ.
3. Install the latest NIC driver/firmware (very important).
4. Enable VMQ for 1Gig NICs in the registry, this step can be skipped if you have 10Gig adapters or more:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\VMSMP\Parameters\BelowTenGigVmqEnabled = 1

5. Reboot the host if you enable the registry key in step 4.
6. Determine the values for Base and Max CPU based on your hardware configuration.
7. Assign values for Base and Max CPU.
8. Enable RSS inside the Virtual Machines.
9. Turn on VMQ under Hyper-V settings for each VM which is already ON by default.

What is the Base CPU? It is the first CPU used for processing the incoming traffic for a particular vmNIC.

What is the Max CPU? It is the maximum number of CPU that we allow that NIC to process the traffic on.

Ok, so having this explained let’s configure VMQ step by step:

Our Lab Scenario:

We have 8 Physical 1Gig NICs and 2 X 8-core (32 logical processors).

First we need to determine if HyperThreading is enabled by running the following cmdlet:

PS C:\Get-WmiObject –Class win32_processor | ft –Property NumberOfCores, NumberOfLogicalProcessors –auto


As you can see we have the NumberOfLogicalProcessors as twice as the NumberOfCores, so we know that HT is enabled in the system.

Next, we need to look at our NIC Teaming and load distribution mode:

PS C:\Get-NetlbfoTeam | ft –Property TeamNics, TeamingMode, LoadBalancingAlgorithm –auto


After we determined that HyperThreading is enabled and the Teaming Mode is Switch Independent with Dynamic Mode, next we move on to Assign the Base and Max CPUs.

Attention: before moving into the assignment, one important point to consider, if the NIC team is in Switch-Independent teaming mode and the Load Distribution is set to Hyper-V Port mode or Dynamic mode, then the number of queues reported is the sum of all the queues available from the team members (SUM-Queues mode), otherwise the number of queues reported is the smallest number of queues supported by any member of the team (MIN-Queues mode).

What is (SUM-Queues mode) and What is (MIN-Queues mode)?

The SUM-Queues mode is the total number of VMQs of all the physical NICs that are participating in the team, however the MIN-Queues mode is the minimum number of VMQs of all the physical NICs that are participating in the team.

As an example, let’s consider we have two physical NICs with 4 VMQs each, if the teaming mode is Switch Independent with Hyper-V Port, the mode will be SUM-Queues equal to 8 VMQs, however if the teaming mode is Switch Dependent with Hyper-V Port the mode will be MIN-Queues equal to 4 VMQs.

[You can refer to the table below in order to determine the Teaming and Load distribution mode, source - Microsoft]:

Distribution mode→

Teaming mode↓

Address Hash modes Hyper-V Port Dynamic
Switch independent Min-Queues Sum-Queues Sum-Queues
Switch dependent Min-Queues Min-Queues Min-Queues

In our scenario, the NIC Team is in Switch Independent with Dynamic Mode so we are in SUM-Queues mode.

If the team is in Sum-Queues mode the team members’ processors should be, non-overlapping or with little overlap as possible. For example, in a 4-core host (8 logical processors) with a team of 2X10Gbps NICs, you could set the first NIC to use base processor of 2 and to use 4 cores; the second would be set to use base processor 6 and use 2 cores.

If the team is in Min-Queues mode the processor sets used by the team members must be identical, you should configure each NIC team member to use the same cores, in other words the assignment for each physical NIC will be the same.

Now let’s check first if VMQ is enabled:

PS C:\Get-NetAdapterVmq


As you can see VMQ is enabled (=True) but not yet configured.

And here we have two Converged Network Teams with 4 Physical NICs and 16 Queues each, so the total number of VMQs per team is 64.

I am using one Converged Team for vmNIC (VMs) and the second one is used for vNIC in the host.

We will set the Base and Max CPUs by running the following cmdlets for the teamedadapters under ConvergedNetTeam01:

PS C:\Set-NetAdapterVmq –Name NIC-b0-f0 –BaseProcessorNumber 2 –MaxProcessors 8
PS C:\Set-NetAdapterVmq –Name NIC-b0-f1 –BaseProcessorNumber 10 –MaxProcessors 8
PS C:\Set-NetAdapterVmq –Name NIC-b0-f2 –BaseProcessorNumber 18 –MaxProcessors 8
PS C:\Set-NetAdapterVmq –Name NIC-b0-f3 –BaseProcessorNumber 24 –MaxProcessors 8

As I mentioned above that in (Sum-Queues mode) you should configure the Base and Max CPU for each physical NIC with non-overlapping as possible, but in our lab environment we didn’t have as many cores as we had Queues so we had to have some overlap otherwise we are wasting our Queues.

Let’s run Get-NetAdapterVmq again and see the changes:


As you can see the Base and Max processors are set now, next we can run the Get-NetAdapterVmqQueue andthis will shows us how all queues are assigned across the VMQs in the vmNICs for all VMs on that particular host.


Now let’s see the result before and after VMQ + vRSS are enabled:

VMQ and vRSS disabled

In the Guest OS:


In the Host:


VMQ and vRSS enabled

In the Guest OS:


In the Host:


Last but not least best practices for configuring VMQ:

1. When using NIC Teaming, always use Switch Independent with Dynamic Mode when possible.
2. Make sure your base processor is never set to Zero to ensure best performance, because CPU0 handles special functions that cannot be handled by any other CPU in the system.
3. Keep in mind when assigning the Base/Max CPU and HyperThreading is enabled in the system, only the even number of processor is real processor (2,4,6,8, etc…), if HT is not enabled you can use even and odd number (1,2,3,4,5, etc…).
4. In SUM-Queues mode, try to configure the Base and Max CPU for each physical NIC with little overlap as possible, this is depends on the host hardware configuration with multiple cores.
5. Only assign Max Processor values of 1,2,4,8. It is ok to have a max processor number that will extend past the last core, or exceeds the number of VMQs on the physical NIC.
6. Don’t set the Base & Max processors on the Multiplexor NIC Teamed Adaptors, leave it as default.

In conclusion, I would prefer to enable VMQ on 1Gig NICs so I can keep my network traffic spread across as many CPU/cores as possible Smile.

For VMQ and RSS deep dive, here you go TechNet 3 part series VMQ Deep Dive.

Hope this helps.

Until then, enjoy your weekend!


Posted in Hyper-V, Network

Sponsor – ALTARO

Copyright Warning

All material is copyrighted by me or by its respective owners. To use any of it, full or in part, you must contact me or owner of the material. You may quote few paragraphs from this blog only if you link to the original blog post.

Follow me on Twitter


Get every new post on this blog delivered to your Inbox.

Join other followers: