Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 855766

Summary: Guest's system facts displays "virt.uuid: Unkown" on xen-ia64-FV.
Product: Red Hat Enterprise Linux 5 Reporter: ndong <ndong>
Component: subscription-managerAssignee: Bryan Kearney <bkearney>
Status: CLOSED CANTFIX QA Contact: Entitlement Bugs <entitlement-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 5.9CC: bkearney, dlackey, huiwang, jmolet, khong, maurizio.antillon, ndai, rnovacek, syeghiay
Target Milestone: rcKeywords: Regression, ReleaseNotes, Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Known Issue
Doc Text:
For virtual guests, the Subscription Manager daemons use dmidecode to read the System Management BIOS (SMBIOS), which is used to retrieve the guest UUID. On 64-bit Intel architecture, the SMBIOS information is controlled by the Intel firmware and stored in a read-only binary entry. Therefore, it is not possible to retrieve the UUID or set a new and readable UUID. Because the guest UUID is unreadable, running the facts command on the guest system shows a value of Unknown in the virt.facts file for the system (virt.uuid: Unknown). This means that the guest does not have any association with the host machine and, therefore, does not inherit some subscriptions. The facts used by Subscription Manager can be edited manually to add the UUID: Obtain the guest name or guest ID. On the virtual host, use virsh to retrieve the guest UUID. For example, for a guest named 'rhel5server_virt1': virsh domuuid rhel5server_virt1 On the guest, manually create a facts file: vim /etc/rhsm/facts/virt.facts Add a line which contains the given UUID. { "virt.uuid": "$VIRSH_UUID" } Creating the facts file and inserting the proper UUID means that Subscription Manager properly identifies the guest rather than using an Unknown value.
Story Points: ---
Clone Of: 758038 Environment:
Last Closed: 2012-09-28 11:49:29 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 758038    
Bug Blocks: 715031, 771748, 782064, 798997    

Comment 1 ndong 2012-09-10 09:12:34 UTC
test version:
subscription-manager-1.0.14-1.el5
virt-who-0.7-5.el5
subscription-manager-1.0.14-1.el5
libvirt-0.8.2-29.el5
candlepin-0.6.5-1.el6_2.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch

The issue only exists on guest ia_64: Red Hat Enterprise Linux Server release 5.9 Beta 1.0 (xen_ia64_FV).
The problem is so serious to block the test of host/guest association (
host:Red Hat Enterprise Linux Server release 5.9 Beta 1.0-ia_64 /
guest:Red Hat Enterprise Linux Server release 5.9 Beta 1.0-ia_64)

Comment 3 Hui Wang 2012-09-13 07:13:36 UTC
Today we recheck the issue on RHEL5.8 GA(xen-ia64-FV), this issue exists on RHEL5.8 GA. Pls help clone this issue to 5.8.z. Thanks very much.

version:
subscription-manager-0.98.14-1.el5
virt-who-0.5-5.el5
libvirt-0.8.2-25.el5

In the Errata: https://errata.devel.redhat.com/advisory/12093 of run https://tcms.engineering.redhat.com/run/32855/, the case blocked by https://bugzilla.redhat.com/show_bug.cgi?id=750283. We should track the issue after the Spring Festival ASAP. This is my fault. So sorry.

Comment 4 James Bowes 2012-09-24 12:52:03 UTC
Can someone help me get access to an ia64 host running xen, or point me to directions for setting one up?

I've had no luck getting one running with beaker so far.

Comment 5 Hui Wang 2012-09-25 02:30:02 UTC
(In reply to comment #4)
> Can someone help me get access to an ia64 host running xen, or point me to
> directions for setting one up?
> 
> I've had no luck getting one running with beaker so far.

Hi James,

I sent one mail for you, you can use the ia64 host in the mail. 

Regards,
Hui Wang

Comment 6 James Bowes 2012-09-26 15:41:53 UTC
I've been able to look into this, and part of the investigation helped spark an old memory about ia64/xen with rhn/satellite. The relevant bug is:

https://bugzilla.redhat.com/show_bug.cgi?id=473418

We use dmidecode to read the smbios in a fully virt guest (and in kvm) to get the guest uuid. On ia64 fully virt xen, the smbios info is controlled by the ia64 guest firmware that Intel puts out. Unfortunately, it's binary only (so we can't change it ourselves), and no longer supported.

There's no other way to read the guest uuid, either.

So we can't fix this bug.

However, for subscription-manager, there is a workaround:

On your host, use virsh to find out the uuid of your guest (you have to know the guest id or name):

virsh domuuid rhel5.8server_fv

Then on your guest, create a file "/etc/rhsm/facts/virt.facts"
and put in it:

{
  "virt.uuid": "$OUTPUT_FROM_VIRSH"
}

That will override the "Unknown" value that subscription-manager would usually use with the real uuid that you got from the host.

If there is demand for it, we could do a kbase (or similar) for this.

Comment 7 James Bowes 2012-09-26 15:42:50 UTC
Leaving this open for now in case anyone wants to have a discussion on it (particularly about documenting it), but I believe we should close as cantfix.

Comment 8 ndong 2012-09-27 08:49:37 UTC
verify passed
test version:
RHEL5.8-Server-x86_64 as guest(FV) 
virt-who-0.5-5.el5
subscription-manager-0.98.14-1.el5
subscription-manager-gnome-0.98.14-1.el5
subscription-manager-firstboot-0.98.14-1.el5

1 on guest, register to candlepin

2 run command virsh domuuid rhel5.8server_fv
[root@hp-bl860c-02 ~]# virsh domuuid rhel5.8server_fv
a7248453-5b88-4049-726a-1888150f9377
 
3 create a file"/etc/rhsm/facts/virt.facts" in the guest, input the content as follows:
{
        "virt.uuid": "7248453-5b88-4049-726a-1888150f9377"
}

4 run the cmd in the guest
[root@dhcp-66-73-134 ~]# subscription-manager facts --list
cpu.core(s)_per_socket: 1
cpu.cpu(s): 1
cpu.cpu_socket(s): 1
distribution.id: Tikanga
distribution.name: Red Hat Enterprise Linux Server
distribution.version: 5.8
memory.memtotal: 878160
memory.swaptotal: 1769440
net.interface.eth0.broadcast: 10.66.73.255
net.interface.eth0.hwaddr: 00:16:3e:5f:40:fc
net.interface.eth0.ipaddr: 10.66.73.134
net.interface.eth0.netmask: 255.255.254.0
net.interface.eth1.broadcast: Unknown
net.interface.eth1.hwaddr: 00:16:3e:5f:40:fc
net.interface.eth1.ipaddr: Unknown
net.interface.eth1.netmask: Unknown
net.interface.lo.broadcast: 0.0.0.0
net.interface.lo.hwaddr: 00:00:00:00:00:00
net.interface.lo.ipaddr: 127.0.0.1
net.interface.lo.netmask: 255.0.0.0
network.hostname: dhcp-66-73-134.englab.nay.redhat.com
network.ipaddr: 127.0.0.1
system.entitlements_valid: valid
system.name: dhcp-66-73-134.englab.nay.redhat.com
system.uuid: cd651790-f591-4983-b847-9f296cae826a
uname.machine: ia64
uname.nodename: dhcp-66-73-134.englab.nay.redhat.com
uname.release: 2.6.18-308.el5
uname.sysname: Linux
uname.version: #1 SMP Fri Jan 27 17:24:02 EST 2012
virt.host_type: xen
xen-hvm
virt.is_guest: True
virt.uuid: 7248453-5b88-4049-726a-1888150f9377

5. virt.uuid: 7248453-5b88-4049-726a-1888150f9377
which is same as from host.
verify passed under the work round. so close the bug as cantfix

Comment 9 ndong 2012-09-28 02:42:36 UTC
the bug can not be closed for guest's uuid is key point to test the host/guest association. However,with this work round the guest can not subscribe the bonus of the host's subscription.

steps for the host/guest association:

1 register the host and the guest with the same username and password.
#subscription-manager register 

