Bug 1715287

Summary: VM starts with UEFI+pc-q35-rhel7.6.0 XML when configuring UEFI bios type+pc-i440fx-rhel7.6.0 in WEB UI
Product: [oVirt] ovirt-engine Reporter: jiyan <jiyan>
Component: BLL.VirtAssignee: Lucia Jelinkova <ljelinko>
Status: CLOSED CURRENTRELEASE QA Contact: Nisim Simsolo <nsimsolo>
Severity: low Docs Contact:
Priority: low    
Version: 4.3.3.7CC: ahadas, bugs, ljelinko, michal.skrivanek, nsimsolo
Target Milestone: ovirt-4.4.5Flags: pm-rhel: ovirt-4.4+
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: ovirt-engine-4.4.5.6 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-03-18 15:15:18 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
engine log
none
UI conf png
none
vm dumpxml
none
Screenshot from 2020/03/17 master none

Description jiyan 2019-05-30 02:38:01 UTC
Description of problem:
VM starts with smbios+pc-q35-rhel7.6.0 XML when configuring UEFI bios+pc-q35-rhel7.6.0 in WEB UI

Version-Release number of selected component (if applicable):
RHV server:
rhvm-4.3.3.7-0.1.el7.noarch

RHV host:
vdsm-4.30.15-1.el7ev.x86_64
qemu-kvm-rhev-2.12.0-28.el7.x86_64
libvirt-4.5.0-17.el7.x86_64
kernel-3.10.0-1048.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Edit VM with the configuration as folows (The following attachment also show it).
   BIOS type: Q35 Chipset with UEFI BIOS
   Custom Emulated Machine: Use cluster default(pc-i440fx-rhel7.6.0)

2. Start VM, Vm starts sucessfully

3. Check log and VM dumpxml
   # engin.log (as attachment shows)
   # virsh dumpxml jiyan-77 (as attachment shows)
    ...
      <sysinfo type='smbios'>
    <system>
      <entry name='manufacturer'>Red Hat</entry>
      <entry name='product'>RHEV Hypervisor</entry>
      <entry name='version'>7.7-6.el7</entry>
      <entry name='serial'>36383738-3231-4336-5538-30343148324d</entry>
      <entry name='uuid'>9bdda5a5-5299-46f9-a612-dc41f1b34b2b</entry>
    </system>
  </sysinfo>
  <os>
    <type arch='x86_64' machine='pc-q35-rhel7.6.0'>hvm</type>
    <loader readonly='yes' secure='no' type='pflash'>/usr/share/OVMF/OVMF_CODE.secboot.fd</loader>
    <nvram template='/usr/share/OVMF/OVMF_VARS.fd'>/var/lib/libvirt/qemu/nvram/9bdda5a5-5299-46f9-a612-dc41f1b34b2b.fd</nvram>
    <bootmenu enable='yes' timeout='30000'/>
    <smbios mode='sysinfo'/>
  </os>
  ...

Actual results:
VM starts with smbios+pc-q35-rhel7.6.0 XML when configuring UEFI bios+pc-q35-rhel7.6.0 in WEB UI

Expected results:
In web UI, there should be some warning when starting VM with wrong conf instead of starting VM by chaning conf.

Additional info:

Comment 1 jiyan 2019-05-30 02:38:26 UTC
Created attachment 1575040 [details]
engine log

Comment 2 jiyan 2019-05-30 02:38:54 UTC
Created attachment 1575041 [details]
UI conf png

Comment 3 jiyan 2019-05-30 02:39:45 UTC
Created attachment 1575042 [details]
vm dumpxml

Comment 4 jiyan 2019-05-30 06:40:08 UTC
Modify the info in step1 in bug description: The UI conf can be seen in attachment "UI conf png"

Comment 5 Ryan Barry 2019-05-31 01:42:57 UTC
Let's block pc machine types in the UI (or in validation) when Q35 is used

