Bug 1346571

Summary: virt-what doesn't display xen-domU for a RHEL6.8 paravirtualized guest domain on RHEL5.11 Xen host.
Product: Red Hat Enterprise Linux 6 Reporter: Lin Liu <linl>
Component: virt-whatAssignee: Richard W.M. Jones <rjones>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.8CC: leiwang, rbalakri, wshi, xchen
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: virt-what-1.11-1.3.el6 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-03-21 11:29:04 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 Lin Liu 2016-06-15 03:11:24 UTC
Description of problem:
virt-what doesn't display xen-domU for a RHEL6.8 paravirtualized guest domain on RHEL5.11 Xen host.

Version-Release number of selected component (if applicable):
Host RHEL5.11 with latest xen and kernel xen:
kernel-xen-2.6.18-408.el5
xen-3.0.3-147.el5_11

Guest RHEL6.8 with:
kernel-2.6.32-642.el6.x86_64
virt-what-1.11-1.2.el6.x86_64

How reproducible: Always

Steps to Reproduce:
1. Create a RHEL6.8 paravirtualized guest domain on RHEL5.11 Xen host.
2. Login to the guest system and run command "virt-what".

Actual results:
The result of virt-what is:
[root@dhcp-66-145-125 ~]# /usr/sbin/virt-what
xen
The other information of the guest "xen-domU" is missing.

Expected results:
The result should include the "xen-domU" information as in the man page.
[root@dhcp-66-145-125 ~]# /usr/sbin/virt-what
xen
xen-domU

Additional info:
1. The latest source code of virt-what (virt-what-1.15) has modified this issue in xen part of file virt-what.in, using this code the virt-what works as expected.

# Check for Xen.

if [ "$cpuid" = "XenVMMXenVMM" ]; then
    echo xen; echo xen-hvm
    skip_qemu_kvm=true
elif [ -d "${root}/proc/xen" ]; then
    echo xen-hypervisor
    if grep -q "control_d" "${root}/proc/xen/capabilities" 2>/dev/null; then
        echo xen-dom0; echo print-dom0
    else
        echo xen-domU; echo print-domU
    fi
    skip_qemu_kvm=true
    skip_lkvm=true
...

2. There is once a bug on RHEL6.1 https://bugzilla.redhat.com/show_bug.cgi?id=671126 which is fixed on virt-what-1.3-4.4.el6, but the directory structure of xen pv guest changed, so I suggest to change this part of code accordingly to get the exactly guest information.

Comment 2 Richard W.M. Jones 2016-06-15 14:33:48 UTC
Possibly we should just rebase virt-what in RHEL 6 to fix this.

Anyway, I am going to dev-ack this, but based on the history of
never being able to get virt-what into the RHEL ACL, I wouldn't
hold your breath on this bug being fixed any time soon.

Comment 5 Bin Han 2016-11-02 08:03:55 UTC
Packager version:
virt-what-1.11-1.3.el6.ppc64

Steps to Reproduce:
1. Create a RHEL6.8 paravirtualized guest domain on RHEL5.11 Xen host.
2. Login to the guest system and run command "virt-what".

Result:
[root@dhcp-66-145-125 ~]# virt-what
xen
xen-domU

So verified.

Comment 7 errata-xmlrpc 2017-03-21 11:29:04 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-2017-0748.html