Cannot power on a virtual machine due to COW memory heap exhaustion
book
Article ID: 345591
calendar_today
Updated On:
Products
VMware vSphere ESXi
Issue/Introduction
Cannot power on virtual machine due to COW memory heap exhaustion.
In the /var/log/hostd.log file, you see entries similar to:
2015-11-02T10:56:09.776Z [2DE80B70 verbose 'Vmsvc.vm:/vmfs/volumes/########-########-####-##########7d/VM/VM.vmx'] Handling message _vmx4: Heap cow already at its maximum size of 201331560. Cannot expand.
2015-11-02T10:56:09.979Z [2C580B70 verbose 'Vmsvc.vm:/vmfs/volumes/########-########-####-##########7d/VM/VM.vmx'] Power On message: Heap cow already at its maximum size of 201331560. Cannot expand.
In the /var/log/vmkwarning.log file, you see entries similar to:
WARNING: Heap: 1445: Heap cow could not be grown to accommodate the memory request WARNING: Heap: 1522: Heap_Align(cow, 68096/68096 bytes, 4 align) failed. caller: 0xa0155e WARNING: Cow: 576: No memory available! Called from 0xa0155e WARNING: Cow: 1223: Creation of the device with device lib failed Out of memory
Cloning a virtual disk using vmkfstools -i fails.
In the /var/log/vmkernel.log file, you see entries similar to:
WARNING: Heap: 1435: Heap cow already at its maximumSize. Cannot expand. WARNING: Heap: 1645: Heap_Align(cow, 1048576/1048576 bytes, 8 align) failed. caller: 0x418032712212 WARNING: Cow: 530: No memory available! Called from 0x418032712212 Cow: 1714: Failed on handle 12 (33833182) of 14 with Out of memory
Note: This log excerpt is an example. Date, time, and environmental variables may vary depending on your environment.
If you use snapshots on virtual machines running on an ESX host, each snapshot delta disk is a COW (Copy On Write) disk. For each one in use by running virtual machines, their data structures take up ESX kernel memory. This allocation is known as the COW heap. This memory is used to store cached metadata, pointing to where in a VMDK or in a chain of VMDK files disk data to be accessed resides.
In ESX 3.5, the default COW memory heap is 32MB. As more snapshots are used by running virtual machines, particularly by virtual machines with large base disks, this COW memory heap may run low. When exhausted, virtual machines no longer power on.
The following ESX versions can have their COW heap manually increased:
You do not automatically have to increase the COW memory heap allocation to its configurable maximum. You can double it to begin with, and see if this resolves the issue, unless you feel the ESX host has a lot of memory to spare.
The ESX host must be rebooted for the changes to take effect.
To increase the COW Memory Heap allocation through VI Client:
Open vCenter/VirtualCenter, and click on the relevant host.
Click the Configurations tab.
Under the Software section click Advanced Settings, and in the dialog that appears, click COW.
Change the value of COW.MaxHeapSizeMB.
To increase the COW Memory Heap Allocation through the Service Console in ESX 3.5:
Ensure that you are logged in as the root user.
Run this command to get the current value:
esxcfg-advcfg -g /COW/MaxHeapSizeMB
Value of MaxHeapSizeMB is 32MB.
Run this command to set the new value:
esxcfg-advcfg -s 64 /COW/MaxHeapSizeMB
Value of MaxHeapSizeMB is 64MB.
Note: ESX 3.5 default COW Memory Heap allocation is 32MB and the maximum is 192 MB.
To increase the COW Heap Memory Allocation through the Service Console in ESX 4.0: