virt-who error configuring Hyper-V "Error when enumerating using root/virtualization namespace, trying root/virtualization/v2 namespace"
Environment
- RHEL Virtual Datacenter
- virt-who
- Hyper-V
Issue
- Error configuring virt-who with Hyper-V:
2015-05-07 09:03:43,677 [DEBUG] @hyperv.py:325 - Error when enumerating using root/virtualization namespace, trying root/virtualization/v2 namespace
2015-05-07 09:03:43,680 [DEBUG] @hyperv.py:258 - Using NTLM authentication
2015-05-07 09:03:43,737 [DEBUG] @hyperv.py:285 - NTLM authentication successful
2015-05-07 09:03:48,804 [ERROR] @virtwho.py:121 - Unable to recover, retry in 60 seconds.
2015-05-07 09:03:48,806 [DEBUG] @hyperv.py:208 - Hyper-V url: http://10.100.10.100:5985/wsman
2015-05-07 09:03:48,809 [DEBUG] @hyperv.py:258 - Using NTLM authentication
2015-05-07 09:03:53,904 [DEBUG] @hyperv.py:290 - Using Basic authentication
2015-05-07 09:03:53,909 [DEBUG] @hyperv.py:325 - Error when enumerating using root/virtualization namespace, trying root/virtualization/v2 namespace
2015-05-07 09:03:53,911 [DEBUG] @hyperv.py:258 - Using NTLM authentication
2015-05-07 09:03:58,998 [DEBUG] @hyperv.py:290 - Using Basic authentication
2015-05-07 09:03:59,003 [ERROR] @virtwho.py:118 - Error in communication with virtualization backend, trying to recover:
Traceback (most recent call last):
File "/usr/share/virt-who/virtwho.py", line 111, in _send
virtualGuests = self._readGuests(config)
File "/usr/share/virt-who/virtwho.py", line 147, in _readGuests
return virt.getHostGuestMapping()
File "/usr/share/virt-who/virt/hyperv/hyperv.py", line 327, in getHostGuestMapping
return self.getHostGuestMapping()
File "/usr/share/virt-who/virt/hyperv/hyperv.py", line 322, in getHostGuestMapping
"root/virtualization/v2")
File "/usr/share/virt-who/virt/hyperv/hyperv.py", line 123, in Enumerate
response = self.post(data)
File "/usr/share/virt-who/virt/hyperv/hyperv.py", line 101, in post
raise HyperVAuthFailed("Authentication failed")
HyperVAuthFailed: Authentication failed
Resolution
- Configure /etc/sysconfig/virt-who as follows:
VIRTWHO_HYPERV_SERVER=http://10.160.47.244 <-- Hyper-V url as captured in rhsm.log(2015-05-07 09:03:59,004 [DEBUG]
@hyperv.py:208 - Hyper-V url: http://10.100.10.100:5985/wsman)
VIRTWHO_HYPERV_USERNAME=local_user <-- use a local administrator account with a full access privilege access (not a domain account)
VIRTWHO_HYPERV_PASSWORD=password <-- local administrator account's password
- In the Hyper-V, verify that wirm/config/service has the following settings as pointed below:
C:\Users\administrator.ONE>winrm get winrm/config/service
Service
RootSDDL = O:NSG:BAD:P(A;;GA;;;BA)(A;;GR;;;IU)S:P(AU;FA;GA;;;WD)(AU;SA;GXGW;;;WD)
MaxConcurrentOperations = 4294967295
MaxConcurrentOperationsPerUser = 1500
EnumerationTimeoutms = 240000
MaxConnections = 300
MaxPacketRetrievalTimeSeconds = 120
AllowUnencrypted = true <---------- virt-who required
Auth
Basic = true <---------- virt-who required
Kerberos = true
Negotiate = true
Certificate = false
CredSSP = false
CbtHardeningLevel = Relaxed
DefaultPorts
HTTP = 5985 <----- virt-who uses this port
HTTPS = 5986
IPv4Filter = *
IPv6Filter = *
EnableCompatibilityHttpListener = true
EnableCompatibilityHttpsListener = false
CertificateThumbprint
AllowRemoteAccess = true <---------- virt-who required
Note: Above pointed settings is the virt-who requirement as per /usr/share/doc/virt-who-xxx/README.hyperv
To configure virt-who with encrypted password, please refer to this KBase article:
How to configure virt-who with encrypted password?
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
- The WS-Management service cannot process the request. The WMI service returned an 'access denied' error,
authentication using a local administrator with full privilege is needed to be able to access WS-Management and WMI Services.
Diagnostic Steps
-
Follow the steps in setting up virt-who in Hyper-V using the steps in KBase article;
-
For RHEL7, above resolution assumes that Security Advisory "RHSA-2015:0430" is already applied.
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.