How to use a Microsoft Windows domain account with virt-who?
Environment
Red Hat Enterprise Linux 5/6/7
Red Hat Satellite 5.x/6.x
Red Hat Subscription Manager
Subscription Asset Manager
virt-who
VMware vCenter with Active Directory domain user authentication
Issue
-
How to configure
virt-whoto use a Microsoft Windows domain account? -
Using Windows domain account
virt-whofails with an authentication error.2015-05-26 14:15:32,008 [INFO] @virtwho.py:442 - Using virt-who configuration: vcenter1 2015-05-26 14:15:32,008 [DEBUG] @virtwho.py:170 - Starting infinite loop with 3600 seconds interval 2015-05-26 14:15:43,708 [ERROR] @esx.py:154 - Unable to login to ESX Traceback (most recent call last): File "/usr/share/virt-who/virt/esx/esx.py", line 152, in scan self.client.service.Login(_this=self.sc.sessionManager, userName=self.username, password=self.password) File "/usr/lib/python2.6/site-packages/suds/client.py", line 542, in __call__ return client.invoke(args, kwargs) File "/usr/lib/python2.6/site-packages/suds/client.py", line 602, in invoke result = self.send(soapenv) File "/usr/lib/python2.6/site-packages/suds/client.py", line 657, in send result = self.failed(binding, e) File "/usr/lib/python2.6/site-packages/suds/client.py", line 712, in failed r, p = binding.get_fault(reply) File "/usr/lib/python2.6/site-packages/suds/bindings/binding.py", line 265, in get_fault raise WebFault(p, faultroot) WebFault: Server raised fault: 'Cannot complete login due to an incorrect user name or password.' 2015-05-26 14:15:43,709 [ERROR] @virtwho.py:118 - Error in communication with virtualization backend, trying to recover:
Resolution
-
If using
/etc/sysconfig/virt-whoconfiguration file then edit username with a double backslash:
For example:VIRTWHO_HYPERV_USERNAME="MYDOMAIN\\user" -
If using
/etc/virt-who.d/configfile then edit username with a single backslash:username=MYDOMAIN\user -
Refer KCS to know how to configure
virt-whoto register hypervisor. -
Refer KCS for steps to configure multiple
vCentersin single RHEL instance.
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
- Microsoft Windows domain account requires a double backslash in the default
/etc/sysconfig/virt-who configurationfile and single backslash in/etc/virt-who.d/configfile if configuring multiple VMware vCenter's on a single RHEL instance:
- VIRTWHO_HYPERV_USERNAME="MYDOMAIN\administrator" will be interpreted as : MYDOMAINuser
- VIRTWHO_HYPERV_USERNAME="MYDOMAIN\\administrator" will be interpreted as : MYDOMAIN\user
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.