RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1212021 - RHELSA: handle virt-rhelsaX.Y machine types
Summary: RHELSA: handle virt-rhelsaX.Y machine types
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: virt-manager
Version: 7.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Giuseppe Scrivano
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 1212027
TreeView+ depends on / blocked
 
Reported: 2015-04-15 12:21 UTC by Andrew Jones
Modified: 2018-10-13 14:48 UTC (History)
6 users (show)

Fixed In Version: virt-manager-1.2.0-1-el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-13 14:48:38 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Andrew Jones 2015-04-15 12:21:53 UTC
virt-manager allows Machine Type to be selected under Architecture options. The default type is 'virt', but qemu-kvm-rhev.aarch64 presents virt-rhelsa7.1 as well. When installing a RHELSA7.1 guest, the virt-rhelsa7.1 type is the more logical to select, but it doesn't currently work. The problem is while 'virt' is special-cased in virt-manager since

commit 42ac7a3036f02296e883fc6129672e228cea8f7a
Author: Cole Robinson <crobinso>
Date:   Tue Sep 23 16:16:35 2014 -0400

    guest: Set optimal arm CPU defaults

to use host cpu passthrough (currently required for kvmarm), no other machine type is. Now, 'virt' is an alias for 'virt-rhelsa7.1' in qemu-kvm-rhev.aarch64

# /usr/libexec/qemu-kvm -M \?
Supported machines are:
virt                 RHELSA 7.1 ARM Virtual Machine (alias of virt-rhelsa7.1)
virt-rhelsa7.1       RHELSA 7.1 ARM Virtual Machine (default)
none                 empty machine

so perhaps virt-manager could "expand aliases" in order to enable is_arm_machvirt() to work with derivatives?

Comment 1 Giuseppe Scrivano 2015-04-15 13:43:14 UTC
should we expand the definition to something like the following?

diff --git a/virtinst/osxml.py b/virtinst/osxml.py
index 77643dd..576676c 100644
--- a/virtinst/osxml.py
+++ b/virtinst/osxml.py
@@ -64,7 +64,7 @@ class OSXML(XMLBuilder):
     def is_arm_vexpress(self):
         return self.is_arm() and str(self.machine).startswith("vexpress-")
     def is_arm_machvirt(self):
-        return self.is_arm() and self.machine == "virt"
+        return self.is_arm() and "virt" in self.machine

Comment 2 Giuseppe Scrivano 2015-04-21 14:10:28 UTC
as I have no access to any ARM machine, Andrew, could you please check if that change is enough?

Comment 3 Andrew Jones 2015-04-21 16:11:55 UTC
(In reply to Giuseppe Scrivano from comment #2)
> as I have no access to any ARM machine, Andrew, could you please check if
> that change is enough?

That should work, and we can commit to using "virt-" as the prefix for all our machine types. Actually, considering it will always be a prefix, to be a bit more precise, maybe it should be

str(self.machine).startswith("virt")

It might still be nice to write an "alias expansion" function that could be used though, as that would guarantee we have a match, and also give the freedom to match when we don't have common prefixes. That could be future work though.

Comment 4 Giuseppe Scrivano 2015-04-22 17:09:43 UTC
I tested it and it works as with the "virt" machine type.

Patch pushed upstream:

commit 1c2211817992c801246dd5019b085a61e8968daa
Author: Giuseppe Scrivano <gscrivan>
Date:   Wed Apr 22 18:39:43 2015 +0200

    aarch64: support virt-rhelsa7.1 machine type
    
    Just check for the prefix of the machine type, as it is done for ARM
    vexpress.
    
    Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1212021
    
    Signed-off-by: Giuseppe Scrivano <gscrivan>

Comment 8 Pavel Hrdina 2015-10-30 08:35:55 UTC
Tested with package virt-manager-1.2.1-8.el7.noarch, during installation there is a possibility to choose between 'virt' and 'virt-rhelsa7.1' machine type and the created XML is also correct according to the selection.

This bug is fixed and verified, the machine type is correctly parsed from qemu and offered to user in virt-manager.

Comment 9 tingting zheng 2015-10-30 15:04:13 UTC
Refer to comment 8,move this bug to VERIFIED,thanks Pavel.


Note You need to log in before you can comment on or make changes to this bug.