open-power-host-os / qemu

OpenPOWER Host OS qemu repository
Other
2 stars 3 forks source link

Can't start KVM guests using libvirt #3

Closed sgarfinkle closed 7 years ago

sgarfinkle commented 7 years ago

After installing host-os 2.5 on top of CentOS, I tried unsuccessfully to start a guest using "virsh start". Every time I did that, I got an error message: error: internal error: Process exited prior to exec: libvirt: error : cannot limit locked memory to 79691776: Operation not permitted

This is a dup of an issue fixed in fedora 24 by https://bugzilla.redhat.com/show_bug.cgi?id=1293024 The fix for host-os is to create a /etc/security/limits.d/qemu-memlock.conf (if it doesn't already exist) when installing the qemu package. I used

The value 64000 was used for the f24 x86 file, but that seems to be too low for host-os.

Mirrored with LTC bug #159047
mopsfelder commented 7 years ago

Here is how this was fixed in fc24 qemu package:

http://pkgs.fedoraproject.org/cgit/rpms/qemu.git/commit/?h=f24&id=fa4cd5da644bc4b079b2fb4a90271955b5fb2764

When we have defined the value for HostOS, builds team can update qemu spec file.

sgarfinkle commented 7 years ago

Well, it seems like creating one with 128000 (or whatever) is better than nothing. Can we get this done?

farosas commented 7 years ago

I have added the 95-kvm-ppc64-memlock.conf file to /etc/security/limits.d with the limits suggested by Scott. This is enough for running guests under non-privileged users and up to 8 GB of RAM.

If anyone wants to see a different memory locking limit being applied, please let me know: https://github.com/open-power-host-os/versions/pull/227/files#diff-38be7a7b7669e4c89e4eab05a3de4a48

cdeadmin commented 7 years ago

------- Comment From satheera@in.ibm.com 2017-10-05 04:45:47 EDT------- Finding in latest release branch update.

rpm -qf /etc/security/limits.d/95-kvm-ppc64-memlock.conf

qemu-system-ppc-2.10.0-2.rel.gitc334a4e.el7.centos.ppc64le

Closing.