A while back I blogged about an issue with SCOM management servers taking too long to snapshot, which caused the resource pools to become unstable.
As these management servers ran on Hyper-V, updating the integration services significantly shortened the backup snapshotting process, causing a lot less resource pool failures.
Since the release of Server 2016, integration services updates have been included in Windows Update. This is to alleviate the burden of upgrading integration services on each VM.
However, since this customer is still using a combination of Hyper-V Server 2012/2012 R2, these updates were not automatically applied, and a lot of VM’s were still using out of date integration services.
I found a few scripts that were able to update integration services, but did not work properly for me.
So I decided to write a script of my own to update integration services on VM’s. This script only works for 64 bit VM’s but can be easily changed to include 32-bit VM’s.
To make this script work, you’ll have to do a few things:
- Recommend you first patch the Hyper-V host with the latest integration services. The latest versions can be found here. It simply updates the ISO that contains the integration services ISO.
- Create a directory on a fileshare that contains the integration services binaries. These binaries can be found on a Hyper-V host on the vmguest.iso file. You only need to copy the AMD64 folder from that ISO.
- Create a text file containing the VM’s you want to patch, you can easily extract this information from SCOM or VMM.
The setup binaries will be copied to c:\temp\integrationservices to the VM. I had to copy the binaries before installing them, as it was causing a double hop authentication issue otherwise.
A central log file will be created by the script that logs the installation of the VM’s.
Keep in mind that to complete the installation, you’ll have to reboot the VM. If you want to reboot the VM after installation, there is a parameter in the script that will do so.
After reboot of the VM, you can validate the integration services build number by running
REG QUERY “HKLM\Software\Microsoft\Virtual Machine\Auto” /v IntegrationServicesVersion
The script can be found here.
Here’s how the script is run:
.\Update-IntegrationServices.ps1 -ISBinaries \\fileserver\IntegrationServices -ServerFile C:\temp\servers.txt -LogFile c:\temp\ISInstallation.log -Restart $True
Good luck with the patching!