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 1240938 - Fail to install guest when set "CPU default" to "Copy host cpu definition"
Summary: Fail to install guest when set "CPU default" to "Copy host cpu definition"
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: virt-manager
Version: 7.2
Hardware: x86_64
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: Pavel Hrdina
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-07-08 08:09 UTC by tingting zheng
Modified: 2015-11-19 05:31 UTC (History)
4 users (show)

Fixed In Version: virt-manager-1.2.1-3.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-19 05:31:40 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Debug info for virt-manager (11.74 KB, text/plain)
2015-07-08 08:09 UTC, tingting zheng
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2206 0 normal SHIPPED_LIVE virt-manager bug fix and enhancement update 2015-11-19 08:17:29 UTC

Description tingting zheng 2015-07-08 08:09:16 UTC
Created attachment 1049737 [details]
Debug info for virt-manager

Description:
Fail to install guest when set "CPU default" to "Copy host cpu definition"

Version:
virt-manager-1.2.1-2.el7.noarch
libvirt-1.2.17-1.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Launch virt-manager,click "Edit"->"Preferences"->"New VM"->"CPU default"->"Copy host cpu definition".

2.Create a new guest,choose pxe installation,set cpu/memory/storage as default value,then follow the GUI to finish installation.

3.After click "Finish",error shows:Unable to complete install: ''list' object has no attribute 'names''
Unable to complete install: ''list' object has no attribute 'names''

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/asyncjob.py", line 89, in cb_wrapper
    callback(asyncjob, *args, **kwargs)
  File "/usr/share/virt-manager/virtManager/create.py", line 1873, in do_install
    guest.start_install(meter=meter)
  File "/usr/share/virt-manager/virtinst/guest.py", line 393, in start_install
    self.set_install_defaults()
  File "/usr/share/virt-manager/virtinst/guest.py", line 560, in set_install_defaults
    self._set_defaults()
  File "/usr/share/virt-manager/virtinst/guest.py", line 689, in _set_defaults
    self._set_cpu_defaults()
  File "/usr/share/virt-manager/virtinst/guest.py", line 805, in _set_cpu_defaults
    self.cpu.set_special_mode(self.x86_cpu_default)
  File "/usr/share/virt-manager/virtinst/cpu.py", line 68, in set_special_mode
    self.copy_host_cpu()
  File "/usr/share/virt-manager/virtinst/cpu.py", line 107, in copy_host_cpu
    for name in cpu.features.names():
AttributeError: 'list' object has no attribute 'names'


Actual results:
As description.

Expected results:
Guest can be installed successfully when set "CPU default" to "Copy host cpu definition"

Additional info:
Attached the debug info.
when check "Copy host CPU configuration" in Processor tab of host details window if choosing customize installation, it doesn't occur.

Comment 4 Pavel Hrdina 2015-07-14 13:53:37 UTC
Upstream patch posted:

https://www.redhat.com/archives/virt-tools-list/2015-July/msg00034.html

Comment 5 Pavel Hrdina 2015-07-15 08:52:56 UTC
Upstream commit:

commit a9b303fb141df5b2d2051c6b4ed489dbb09952f8
Author: Pavel Hrdina <phrdina>
Date:   Tue Jul 14 15:53:25 2015 +0200

    virtinst.cpu: fix copy host cpu definition
    
    Commit cac4ac14 updated cpu features to use XMLBuilder and this change
    removes the 'Features' class.  There is no longer any '.names()'
    method to return names, so just cycle through all features and use a
    name attribute instead.
    
    Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1240938
    
    Signed-off-by: Pavel Hrdina <phrdina>

Comment 8 XiaoQing 2015-07-29 09:02:46 UTC
Bug 1240938
I can reproduce the bug with build:
virt-manager-1.2.1-2.el7.noarch
libvirt-1.2.17-1.el7.x86_64

Try to verify this bug with package:
libvirt-1.2.17-2.el7.x86_64
virt-manager-1.2.1-4.el7.noarch

Steps:

1.Launch virt-manager,click "Edit" -> "Preferences" -> "New VM" -> "CPU default" -> "Copy host cpu definition".

2.Create a new guest,choose pxe installation,set cpu/memory/storage as default value,then follow the GUI to finish installation.

3.Clikc the "Finish" Button.

Result:
Create a new guest successfully.
 Move this bug from ON_QA to VERIFIED

Comment 10 errata-xmlrpc 2015-11-19 05:31:40 UTC
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, 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://rhn.redhat.com/errata/RHBA-2015-2206.html


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