Bug 1640156

Summary: Client on Nutanix AHV not recognized as virtual system
Product: [Community] Spacewalk Reporter: Cristian Seres <cseres>
Component: ClientsAssignee: Tomáš Kašpárek <tkasparek>
Status: CLOSED CURRENTRELEASE QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: low Docs Contact:
Priority: unspecified    
Version: 2.8CC: cseres
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-01-15 07:59:27 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: 1653216    
Attachments:
Description Flags
dmidecode output from a CentOS 7.5 VM running on Nutanix AHV none

Description Cristian Seres 2018-10-17 12:44:52 UTC
Description of problem:
CentOS6 and CentOS7 Spacewalk clients running in Nutanix AHV virtualization system get classified as Physical Systems instead of Virtual Systems

Version-Release number of selected component (if applicable):
rhn-check-2.8.26-1.el7.centos.noarch
rhnsd-5.0.37-1.el7.centos.x86_64
rhn-setup-2.8.26-1.el7.centos.noarch
osad-5.11.102-1.el7.centos.noarch
spacewalk-base-2.8.7-1.el7.centos.noarch

How reproducible:
Always

Steps to Reproduce:
1. register a CentOS 7 (or 6) VM running in Nutanix AHV (tested with hypervisor Nutanix 20170830.171) to Spacewalk server
2. Check Systems / Systems in Spacewalk web GUI

Actual results:
Registered VM is shown under Physical Systems

Expected results:
Registered VM shown under Virtual Systems

Additional info:
I don't know how Spacewalk tests the environment, but also virt-what command recognizes Nutanix AHV wrongly as hyperv instead of kvm.

Comment 1 Cristian Seres 2018-10-17 12:53:56 UTC
Created attachment 1494839 [details]
dmidecode output from a CentOS 7.5 VM running on Nutanix AHV

Comment 2 Tomáš Kašpárek 2018-10-17 13:11:25 UTC
Hello Cristian,

I do not have access to Nutanix AHV could you please try to patch /usr/share/rhn/server/handlers/xmlrpc/registration.py with following patch, restart httpd and re-register one system to see whether it works?

@@ -94,6 +94,8 @@ def parse_smbios(smbios):
         if uuid is None:
             uuid = "flex-guest"
         return (rhnVirtualization.VirtualizationType.VIRTAGE, uuid)
+    elif manufacturer == 'Nutanix' and product == 'AHV' and uuid is not None:
+        return (rhnVirtualization.VirtualizationType.QEMU, uuid)
     else:
         return (None, None)

Comment 3 Cristian Seres 2018-10-17 13:55:27 UTC
Hello Tomáš,

perfect fix! I have tested it and re-registered client is shown as Virtual system now.

Comment 4 Tomáš Kašpárek 2018-10-18 05:47:22 UTC
spacewalk.git(master): ccfeebffc39a28fb42e753a2dc24ab5812314f21

Comment 5 Michael Mráka 2018-11-26 09:44:02 UTC
Move Spacewalk 2.9 bugs ON_QA.

Comment 6 Michael Mráka 2019-01-15 07:59:27 UTC
Spacewalk 2.9 has been released.
https://github.com/spacewalkproject/spacewalk/wiki/ReleaseNotes29