qemu: Set RLIMIT_MEMLOCK when memoryBacking/locked is used

If a domain is configured to have all its memory locked, we need to set
RLIMIT_MEMLOCK so that QEMU is actually allowed to lock the memory.
This commit is contained in:
Jiri Denemark 2013-06-28 16:58:03 +02:00
parent 6d8ebc7538
commit 59cc0fe5aa

View File

@ -6795,6 +6795,7 @@ qemuBuildCommandLine(virConnectPtr conn,
virCommandAddArgFormat(cmd, "mlock=%s",
def->mem.locked ? "on" : "off");
}
mlock = def->mem.locked;
virCommandAddArg(cmd, "-smp");
if (!(smp = qemuBuildSmpArgStr(def, qemuCaps)))