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 1335534 - Unexpected warning appears when start a guest with non-exists rom file and cpu fea-ture defined together in the xml
Summary: Unexpected warning appears when start a guest with non-exists rom file and cp...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Jiri Denemark
QA Contact: yalzhang@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-05-12 12:42 UTC by yalzhang@redhat.com
Modified: 2018-04-10 10:36 UTC (History)
9 users (show)

Fixed In Version: libvirt-3.9.0-4.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-10 10:36:45 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
guest's xml file (4.40 KB, text/plain)
2016-05-16 01:27 UTC, yalzhang@redhat.com
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2018:0704 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2018-04-10 15:57:35 UTC

Description yalzhang@redhat.com 2016-05-12 12:42:59 UTC
Description of problem:
Unexpected warning appears when start a guest with non-exists rom file defined 

Version-Release number of selected component (if applicable):
libvirt-1.3.4-1.el7.x86_64
qemu-kvm-rhev-2.5.0-4.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Start a guest with cpu feature defined.
# virsh dumpxml rh7.2
....
 <cpu mode='custom' match='exact'>
    <model fallback='allow'>Penryn</model>
    <vendor>Intel</vendor>
    <feature policy='require' name='osxsave'/>
    <feature policy='require' name='xsave'/>
    <feature policy='require' name='pdcm'/>
    <feature policy='require' name='xtpr'/>
    <feature policy='require' name='tm2'/>
    <feature policy='require' name='est'/>
    <feature policy='require' name='vmx'/>
    <feature policy='require' name='ds_cpl'/>
    <feature policy='require' name='monitor'/>
    <feature policy='require' name='dtes64'/>
    <feature policy='require' name='pbe'/>
    <feature policy='require' name='tm'/>
    <feature policy='require' name='ht'/>
    <feature policy='require' name='ss'/>
    <feature policy='require' name='acpi'/>
    <feature policy='require' name='vme'/>
  </cpu>
....
   <interface type='network'>
      <mac address='52:54:00:cc:cb:46'/>
      <source network='default'/>
      <model type='virtio'/>
      <rom bar='on' file='/usr/share/ipxe/1af41000.rom'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
.......
# virsh start rh7.2
Domain rh7.2 started

2. Destroy the guest, then edit the rom file path in the interface section to a non-exists one, and start the guest.
# virsh destroy rh7.2
# virsh edit rh7.2

# virsh dumpxml rh7.2 | grep "rom bar"
      <rom bar='on' file='/usr/ssssjdffdfd.rom'/>

# virsh start rh7.2
error: Failed to start domain rh7.2
error: internal error: early end of file from monitor, possible problem: warning: host doesn't support requested feature: CPUID.01H:EDX.acpi [bit 22]
warning: host doesn't support requested feature: CPUID.01H:EDX.ht [bit 28]
warning: host doesn't support requested feature: CPUID.01H:EDX.tm [bit 29]
warning: host doesn't support requested feature: CPUID.01H:EDX.pbe [bit 31]
warning: host doesn't support requested feature: CPUID.01H:ECX.dtes64 [bit 2]
warning: host doesn't support requested feature: CPUID.01H:ECX.monitor [bit 3]
warning: host doesn't support requested feature: CPUID.01H:ECX.ds_cpl [bit 4]
warning: host doesn't support requested feature: CPUID.01H:ECX.vmx [bit 5]
warning: host doesn't support requested feature: CPUID.01H:ECX.est [bit 7]
warning: host doesn't support requested feature: CPUID.01H:ECX.tm2 [bit 8]
warning: host doesn't support requested feature: CPUID.01H:ECX.xtpr [bit 14]
warning: host doesn't support requested feature: CPUID.01H:ECX.pdcm [bit 15]
warning: host doesn't support requested feature: CPUID.

3. Delete the file attribute in the interface section, then start the guest.
# virsh dumpxml rh7.2 | grep "rom bar"
      <rom bar='on'/>
# virsh start rh7.2
Domain rh7.2 started

Actual results:
step2, unexpected warning appears when start a guest with non-exists rom file and cpu feature defined together.

Expected results:
The error message should be reasonable.

Additional info:
When no cpu feature defined, the error message is reasonable.
# virsh dumpxml rh7.2
....
 <cpu mode='custom' match='exact'>
    <model fallback='allow'>Penryn</model>
    <vendor>Intel</vendor>
  </cpu>
......
  <interface type='network'>
      <mac address='52:54:00:cc:cb:46'/>
      <source network='default'/>
      <model type='virtio'/>
      <rom bar='on' file='/usr/ssssjdffdfd.rom'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
......
# virsh start rh7.2
error: Failed to start domain rh7.2
error: internal error: early end of file from monitor, possible problem: 2016-05-12T12:35:29.686750Z qemu-kvm: -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:cc:cb:46,bus=pci.0,addr=0x3,rombar=1,romfile=/usr/ssssjdffdfd.rom: failed to find romfile "/usr/ssssjdffdfd.rom"

