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 1683301 - [RFE] [machines] Provide the option to use host CPU model when creating/editing VM
Summary: [RFE] [machines] Provide the option to use host CPU model when creating/editi...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: cockpit-appstream
Version: 8.1
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: rc
: 8.4
Assignee: Katerina Koukiou
QA Contact: YunmingYang
URL:
Whiteboard:
: 1680297 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-02-26 14:47 UTC by Javier Coscia
Modified: 2023-02-15 16:48 UTC (History)
6 users (show)

Fixed In Version: 234
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-18 15:53:08 UTC
Type: Feature Request
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-95014 0 None None None 2023-02-15 16:48:13 UTC
Red Hat Knowledge Base (Solution) 3935841 0 None None None 2020-11-27 11:46:06 UTC
Red Hat Knowledge Base (Solution) 3942291 0 Customize or extend None Copy Host CPU configuration through cockpit UI 2019-02-26 15:18:17 UTC

Description Javier Coscia 2019-02-26 14:47:27 UTC
Description of problem:

There are some cases where we need to emulate / copy CPU host into the 
guest when creating it (-cpu flag in qemu), such as when using nested 
virtualization to run labs / PoC/ demos. 



This is already present in virt-manager:

With the VM down: Select the VM > Open > Details > CPUs > Configuration 

With virsh, define or edit xml `cpu mode` section

Version-Release number of selected component (if applicable):


kernel-4.18.0-67.el8.x86_64
cockpit-machines-184.1-1.el8.noarch


How reproducible:

100% 

Actual results:

There is no option to configure CPU model on the guest when creating or 
once VM is created.

Expected results:

Expose this option for users to be able to copy Host CPU 
configuration.

Comment 3 Katerina Koukiou 2020-11-27 11:46:06 UTC
*** Bug 1680297 has been marked as a duplicate of this bug. ***

Comment 4 Katerina Koukiou 2020-11-30 14:35:40 UTC
PR sent upstream: https://github.com/cockpit-project/cockpit/pull/14969

Comment 7 Xianghua Chen 2021-01-05 12:30:58 UTC
Verified with packages:
cockpit-machines-234-1.el8.noarch
libvirt-dbus-1.3.0-2.module+el8.3.0+6423+e4cb6418.x86_64

Steps:
1. Prepare a bare mental env, click Import VM 
2. Choose an existing vm image, click Import and wait until the vm start successfully, then check the CPU type
The CPU type is same to the generation of the host CPUs in use, e.g.: custom (Haswell-noTSX-IBRS)
Refer to: https://www.qemu.org/docs/master/system/qemu-cpu-models.html 
3. Check the cpu mode by dumping the xml:
# virsh dumpxml vm-name
<cpu mode='custom' match='exact' check='full'>
    <model fallback='forbid'>Haswell-noTSX-IBRS</model>
    <vendor>Intel</vendor>
    <feature policy='require' name='vme'/>
    <feature policy='require' name='ss'/>
    <feature policy='require' name='vmx'/>
    <feature policy='require' name='pdcm'/>
    <feature policy='require' name='f16c'/>
    <feature policy='require' name='rdrand'/>
... ...
4. Shutdown the vm, the CPU type will not change and match the host CPU
5. Check the cpu mode by dumping xml again
The cpu mode should be the same as before
6. Run the vm again, click edit after the CPU type, choose a different mode, but click cancel
The dialog can be closed, and the no changes to the CPU type
7. Click edit after the CPU type again, choose a different mode, click Apply
There will be an icon showing "Changes will take effect after shutting down the VM"
8. Dump the xml again and check the cpu type
The cpu mode should be the same as changes before, same as shown on the page 
9. Close the VM , check the CPU type on the page and dump the xml again to check the cpu type
The CPU type on the page is changed to the new one in step 7.
The CPU type in the xml should be the same as step 7, same as shown on the page.
10. Click edit again and change to a different mode, check the CPU type on the page and the xml
The CPU type on the page will change immediately per the step.
The CPU type in the xml should changed too, same as shown on the page.
11. Change the CPU type to "host-model" and "host-passthrough"
Check the CPU type and the xml again, and check again after running.

So verified.

Comment 9 errata-xmlrpc 2021-05-18 15:53:08 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 (cockpit-appstream 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:1875


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