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

With more than 19 years’ experience in Datacenter Architectures, Marcos Nogueira is currently working as a Senior 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 an 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

Cluster Shared Volumes (CSV) errors on Hyper-V Clu... In a failover cluster, virtual machines can use Cluster Shared Volumes that are on the same LUN (disk), while still being able to fail over (or move f...
Containers on Azure – Part 2 On the previous post (see here), I talked about the concept of Containers, Azure Container Service and Azure Service Fabric. Now that you know the con...
How to install Microsoft Azure PowerShell In this Tutorial we are going over the process to install Microsoft Azure PowerShell and we can use the same procedure to update several other compone...
Managing Hyper-V Server remotely through PowerShel... Working with PowerShell can be very common for daily tasks and Hyper-V Server management. However, as there is more than one server to be managed, som...