Bug 681464

Summary: virt-what should be better at detecting EC2 instances
Product: Red Hat Enterprise Linux 7 Reporter: Richard W.M. Jones <rjones>
Component: virt-whatAssignee: Richard W.M. Jones <rjones>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: low    
Version: 7.0CC: bkearney, dgoodwin, jsefler, jzheng, leiwang, linl, mgoldman, mshao, rjones, wshi, xchen
Target Milestone: rcKeywords: Reopened
Target Release: 7.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 671126 Environment:
Last Closed: 2017-07-19 15:42:10 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 671126    
Bug Blocks: 1113520, 1288337, 1301891    

Description Richard W.M. Jones 2011-03-02 09:37:36 UTC
+++ This bug was initially created as a clone of Bug #671126 +++

It would be better if, when you run virt-what on an EC2
instance, it would say something like:

  # virt-what
  xen
  xen-domU
  xen-EC2

In 6.0 it was completely wrong about EC2.  In 6.1 we fixed that
so it now says:

  # virt-what
  xen

Comment 3 Richard W.M. Jones 2011-06-10 11:14:42 UTC
Looks like we'll be able to investigate this for 6.2.

Comment 4 Richard W.M. Jones 2011-08-11 11:40:40 UTC
Push this up to 6.3, it's not a customer bug.

Comment 5 Richard W.M. Jones 2012-03-05 13:13:14 UTC
Push to 6.4, for the same reason as comment 4.

Comment 7 RHEL Program Management 2012-07-10 05:51:46 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 8 RHEL Program Management 2012-07-11 02:02:25 UTC
This request was erroneously removed from consideration in Red Hat Enterprise Linux 6.4, which is currently under development.  This request will be evaluated for inclusion in Red Hat Enterprise Linux 6.4.

Comment 9 Richard W.M. Jones 2012-08-10 13:17:08 UTC
Pushed to RHEL 6.5 for the same reason as comment 4.

Comment 13 Richard W.M. Jones 2013-10-28 08:31:01 UTC
I don't have a way to test any of this, but I have just
added the two upstream patches which are not part of virt-what 1.13
(which includes the missing commit I mentioned in the previous comment).

So please try:
http://brewweb.devel.redhat.com/brew/taskinfo?taskID=6472054
virt-what-1.13-2.el7

Comment 14 Can Zhang 2013-10-28 09:31:34 UTC
(In reply to Richard W.M. Jones from comment #13)
> I don't have a way to test any of this, but I have just
> added the two upstream patches which are not part of virt-what 1.13
> (which includes the missing commit I mentioned in the previous comment).
> 
> So please try:
> http://brewweb.devel.redhat.com/brew/taskinfo?taskID=6472054
> virt-what-1.13-2.el7

Downloaded and installed the package you provided, but nothing changed.

[root@ip-10-179-14-42 fedora]# virt-what 
xen
grep: /proc/xen/capabilities: No such file or directory
xen-domU
[root@ip-10-179-14-42 fedora]# yum info virt-what
Installed Packages
Name        : virt-what
Arch        : x86_64
Version     : 1.13
Release     : 2.el7
Size        : 40 k
Repo        : installed
From repo   : /virt-what-1.13-2.el7.x86_64

<omit some outputs here>

Also, directory `/proc/xen` do exist, but is empty.

[root@ip-10-179-14-42 fedora]# ls -a /proc/xen/
.  ..

Comment 15 Richard W.M. Jones 2013-10-28 11:16:47 UTC
OK, thanks for testing.  Looks like this is still buggy
because the 'grep' command is not sufficiently silenced.

Try this one:
http://brewweb.devel.redhat.com/brew/taskinfo?taskID=6472395
virt-what-1.13-3.el7

Comment 16 Can Zhang 2013-11-01 01:44:35 UTC
(In reply to Richard W.M. Jones from comment #15)
> OK, thanks for testing.  Looks like this is still buggy
> because the 'grep' command is not sufficiently silenced.
> 
> Try this one:
> http://brewweb.devel.redhat.com/brew/taskinfo?taskID=6472395
> virt-what-1.13-3.el7

Here's the result:

[root@ip-10-179-14-42 fedora]# virt-what 
xen
xen-domU
[root@ip-10-179-14-42 fedora]# yum info virt-what
Installed Packages
Name        : virt-what
Arch        : x86_64
Version     : 1.13
Release     : 3.el7
Size        : 40 k
Repo        : installed
From repo   : /virt-what-1.13-3.el7.x86_64

Comment 17 Wei Shi 2014-04-11 07:22:17 UTC
Testing on RHEL-7.0_HVM_beta-x86_64-4-HVM-Access2 (ami-5b183532)

[ec2-user@ip-10-186-149-84 ~]$ rpm -qa | grep virt-what
virt-what-1.13-3.el7.x86_64
[ec2-user@ip-10-186-149-84 ~]$ sudo virt-what 
xen
xen-hvm

Rich,
  If this output is ok, or it should also display "xen-EC2"?

Comment 18 Richard W.M. Jones 2014-04-11 07:33:30 UTC
(In reply to Wei Shi from comment #17)
> Testing on RHEL-7.0_HVM_beta-x86_64-4-HVM-Access2 (ami-5b183532)
> 
> [ec2-user@ip-10-186-149-84 ~]$ rpm -qa | grep virt-what
> virt-what-1.13-3.el7.x86_64
> [ec2-user@ip-10-186-149-84 ~]$ sudo virt-what 
> xen
> xen-hvm
> 
> Rich,
>   If this output is ok, or it should also display "xen-EC2"?

Note that this bug has not been fixed.  It should display
something like "xen-EC2" (the exact string hasn't been decided).
It's not expected to at the moment.  What it prints above is
fairly reasonable.

Comment 22 RHEL Program Management 2014-07-21 15:45:45 UTC
Development Management has reviewed and declined this request.
You may appeal this decision by reopening this request.

Comment 23 Richard W.M. Jones 2014-07-21 15:48:44 UTC
I didn't realize that would actually close the bug ...

Comment 26 Richard W.M. Jones 2016-06-20 12:22:57 UTC
This package is on the ACL for RHEL 7.3 (yay!).  Unfortunately
we don't have a clear fix for this upstream.  So I will defer
this to RHEL 7.4 unless we have a clear plan to fix this upstream
and test the fix.

Comment 27 Richard W.M. Jones 2017-02-16 12:34:03 UTC
Moving to RHEL 7.5 for the same reasons as comment 26.

Comment 28 Richard W.M. Jones 2017-07-19 15:42:10 UTC
This feature has now been implemented by Qi Guo.

*** This bug has been marked as a duplicate of bug 1472871 ***