Bug 1072524

Summary: Add support for detecting ppc64 LPAR as virt guests
Product: Red Hat Enterprise Linux 7 Reporter: Adrian Likins <alikins>
Component: virt-whatAssignee: Richard W.M. Jones <rjones>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0CC: alemay, alikins, asaha, bugproxy, dgibson, hannsj_uhl, jwildman, linl, ncoghlan, xchen
Target Milestone: rcKeywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: virt-what-1.13-7.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1312431 (view as bug list) Environment:
Last Closed: 2016-11-04 07:02:12 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:
Bug Depends On:    
Bug Blocks: 1151596, 1301891, 1312431    
Attachments:
Description Flags
add ppc64 lpar and kvm detection to virt-what
none
patch
none
Git patch none

Description Adrian Likins 2014-03-04 17:17:58 UTC
Description of problem:

This is based on conversations around https://bugzilla.redhat.com/show_bug.cgi?id=1070908 . We need virt-what to consider ppc64 systems running
in/on a LPAR as virt-guests.

That bug is about subman codes method of counting cpu sockets on a system that is a ppc64 lpar partition (which is currently wrong). But, discussions with dlah came to the conclusion that that instance should be considered a virt guest (where for new entitlements, the cpu socket count doesn't matter).
But, for those systems we are not currently detecting them as virt guests.

Version-Release number of selected component (if applicable):
RHEL7 versions (virt-what-1.13-5 was on one system)

How reproducible:
Steps to reproduce:
Need a ppc64 system running in a LPAR and I believe with the hardware running powerVM.


Actual results:
virt-what returns nothing

Expected results:
something like
powervm-lpar



Additional info:

I am not actually sure how to detect if the system is running as an LPAR.

Comment 4 Nick Coghlan 2014-08-22 04:50:24 UTC
I'd like to suggest that this issue be reconsidered.

It recently came up on beaker-user-list that Beaker's inventory system currently reports LPAR systems with shared resources as not having a hypervisor. In the context of performance testing, this means that filters to request bare metal systems may come up with LPAR hosts running with access to shared resources, and hence the benchmark results may be affected by activity in other partitions on the same host.

While I can understand an LPAR with a static resource assignment being considered "equivalent to bare metal", and hence not reporting a hypervisor, one running with shared resources is just as unreliable for benchmarking purposes as any VM running on KVM/Xen/VMWare/Hyper-V.

We'll aim to address this issue directly in beaker-system-scan regardless (see bug 1132791), but that shared vs static distinction seems potentially relevant here as well.

Comment 5 Richard W.M. Jones 2014-08-22 08:16:43 UTC
Gonna need access, or someone to send me a patch.

Comment 9 Adrian Likins 2016-01-19 15:27:39 UTC
Re-openning. 

It would still be useful to have ppc64 lpar detection built into virt-what, even if we (subscription-manager and entitlements) don't necessarily consider ppc64 lpar systems to count as virt guests. It would be easier to have that info and ignore it that to not have it at all. 

PowerKVM support also confuses that matter.

Comment 11 Adrian Likins 2016-01-19 17:55:19 UTC
Also, support for detection of ppc64 KVM and PowerKVM.

Comment 12 Adrian Likins 2016-01-19 17:56:18 UTC
virt-what-1.13 fails to detect KVM on ppc64. 
However systemd-detect-virt does.

Comment 13 Adrian Likins 2016-01-19 23:29:31 UTC
Created attachment 1116413 [details]
add ppc64 lpar and kvm detection to virt-what

This is based on the mailing list about the facts collected by subscription-manager for ppc64. This adds info about ppc64 virt modes to virt-what so subscription-manager will correctly the 'virt.is_guest' fact.

Note this makes a bit of an assumption, namely that ppc64 lpar guests are 'virt'.
My preference would be for virt-what to indicate a lpar guests, and include the
virt type. If RHSM/subscription-manager later need to special case ppc64/lpar to not count as 'virt', we can do that with the info available.

Comment 14 RHEL Program Management 2016-02-04 06:47:11 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 15 Richard W.M. Jones 2016-06-20 12:06:35 UTC
Comment 13 added as an upstream patch:
http://git.annexia.org/?p=virt-what.git;a=commit;h=d5a6ad7fbbed356c9176c859356e2408519762c0

Comment 16 Richard W.M. Jones 2016-06-20 12:21:41 UTC
*** Bug 1292403 has been marked as a duplicate of this bug. ***

Comment 17 IBM Bug Proxy 2016-06-20 13:00:57 UTC
Created attachment 1169917 [details]
patch

Comment 18 IBM Bug Proxy 2016-06-20 13:01:03 UTC
Created attachment 1169918 [details]
Git patch

Comment 19 Xianghua Chen 2016-07-26 03:41:45 UTC
Verified with the packages:
virt-what-1.13-7.el7.ppc64

Verify steps:
1. Prepare a RHEL system on LPAR.
To find a ppc LAPR hardware on beaker, search condition is : System/Model  contains  LPAR
And then schedule reservation and install rhel7.3.
2. 
# virt-what
ibm_power-lpar_dedicated

So verified.

Comment 21 errata-xmlrpc 2016-11-04 07:02:12 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-2016-2469.html