RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1082981 - Faild to add Hyper-V 2012 to SAM as virt-who communication with Hyper-V failed
Summary: Faild to add Hyper-V 2012 to SAM as virt-who communication with Hyper-V failed
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: virt-who
Version: 7.0
Hardware: x86_64
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Radek Novacek
QA Contact: Li Bin Liu
URL:
Whiteboard:
Depends On:
Blocks: 1113520
TreeView+ depends on / blocked
 
Reported: 2014-04-01 08:55 UTC by Liushihui
Modified: 2018-12-09 17:41 UTC (History)
7 users (show)

Fixed In Version: virt-who-0.11-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-05 10:23:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
The successful transaction on HyperV2008 (34.41 KB, application/vnd.tcpdump.pcap)
2014-04-01 08:58 UTC, Liushihui
no flags Details
The error transaction on the HyperV2012 (153.02 KB, application/vnd.tcpdump.pcap)
2014-04-01 09:00 UTC, Liushihui
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:0430 0 normal SHIPPED_LIVE Moderate: virt-who security, bug fix, and enhancement update 2015-03-05 14:52:46 UTC

Description Liushihui 2014-04-01 08:55:17 UTC
Description of problem:
Virt-who can't get the host/guest association in the HYPER-V mode as it connect with Hyper-V failed

Version-Release number of selected component (if applicable):
subscription-manager-1.10.14-7.el7.x86_64
python-rhsm-1.10.12-2.el7.x86_64
virt-who-0.8-12.el7.noarch

How reproducible:
Always

Test Env:
Hyper-V 2012 : 10.66.12.120
SAM server: 10.66.12.116 username/password:admin/admin

Steps to Reproduce:
1. Install a Hyper-V 2012 on a physical machine.
2. Configure Hyper-V 2012 as README.hyperv file 
 https://git.fedorahosted.org/cgit/virt-who.git/tree/README.hyperv
3. Configure virt-who run at the hyperv mode. 
VIRTWHO_DEBUG=1
VIRTWHO_INTERVAL=5
VIRTWHO_HYPERV=1

VIRTWHO_HYPERV_OWNER=ACME_Corporation
VIRTWHO_HYPERV_ENV=Library
VIRTWHO_HYPERV_SERVER=10.66.12.120
VIRTWHO_HYPERV_USERNAME=administrator
VIRTWHO_HYPERV_PASSWORD=qwer1234P
4.Restart virt-who service
# systemctl restart virt-who
5.Check the http transactions which from virt-who to Hyper-V 2012
Please see it in the attachment Hyperv2012.pcap
6.Check the virt-who log in the /var/log/rhsm/rhsm.log
#tail -f /var/log/rhsm/rhsm.log

Actual results:
it can't get the host/guest mapping as the Hyper-V response 415 error message when virt-who send post request to Hyper-V 2012.

2014-04-01 15:36:25,217 [DEBUG]  @hyperv.py:165 - Hyper-V url: http://10.66.12.120:5985/wsman
2014-04-01 15:36:25,219 [DEBUG]  @hyperv.py:215 - Using NTLM authentication
2014-04-01 15:36:25,222 [DEBUG]  @hyperv.py:242 - NTLM authentication successful
2014-04-01 15:36:25,224 [ERROR]  @virt-who.py:200 - Unable to recover, retry in 5 seconds.
2014-04-01 15:36:30,229 [DEBUG]  @hyperv.py:165 - Hyper-V url: http://10.66.12.120:5985/wsman
2014-04-01 15:36:30,230 [DEBUG]  @hyperv.py:215 - Using NTLM authentication
2014-04-01 15:36:30,235 [DEBUG]  @hyperv.py:242 - NTLM authentication successful
2014-04-01 15:36:30,236 [ERROR]  @virt-who.py:197 - Error in communication with virt backend, trying to recover:
Traceback (most recent call last):
  File "/usr/share/virt-who/virt-who.py", line 191, in _send
    virtualGuests = self.virt.getHostGuestMapping()
  File "/usr/share/virt-who/hyperv.py", line 270, in getHostGuestMapping
    uuid = hypervsoap.Enumerate("select BIOSGUID from Msvm_VirtualSystemSettingData where SettingType = 3")
  File "/usr/share/virt-who/hyperv.py", line 88, in Enumerate
    response = self.post(data)
  File "/usr/share/virt-who/hyperv.py", line 68, in post
    raise HyperVException("Communication with Hyper-V failed, HTTP error: %d" % response.status)
