Hyper-V troubleshooting commands

Check WinRM

Relevant information

 Get-WSManInstance winrm/config/Listener -Enumerate -ComputerName Localhost
 winrm quickconfig 
 winrm get winrm/config/service/Auth
 winrm get winrm/config/winrs

We can also get all the information with

winrm get winrm/config
winrm enumerate winrm/config/listener

Check the needed configuration for overthere cifs connection here https://github.com/xebialabs/overthere#cifs

Check Firewall

All these ports should be open so these rules need to be enabled for the user profile

netsh advfirewall firewall show rule direction=in name='Windows Remote Management (HTTPS-In)'
netsh advfirewall firewall show rule direction=in name='File Server Remote Management (DCOM-In)'
netsh advfirewall firewall show rule direction=in name='File and Printer Sharing (SMB-In)'
netsh advfirewall firewall show rule direction=in name='Hyper-V (REMOTE_DESKTOP_TCP_IN)'

Also we can dump configuration and check manually the rules/ports enabled

netsh advfirewall firewall show rule direction=in name=all > ports.txt

Check Windows Version


Versions are explained here: https://docs.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-osversioninfoexa

[System.Environment]::OSVersion.Version
(Get-WmiObject -class Win32_OperatingSystem).Caption

Check  Host Discovery commands

  • Check Abiquo scripts are there
Test-Path C:\AbiquoPS\{version-commit}
Get-ChildItem C:\AbiquoPS\4.5.1-d95a932\*.ps1
# {version-commit} should be something like '4.5.1-d95a932'
  • Check usual commands needed to discover hostinfo, volumes, etc.
Get-WmiObject Win32_ComputerSystem
Get-WmiObject Win32_OperatingSystem
Get-WmiObject Win32_Processor
Get-WmiObject -Namespace root\wmi -Class MSiSCSIInitiator_MethodClass
Get-WmiObject Win32_ComputerSystemProduct
Get-WmiObject Win32_Volume | Where { $_.DriveType -Match 3}
Get-WmiObject Win32_MappedLogicalDisk


References:

https://wiki.abiquo.com/display/doc/Hyper-V
https://wiki.abiquo.com/display/DEVOPS/Hyper-V+Configuration

Copyright © 2006-2022, Abiquo Holdings SL. All rights reserved