Avoid Saved State Backup and Check Hyper-V Integration Service Versions Automatically
Are Hyper-V virtual machine backups failing on your server? Or, are VMs being backed up using a Saved State?
Chances are there is a mismatch in the Hyper-V Integration Services versions used on host and inside VMs. In case you wonder what else might happen if there is a version mismatch, check out this article.
The current Hyper-V Integration Services version number on your host is stored in the following registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtualization\GuestInstaller\Version
A simple PowerShell script is all you need.
Note: The following script works on Windows Server 2012 and later only.
Create a new PowerShell file GetHyperVIntegrationVersions.ps1 and paste the following code:
$VMMS = gwmi -namespace root\virtualization\v2 Msvm_VirtualSystemManagementService # 1 == VM friendly name. 123 == Integration State $RequestedSummaryInformationArray = 1,123 $vmSummaryInformationArray = $VMMS.GetSummaryInformation($null, $RequestedSummaryInformationArray).SummaryInformation # Create an empty array to store the results in $outputArray = @() # Go over the results of the GetSummaryInformation Call foreach ($vmSummaryInformation in [array] $vmSummaryInformationArray) { # Turn result codes into readable English switch ($vmSummaryInformation.IntegrationServicesVersionState) { 1 {$vmIntegrationServicesVersionState = "Up-to-date"} 2 {$vmIntegrationServicesVersionState = "Version Mismatch"} default {$vmIntegrationServicesVersionState = "Unknown"} } # Use Hyper-V PowerShell cmdlets to quickly get the integration version number $vmIntegrationServicesVersion = (get-vm $vmSummaryInformation.ElementName).IntegrationServicesVersion # Display "Unknown" if we got a null result if ($vmIntegrationServicesVersion -eq $null) {$vmIntegrationServicesVersion = "Unknown"} # Put the VM Name, Integration Service Version and State in a PSObject - so we can display a nice table at the end $output = new-object psobject $output | add-member noteproperty "VM Name" $vmSummaryInformation.ElementName $output | add-member noteproperty "Integration Services Version" $vmIntegrationServicesVersion $output | add-member noteproperty "Integration Services State" $vmIntegrationServicesVersionState # Add the PSObject to the output Array $outputArray += $output } # Display information in nicely formatted table write-output $outputArray | sort "VM Name"
Run the above PowerShell script and you’ll get a screen output like the following:
VM Name Integration Services Version Integration Services State ------- ---------------------------- -------------------------- iscsi VM Unknown Unknown test Unknown Unknown w7 x64 6.3.9600.16384 Up-to-date win7 on vhd (3/3/2014 6:26 PM) 3/6/2014 11:... 6.3.9600.16384 Up-to-date win7 on vhd (3/3/2014 6:26 PM) 3/6/2014 11:... 6.3.9600.16384 Up-to-date Win7 on VHDX 6.1.7601.17514 Version Mismatch
As you can see from the above sample output, the VM “Win7 on VHDX” has an outdated version of the Hyper-V Integration Services running.
By the way, the virtual machines need to be running in order for this information to be obtainable; hence, the ‘test’ VM above couldn’t be queried since it was shut down.
In order for backups to run properly without Saved State interruptions, you’ll need to run this script every time you update Windows.
This is because Hyper-V is an ongoing development of Microsoft and it is affected by many Windows Updates. Each time a change is made, the internal vmguest.iso is updated, too. You’ll find this file in C:\Windows\System32 and it contains the “current” Integration Service CD you need for each VM. The thing to remember is that after each Windows Update the ISO file may change. I guess one could write a script to check the ISO file’s date and alert the admin of a new Integration Services version on the host.
Adapted from Virtual PC Guy. Try our backup software which also covers Hyper-V backup, and other services.
Backup Software Overview
Server Backup SoftwareDownload BackupChain
Cloud Backup
Backup VMware Workstation
Backup FTP
Backup VirtualBox
Backup File Server
Hyper-V Backup
Backup Hyper-VPopular
- Hyper-V Links, Guides, Tutorials & Comparisons
- Veeam Alternative
- How to Back up Cluster Shared Volumes
- DriveMaker: Map FTP, SFTP, S3 Site to a Drive Letter (Freeware)
Resources
- Free Hyper-V Server
- Remote Desktop Services Blog
- SCDPM Blog
- SCOM Blog
- V4 Articles
- Knowledge Base
- FAQ
- Archive 2024
- Archive 2022
- Archive 2021
- Archive 2020
- Archive 2018
- Archive 2017
- Archive 2016
- Archive 2015
- Archive 2014
- Archive 2013
- Hyper-V Scripts in PowerShell
- FastNeuron
- BackupChain (Greek)
- BackupChain (Deutsch)
- BackupChain (Spanish)
- BackupChain (French)
- BackupChain (Dutch)
- BackupChain (Italian)
Backup Software List
BackupChain
Veeam
Unitrends
Symantec Backup Exec
BackupAssist
Acronis
Zetta
Altaro
Windows Server Backup
Microsoft DPM
Ahsay
CommVault
IBM
Other Backup How-To Guides
- Windows Server 2012 R2 New Features & What’s New in Server 2012 R2
- Windows Server 2012 Failover Cluster Important Updates
- How to Fix VSS Errors (Volume Shadow Copy Service Errors)
- VMware Scheduled Snapshot Creation in a Task, Fully Automated
- 0x8004230f VSS_E_UNEXPECTED_PROVIDER_ERROR VSS snapshot creation failed
- New: Backup Software Comparison and List
- Windows Server 2022 ISO Preview – Free Download
- Hyper-V IDE or SCSI? What’s Performing Better, Faster?
- Disaster Recovery Strategies and Recovery Objectives
- Hyper-V Server 2008 R2: Important Hotfixes and Updates
- Hyper-V, VMware, and VirtualBox Hypervisor Limitations
- Windows Server 2016 Download Location ISO File
- Hyper-V Stop 0x0000000A BSOD Error Causes and Fixes KB2776366
- How to fix error CLSID {463948d2-035d-4d1d-9bfc-473fece07dab} Access Denied
- Hyper-V Files, Formats, Snapshots, and Checkpoints Explained
- Free Disk2VHD Hyper-V VHDX Physical to Virtual Conversion P2V
- Windows Server 2022 ISO Final Release Free Download
- Windows Server 2012 R2 and Windows 8.1 Backup Software
- Reboot a virtual machine in Hyper-V from the command line
- How to fix ‘Microsoft Hyper-V VSS Writer’ is in failed state, Writer Failure code: 0x800423f3