2 the host is subscibed a subscription with a bonus.
#subscription-manager subscribe --pool=$poolID

3 run the cmd to check if whether the bonus subcription in the guest exits
#subscription-manager list --available

actual results:
there are only physical subscription pools available displayed.

expect results:
there will virtual supcriptions available displayed in the guest.

Comment 10 Bryan Kearney 2012-09-28 11:49:29 UTC
I have requested a release not for this with the instructions in https://bugzilla.redhat.com/show_bug.cgi?id=855766#c6 to be used. However, the bug itself can not be fixed.

Comment 11 Hui Wang 2012-10-12 09:02:32 UTC
If used the work round as comment6, it can support host/guest association. But how to make the work round more simple to customers? We should not let the customers to update the facts manually. Any comments?


step:
1.register host to SAM, got HOST consumer ID: 9610f79d-8105-425c-9dd1-0620ea16cc91
2.virt-who send the host/guest uuids to SAM
2.use the work round to set the virt.uuid to facts on the guest(ia64_xen_fv)
3.register the guest to SAM, got GUEST consumer ID: 496e1b88-44f4-4eef-a184-60c11a770e56 
4.get the host/guest association from consumer content on server side:
#curl -u admin:admin -k https://10.66.13.214/sam/api/consumers/9610f79d-8105-425c-9dd1-0620ea16cc91 >> "consumerContent"
The GUEST consumer ID is in "consumerContent" file that is HOST consumer content file.

So if Host consumer one subscription that can provide bonus pool, guest will see the bonus pool and can to consumer the bonus pool.

=========================
Details:
=========================
On HOST: [root@hp-bl860c-02 ~]# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+

Subscription Name:    	Red Hat Employee Subscription
Provides:             	Red Hat Enterprise Linux Server
                      	Red Hat Enterprise Linux Resilient Storage (for RHEL Server)
                      	Red Hat Enterprise Linux Scalable File System (for RHEL Server)
                      	Red Hat Beta
                      	Red Hat Enterprise Linux Load Balancer (for RHEL Server)
                      	Red Hat Enterprise Linux High Availability (for RHEL Server)
                      	Red Hat Enterprise Linux Workstation
SKU:                  	SYS0395
Contract:             	2596950
Account:              	477931
Serial Number:        	4321036658055440869
Active:               	True
Quantity Used:        	1
Service Level:        	None
Service Type:         	None
Starts:               	10/08/2011
Ends:                 	01/01/2022

ON GUEST:
[root@dhcp-66-73-85 ~]# subscription-manager list --available
+-------------------------------------------+
    Available Subscriptions
+-------------------------------------------+

Subscription Name:    	Resilient Storage (8 sockets)
SKU:                  	RH1316844
Pool Id:              	8ac28c0b398f624901398faaf4130084
Quantity:             	18
Service Level:        	Layered
Service Type:         	L1-L3
Multi-Entitlement:    	No
Ends:                 	02/24/2013
Machine Type:         	physical

Subscription Name:    	Red Hat Enterprise Linux Server for HPC Compute Node,
                        Self-support (8 sockets) (Up to 1 guest)
SKU:                  	RH0604852
Pool Id:              	8ac28c0b398f624901398faafa0c00b6
Quantity:             	21
Service Level:        	Self-support
Service Type:         	L1-L3
Multi-Entitlement:    	No
Ends:                 	12/21/2012
Machine Type:         	physical

Subscription Name:    	Red Hat Employee Subscription
SKU:                  	SYS0395
Pool Id:              	8ac28c0b398f624901398faafaa300d2
Quantity:             	12
Service Level:        	None
Service Type:         	None
Multi-Entitlement:    	No
Ends:                 	01/01/2022
Machine Type:         	physical

Subscription Name:    	Red Hat Employee Subscription
SKU:                  	SYS0395
Pool Id:              	8ac28c0b398f6249013a4890dc053eee
Quantity:             	unlimited
Service Level:        	None
Service Type:         	None
Multi-Entitlement:    	No
Ends:                 	01/01/2022
Machine Type:         	virtual ^^^^^^^^^^^^^^^bonus pool