Bug 1756381
Summary: | Nutanix AHV is detected as hyperv | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 8 | Reporter: | Cristian Seres <cseres> | |
Component: | virt-what | Assignee: | Richard W.M. Jones <rjones> | |
Status: | CLOSED ERRATA | QA Contact: | YongkuiGuo <yoguo> | |
Severity: | low | Docs Contact: | ||
Priority: | unspecified | |||
Version: | 8.0 | CC: | boyang, jsuchane, knoel, leiwang, linl, mfuruta, pbonzini, ribarry, rjones, xiliang, ymankad, ymao, yoguo | |
Target Milestone: | rc | Keywords: | Triaged, ZStream | |
Target Release: | 8.5 | |||
Hardware: | x86_64 | |||
OS: | Linux | |||
Whiteboard: | ||||
Fixed In Version: | virt-what-1.18-9.el8 | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1979952 1984624 (view as bug list) | Environment: | ||
Last Closed: | 2021-11-09 19:32:37 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: | 1979952, 1984624 |
Description
Cristian Seres
2019-09-27 13:37:24 UTC
The expected result is probably kvm, but if virt-what says "hyperv", it's because Nutanix configured its KVM to enable Hyper-V extensions. The problem is twofold: 1) virt-what-cpuid-helper.c should not use max_entries in "for (leaf = base + 0x100; leaf <= base + max_entries; leaf += 0x100)", instead it should just use "leaf < base + 0x10000" 2) virt-what should be able to deal with virt-what-cpuid-helper printing two or more signatures, and probably it should skip Hyper-V if more than one signature is printed. Alternatively, virt-what-cpuid-helper should print only the highest signature. Can I get access to a Linux guest (ideally RHEL 8 or recent Fedora) running on a Nutanix host? (In reply to Richard W.M. Jones from comment #2) > Can I get access to a Linux guest (ideally RHEL 8 or recent Fedora) running > on > a Nutanix host? Sure, I have now created fedora.seres.fi (Fedora 30 Server), ECDSA key fingerprint is SHA256:BpJo23PKFb0hi1tYIbD5xUKjmazZYtkxvAQFVJKfJrE. Can I have your ssh public key? With best regards, Cristian Seres Sent by email. Fixed in http://git.annexia.org/?p=virt-what.git;a=commitdiff;h=0a0d9fa7c85c5474870cae37832d28ccd899d4ee http://git.annexia.org/?p=virt-what.git;a=commitdiff;h=f317e788dd7c2a35c2ae0f64fa50ab720382ebf5 Cristian: You can test this if you like. The source for virt-what is checked out on the Fedora VM, and you can run it from that directory by doing: cd virt-what sudo PATH=.:$PATH ./virt-what I probably don't need that Fedora VM any longer, as long as everyone is happy with the patches above. Hi rjones, was this bug likely to be fixed in rhel8.2? Maybe we should confirm whether Cristian has tested the patch you provided. I'd like to see it tested as, especially the first part of the patch, is risky. (In reply to Richard W.M. Jones from comment #5) > Cristian: You can test this if you like. The source for virt-what is > checked out > on the Fedora VM, and you can run it from that directory by doing: > > cd virt-what > sudo PATH=.:$PATH ./virt-what I have tested that this works as it should on the Fedora 30 test VM. It prints out nutanix_ahv On other hypervisors (VMware) I have not tried it. The Fedora test VM on Nutanix AHV still exists and I can make it accessible, if someone still wants to do some other checks. I have no licensed RHEL8 vms to test the patch on, but I do have CentOS 8.0.1905 if you want me to still test something specific. With best regards, Cristian Seres If you want to test CentOS 8 that'd be great. You will need to check out the source code first using: git clone git://git.annexia.org/virt-what.git and then compile it by following the README file (it's quite easy to compile). Actually even better I'll build a virt-what package that you can try out, give me a few minutes. http://oirase.annexia.org/rpms/virt-what-rhel-8/ Despite the version number this is really virt-what 1.20 + all upstream patches. It's just we have to keep the version number at 1.18 because "process". It should install on any CentOS 8 as far as I know. http://oirase.annexia.org/rpms/virt-what-rhel-8/virt-what-1.18-8.el8.x86_64.rpm installed and worked like a charm on CentOS 8. Thanks for testing that. We'll let QE have a bash on it next and if it all goes well it should go into RHEL 8.2 and CentOS 8.2. Hi rjones, this virt-what(1.18-8) package failed to detect the xen/hyperv/vmware/kvm/.../ virtualization types. AWS KVM instance failed: current output: [root@ip-10-116-2-30 ec2-user]# virt-what aws dmesg: [ 206.388772] virt-what-cpuid[5258]: segfault at 7f0499d6 ip 0000562e7f049799 sp 00007fff111935a0 error 4 in virt-what-cpuid-helper[562e7f049000+1000] [ 206.395986] Code: 49 39 07 0f 84 a8 00 00 00 b9 0d 00 00 00 4c 89 fe 48 89 ef f3 a6 0f 97 c0 1c 00 84 c0 74 a6 b9 0d 00 00 00 4c 89 fe 48 89 df <f3> a6 0f 97 c0 1c 00 84 c0 74 90 b9 0d 00 00 00 4c 89 fe 4c 89 ef expected output: [root@ip-10-116-2-30 ec2-user]# virt-what kvm aws ------------------------------------------ Local xen guest failed: current output: [root@dhcp-15-147 ~]# virt-what xen xen-domU [3444171.721744] virt-what-cpuid[1990]: segfault at 488bd9d6 ip 000055e3488bd799 sp 00007fff6507a820 error 4 in virt-what-cpuid-helper[55e3488bd000+1000] [3444171.721749] Code: 49 39 07 0f 84 a8 00 00 00 b9 0d 00 00 00 4c 89 fe 48 89 ef f3 a6 0f 97 c0 1c 00 84 c0 74 a6 b9 0d 00 00 00 4c 89 fe 48 89 df <f3> a6 0f 97 c0 1c 00 84 c0 74 90 b9 0d 00 00 00 4c 89 fe 4c 89 ef expected result: [root@dhcp-15-147 ~]# virt-what xen xen-hvm ------------------------------------------ rhel8.2 guest on Hyper-V: current output: [root@dhcp-xx-xx]# virt-what virtualpc expected output: [root@dhcp-xx-xx]# virt-what hyperv ------------------------------------------ rhel8.2 guest on ESXi [root@bootp-73-199-201 ~]# virt-what vmware ---> Slow than last version. [root@bootp-73-199-201 ~]# dmesg [57332.974164] virt-what-cpuid[19977]: segfault at b099d9d6 ip 000055c4b099d799 sp 00007fff47532720 error 4 in virt-what-cpuid-helper[55c4b099d000+1000] [57332.974177] Code: 49 39 07 0f 84 a8 00 00 00 b9 0d 00 00 00 4c 89 fe 48 89 ef f3 a6 0f 97 c0 1c 00 84 c0 74 a6 b9 0d 00 00 00 4c 89 fe 48 89 df <f3> a6 0f 97 c0 1c 00 84 c0 74 90 b9 0d 00 00 00 4c 89 fe 4c 89 ef I guess patch 1 is riskier than I thought ... I moved this to the backlog because I don't have time to debug this for 8.2. rjones, this package(virt-what-1.18-8.el8) has been into the rhel8 nightly compose (In reply to YongkuiGuo from comment #17) > rjones, this package(virt-what-1.18-8.el8) has been into the rhel8 nightly > compose It should come out of the compose soon because the advisory was dropped. Of course people will have to manually downgrade. The fix for this is: http://git.annexia.org/?p=virt-what.git;a=commit;h=60d903fbb7653bc9754228bdab4c6933fcda1e72 This is simple enough that it does not require rebasing, and can be backported ... if it passes all the tests - I was only able to test it on baremetal, KVM and VMware so far. (In reply to Richard W.M. Jones from comment #31) > The fix for this is: > http://git.annexia.org/?p=virt-what.git;a=commit; > h=60d903fbb7653bc9754228bdab4c6933fcda1e72 > > This is simple enough that it does not require rebasing, and can > be backported ... if it passes all the tests - I was only able to test > it on baremetal, KVM and VMware so far. rjones, can we let Cristian Seres test the fixed version(virt-what-1.18-9.el8) on CentOS 8 with Nutanix AHV platform? We don't have Nutanix AHV env. Christian: Are you able to test either http://git.annexia.org/?p=virt-what.git, or a RHEL package which I will provide, or provide a Nutanix AHV environment we can use to test this change in? Sure, I can test, preferable with an RPM. That's great news, thanks. I have placed the RPMs here: http://oirase.annexia.org/tmp/bz1756381/ Assuming it's x86-64 you'll only need this one: http://oirase.annexia.org/tmp/bz1756381/virt-what-1.18-9.el8.x86_64.rpm The package seems to work perfectly. I tested both before and after upgrading to CentOS 8.3. [cristian@uuni1 ~]$ rpm -q virt-what virt-what-1.18-9.el8.x86_64 [cristian@uuni1 ~]$ uname -a Linux uuni1.contrasec.fi 4.18.0-193.6.3.el8_2.x86_64 #1 SMP Wed Jun 10 11:09:32 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux [cristian@uuni1 ~]$ cat /etc/redhat-release CentOS Linux release 8.2.2004 (Core) [cristian@uuni1 ~]$ sudo virt-what nutanix_ahv [cristian@uuni1 ~]$ [cristian@uuni1 ~]$ uname -a Linux uuni1.contrasec.fi 4.18.0-240.15.1.el8_3.x86_64 #1 SMP Mon Mar 1 17:16:16 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux [cristian@uuni1 ~]$ cat /etc/redhat-release CentOS Linux release 8.3.2011 [cristian@uuni1 ~]$ sudo virt-what nutanix_ahv [cristian@uuni1 ~]$ Thanks for testing it. The fixed package(virt-what-1.18-9.el8) also works well in the following hypervisors. On KVM: [root@localhost ~]# virt-what kvm On ESXi: [root@vm-198-14 ~]# virt-what vmware On Hyper-V: [root@dhcp-10-22]# virt-what hyperv On nested KVM (openstack env) [root@ci-vm-10-0-139-17 ~]# virt-what kvm Verified this bug according to comment 39, 41 and 42. 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 (virt-what bug fix and enhancement update), 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://access.redhat.com/errata/RHBA-2021:4370 FWIW there is apparently Nutanix hardware which gets detected as AHV (incorrectly, presumably). See: https://bugzilla.redhat.com/show_bug.cgi?id=2211980 |