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 1525337 - virt-manager shouldn't copy host cpu capabilities directly with setting 'copy host CPU definition'
Summary: virt-manager shouldn't copy host cpu capabilities directly with setting 'copy...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: virt-manager
Version: 7.5
Hardware: x86_64
OS: Unspecified
unspecified
medium
Target Milestone: rc
: ---
Assignee: Pavel Hrdina
QA Contact: Virtualization Bugs
URL:
Whiteboard:
: 1639125 1715149 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-12-13 04:38 UTC by zhoujunqin
Modified: 2019-08-06 13:08 UTC (History)
7 users (show)

Fixed In Version: virt-manager-1.5.0-3.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-08-06 13:07:59 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
virt-manager debug log (28.75 KB, text/plain)
2017-12-13 04:39 UTC, zhoujunqin
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:2232 0 None None None 2019-08-06 13:08:11 UTC

Description zhoujunqin 2017-12-13 04:38:20 UTC
Description of problem:
virt-manager shouldn't copy host cpu capabilities directly with setting 'copy host CPU definition' while you install a new vm.

Version-Release number of selected component (if applicable):
virt-manager-1.4.3-2.el7.noarch
libvirt-3.9.0-6.el7.x86_64
qemu-kvm-rhev-2.10.0-12.el7.x86_64


How reproducible:
100%

Steps to Reproduce:
1. Launch virt-manager
# virt-manager

2. Set 'Edit'->'Preferences'->'New VM defaults'->select 'CPU default' as 'Copy host CPU definition', then click 'Close'.

3. Install a vm.
3.1 Select the local connection: QEMU/KVM
3.2 Click NEW button at the top of Virtual Machine Manager dialogue.
3.3 Select Network Install(HTTP,FTP or NFS)", and Click "Forward" button.
3.4 Enter URL in "URL" field, such as "http://download.eng.pek2.redhat.com/pub/rhel/rel-eng/RHEL-7.5-20171130.0/compose/Server/x86_64/os/"
3.5 Check "Automatically detect operating system based on install media", then click 'Forward'.
3.6 Keep following pages as default setting, and click 'Forward' step by step until click "Finish" button.

Actual results:
Failed to install new vm with following error.
Unable to complete install: 'internal error: process exited while connecting to monitor: 2017-12-13T04:23:06.442411Z qemu-kvm: can't apply global Broadwell-x86_64-cpu.cmt=on: Property '.cmt' not found'

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 2545, in _do_async_install
    guest.start_install(meter=meter)
  File "/usr/share/virt-manager/virtinst/guest.py", line 498, in start_install
    doboot, transient)
  File "/usr/share/virt-manager/virtinst/guest.py", line 434, in _create_guest
    domain = self.conn.createXML(install_xml or final_xml, 0)
  File "/usr/lib64/python2.7/site-packages/libvirt.py", line 3658, in createXML
    if ret is None:raise libvirtError('virDomainCreateXML() failed', conn=self)
libvirtError: internal error: process exited while connecting to monitor: 2017-12-13T04:23:06.442411Z qemu-kvm: can't apply global Broadwell-x86_64-cpu.cmt=on: Property '.cmt' not found


Expected results:
1. Vm should be installed successfully.
2. virt-manager should not copy host cpu capabilities directly with setting 'copy host CPU definition' while you install a new vm.
3. No need copy host cpu-flags, can use 'host-model' mode or cpu xml from 'virsh domcapabilities', if so i think we'd better merge items in 'CPU default' setting  .

Additional info:

1. It has same error as libvirt Bug 1450317.

Comment 2 zhoujunqin 2017-12-13 04:39:27 UTC
Created attachment 1367080 [details]
virt-manager debug log

Comment 4 mxie@redhat.com 2018-02-23 08:07:52 UTC
Hi Pavel,

   I found virt-manager (1.4.3-3.el7) doesn't have cpu mode "host-passthrough" option by default,if edit guest'xml to set cpu mode as "host-passthrough by virsh, this option will be shown in virt-manager. does virt-mangaer support cpu mode "host-passthrough"?

Thanks

Comment 5 Pavel Hrdina 2018-02-23 09:14:31 UTC
Hi Ming,

Virt-manager doesn't show this mode since it's not usually the best mode to
select by majority of users.  However, user can write it into the CPU field
manually and it will work.  Once this bug is fixed, the best option to have
the same CPU as host will be checking "Copy host CPU configuration".

Pavel

Comment 7 Pavel Hrdina 2019-02-27 14:09:12 UTC
*** Bug 1639125 has been marked as a duplicate of this bug. ***

Comment 10 Pavel Hrdina 2019-03-28 15:50:08 UTC
Moving back to POST as this needs one more commit to be backported:

commit 9fdbbca27fa820d58b1bff58d215e6847b848f0a
Author: Pavel Hrdina <phrdina>
Date:   Wed Mar 13 14:18:14 2019 +0100

    domcapabilities: fix detection if host-model is safe to use

Comment 13 zhoujunqin 2019-05-15 03:24:25 UTC
Background: Testing on the machine with "Broadwell-x86_64" supports

I can reproduce this bug issue with package:

virt-manager-1.5.0-1.el7.noarch
virt-install-1.5.0-1.el7.noarch
virt-manager-common-1.5.0-1.el7.noarch

Steps:
1. Launch virt-manager
# virt-manager

2. Set 'Edit'->'Preferences'->'New VM defaults'->select 'CPU default' as 'Copy host CPU definition', then click 'Close'.

3. Install a vm.
3.1 Select the local connection: QEMU/KVM
3.2 Click NEW button at the top of Virtual Machine Manager dialogue.
3.3 Select Network Install(HTTP,FTP or NFS)", and Click "Forward" button.
3.4 Enter URL in "URL" field, such as "http://download.eng.pek2.redhat.com/pub/rhel/rel-eng/RHEL-7.7-20190502.1/compose/Server/x86_64/os/"
3.5 Check "Automatically detect operating system based on install media", then click 'Forward'.
3.6 Keep following pages as default setting, and click 'Forward' step by step until click "Finish" button.

Result: 
Failed to start installation with following error:
Unable to complete install: 'internal error: qemu unexpectedly closed the monitor: 2019-05-14T07:57:14.186633Z qemu-kvm: can't apply global Broadwell-x86_64-cpu.cmt=on: Property '.cmt' not found'

Then try to verify this bug with new build:

virt-manager-1.5.0-4.el7.noarch
virt-manager-common-1.5.0-4.el7.noarch
virt-install-1.5.0-4.el7.noarch
libvirt-4.5.0-16.el7.x86_64
qemu-kvm-rhev-2.12.0-28.el7.x86_64

1. Steps as above, installation starts without error, so the bug issue has been fixed.
2. I also checked virt-manager debug log, XML was generated correctly
...
  <cpu mode='custom' match='exact' check='full'>
    <model fallback='forbid'>Broadwell</model>
    <vendor>Intel</vendor>
    <feature policy='require' name='vme'/>
    <feature policy='require' name='ss'/>
    <feature policy='require' name='f16c'/>
    <feature policy='require' name='rdrand'/>
    <feature policy='require' name='hypervisor'/>
    <feature policy='require' name='arat'/>
    <feature policy='require' name='tsc_adjust'/>
    <feature policy='require' name='xsaveopt'/>
    <feature policy='require' name='pdpe1gb'/>
    <feature policy='require' name='abm'/>
  </cpu>

So I move this bug from ON_QA to VERIFIED, thanks.

Comment 14 Jiri Denemark 2019-07-24 12:33:36 UTC
*** Bug 1715149 has been marked as a duplicate of this bug. ***

Comment 16 errata-xmlrpc 2019-08-06 13:07:59 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://access.redhat.com/errata/RHBA-2019:2232


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