The virtual machine is configured with a set of memory; this is the sum that the guest OS is told it has available to it. A virtual machine will not necessarily use the entire memory size; it only uses what is needed at the time by the guest OS and applications. However, a VM cannot access more memory than its configured memory size plus overhead. A default memory size is provided by vSphere when creating the virtual machine but can be adjusted by the administrator. It is important to know the memory needs of the application and guest operating system being virtualized so that the virtual machine's memory can be sized accordingly.
Don't forget to factor in memory overhead. Memory overhead can be broken down into two categories, ESXi overhead and virtual machine overhead. The system, or ESXi, overhead is used for the VMkernel and other host agents such as hostd or vpxa. There is also per virtual machine overhead that is used for the Virtual Machine Monitor...