Comment 6 Michal Skrivanek 2019-05-31 05:11:09 UTC
What do you mean block? Itks an override, pretty low level, and the problem is just cosmetic - that when you do not want any override we show the cluster default, which is actually overwritten by bios type setting. We can also just not show the cluster default, or ignore this issue entirely

Comment 7 Ryan Barry 2019-05-31 10:46:16 UTC
What I mean is adding granularity.

Sure, it boots and works. But we already don't show machine types for different architectures, and on onChange event to limit Q35 machine types isn't that bad.

Comment 8 Michal Skrivanek 2019-05-31 13:29:44 UTC
most of the machine types don't really work with the config we have. The problem is really just with what it shows in the UI - "Custom Emulated Machine: Use cluster default(pc-i440fx-rhel7.6.0)" that it's not true when you select q35 as we mangle the cluster default to q35. it's not necessarily a simple swap, see EmulatedMachineUtils. We can try to call the same thing here and show the real resulting machine type

Comment 9 Ryan Barry 2019-05-31 15:38:41 UTC
Ok, you convinced me

Comment 10 Michal Skrivanek 2019-06-03 10:06:52 UTC
still worth showing the right thing in the dialog:)

Comment 11 Michal Skrivanek 2020-03-18 13:46:33 UTC
I think it was fixed in the meantime, wasn't it?

Comment 12 Lucia Jelinkova 2020-03-19 12:29:26 UTC
Created attachment 1671433 [details]
Screenshot from 2020/03/17 master

Comment 13 Lucia Jelinkova 2020-03-19 12:31:12 UTC
I do not think it has been fixed - the VM dialog looks the same to me (see the attached screenshot)

Comment 14 Lucia Jelinkova 2020-03-20 13:21:41 UTC
I do not think we should change the value of cluster default displayed to the user. One would expect that the field contains the real db value not a calculated one. 

What about a warning when user clicks OK on the Edit VM dialog?

Comment 15 Ryan Barry 2020-03-20 17:12:10 UTC
A warning works for me

Comment 16 Michal Skrivanek 2020-08-05 06:55:44 UTC
now we have "two cluster defaults", so we can show the correct one in the custom machine type field I suppose, depending on effective bios type

Comment 17 Arik 2020-08-19 18:25:11 UTC
Lucia, was it addressed by https://gerrit.ovirt.org/c/110751 ?

Comment 18 Arik 2020-08-19 18:27:56 UTC
Ah no, this one is about machine type - not the chipset type

Comment 19 Lucia Jelinkova 2021-02-17 13:23:58 UTC
After taking another look at this issue I do agree with Michal - showing cluster default in the VM popup dialog is confusing as a user might expect that the value would be used directly. However, the actual effective emulated machine is calculated when the vm is started and might be different. Simply not showing the cluster value should prevent such a confusion.

Comment 20 Nisim Simsolo 2021-02-25 09:26:42 UTC
Verified:
ovirt-engine-4.4.5.6-0.11.el8ev
vdsm-4.40.50.6-1.el8ev.x86_64
libvirt-daemon-6.6.0-13.module+el8.3.1+9548+0a8fede5.x86_64
qemu-kvm-5.1.0-20.module+el8.3.1+9918+230f5c26.x86_64

Verification scenario:
Verify cluster default + (chipset and BIOS) is listed correctly in edit VM dialog -> system tab.
1. Set cluster default to i440fx chipset with BIOS.
2. Open edit VM dialog -> system -> "custom chipse/Firmware type" and verify "cluster default (i440fx chipset with BIOS" is listed in the dropbox.
3. repeat steps 1-2 for other custom chipset/firmware types which are available to set as cluster default.

Comment 21 Sandro Bonazzola 2021-03-18 15:15:18 UTC
This bugzilla is included in oVirt 4.4.5 release, published on March 18th 2021.

Since the problem described in this bug report should be resolved in oVirt 4.4.5 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.