HyperVException: Communication with Hyper-V failed, HTTP error: 415

Expected results:
Virt-who should connect to the Hyper-V successfully. it will send the correct host/guest association mapping to SAM server

Additional info:
[NOTE]: Do the same test on the Hyper-V 2008 against SAM, it hasn't this problem, please see the http transactions between virt-who and Hyper-V 2008 in the attachment Hyperv2008.pcap. Check the "http POST" packets which from virt-who to Hyper-V 2008 and Hyper-V 2012, the package contend is the same.

Comment 1 Liushihui 2014-04-01 08:58:51 UTC
Created attachment 881250 [details]
The successful transaction on HyperV2008

Comment 3 Liushihui 2014-04-01 09:00:05 UTC
Created attachment 881251 [details]
The error transaction on the HyperV2012

Comment 4 RHEL Program Management 2014-04-09 05:47:53 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 5 Liushihui 2014-06-23 05:46:28 UTC
Do the same test as bug description on RHEL5u11-Server-x64-20140603.0(kvm) + HyperV2012, The bug is still exist.

Test Env:
Hyper-V 2012 : 10.66.129.161
SAM server: 10.66.129.45 username/password:admin/admin

Version-Release number of selected component (if applicable):
subscription-manager-1.11.3-5.el5
python-rhsm-1.11.3-3.el5
virt-who-0.9-4.el5

Steps to Reproduce:
1. Install a Hyper-V 2012 on a physical machine which installed Windows Server 2012 R2 Datacenter.
2. Configure Hyper-V 2012 as README.hyperv file 
 https://git.fedorahosted.org/cgit/virt-who.git/tree/README.hyperv
3. Configure virt-who run at the hyperv mode. 
VIRTWHO_DEBUG=1
VIRTWHO_INTERVAL=5
VIRTWHO_HYPERV=1

VIRTWHO_HYPERV_OWNER=ACME_Corporation
VIRTWHO_HYPERV_ENV=Library
VIRTWHO_HYPERV_SERVER=10.66.129.161
VIRTWHO_HYPERV_USERNAME=administrator
VIRTWHO_HYPERV_PASSWORD=qwer1234P
4.Register system to SAM server and restart virt-who service
[root@hp-z220-03 ~]#subscription-manager register --username=admin --password=admin
[root@hp-z220-03 ~]# service virt-who restart
Stopping virt-who:                                         [FAILED]
Starting virt-who:                                         [  OK  ]
5.Check the virt-who log in the /var/log/rhsm/rhsm.log
#tail -f /var/log/rhsm/rhsm.log

2014-06-23 01:28:10,592 [WARNING]  @virt-who.py:547 - Listening for events is not available in VDSM, ESX, RHEV-M or Hyper-V mode
2014-06-23 01:28:10,750 [DEBUG]  @hyperv.py:172 - Hyper-V url: http://10.66.128.161:5985/wsman
2014-06-23 01:28:10,750 [DEBUG]  @virt-who.py:562 - Virt-who is running in hyperv mode
2014-06-23 01:28:10,751 [DEBUG]  @virt-who.py:569 - Starting infinite loop with 5 seconds interval and event handling
2014-06-23 01:28:10,755 [DEBUG]  @hyperv.py:222 - Using NTLM authentication
2014-06-23 01:28:10,867 [DEBUG]  @hyperv.py:249 - NTLM authentication successful
2014-06-23 01:28:10,931 [ERROR]  @virt-who.py:207 - Error in communication with virt backend, trying to recover:
Traceback (most recent call last):
  File "/usr/share/virt-who/virt-who.py", line 198, in _send
    virtualGuests = self.virt.getHostGuestMapping()
  File "/usr/share/virt-who/hyperv.py", line 277, in getHostGuestMapping
    uuid = hypervsoap.Enumerate("select BIOSGUID from Msvm_VirtualSystemSettingData where SettingType = 3")
  File "/usr/share/virt-who/hyperv.py", line 95, in Enumerate
    response = self.post(data)
  File "/usr/share/virt-who/hyperv.py", line 75, in post
    raise HyperVException("Communication with Hyper-V failed, HTTP error: %d" % response.status)
