Bug 1350735
| Summary: | memory locking limit for regular users is too low to launch guests through libvirt | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Andrea Bolognani <abologna> |
| Component: | qemu-kvm-rhev | Assignee: | David Gibson <dgibson> |
| Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 7.3 | CC: | abologna, dgibson, dyuan, dzheng, gsun, juzhang, knoel, mrezanin, qzhang, rjones, virt-maint, zhengtli |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | ppc64le | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | qemu-kvm-rhev-2.6.0-12.el7 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | 1293024 | Environment: | |
| Last Closed: | 2016-11-07 21:20:24 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
Andrea Bolognani
2016-06-28 09:09:51 UTC
Fix included in qemu-kvm-rhev-2.6.0-11.el7 Andrea Bolognani and Richard Jones pointed out an error in my patch - it only allowed members of group kvm to have the increased locked memory limit. I was working from the mistaken assumption that only members of this group could create KVM VMs anyway. Moving back to ASSIGNED, until a fix for that problem is posted. Fix included in qemu-kvm-rhev-2.6.0-12.el7 I reproduced the problem under RHEL7 guest at ppc64le platform packages: Host kernel:3.10.0-459.el7.ppc64le qemu: qemu-kvm-rhev-2.6.0-9.el7 User is "testuser"(non-root) bootcmd: virt-install --name=rhelguest --ram=4096 --vcpus=1 --os-type=linux --os-variant=rhel7 --arch ppc64le --machine pseries '--extra-args=console=tty0 console=hvc0' --disk /tmp/rhel7.2-ppc64le,size=6,format=raw --serial pty --location=http://download.eng.bos.redhat.com/rel-eng/RHEL-7.2-20151030.0/compose/Server/ppc64le/os/ --nographics --noreboot result: Starting install... Retrieving file vmlinuz... | 18 MB 00:00:00 Retrieving file initrd.img... | 35 MB 00:00:00 Allocating 'rhel7.2-ppc64le' | 6.0 GB 00:00:00 ERROR internal error: Process exited prior to exec: el0,id=channel0,name=org.qemu.guest_agent.0 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5 -msg timestamp=on libvirt: error : cannot limit locked memory to 46137344: Operation not permitted =============================================================================== Only after upgrate the qemu version to qemu-kvm-rhev-2.6.0-12.el7. Run the command again. [testuser@ibm-p8-rhevm-13 ~]$ sh virt_boot.sh WARNING No --console device added, you likely will not see text install output from the guest. Starting install... Retrieving file vmlinuz... | 18 MB 00:00:00 Retrieving file initrd.img... | 35 MB 00:00:00 Allocating 'rhel7.2-ppc64le' | 6.0 GB 00:00:00 Creating domain... | 0 B 00:00:00 Connected to domain rhelguest Escape character is ^] Populating /vdevice methods Populating /vdevice/vty@30000000 Populating /vdevice/nvram@71000000 Populating /pci@800000020000000 00 2800 (D) : 1af4 1002 unknown-legacy-device* 00 2000 (D) : 1af4 1001 virtio [ block ] 00 1800 (D) : 1af4 1003 communication-controller* 00 1000 (D) : 106b 003f serial bus [ usb-ohci ] 00 0800 (D) : 1af4 1000 virtio [ net ] No NVRAM common partition, re-initializing... Scanning USB OHCI: initializing Using default console: /vdevice/vty@30000000 Detected RAM kernel at 400000 (15448c4 bytes) Welcome to Open Firmware Copyright (c) 2004, 2011 IBM Corporation All rights reserved. This program and the accompanying materials are made available under the terms of the BSD License available at http://www.opensource.org/licenses/bsd-license.php Booting from memory... OF stdout device is: /vdevice/vty@30000000 Preparing to boot Linux version 3.10.0-327.el7.ppc64le (mockbuild.eng.bos.redhat.com) (gcc version 4.8.3 20140911 (Red Hat 4.8.3-9) (GCC) ) #1 SMP Thu Oct 29 17:31:13 EDT 2015 Detected machine type: 0000000000000101 Max number of cores passed to firmware: 2048 (NR_CPUS = 2048) Calling ibm,client-architecture-support... done command line: console=tty0 console=hvc0 inst.repo=http://download.eng.bos.redhat.com/rel-eng/RHEL-7.2-20151030.0/compose/Server/ppc64le/os/ memory layout at init: memory_limit : 0000000000000000 (16 MB aligned) alloc_bottom : 0000000001960000 alloc_top : 0000000030000000 alloc_top_hi : 0000000100000000 rmo_top : 0000000030000000 ram_top : 0000000100000000 instantiating rtas at 0x000000002fff0000... done prom_hold_cpus: skipped copying OF device tree... Building dt strings... Building dt structure... Device tree strings 0x0000000003c70000 -> 0x0000000003c70a1d Device tree struct 0x0000000003c80000 -> 0x0000000003c90000 Calling quiesce... returning from prom_init [ 0.000000] Using pSeries machine description [ 0.000000] Page sizes from device-tree: [ 0.000000] base_shift=12: shift=12, sllp=0x0000, avpnm=0x00000000, tlbiel=1, penc=0 [ 0.000000] base_shift=16: shift=16, sllp=0x0110, avpnm=0x00000000, tlbiel=1, penc=1 [ 0.000000] Using 1TB segments [ 0.000000] Found initrd at 0xc000000001960000:0xc000000003c3f90c [ 0.000000] bootconsole [udbg0] enabled [ 0.000000] Partition configured for 1 cpus. [ 0.000000] CPU maps initialized for 1 thread per core [ 0.000000] Starting Linux PPC64 #1 SMP Thu Oct 29 17:31:13 EDT 2015 [ 0.000000] ----------------------------------------------------- [ 0.000000] ppc64_pft_size = 0x19 [ 0.000000] physicalMemorySize = 0x100000000 [ 0.000000] htab_hash_mask = 0x3ffff [ 0.000000] ----------------------------------------------------- .... It's good the boot up the guest (In reply to Zhengtong from comment #5) > I reproduced the problem under RHEL7 guest at ppc64le platform > > packages: > Host kernel:3.10.0-459.el7.ppc64le > qemu: qemu-kvm-rhev-2.6.0-9.el7 > > User is "testuser"(non-root) If you have time can you test it using the command libguestfs-test-tool (as testuser / non-root)? It should fail with the old qemu and succeed with the new qemu. (In reply to Richard W.M. Jones from comment #6) > (In reply to Zhengtong from comment #5) > > I reproduced the problem under RHEL7 guest at ppc64le platform > > > > packages: > > Host kernel:3.10.0-459.el7.ppc64le > > qemu: qemu-kvm-rhev-2.6.0-9.el7 > > > > User is "testuser"(non-root) > > If you have time can you test it using the command > > libguestfs-test-tool > > (as testuser / non-root)? It should fail with the old qemu and > succeed with the new qemu. I tested with libguestfs-test-tool with qemu-kvm-rhev-2.6.0-9 and qemu-kvm-rhev-2.6.0-12 , I have attached the log to the attachment. I can't say which result is good, because I am not familiar with libguestfs tools. but through what I can see in the log, they both run well. Created attachment 1178824 [details]
qemu-kvm-rhev-2.6.0-9 libguestfs-test-tool log
Created attachment 1178825 [details]
qemu-kvm-rhev-2.6.0-12 libguestfs-test-tool log
I would have expected the test in comment 8 to fail with the error "cannot limit locked memory to ...". The test in comment 9 shows the expected output ("TEST FINISHED OK"). There are several reasons why it might have worked when it would be expected to fail: - You didn't log out & log in after changing qemu version. Therefore the ulimit was not changed. - Session libvirtd has a 30 second timeout, and was still running and still had the ulimit settings from the previous qemu installation. You can do (as non-root): 'killall libvirtd' to kill any previous session libvirtd that is hanging around. Created attachment 1179057 [details]
qemu-kvm-rhev-2.6.0-9 libguestfs-test-tool log version 2 (failed)
Yes , after restarting libvirtd service and reconnecting the session , libguestfs-test-tool run failed , the log is attached. Libvirt screws up the error message completely. I guess you'll find the real error message in ~/.cache/libvirt/qemu/log/guestfs-nagohys0uvhu508w.log (In reply to Richard W.M. Jones from comment #14) > Libvirt screws up the error message completely. > > I guess you'll find the real error message in > ~/.cache/libvirt/qemu/log/guestfs-nagohys0uvhu508w.log I noticed this a while ago, but got sidetracked and forgot to investigate further. I just filed about Bug 1356108 to track the issue. yes there is error in the log file libvirt: error : cannot limit locked memory to 18874368: Operation not permitted Created attachment 1179598 [details]
guestfs log
Setting to VERIFIED according to comment 5. 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://rhn.redhat.com/errata/RHBA-2016-2673.html |