virt-who on HyperV fails with error "Invalid response (500) from Hyper-V"

Solution Verified - Updated -

Environment

  • virt-who-0.22.5-1.el7.noarch or below version (reporting to Customer Portal or Satellite 6)
  • Red Hat Enterprise Linux

Issue

  • Running virt-who configured for HyperV failed to do host/guest mapping with error:
Invalid response (500) from Hyper-V: <s:envelope xml:lang="en-US" xmlns:s="<a target='_blank' href=" http:="" www.w3.org="" 2003="" 05="" soap-envelope"="" title="http://www.w3.org/2003/05/soap-envelope">http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:x="http://schemas.xmlsoap.org/ws/2004/09/transfer" xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:n="http://schemas.xmlsoap.org/ws/2004/09/enumeration" xmlns:w="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd" xmlns:p="http://schemas.microsoft.com/wbem/wsman/1/wsman.xsd"><s:header><a:action>http://schemas.dmtf.org/wbem/wsman/1/wsman/fault</a:action><a:messageid>uuid:89C5C617-75DA-4B99-BFB6-66358624BCE9</a:messageid><a:to>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:to><a:relatesto>uuid:370271c4-577b-11e9-8b78-00155dccc60b</a:relatesto></s:header><s:body><s:fault><s:code><s:value>s:Receiver</s:value><s:subcode><s:value>w:InternalError</s:value></s:subcode></s:code><s:reason><s:text xml:lang="">An internal error occurred. </s:text></s:reason><s:detail><f:wsmanfault xmlns:f="<a target='_blank' href=" http:="" schemas.microsoft.com="" wbem="" wsman="" 1="" wsmanfault"="" title="http://schemas.microsoft.com/wbem/wsman/1/wsmanfault">http://schemas.microsoft.com/wbem/wsman/1/wsmanfault" Code="1359" Machine="hyperv.example.com"><f:message><f:providerfault provider="WMI Provider" path="C:\Windows\system32\WsmWmiPl.dll"><f:wsmanfault xmlns:f="<a target='_blank' href=" http:="" schemas.microsoft.com="" wbem="" wsman="" 1="" wsmanfault"="" title="http://schemas.microsoft.com/wbem/wsman/1/wsmanfault">http://schemas.microsoft.com/wbem/wsman/1/wsmanfault" Code="1359" Machine="hyperv.example.com"><f:message>HRESULT = 0x80041032</f:message></f:wsmanfault></f:providerfault></f:message></f:wsmanfault></s:detail></s:fault></s:body></s:envelope>

Resolution

  • Upgrade the virt-who package to the latest version, which is virt-who-0.24.6-1.el7.noarch and above.
  • Restart the virt-who service.

For more KB articles/solutions related to Virt-who and Virtual Datacenter (VDC) Subscriptions Issues, please refer to the Consolidated Troubleshooting Article for Virt-who and Virtual Datacenter (VDC) Subscriptions Issues

Root Cause

  • Hyper-V response 500 internal server error when it is taking too long to query the HyperV version. This is caused by the inefficient WQL query which is not specific enough.

Diagnostic Steps

  • virt-who is unable to connect with Hyper-V, fails with below error which can be seen in /var/log/rhsm/rhsm.log file.
2019-07-11 13:44:46,775 [virtwho.main ERROR] MainProcess(56516):Thread-3 @virt.py:run:392 - Thread 'hyperv-01' fails with error: Communication with Hyper-V failed, HTTP error: 500
2019-07-11 13:44:46,775 [virtwho.main INFO] MainProcess(56516):Thread-3 @virt.py:_send_data:935 - Report for config "hyperv-01" gathered, placing in datastore
2019-07-11 13:44:46,777 [virtwho.main DEBUG] MainProcess(56516):Thread-3 @virt.py:run:411 - Thread 'hyperv-01' stopped after running once

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments