Configuring P2M Buffer size for virtual machines.
search cancel

Configuring P2M Buffer size for virtual machines.

book

Article ID: 318766

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

Symptoms:
  • A virtual machine might fail with the following error message in vm log:

YYYY-MM-DDTHH:MM:SS.sssZ| vcpu-1| W115: MONITOR PANIC: vmk: vcpu-0:P2M reservation failed after max retries
 

  • A virtual machine might fail to enable its network adapter after a vMotion with the following error messages in vmkernel.log

YYYY-MM-DDTHH:MM:SS.sssZ cpu174:4463989)VmMemCow: 1706: p2m update: cannot reserve - cur 0 0 rsvd 1028 req 257 avail 1279
YYYY-MM-DDTHH:MM:SS.sssZ cpu174:4463989)Vmxnet3: 16524: Failed to map the rx data ring for rq 0


 

Note: NSX Edge VM's can be affected by this issue


Environment

VMware vSphere ESXi 6.0
VMware vSphere ESXi 7.0.x
VMware vSphere ESXi 6.7
VMware vSphere ESXi 6.5

Cause

A virtual machine might request a bigger size of memory from VMX device(ex: SVGA, 3D, etc), this can cause breaking of large number of shared memory pages causing p2m buffer to overflow and virtual machine powered off with the error message reservation failed after max retries.

Resolution

To workaround this issue, increase the P2M buffer slots for all the virtual machines VM(s) on the host. It is a host setting that is applied at the time when the virtual machine is powered on or migrated to that host. The host does not require a reboot. The virtual machine has to be either powered off and powered back on or migrated to another host and migrated back for the setting to take effect on this host.

If a virtual machine cannot be powered off, you can migrate the virtual machine to a different ESXi host in the cluster, If the virtual machine resides on shared datastores across the cluster. It can be done to all the virtual machines on the host if the settings need to be applied to all the virtual machines. Once the host setting is applied, virtual machines can be migrated back to the host. 

  1. Power off VM(s) on the hosts OR Migrate all the Powered ON virtual machines from the host on which you need to make changes to different ESXi hosts in the cluster.
  2. From UI, go to Host > Manage > Advanced Settings
  3. Search for ShareCOSBufSize
  4. Edit the value to 32 (Maximum supported size)
  5. Please make sure the new value is updated under the value section.
  6. Power on the VM(s) OR Migrate the virtual machines back to the host on which changes were made.  

Note: Alternatively, you can apply the setting on the destination host before migrating the virtual machine to it.