HyperVException: Communication with Hyper-V failed, HTTP error: 415

Comment 7 Radek Novacek 2014-09-24 07:27:45 UTC
This bug should be fixed by rebase to virt-who-0.11-1.el7.

Comment 9 Liushihui 2014-10-10 02:17:40 UTC
Verify it on virt-who-0.11-1.el7.noarch

Verified process:
Env:
Hyper-V 2012 : 10.66.128.26
SAM server: 10.66.129.124 username/password:admin/admin

Version-Release number of selected component (if applicable):
subscription-manager-1.13.3-1.el7.x86_64
python-rhsm-1.13.2.1-2.el7.x86_64
virt-who-0.11-1.el7.noarch

Steps to verify:
1. Install a Hyper-V 2012 on a physical machine which installed Windows Server 2012 R2 Datacenter.
2. Configure Hyper-V 2012 as README.hyperv file 
 https://git.fedorahosted.org/cgit/virt-who.git/tree/README.hyperv
3. Configure virt-who run at the hyperv mode. 
VIRTWHO_DEBUG=1
VIRTWHO_INTERVAL=5
VIRTWHO_HYPERV=1

VIRTWHO_HYPERV_OWNER=ACME_Corporation
VIRTWHO_HYPERV_ENV=Library
VIRTWHO_HYPERV_SERVER=10.66.128.26
VIRTWHO_HYPERV_USERNAME=administrator
VIRTWHO_HYPERV_PASSWORD=qwer1234P
4.Register system to SAM server and restart virt-who service
[root@dhcp-128-2 ~]# subscription-manager register --username=admin --password=admin
The system has been registered with ID: 240e7611-6fde-451c-8a24-282dde528024 
[root@dhcp-128-2 ~]# service virt-who restart
Redirecting to /bin/systemctl restart  virt-who.service

5.Check the virt-who log in the /var/log/rhsm/rhsm.log,it hasn't show any error log, Meanwhile, the hypervisor has been registered to SAM successfully.Therefore, Verify it.

#tail -f /var/log/rhsm/rhsm.log
2014-10-10 10:11:26,595 [INFO]  @virtwho.py:442 - Using virt-who configuration: virt-who
2014-10-10 10:11:26,596 [DEBUG]  @virtwho.py:170 - Starting infinite loop with 5 seconds interval
2014-10-10 10:11:26,724 [DEBUG]  @hyperv.py:208 - Hyper-V url: http://10.66.128.26:5985/wsman
2014-10-10 10:11:26,728 [DEBUG]  @hyperv.py:258 - Using NTLM authentication
2014-10-10 10:11:26,774 [DEBUG]  @hyperv.py:285 - NTLM authentication successful
2014-10-10 10:11:26,783 [DEBUG]  @hyperv.py:325 - Error when enumerating using root/virtualization namespace, trying root/virtualization/v2 namespace
2014-10-10 10:11:26,784 [DEBUG]  @hyperv.py:258 - Using NTLM authentication
2014-10-10 10:11:26,801 [DEBUG]  @hyperv.py:285 - NTLM authentication successful
2014-10-10 10:11:26,897 [INFO]  @subscriptionmanager.py:116 - Sending update in hosts-to-guests mapping: {'60527517-6284-7593-6AAB-75BF2A6375EF': []}
2014-10-10 10:11:28,013 [INFO]  @virtwho.py:164 - Created host: 48c16a13-d920-43a2-b72a-a812b9a899db with guests: []

Comment 11 errata-xmlrpc 2015-03-05 10:23:08 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2015-0430.html


Note You need to log in before you can comment on or make changes to this bug.