Description of problem: # virt-what xen # virt-version 1.11 On a RHEL6.3 Xen VM, the following file does not exist: /proc/xen/capabilities # ls -R /proc/xen/capabilities (nothing) Looking at the code, it seems that this file is relied on. I'd suggest changing the logic to: 1. If /proc/xen exists, it's a xen vm or hypervisor 2. If /proc/xen/capabilities exists and contains the string control_d, it's a Xen Hypervisor 3. Otherwise it's a Xen VM Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
(In reply to James Patterson from comment #0) > Description of problem: > # virt-what > xen This is working isn't it? > # virt-version > 1.11 > > On a RHEL6.3 Xen VM, the following file does not exist: > /proc/xen/capabilities The RHEL 6.3 machine is a guest? > # ls -R /proc/xen/capabilities > (nothing) I don't get this because if I do a similar command I get an error: $ ls -R /foobar ls: cannot access /foobar: No such file or directory Do you mean there is an error, or something else? Can you run something more informative such as: ls -lR /proc/xen I'm afraid I won't be able to fix this because I don't have a Xen VM. However you can send patches or suggestions upstream to the virt-tools mailing list.
> This is working isn't it? Kind of. It's telling me it's a Xen thing, but not that it's a Xen VM. > The RHEL 6.3 machine is a guest? Yes. > ls -lR /proc/xen This returns nothing.
Reported to mailing list: https://www.redhat.com/archives/virt-tools-list/2013-June/msg00070.html
I am also seeing this issue on an AWS (Xen) instance: CentOS release 6.4 virt-what --version 1.11 sudo virt-what xen
This still needs someone to come up with & test an actual patch. I don't have access to a suitable Xen VM right now.
You mean you want me to write the logic from my original bug report description in the form of a patch? It's a simple change, but I can do that if you want. Won't that mean paperwork and assignment of copyright, etc.?
I will get the patch and post it here.
Created attachment 788830 [details] virt-what patch to better identify non-hypervisors
Created attachment 788832 [details] virt-what patch to better identify non-hypervisors (fixed) Patch needs testing.
Created attachment 788834 [details] virt-what patch to better identify non-hypervisors (fixed)
I don't quite understand certain things about this: (1) Why did you move the echo xen inside both branches of the if statement? That appears unnecessary. (2) In comment 0 you said that: # ls -R /proc/xen/capabilities prints nothing. However if a file does not exist, I get an error message, not no output. -- No copyright assignment is necessary.
1. Because the first if block does this. Seems strange to me but... 2. It prints nothing to STDOUT.
OK, I hope this (rather simple in the end) change is correct: http://git.annexia.org/?p=virt-what.git;a=commitdiff;h=acd6bec92a99550ad98011d44f6381fdf7fa5992 If it is, please put the bug in "POST" state and I'll push the change to Fedora.
Looks good. Not sure how to put it in the POST state.
virt-what-1.13-2.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/virt-what-1.13-2.fc19
virt-what-1.13-2.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/virt-what-1.13-2.fc20
Package virt-what-1.13-2.fc20: * should fix your issue, * was pushed to the Fedora 20 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing virt-what-1.13-2.fc20' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2013-16439/virt-what-1.13-2.fc20 then log in and leave karma (feedback).
virt-what-1.13-2.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report.
virt-what-1.13-2.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.