Bug 1571831 - [RFE] virt-who should treat qemu:///system the same as if no server were specified
Summary: [RFE] virt-who should treat qemu:///system the same as if no server were spec...
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: virt-who
Version: 7.5
Hardware: x86_64
OS: Linux
Target Milestone: rc
: ---
Assignee: candlepin-bugs
QA Contact: Eko
Depends On:
TreeView+ depends on / blocked
Reported: 2018-04-25 13:35 UTC by Kenny Tordeurs
Modified: 2019-10-28 07:20 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2019-05-28 15:23:43 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 3426201 0 None None None 2018-04-27 14:53:28 UTC

Description Kenny Tordeurs 2018-04-25 13:35:36 UTC
Description of problem:
virt-who creates a second profile for kvm hypervisor while there is only 1 subscription available so either the host cannot attach its subcription or the VMs cannot get their subscription.

Example subscription that provides both 1 physical subscription for the host to get updates and for its VMs:
Red Hat Enterprise Linux for Power, LE with Smart Virtualization, Standard (1 Socket-Pair, Linux only, Unlimited Guests) (SKU RH00321F3)

Version-Release number of selected component (if applicable):
# rpm -qa |grep virt-who

How reproducible:

Steps to Reproduce:
1. Have a KVM host with virt-who config running locally like: 
# cat /etc/virt-who.d/kvm.conf 

2. System is registered with subscription-manager
# subscription-manager identity
system identity: ac23eebc-bed0-41d7-a307-105b64ce451f
name: kvm-host.redhat.com
org name: 1979710
org ID: 1979710

3. Consume a subscription of type RHEL Server with Unlimited Guests

4. Verify on the portal there will be both the profile for 'ac23eebc-bed0-41d7-a307-105b64ce451f' and one created by virt-who

5. Only 1 subscription available and cannot assign it to both profiles

Actual results:
1 profile in the customer portal created by `subscription-manager register` (https://access.redhat.com/management/systems/ac23eebc-bed0-41d7-a307-105b64ce451f)
2nd profile in the customer portal created by virt-who (type hypervisor)

Expected results:
Only 1 profile that is both used by subscription-manager register and for the virt-who mapping.

Additional info:
Configuration is exact match for KVM conf according to https://access.redhat.com/labs/virtwhoconfig/

Comment 4 Kenny Tordeurs 2018-04-26 06:41:55 UTC
Also an additional note:

Removing the server line from the virt-who configuration prevents the secondary profile from being created via virt-who in the customer portal, however none of the VMs are able to pick up their DERIVED SKU, the KVM host can attach the subscription and get updates but none of the VMs even when we can see the GUESTS/HOST in the customer portal which links to the correct host the VM is running on.

Removing the server line from virt-who seems to work for Satellite 6.3 as indicated in [0]
[0] https://bugzilla.redhat.com/show_bug.cgi?id=1566000#c2

Comment 7 Kenny Tordeurs 2018-04-27 08:14:54 UTC
I can confirm that the following steps should resolve the issue:

1) Remove the duplicate profile for the KVM hypervisor created by virt-who with type "Hypervisor" from the customer portal
2) Disable virt-who conf on the KVM hypervisor with : # mkdir /etc/virt-who.d/bkp && mv /etc/virt-who.d/*.conf /etc/virt-who.d/bkp/
3) Restart virt-who: # service virt-who restart
4) On the portal you should only see the KVM profile for type physical system, no new profile should be created.
5) The KVM host and the VMs running on it should still be able to perform `yum check-update` and/or obtain the subscription

Comment 8 Mithil Mhatre 2018-04-27 14:43:40 UTC
Hello Kenny,

The above solution works.

I installed virt-who package and restarted the virt-who service on my KVM host and it is working.

I can now see all the guest present in my KVM host onto the customer portal under the physical system KVM host profile. 

I did not check the yum by attaching the subscription as we dont have physical+guest subscription.

Comment 9 William Poteat 2019-05-28 15:23:43 UTC
The duplication of hosts has been fixed on the Candlepin side as of 2.5. If you see dulplicated host entries then you need to delete one. Reporting of hosts and their normal check ins should proceed and only use the one record. That is the issue decribed in the body of this BZ

The title of this BZ is not what is described below it. If there is an issue there, open as a new bug with that description.

I will close as CURRENT RELEASE.

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