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 - https://dmtf.org/). 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: https://msdn.microsoft.com/en-us/library/hh850319(v=vs.85)
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
Cheers,
Ben
Comments
Anonymous
May 30, 2012
I understand the emphasis on the latest-and-greatest, and the answer to the following question may certainly be "yes": after all, this is your blog, so your rules: Is your blog now exclusively Windows 8 related? I see the subtitle still reads "Talking about core virtualization at Microsoft (Hyper-V, Virtual PC and Virtual Server)," but it seems it's been a while since there was any discussion regarding (say) Virtual PC. Again, if that's intentional, that's fine, I just need to know because my organization currently has no plans to migrate (heck, we're only just now finalizing on Windows 7) so it's not a good use of my time to pore over Windows 8 right now. Thanks for a reply either way, JimAnonymous
May 30, 2012
so how can I manage my Hyper-V 2008 from a Windows 8 client?Anonymous
June 01, 2012
The lack of support for managing a 2008 Server from a Win8 machine is very troublesome. Are there any workarounds or any standalone clients that I can use from a Win8 machine to manage my 2008 Servers? And what happens with the v3 namespace? What is the mitigation -- am I expected to create a Win7 VM on my Win8 client so that I can manage my 2008 Servers?Anonymous
June 02, 2012
@Jim, Virtual PC and Virtual Server are end-of-life products. Microsoft virtualization is Hyper-V. Both for client and server as of Windows 8.Anonymous
June 04, 2012
Ummm, who are you, sj? I'm (still) hoping for an authoritative response from Ben, as opposed to someone simply providing an opinion (which doesn't answer my [rather simple and direct] question, anyway). If the blog is to become Windows 8 only, fine, it's one thing off my daily watch list. As is (by the way, and to provide another example) the MDOP DaRT blog; there, at least, PaulM was willing to confirm that both the blog and the product itself are (now) Windows 8 specific. If (for whatever reason) my organization is stuck at Windows 7 for the foreseeable future, then Windows 8-specific discussions are kinda irrelevant to me, and it would be nice to have (official) confirmation one way or the other. JimAnonymous
June 04, 2012
Jim - I talk about what I am using, which tends to be the latest and greatest, though every now and then I will use older software for personal interest. Out of curiosity - what information are you looking for that I have not yet blogged about? (Also - SJ is one of the Hyper-V MVPs who is a big contributor to the community, and was just trying to be helpful). Sepp / Doug - To manage previous versions from Windows 8 you are either going to need to use: 1) Remote Desktop to connect to the server 2) a virtual machine running an earlier version of Windows or 3) SCVMM. Cheers, BenAnonymous
July 16, 2012
Looking forward to Windows Server 2012 Service Pack 1, and a lot of Remote Desktop in between.Anonymous
August 27, 2012
"To manage previous versions from Windows 8 you are either going to need to use: 1) Remote Desktop to connect to the server 2) a virtual machine running an earlier version of Windows or 3) SCVMM." It's rather amusing that such an inconvenience was considered to be acceptable during planning.Anonymous
August 30, 2012
The comment has been removedAnonymous
September 22, 2012
Ben, I have some source code using WMI and noticed that so more has changed that the code no longer works when using the v2 namespace. Method names have changed (DefineSystem vs DefineVirtualSystem), properties have changed (ExternalDataRoot to ConfigurationDataRoot), and some classes are gone completely (Msvm_GlobalSystemSettingData). It seems from your post that when using v2, everything will work but you just lose the management of Hyper-V v1. From the code this is obviously not the case. Maybe the PowerShell wrapper makes this transparent but the code used with Hyper-V v1 now breaks on many locations with v2. Switching back to v1 namespace everything works again... It disappoints me that the v2 Hyper-V WMI documentation is still far from complete and missing all critical changes from v1 to v2. When will the documentation be updated? MarkAnonymous
October 12, 2012
Have to say this is disappointing... the Scvmm interface isn't nearly as lightweight as the hyper-V manager UI. While Scvmm has it's purpose... there are many times when I want to do something relatively quick and just use Hyper-V manager as the quick tool to go address a VM that's locked up. SCVMM is rather cumbersome... (right about now I'm considering rolling back to windows 7)Anonymous
October 25, 2012
Hi Ben and thanks for the post. I am facing an issue with executing the following command: winrm e wmi/root/virtualization/* -filter:"select * from Msvm_VirtualSwitch" When executed against Hyper-V 2012, it returns empty value, whereas when executed against Hyper-V 2008 R2, it returns an actual value. Could you please comment on that and let me know if there is a list of breaking changes in the 2012 version of the product? Thanks in advance, -StoimenAnonymous
October 25, 2012
Hi all, The question I asked above is no longer valid, there was a misconfiguration on my end, I apologize for the confusion. Thanks, -StoimenAnonymous
November 14, 2012
The comment has been removedAnonymous
November 25, 2012
Hi all, I am trying to run Windows server 2008 R2 in Windows 8 hyper-v but somehow I can not get it installed. Is this not possible or am I doing something wrongAnonymous
November 25, 2012
This is hog wash. MS should have built in support.Anonymous
December 02, 2012
The fact that the new Hyper-V is now using a different WMI namespace does not justify anything. If MS wanted to avoid this problem they could have programmed the Hyper-V Manager to first detect the Server version and then use the right WMI namespace.Anonymous
April 17, 2013
Ugh...everything Microsoft does is almost great...which is really bad. This is just another example. Azure could be great...but its not. Hyper-V almost caught up to VMWare...but then you can't manage a large environment from one place. Some very strange product decisions. Do or die Microsoft...either be great or not. Enough in between.Anonymous
April 21, 2013
How hard would it be to release a copy of the old (2008/2008R2) Hyper-V management console for Windows 8? Installing the old Win7 RSAT tools clearly won't work, but it would be really useful if Microsoft were to release the old management console for Win8.Anonymous
June 12, 2013
I actually can't see root/virtualization on Windows 8 Pro in the WMIControl. It was there on a previous install and I can bring up the Hyper-V manager but can't connect. Is the root/virtualization meant to be visible in the tool?Anonymous
June 17, 2013
Does Windows 2012 R2 Hyper-V support rootvirtualization WMI classes as Windows 2012 does? Currently We are looking at the Hyper-V WMI classes in a preview version of 2012 R2 and it seems that all Hyper-V WMI classes such as MSVM_ComputerSystem are removed from rootvirtualization namespace. I wonder this is a temporary phenomenon or a permnent decision.Anonymous
November 07, 2013
I have the same question as Shangwu, it looks like rootvirtualization has been removed from windows 8. I tested on my two windows 8 client machines and none of them have rootvirtualization, though I can use rootvirtualizationv2. We have 2008R2 scripts to deal with VM, but none of them work on widows 8. How to get v1 of virtualization on win 8 clients ?- Anonymous
March 10, 2017
The WMI v1 namespace was removed in Windows 8.1 / Windows Server 2012 R2
- Anonymous
Anonymous
April 11, 2016
The comment has been removedAnonymous
March 09, 2017
Is this namespace applicable to windows 2016. Is there any new version of namespace added for windows 2016.- Anonymous
March 10, 2017
Yes - Windows Server 2016 continues to use the v2 namespace
- Anonymous