Phenomenon:
cloudstack4.3,4.4 version, when using a KVM virtual machine, if memory is configured for Hyper-use, you will find that the VM memory created is half the compute scheme.
Analysis:
After configuring the 2, the virtual machine is created, and the XML configuration file that opens the virtual machine (compute scheme is 2C/2G) is as follows:
<name>i-2-32-VM</name> <uuid>eb1a307f-ff54-4f40-aa88-d6071535cd92</uuid> <description >centos 5.5 (64-bit) </description> <memory unit= ' KiB ' >2097152</memory> <currentmemory unit= ' KiB ' >1048576</currentMemory>
As you can see, the virtual machine is actually displayed as Currentmemory (Minram), which is the current memory of 1G.
However, the memory unit is actually the maximum use of RAM (Maxram).
As you can see, the 2G is actually defined as the Maxram of the virtual machine, but is actually assigned to Minram, which is the half-phenomenon seen.
Solve:
1. Edit the agent configuration file and add the parameter "vm.memballoon.disable=true"
[Email protected] agent]# Cat/etc/cloudstack/agent/agent.properties | grep Memballoon Vm.memballoon.disable=true
2. Restart the LIBVIRTD and cloudstack-agent services.
3. Close and restart the virtual machine.
explanation of Vm.memballoon.disable=true:
# Vm.memballoon.disable=true |
# Disable Memory ballooning on VMS guests for Overcommit, by default Overcommit feature enables balloon and sets Curre Ntmemory to a minimum value. |
This article is from the "Systems" blog, so be sure to keep this source http://systems.blog.51cto.com/2500547/1591576
KVM Virtual machine memory is over-provisioned-virtual machine memory halved phenomenon analysis and solution