How to troubleshoot hyper-v with virt-who?
Environment
Hyper-V
Virt-who
Issue
How to easily troubleshoot the connection between virt-who and hyper-v?
Resolution
Install the following 2 packages:
# yum install openwsman wsmancli
This allows you to test the connection directly with wsman:
# wsman identify -h hyper-v-2012.redhat.com -u Administrator -p Password1! -P 5985 -y basic -d 6 -Vv
Successful connection:
Nov 9 15:41:07 cl->authentication.verify_peer: 0
Nov 9 15:41:07 *****set post buf len = 238******
* About to connect() to hyper-v-2012.redhat.com port 5985 (#0)
* Trying 192.168.0.100...
* Connected to hyper-v-2012.redhat.com (192.168.0.100) port 5985 (#0)
> POST /wsman HTTP/1.1
Host: hyper-v-2012.redhat.com:5985
Accept: */*
Content-Type: application/soap+xml;charset=UTF-8
User-Agent: WS-Management for all
Content-Length: 238
* upload completely sent off: 238 out of 238 bytes
< HTTP/1.1 401
< Server: Microsoft-HTTPAPI/2.0
< WWW-Authenticate: Negotiate
< WWW-Authenticate: Basic realm="WSMAN"
< Date: Mon, 09 Nov 2015 10:04:42 GMT
< Connection: close
< Content-Length: 0
<
* Closing connection 0
Nov 9 15:41:07 Basic authentication is used
* About to connect() to hyper-v-2012.redhat.com port 5985 (#1)
* Trying 192.168.0.100...
* Connected to hyper-v-2012.redhat.com (192.168.0.100) port 5985 (#1)
* Server auth using Basic with user 'Administrator'
> POST /wsman HTTP/1.1
Authorization: Basic QWRtaW5pc3RyYXRvcjpSZWRIYXQxIQ==
Host: hyper-v-2012.redhat.com:5985
Accept: */*
Content-Type: application/soap+xml;charset=UTF-8
User-Agent: WS-Management for all
Content-Length: 238
* upload completely sent off: 238 out of 238 bytes
< HTTP/1.1 200
< Content-Type: application/soap+xml;charset=UTF-8
< Server: Microsoft-HTTPAPI/2.0
< Date: Mon, 09 Nov 2015 10:04:42 GMT
< Content-Length: 787
<
Nov 9 15:41:07 write_handler: recieved 787 bytes, all = 787
* Connection #1 to host hyper-v-2012.redhat.com left intact
Nov 9 15:41:07 curl error code: 0.
Nov 9 15:41:07 cl->response_code: 200.
Nov 9 15:41:07 cl->last_error code: 0.
<?xml version="1.0" encoding="UTF-8"?>
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xml:lang="en-US">
<s:Header/>
<s:Body>
<wsmid:IdentifyResponse xmlns:wsmid="http://schemas.dmtf.org/wbem/wsman/identity/1/wsmanidentity.xsd">
<wsmid:ProtocolVersion>http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd</wsmid:ProtocolVersion>
<wsmid:ProductVendor>Microsoft Corporation</wsmid:ProductVendor>
<wsmid:ProductVersion>OS: 6.2.9200 SP: 0.0 Stack: 3.0</wsmid:ProductVersion>
<wsmid:SecurityProfiles>
<wsmid:SecurityProfileName>http://schemas.dmtf.org/wbem/wsman/1/wsman/secprofile/http/basic</wsmid:SecurityProfileName>
<wsmid:SecurityProfileName>http://schemas.dmtf.org/wbem/wsman/1/wsman/secprofile/http/spnego-kerberos</wsmid:SecurityProfileName>
</wsmid:SecurityProfiles>
</wsmid:IdentifyResponse>
</s:Body>
</s:Envelope>
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
SBR
Components
Tags
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.