Bug 1813852
Summary: | report proper error if 'memfd' is requested as memory backing but qemu doesn't support it | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux Advanced Virtualization | Reporter: | Jing Qi <jinqi> |
Component: | libvirt | Assignee: | Ján Tomko <jtomko> |
Status: | CLOSED ERRATA | QA Contact: | Jing Qi <jinqi> |
Severity: | low | Docs Contact: | |
Priority: | low | ||
Version: | 8.2 | CC: | areis, chayang, ddepaula, dgilbert, dyuan, jdenemar, jinqi, jinzhao, jtomko, juzhang, marcandre.lureau, mdeng, virt-maint, xuzhang, yuhuang |
Target Milestone: | pre-dev-freeze | Keywords: | Triaged |
Target Release: | 8.3 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | libvirt-6.2.0-1.el8 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | 1738626 | Environment: | |
Last Closed: | 2020-11-17 17:47:36 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: | |||
Bug Depends On: | 1738626 | ||
Bug Blocks: | 1740797 |
Comment 2
Jing Qi
2020-03-16 10:18:23 UTC
Could you please run: grep -e '\(memfd\|packa\)' /var/cache/libvirt/qemu/capabilities/* and paste the output here. Then please delete everything in /var/cache/libvirt/qemu/capabilities/ and restart libvirtd and try again. If it fails please paste the output of the above command again. Here is the result as you request, please have a look. # grep -e '\(memfd\|packa\)' /var/cache/libvirt/qemu/capabilities/* <package>qemu-kvm-4.2.0-10.module+el8.2.0+5740+c3dff59e</package> # rm -rf /var/cache/libvirt/qemu/capabilities/* # systemctl restart libvirtd # grep -e '\(memfd\|packa\)' /var/cache/libvirt/qemu/capabilities/* <package>qemu-kvm-4.2.0-10.module+el8.2.0+5740+c3dff59e</package> Ok, so this boils down to validation not being done on the input definition as the capability is not present but we'll attempt to start the VM. Case #1 was fixed upstream by: commit 8400b6c1983dd1e4504fe19d3421fff0e5866091 Author: Ján Tomko <jtomko> CommitDate: 2020-02-24 13:46:51 +0100 qemu: use correct backendType when checking memfd capability The backend name is memory-backend-memfd but we've been checking for memory-backend-memory. Reported by GCC on rawhide: ../../../src/internal.h:75:22: error: 'strcmp' of a string of length 21 and an array of size 21 evaluates to nonzero [-Werror=string-compare] ../../../src/qemu/qemu_command.c:3525:20: note: in expansion of macro 'STREQ' 3525 | } else if (STREQ(backendType, "memory-backend-memory") && | ^~~~~ Signed-off-by: Ján Tomko <jtomko> Fixes: 24b74d187cab48a9dc9f409ea78900154c709579 Reviewed-by: Daniel P. Berrangé <berrange> git describe: v6.0.0-468-g8400b6c198 contains: v6.1.0-rc1~62 Case #2 is a separate problem common for all memory backends. Verified with libvirt-6.4.0-1.module+el8.3.0+6881+88468c00.x86_64 & qemu-kvm-5.0.0-0.module+el8.3.0+6620+5d5e1420.x86_64 1. The domain xml has below part: <memoryBacking> <source type='memfd'/> </memoryBacking> <vcpu placement='static'>4</vcpu> ... <numa> <cell id='0' cpus='0-1' memory='512000' unit='KiB'/> <cell id='1' cpus='2-3' memory='512000' unit='KiB'/> </numa> 2. # virsh start avocado-vt-vm1 error: Failed to start domain avocado-vt-vm1 error: unsupported configuration: this qemu doesn't support the memory-backend-memfd object There is no libvirt error message reported. 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 (virt:8.3 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-2020:5137 |