Bug 1335534
Summary: | Unexpected warning appears when start a guest with non-exists rom file and cpu fea-ture defined together in the xml | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | yalzhang <yalzhang> | ||||
Component: | libvirt | Assignee: | Jiri Denemark <jdenemar> | ||||
Status: | CLOSED ERRATA | QA Contact: | yalzhang <yalzhang> | ||||
Severity: | unspecified | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 7.3 | CC: | dyuan, fjin, jsuchane, lhuang, mzhan, rbalakri, xuzhang, yafu, yalzhang | ||||
Target Milestone: | rc | ||||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | libvirt-3.9.0-4.el7 | Doc Type: | Bug Fix | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2018-04-10 10:36:45 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
yalzhang@redhat.com
2016-05-12 12:42:59 UTC
I was not able to reproduce it using the config snippet from the description. Please provide full config and debug logs if possible. Created attachment 1157771 [details]
guest's xml file
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. Patches sent upstream for review: https://www.redhat.com/archives/libvir-list/2017-November/msg00898.html 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> 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. Additional patches sent for review upstream: https://www.redhat.com/archives/libvir-list/2017-November/msg01147.html 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> 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" verify this bug as expected error message can list out now as in comment 15 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 |