Comment 2 Jaroslav Suchanek 2016-05-13 13:57:23 UTC
I was not able to reproduce it using the config snippet from the description. Please provide full config and debug logs if possible.

Comment 3 yalzhang@redhat.com 2016-05-16 01:27:35 UTC
Created attachment 1157771 [details]
guest's xml file

Comment 4 yalzhang@redhat.com 2016-05-16 01:35:51 UTC
Hi Jaroslav,

Have you add the cpu feature in the xml file?
This is what I have done:
# virsh capabilities > /tmp/capabilities.xml
# virsh cpu-baseline /tmp/capabilities.xml
<cpu mode='custom' match='exact'>
  <model fallback='forbid'>Penryn</model>
  <vendor>Intel</vendor>
  <feature policy='require' name='osxsave'/>
  <feature policy='require' name='xsave'/>
  <feature policy='require' name='pdcm'/>
  <feature policy='require' name='xtpr'/>
  <feature policy='require' name='tm2'/>
  <feature policy='require' name='est'/>
  <feature policy='require' name='vmx'/>
  <feature policy='require' name='ds_cpl'/>
  <feature policy='require' name='monitor'/>
  <feature policy='require' name='dtes64'/>
  <feature policy='require' name='pbe'/>
  <feature policy='require' name='tm'/>
  <feature policy='require' name='ht'/>
  <feature policy='require' name='ss'/>
  <feature policy='require' name='acpi'/>
  <feature policy='require' name='ds'/>
  <feature policy='require' name='vme'/>
</cpu>
Then I have modify the guest's xml with this cpu section as a replacement. And add a <rom bar='on' file='/tmp/bladsfdssd'/> in the interface section.

Comment 7 Jiri Denemark 2017-11-22 12:37:56 UTC
Patches sent upstream for review: https://www.redhat.com/archives/libvir-list/2017-November/msg00898.html

Comment 8 Jiri Denemark 2017-11-23 14:16:14 UTC
This is now fixed upstream by

commit 7e0cd26db475ed72257bd99be606ac8f2095231a
Refs: v3.9.0-193-g7e0cd26db4
Author:     Jiri Denemark <jdenemar>
AuthorDate: Wed Nov 22 10:19:12 2017 +0100
Commit:     Jiri Denemark <jdenemar>
CommitDate: Thu Nov 23 14:06:40 2017 +0100

    qemu: Properly skip "char device redirected to" in QEMU log

    When reading QEMU log for reporting it as an error message, we want to
    skip "char device redirected to" line. However, this string is not
    printed at the beginning of a line, which means STRPREFIX will never
    find it.

    Signed-off-by: Jiri Denemark <jdenemar>
    Reviewed-by: Pavel Hrdina <phrdina>

commit c88ce8ae740165ffcf3cb172c6950ffe0c3a7b3b
Refs: v3.9.0-194-gc88ce8ae74
Author:     Jiri Denemark <jdenemar>
AuthorDate: Wed Nov 22 10:28:35 2017 +0100
Commit:     Jiri Denemark <jdenemar>
CommitDate: Thu Nov 23 14:06:40 2017 +0100

    vierror: Define VIR_ERROR_MAX_LENGTH macro

    And use it instead of a magic 1024 constant.

    Signed-off-by: Jiri Denemark <jdenemar>
    Reviewed-by: Pavel Hrdina <phrdina>

commit 96f7a045e93ad08eb4130be97dd6d8a8c963a952
Refs: [master], [TMP], {origin/master}, {origin/HEAD}, v3.9.0-195-g96f7a045e9
Author:     Jiri Denemark <jdenemar>
AuthorDate: Wed Nov 22 13:12:00 2017 +0100
Commit:     Jiri Denemark <jdenemar>
CommitDate: Thu Nov 23 14:06:40 2017 +0100

    qemu: Use the end of QEMU log for reporting errors

    When QEMU dies, we read its output stored in a log file and use it for
    reporting a hopefully useful error. However, virReportError will trim
    the message to (VIR_ERROR_MAX_LENGTH - 1) characters, which means the
    end of the log (which likely contains the error message we want to
    report) may get lost. We should trim the beginning of the log instead.

    https://bugzilla.redhat.com/show_bug.cgi?id=1335534

    Signed-off-by: Jiri Denemark <jdenemar>
    Reviewed-by: Pavel Hrdina <phrdina>

Comment 11 Jiri Denemark 2017-11-28 09:40:35 UTC
Unfortunately, the change to virerror caused our API XMLs to be regenerated during the build. As a result of this, all HTML files where regenerated too and thanks to the "This page was generated at <xsl:value-of select="$timestamp"/>." comment in page.xsl, the build will not be reproducible. We need to make sure the timestamp does not change when repeatedly building the same source RPM.

Comment 12 Jiri Denemark 2017-11-29 13:59:13 UTC
Additional patches sent for review upstream: https://www.redhat.com/archives/libvir-list/2017-November/msg01147.html

Comment 13 Jiri Denemark 2017-11-29 16:17:05 UTC
The timestamp issue should be now fixed upstream by

