Finding the status of a VMs or all your VMs Integration Components can be a very useful troubleshooting tool when you are having various VM management issues. Examples could be that VMs that have the correct Integration Components versions are slipping into saved state or maybe the VM is not responding to a shutdown command from the Hyper-V or SCVMM console. I have seen both of these. This week I have a couple of examples for you that might just come in handy if you come across a VM that just is not responding as a fully enlightened VM should.
These scripts need to be run from a Workstation/Server that has the Hyper-V PowerShell Components
View Status of all Integration Components for a VM:
Get-VM -ComputerName HOSTNAME–VMName <VMNAME>| Get-VMIntegrationService| ft VMName, Name, primarystatusDescription, Enabled
If all ICs are in a good state you will see this output
If you see this, the VM will go into Saved State when backups are performed
To get just the VMs with Integration Services that have a Primary Status of “No Contact” you can use this method:
$s = “VMHOST1″,”VMHOST2”
foreach ($server in $s) {Get-VM -ComputerName $server | Get-VMIntegrationService| ? primarystatusdescription -like “no*” | ft VMName, Name, primarystatusDescription, Enabled}
Output will look like this if there are any VMs with IC Contact issues.
My next post will go more deeply into what to do when you see these issues with Integration Components.