Ever since Windows 2008 R2 SP1 became available people have been waiting for Windows Hyper-V Server R2 to catch up. The wait is over as last week Microsoft made it available on their website http://technet.microsoft.com/en-us/evalcenter/dd776191.aspx. That’s a nice package to have when it serves your needs and there ‘s little to argue about. Guidance on how to configure it and how to get remote management set up has been out for a while and is quite complete so that barrier shouldn’t stop you from using it where appropriate. If you’re staring out head over to José Barreto’s blog to get a head start and here’s some more information on the subject http://technet.microsoft.com/en-us/library/cc794756(WS.10).aspx and naturally there are some tools around to help out if needed and the Microsoft provided tools are not to you liking http://coreconfig.codeplex.com/. So there you go, now you have a free and very capable hypervisor available to the public that gives you high availability, Live Migration, Dynamic Memory, Remote FX and they even threw in their software iSCSI target 3.3 into the free package so you can build a free iSCSI SAN supported by Microsoft. Live is good.
Category Archives: Virtualization
KB2230887 Hotfix for Dynamic Memory with Windows 2008 Standard & Web edition does not apply to without Hyper-V editions?
As my readers all know by now, since I blogged about this here, you need to install an update/hotfix for Hyper-v Dynamic Memory to work with Windows 2008 Standard & Web edition. You can find more information here: Hyper-V Dynamic Memory does not work on a Windows Server 2008 Standard Edition or Windows Web Server 2008 virtual machine (VM)
UPDATE 2011/06/23: Microsoft released the hotfix based on end-user feedback and you can download version 2 that works on all SKUs now http://support.microsoft.com/kb/2230887 (v2).
The cause is that on these versions of the operating systems the the required memory enlightenment is supported. After installing the hotfix (or SP1 in the case of Windows 2008 R2) memory addition enlightenment is available on these SKU and your good to go.
But recently I ran into an issue. One virtual machine guest on a Windows 2008 R2 SP1 cluster that is running the Windows 2008 Standard edition without Hyper-V SKU, x86 the standalone installer for Windows6.0-KB2230887-x86 throws following warning:
Windows Update Standalone Installer
The update does not apply to your system
OK
That’s a bit strange. As you can see the hotfix has not been installed. And why would I need the with Hyper-V SKU to use dynamic memory with this guest?
I installed the same hotfix without any issue on several Windows 2008 Standard Edition (the SKU with Hyper-V) guests. So what is going on here? What exactly is different about the without Hyper-V SKU? Note that Windows 2008 R2 no longer has such a SKU. Microsoft states that it is an SKU for people who don’t need virtualization. Well as they installed it as a guest virtual machine they chose this version and now what? No hotfix for dynamic memory as a guest?
There is a TechNet forum discussion going on here where they have this issue and I asked them to check what SKU it was happening on. Bingo! It’s on the Windows 2008 Standard without Hyper-V version!
I don’t expect any Hyper-V functionality or management tools but I do expect to get the hotfix to enable Dynamic Memory in guests with this SKU, just like we get any other update that is relevant to Hyper-V, for example, upgraded Integration Services. I’m going to ping a Microsoft contact on this one and see if they can help with this. And in case you’re wondering SKU = Stock Keeping Unit.
System Center Virtual Machine Manager 2008 R2 SP1 Upgrade Walkthrough
Some people downloading the System Center Virtual Machine Manager 2008 R2 SP1 seem to be confused that it is the entire product ISO. It’s a big download but the upgrade itself, when you have a healthy environment is fast and easy. To my knowledge there is no SP1 upgrade file only, you get one package for all needs. I’ve provided a screenshot walkthrough of the process below and it really only takes a couple of minutes on the servers deployed it on. There is both an evaluation version available or a licensed version via the licensing site or the TechNet subscribers downloads.
Do note that the below process is for those who are upgrading from System Center Virtual Machine Manager 2008 R2 to System Center Virtual Machine Manager 2008 R2 SP1. If you have the RC installed take a look at the following blog post by Maarten Wijsman to see how to upgrade the SQL database used by SCVMM2008R2 SP1 Release Candidate with the UpgradeVMMR2SP1RC.exe tool. The download is here at the Microsoft Connect site (Live ID).
Run the setup.exe and click setup VMM Server or any other component you need to upgrade. If you click VMM server it will detect other components as well.
The installation files are extracted …
Accept the license agreement and click next
As you can see it detected that I’m also running the Virtual Machine Manager Administration Console. Click on ‘Upgrade” to continue.
If the account you’re using doesn’t have the needed SQL Server permissions you can provide alternate credentials that do have those. Click “Next” to continue.
It will then upgrade all detected components one by one ….
… until you reach the Completion form. That’s it you’re done.
You have to go through this process for all servers where you have Virtual Machine Manager components installed to complete the entire upgrade. When you have you can now configure Dynamic Memory from your SCVNN administrator Console. Nice
Key Value Pair Exchange WMI Component Property GuestIntrinsicExchangeItems & Assumptions
Now that Windows 2008 R2 SP1 is being deployed some scripts to check whether the Integration Components (IC) in Hyper-V VM guests are upgraded came back on the radar screen. Host are being upgraded and thus the clients need upgraded IC as well. Now to check this for hundreds or thousands of guest we need some automation. PowerShell comes in handy for this and some neat scripts can be found around the internet. The most concise PowerShell code to do this, that I know of, is the one Peter Noorderijk (great Dutch IT Pro) uses in his PowerShell function Get-IntegrationServicesVersion on his blog How to check the version of the Integration Components. As he provided this script just when I needed one I used it. This worked fine until I ran into an issue with it on some clusters. On two test clusters and two production clusters, it did the job as expected. On one test cluster and one production cluster, we ran into the situation where the output seemed wrong. The screenshot below is an example of this.
The red arrows indicate wrong data for the VMname and ICVersion. What happened here? Well, when we read out the GuestIntrinsicExchangeItems property from the WMI object Msvm_KvpExchangeComponent we get back XML. That XML needs to be parsed to display it for human consumption. The function depends on fixed positions containing the correct data. I’ve marked the relevant portions with a red arrow above, they come from$vmkvp[0] en $vmkvp[14] in the script below.
function Get-Integ.rationServicesVersion ($HVhost = $(throw “HVHost required”)) { $kvps = Get-WmiObject -Namespace rootvirtualization -ComputerName $HVHost -Query “Select GuestIntrinsicExchangeItems From Msvm_KvpExchangeComponent” foreach ($kvp in $kvps) { $vmkvp = $Kvp.GuestIntrinsicExchangeItems $vmkvp | select-object @{Label=”VMHost”;Expression={$hvhost}}, @{Label=”VMName”;Expression={($vmkvp[0]).instance.property[1].value}}, @{Label=”ICVersion”;Expression={($vmkvp[14]).instance.property[1].value}} -first 1 } } foreach ($hvhost in get-content servers.txt) {Get-IntegrationServicesVersion $hvhost}
And indeed, when we dump the XML for two of the affected servers out to text files you can see the order is indeed different so counting on the exact location in an array is what tripped us up here.
Should this ever happen? Am I making a scripting mistake somewhere? Running a check with a VBScript that parses the XML using XDOM (just in case my PowerShell skills are the cause of this) confirms the order is different but that the key pairs match up and are correct
D:SysAdminPowerShellScripts>cscript.exe test.vbs
Microsoft (R) Windows Script Host Version 5.8 Copyright (C) Microsoft Corporation. All rights reserved. Guest OS information for server01 CSDVersion : Service Pack 1 FullyQualifiedDomainName : server01.lab.test IntegrationServicesVersion : 6.1.7601.17514 NetworkAddressIPv4 : 10.10.100.118 NetworkAddressIPv6 : fe80::a177:729:8840:250%9 OSBuildNumber : 7601 OSEditionId : 7 OSMajorVersion : 6 OSMinorVersion : 1 OSName : Windows Server 2008 R2 Standard OSPlatformId : 2 OSVersion : 6.1.7601 ProcessorArchitecture : 9 ProductType : 3 RDPAddressIPv4 : 10.10.100.118 RDPAddressIPv6 : fe80::a177:729:8840:250%9 ServicePackMajor : 1 ServicePackMinor : 0 SuiteMask : 272 |
D:SysAdminPowerShellScripts>cscript.exe test.vbs
Microsoft (R) Windows Script Host Version 5.8 Copyright (C) Microsoft Corporation. All rights reserved. Guest OS information for server13 FullyQualifiedDomainName : server13.lab.test OSName : Windows Server 2008 R2 Standard OSVersion : 6.1.7601 CSDVersion : Service Pack 1 OSMajorVersion : 6 OSMinorVersion : 1 OSBuildNumber : 7601 OSPlatformId : 2 ServicePackMajor : 1 ServicePackMinor : 0 SuiteMask : 272 ProductType : 3 OSEditionId : 7 ProcessorArchitecture : 9 IntegrationServicesVersion : 6.1.7601.17514 NetworkAddressIPv4 : 10.10.100.112 NetworkAddressIPv6 : fe80::c18b:e3f2:7f05:31e4%12 RDPAddressIPv4 : 10.10.100.112 RDPAddressIPv6 : fe80::c18b:e3f2:7f05:31e4%12 |
When I look at where that data lives in the registry on those servers it all looks exactly the same, neatly ordered buy the RegEdit GUI:
So when getting that data from the Key-Value Pair Exchange WMI component with the property GuestIntrinsicExchangeItems you get a bunch of XML. That has to be parsed to be displayed in a readable fashion. The problem we are seeing is due to the fact that the items in the XML file are not in the same order. Peter’s function assumes it is. However this does not happen to be the case for most virtual machines, the majority is in the expected order. I don’t know why that is or if this is supposed to happen but it doesn’t seem to cause any harm. All is fully functional and operational in Hyper-V Manager, SCVMM 2008R2 … etc. Perhaps an MVP or Microsoft guru can shed some light on this. It seems like a bug waiting to happen if a developer of Hyper-V management software makes the same assumption. Of is this never suppose to happen and do I need to worry? I don’t know I reinstalled the IC on the guests that have a different ordering and live migrated them, but that didn’t change anything
Anyway if you want to make sure you get the correct output we’ll need another approach that doesn’t make assumptions. You can roll your own and get the output customized to your needs but you need to parse the XML using a filter. An example of this is listed below.
# Filter for parsing XML data filter Import-CimXml { # Create new XML object from input $CimXml = [Xml]$_ $CimObj = New-Object -TypeName System.Object # Iterate over the data and pull out just the value name and data for each entry foreach ($CimProperty in $CimXml.SelectNodes("/INSTANCE/PROPERTY[@NAME='Name']")) { $CimObj | Add-Member -MemberType NoteProperty -Name $CimProperty.NAME -Value $CimProperty.VALUE } foreach ($CimProperty in $CimXml.SelectNodes("/INSTANCE/PROPERTY[@NAME='Data']")) { $CimObj | Add-Member -MemberType NoteProperty -Name $CimProperty.NAME -Value $CimProperty.VALUE } # you send the output from the property to the filter via a pipe $KvpComponentVMGuest.GuestIntrinsicExchangeItems $vmkvp |Import-CimXml
Maarten Wijsman (a fellow blogger at http://www.hyper-v.nu like Peter) has a nice example script here that also uses a filter Import-CimXML. Do note that there are variants on this filter depending on what output you desire that explains the difference between the filters.