The v2 WMI namespace in Hyper-V on Windows 8

Hyper-V’s primary management interface is based on WMI.  More than that, it is based on an industry standard API profile that is defined by the DMTF (Distributed Management Task Force – The DMTF profiles that we use are developed by a number of industry members (Microsoft included) and are constantly growing and evolving.

When we started working on Windows 8, we decided that we needed to update our WMI interfaces to take advantage of newer profiles that have been defined since the initial release of Hyper-V.  Some of these newer profiles were needed to support new features in Windows 8, while other profiles had been improved to be easier to use and develop against.

There was one problem with this decision.  In some key areas – the newest profiles were not 100% compatible with the existing Hyper-V WMI interfaces.  This meant that adopting them would break any scripts / programs that people had written against Hyper-V in the past. 

This is not something that we wanted to do.

The solution that we came up with is what we call the “v2 namespace” for WMI.

What we did was to create a new WMI namespace for Hyper-V.  This namespace has WMI APIs that are based off of the newer DMTF profiles and allows you to do everything that you need to with a Windows 8 / Windows Server 2012 installation of Hyper-V.  At the same time we also maintained the old WMI namespace and kept 100% compatibility with the APIs from Windows Server 2008 / Windows Server 2008 R2 – however, this namespace does not have any APIs for new Windows 8 / Windows Server 2012 features.

This approach provides the best of all worlds.  We can provide access to new features, continue to adhere to industry standards and maintain backwards compatibility with existing programs / scripts.

Selecting to use one WMI namespace or another is as simple as specifying the “root\virtualization” or “root\virtualization\v2” namespace on your WMI query.  In some cases – the difference between the two is nonexistent:


But in other areas there are big differences:


You can read about the new WMI details here:

Another interesting impact of the WMI changes is around our in-box management tools.  In order to support all of the new features in Windows 8 / Windows Server 2012 we had to move our management tools to using the new v2 WMI namespace.  Unfortunately, this means that you cannot use these tools to manage Hyper-V on Windows Server 2008 R2 / Windows Server 2008 (i.e. you cannot use Hyper-V Manager or Hyper-V PowerShell cmdlets on Windows 8 to connect to Windows Server 2008 R2).  However, you can use Hyper-V Manager on Windows Server 2008 R2 to manage a Windows Server 2012 installation (due to our work to maintain backwards compatibility of APIs) but then you will not have access to any of the new features.

One final note here – for the curious – here are the DMTF profiles and versions that we are using in Windows 8 / Windows Server 2012:

Registered Name                         Registered Version
————–                         —————–
Computer System                        1.0.1
Generic Device Resource Virtualization 1.0.0
Storage Resource Virtualization        1.0.0
Processor Resource Virtualization      1.0.0
Ethernet Port Resource Virtualization  1.0.0
Virtual System                         1.0.0
Allocation Capabilities                1.0.0
System Virtualization                  1.0.0
Resource Allocation                    1.1.0
Memory Resource Virtualization         1.0.0
Virtual Ethernet Switch                1.0.0
Base Metrics                           1.0.1
Virtual System Migration               0.7.3