commit c2dc04c5aaf64bfd043ff3663a350c5ebf1bd83b
Refs: v3.9.0-269-gc2dc04c5aa
Author:     Jiri Denemark <jdenemar>
AuthorDate: Wed Nov 29 11:08:15 2017 +0100
Commit:     Jiri Denemark <jdenemar>
CommitDate: Wed Nov 29 17:08:18 2017 +0100

    spec: Turn on verbose build

    When building a package in a build system, such as koji or cbs, logs are
    the only thing which can be used to diagnose failures. Make them verbose
    since human friendly output of V=0 build doesn't really help when a
    build fails.

    Signed-off-by: Jiri Denemark <jdenemar>
    Reviewed-by: Pino Toscano <ptoscano>

commit 4fe1125b77cb6c6c24798101bd70045189e73f1a
Refs: v3.9.0-270-g4fe1125b77
Author:     Jiri Denemark <jdenemar>
AuthorDate: Wed Nov 29 11:08:40 2017 +0100
Commit:     Jiri Denemark <jdenemar>
CommitDate: Wed Nov 29 17:08:18 2017 +0100

    spec: Make the build reproducible

    If the spec file applies a patch which touches any file in the API XMLs
    dependency tree, we need to regenerate the XMLs and consequently
    recreate hvsupport.html. The file will contain a time stamp in a comment
    which means it will be different every time the package is built. The
    commit a54c9622860 which added the time stamp also added support for
    SOURCE_DATE_EPOCH environment variable. Let's set it to the time stamp
    of the spec file itself to make the build reproducible.

    Signed-off-by: Jiri Denemark <jdenemar>
    Reviewed-by: Pino Toscano <ptoscano>

Comment 15 yalzhang@redhat.com 2017-12-04 09:39:08 UTC
Test on libvirt-3.9.0-4.el7.x86_64

1. # virsh capabilities > /tmp/capabilities.xml
add the output of "# virsh cpu-baseline /tmp/capabilities.xml" as the cpu of guest rhel7.4

# virsh edit rhel7.4
...
<cpu mode='custom' match='exact'>
  <model fallback='forbid'>SandyBridge</model>
  <vendor>Intel</vendor>
  <feature policy='require' name='vme'/>
  <feature policy='require' name='ds'/>
  <feature policy='require' name='acpi'/>
  <feature policy='require' name='ss'/>
  <feature policy='require' name='ht'/>
  <feature policy='require' name='tm'/>
  <feature policy='require' name='pbe'/>
  <feature policy='require' name='dtes64'/>
  <feature policy='require' name='monitor'/>
  <feature policy='require' name='ds_cpl'/>
  <feature policy='require' name='vmx'/>
  <feature policy='require' name='smx'/>
  <feature policy='require' name='est'/>
  <feature policy='require' name='tm2'/>
  <feature policy='require' name='xtpr'/>
  <feature policy='require' name='pdcm'/>
  <feature policy='require' name='pcid'/>
  <feature policy='require' name='osxsave'/>
  <feature policy='require' name='arat'/>
  <feature policy='require' name='xsaveopt'/>
  <feature policy='require' name='invtsc'/>
</cpu>
...
  <interface type='network'>
      <mac address='52:54:00:cb:86:d9'/>
      <source network='default'/>
      <model type='rtl8139'/>
      <rom bar='on' file='/tmp/bladsfdssd'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
...

2. start the guest, check the error message, the error info about romfile is exposed
# virsh start rhel7.4
error: Failed to start domain rhel7.4
error: internal error: qemu unexpectedly closed the monitor: warning: host doesn't support requested feature: CPUID.01H:ECX.dtes64 [bit 2]
warning: host doesn't support requested feature: CPUID.01H:ECX.monitor [bit 3]
warning: host doesn't support requested feature: CPUID.01H:ECX.ds-cpl [bit 4]
warning: host doesn't support requested feature: CPUID.01H:ECX.vmx [bit 5]
warning: host doesn't support requested feature: CPUID.01H:ECX.smx [bit 6]
warning: host doesn't support requested feature: CPUID.01H:ECX.est [bit 7]
warning: host doesn't support requested feature: CPUID.01H:ECX.tm2 [bit 8]
warning: host doesn't support requested feature: CPUID.01H:ECX.xtpr [bit 14]
warning: host doesn't support requested feature: CPUID.01H:ECX.pdcm [bit 15]
warning: host doesn't support requested feature: CPUID.01H:ECX.osxsave [bit 27]
2017-12-04T09:37:42.567573Z qemu-kvm: -device rtl8139,netdev=hostnet0,id=net0,mac=52:54:00:cb:86:d9,bus=pci.0,addr=0x3,rombar=1,romfile=/tmp/bladsfdssd: failed to find romfile "/tmp/bladsfdssd"

Comment 16 yalzhang@redhat.com 2017-12-14 08:53:01 UTC
verify this bug as expected error message can list out now as in comment 15

Comment 20 errata-xmlrpc 2018-04-10 10:36:45 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/RHEA-2018:0704


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