[libvirt-users] Dynamically setting permanent memory libvirt-lxc

Eric Blake eblake at redhat.com
Thu Jan 30 19:36:18 UTC 2014


On 01/30/2014 10:11 AM, mallu mallu wrote:
> I'm trying to permanently change memory allocation for a libvirt-lxc domain. So far I tried changing memory in memory.limit_in_bytes under /cgroup/memory/libvirt/lxc/<container>/.  This didn't help. It appears that libvirt is not reading changes in cgroup.
> 
> My requirements are 
> 
> 1) Be able to dynamically change memory of a LXC domain without reboot
> 2) The memory change must survive LXC domain reboot.

virsh memtune, virsh setmaxmem, and virsh setmem are the appropriate
tools to use.  Changing things directly in cgroups goes behind libvirt's
back, while changing it through the libvirt API allows you to hot-plug
the changes as well as control whether the next boot will have the same
new limits.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20140130/c24080a9/attachment.sig>


More information about the libvirt-users mailing list