Hyper-V 2012 Hotfixes: Where I can find it and how to automate the deployment ?

Share this:

After my session at TechEd about Best Practices for Virtualizing and Managing Microsoft SharePoint 2013 with Microsoft System Center 2012 R2 and Windows Server 2012 R2 one of the questions that I got was where I can find the Hyper-V hotfixes and how can I automate the deployment process.

Where I can find the most update list of Hotfixes for Hyper-V 2012 and Hyper-V 2012 R2? I found a couple of years ago on TechNet Wiki a page where they announce public the hotfixes. Now it’s easy for me, because being an MVP I have this information sooner and I always try to publish when I get it! But for the common mortal, I highly recommend the TechNet Wiki Page (you can find HERE).

To automate the process or to install those hotfixes on Hyper-V Server Core, you can use the PowerShell cmdlet that Hans Vredevoort (@hvredevoort) created that will simplify your process and make your life easier.

This script will help to identify what hotfixes and updates are installed and what is missing. To run this tool you will need the .XML file that have all the updated list. These .XML files must be on the same directory where the PowerShell script will run (or you have to edit the script with the correct location).

One of the ways, that did found out that worked very well for me, and I always use it when I deploy Hyper-V server, it is enable the RSS on the TechNet Wiki page and then when you received the notice that they have news hotfixes or updates, you grab the XML files and run the tool.

You can find the all the scripts and XML (up to date) HERE.

The script it’s not very complex, but it’s very effective!

param

(

[parameter(mandatory=$True)]

[String[]]$HyperHostName

)

#Getting current execution path

$scriptpath = $MyInvocation.MyCommand.Path

$dir = Split-Path $scriptpath

$version = “This list was updated on April 17, 2014 by @hvredevoort”

#Loading list of updates from XML files

[xml]$SourceFileHyperV = Get-Content $dirUpdatesListHyperV.xml

[xml]$SourceFileCluster = Get-Content $dirUpdatesListCluster.xml

$HyperVHotfixes = $SourceFileHyperV.Updates.Update

$ClusterHotfixes = $SourceFileCluster.Updates.update

#Getting Hotfixes installed on the specified Hyper-V Host

foreach($VMHost in $HyperHostName)

{

$Hotfixes = Get-HotFix -ComputerName $VMHost |select HotfixID,description

Write-Host $version $HyperHostName -ForegroundColor Green

Write-Host “COLLECTING HOTFIXES ON HYPER-V HOST: ” $HyperHostName -ForegroundColor Yellow

Write-Host “Listing Hyper-V 2012 R2 Hotfixes” -ForegroundColor Yellow

foreach($RecomendedHotfix in $HyperVHotfixes)

{

$witness = 0

foreach($hotfix in $Hotfixes)

{

If($RecomendedHotfix.id -eq $hotfix.HotfixID)

{

Write-Host “————————–”

Write-Host “Hyper-V Host: “$VMHost

Write-Host $RecomendedHotfix.Id “installed” -ForegroundColor Green

write-host $RecomendedHotfix.Description

Write-Host “————————–”

$witness = 1

}

}

if($witness -eq 0)

{

Write-Host “————————–”

Write-Host “Hyper-V Host: “$VMHost

Write-Host $RecomendedHotfix.Id “not installed” -ForegroundColor Red

write-host $RecomendedHotfix.Description

Write-Host “————————–”

}

}

Write-Host “Listing Failover Cluster 2012 R2 Hotfixes” -ForegroundColor Yellow

foreach($RecomendedClusterHotfix in $ClusterHotfixes)

{

$witness = 0

foreach($hotfix in $Hotfixes)

{

If($RecomendedClusterHotfix.id -eq $hotfix.HotfixID)

{

Write-Host “————————–”

Write-Host “Hyper-V Host: “$VMHost

Write-Host $RecomendedClusterHotfix.Id “installed” -ForegroundColor Green

write-host $RecomendedClusterHotfix.Description

Write-Host “————————–”

$witness = 1

}

}

if($witness -eq 0)

{

Write-Host “————————–”

Write-Host “Hyper-V Host: “$VMHost

Write-Host $RecomendedClusterHotfix.Id “not installed” -ForegroundColor Red

write-host $RecomendedClusterHotfix.Description

Write-Host “————————–”

}

}

Write-Host $version $HyperHostName -ForegroundColor Green

}

Written by Marcos Nogueira

Marcos Nogueira

With more than 18 years experience in Datacenter Architectures, Marcos Nogueira is currently working as a Principal Cloud Solution Architect. He is an expert in Private and Hybrid Cloud, with a focus on Microsoft Azure, Virtualization and System Center. He has worked in several industries, including Aerospace, Transportation, Energy, Manufacturing, Financial Services, Government, Health Care, Telecoms, IT Services, and Gas & Oil in different countries and continents.

Marcos was a Canadian MVP in System Center Cloud & Datacenter Managenment and he has +14 years as Microsoft Certified, with more than 100+ certifications (MCT, MCSE, and MCITP, among others). Marcos is also certified in VMware, CompTIA and ITIL v3. He assisted Microsoft in the development of workshops and special events on Private & Hybrid Cloud, Azure, System Center, Windows Server, Hyper-V and as a speaker at several Microsoft TechEd/Ignite and communities events around the world.

Related Post

Server management and automation with Windows Serv... Datacenter infrastructure has become complex: Multiple industry standards are confusing hardware vendors, and customers are looking for guidance on ho...
How to disconnect media on all VMs in SCVMM 2008 R... Hello folks, Today I had a requirement to disable configure all VMs of a SCVMM 2008 R2 to  No Media and I could’ve gone to each one of the VMs, ask P...
Resolving the error message: Virtual Machine cann... If you are running System Center 2012 SP1 which is my case and you try to create your Virtual Machine you may have this issue when trying to do the pr...
SCOM Alert: WinRM is not functional or not the rig... On System Center 2012 R2 Operations Manager (SCOM) (with UR2) starting to appear Critical Alerts coming from System Center Advisor (SCA) saying that m...