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

mallu mallu mallu0987 at yahoo.com
Thu Jan 30 20:26:10 UTC 2014


Eric, thank you for your response. Virsh memtune, setmaxmem and setmem won't survive a reboot. I'm hoping to find  a solution that can survive reboot. 

  




On Thursday, January 30, 2014 11:36 AM, Eric Blake <eblake at redhat.com> wrote:
 
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 --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20140130/1449a423/attachment.htm>


More information about the libvirt-users mailing list