[libvirt] [PATCH] qemu: Forbid <memoryBacking><locked> without <memtune><hard_limit>

Pavel Hrdina phrdina at redhat.com
Tue Feb 7 11:07:04 UTC 2017


On Tue, Feb 07, 2017 at 08:43:56AM +0100, Jiri Denemark wrote:
> On Mon, Feb 06, 2017 at 18:29:59 +0100, Andrea Bolognani wrote:
> > In order for memory locking to work, the hard limit on memory
> > locking (and usage) has to be set appropriately by the user.
> > 
> > The documentation mentions the requirement already: with this
> > patch, it's going to be enforced by runtime checks as well.
> > 
> > Note that this will make existing guests that don't satisfy
> > the requirement disappear; that said, such guests have never
> > been able to start in the first place.
> 
> Yes, could not start or if they started they would just crash
> afterwards. But with your patch they would just disappear and the user
> would not even be able to fix the XML. I think the check should be done
> prior to starting a domain to avoid this unfortunate behaviour.
> 
> Jirka

Actually there is a third option, we have domainValidateCallback
that is what you are looking for.  This function is called only
when defining new XML and is skipped while parsing the XML from
disk on libvirtd startup or while restoring from snapshot and etc.

It is also called before domain is started.

Pavel

> 
> --
> libvir-list mailing list
> libvir-list at redhat.com
> https://www.redhat.com/mailman/listinfo/libvir-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20170207/ff1c6f54/attachment-0001.sig>


More information about the libvir-list mailing list