Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1243697

Summary: Failed to run "virt-who -p"
Product: Red Hat Enterprise Linux 7 Reporter: Liushihui <shihliu>
Component: virt-whoAssignee: Radek Novacek <rnovacek>
Status: CLOSED ERRATA QA Contact: xingge <gxing>
Severity: high Docs Contact:
Priority: unspecified    
Version: 7.2CC: gxing, hsun, ldai, ovasik, sgao
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: virt-who-0.14-2.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-19 11:56:52 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Liushihui 2015-07-16 06:23:16 UTC
Description of problem:
Failed to run "virt-who -p" as "Fatal error:
	<virt.libvirtd.libvirtd.LibvirtdGuest object at 0x1e7a410> is not JSON serializable"

Version-Release number of selected component (if applicable):
virt-who-0.14-1.el7.noarch
subscription-manager-1.15.5-1.el7.x86_64
python-rhsm-1.15.3-1.el7.x86_64
Satellite-6.1.0-RHEL-7-20150707.4

How reproducible:
Always

Steps to Reproduce:
1.Register system to Satellite.
2.Stop virt-who service.
3.Run virt-who with "-p" option.
[root@hp-z220-05 ~]# virt-who -p
No configurations found, using libvirt as backend
Using configuration "env/cmdline" ("libvirt" mode)
Using libvirt url: ""
<virt.libvirtd.libvirtd.LibvirtdGuest object at 0x1e7a410> is not JSON serializable
Fatal error:
	<virt.libvirtd.libvirtd.LibvirtdGuest object at 0x1e7a410> is not JSON serializable
Fatal error:
	<virt.libvirtd.libvirtd.LibvirtdGuest object at 0x1e7a410> is not JSON serializable

Actual results:
Failed to run "virt-who -p " as fatal error  

Expected results:
Success to run "virt-who -p" as the following:
[root@dhcp-128-60 ~]# virt-who -p
2015-07-16 18:13:59,833 INFO: No configurations found, using libvirt as backend
2015-07-16 18:13:59,833 INFO: Using configuration "env/cmdline" ("libvirt" mode)
2015-07-16 18:13:59,914 INFO: Using libvirt url: ""
{"hypervisors": [{"guests": []}]}

Additional info:
When virt-who run at esx mode with "-p" option, it hasn't this problem, it can show host/guest mapping successfully.
[root@hp-z220-05 ~]# virt-who --esx --esx-owner=ACME_Corporation --esx-env=Library --esx-server=10.66.79.57 --esx-username=Administrator --esx-password=qwer1234P! -p
Using configuration "env/cmdline" ("esx" mode)
{"hypervisors": [{"uuid": "aee4ff00-8c33-11e2-994a-6c3be51d959a", "guests": [{"guestId": "564dab7d-3b72-51a1-eeda-586036106892", "attributes": {"active": 0, "virtWhoType": "esx"}, "state": 5}, {"guestId": "4227d611-0abc-fc5e-7538-07ebd83fa9ba", "attributes": {"active": 1, "virtWhoType": "esx"}, "state": 1}, {"guestId": "421aa84b-a49e-e01c-fa72-0b570372dd9d", "attributes": {"active": 1, "virtWhoType": "esx"}, "state": 1}, {"guestId": "564daa52-c518-b2f0-3c05-a343285910e1", "attributes": {"active": 0, "virtWhoType": "esx"}, "state": 5}]}, {"uuid": "564d9e7a-4128-92b6-7284-6335f6b399be", "guests": []}]}

Comment 1 Radek Novacek 2015-07-16 15:34:13 UTC
Fixed in virt-who-0.14-2.el7.

Comment 3 Liushihui 2015-07-24 06:48:55 UTC
Verified it on virt-who-0.14-2.el7.noarch since "virt-who -p "can run normally. Therefore, verify it.

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

Verified process:
1. Register system to Satellite6.1
2.Stop virt-who service.
3.Run virt-who with "-p" option.
[root@hp-z220-05 libvirt-test-API]# virt-who -p
No configurations found, using libvirt as backend
Using configuration "env/cmdline" ("libvirt" mode)
Using libvirt url: ""
{"hypervisors": [{"guests": [{"guestId": "2c8198c2-8e26-4d70-89fb-9eaaf67aaf47", "state": 1, "attributes": {"active": 1, "virtWhoType": "libvirt", "hypervisorType": "QEMU"}}, {"guestId": "bcd6eb25-7183-4c83-bcac-08553b54440f", "state": 5, "attributes": {"active": 0, "virtWhoType": "libvirt", "hypervisorType": "QEMU"}}, {"guestId": "cde1bad7-3c4e-4be8-a4aa-e8dd42f53d28", "state": 5, "attributes": {"active": 0, "virtWhoType": "libvirt", "hypervisorType": "QEMU"}}, {"guestId": "efbc465f-24ec-435e-8779-0ea26d4986ae", "state": 5, "attributes": {"active": 0, "virtWhoType": "libvirt", "hypervisorType": "QEMU"}}]}]}

Comment 4 errata-xmlrpc 2015-11-19 11:56:52 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/RHBA-2015-2370.html