VMware ESXi and vSphere Cluster Management
Physical and Virtualized Host Memory in VMware vSphere
Learn how RAM, operating-system virtual memory, guest physical memory, and ESXi host memory relate through address translation and isolation.
Memory virtualization is the set of techniques that lets software use memory addresses without knowing the exact location of data in physical RAM. In a vSphere environment, several memory views are layered together: an application has a virtual address space, the guest operating system manages guest virtual memory, the virtual machine is given guest physical memory, and ESXi maps that memory to actual host RAM.
Understanding these layers prevents common mistakes, such as treating a virtual machine's configured memory as a permanently reserved, contiguous range of host RAM.
Physical Memory in a Nonvirtualized System
Physical memory is the actual RAM installed in a computer. RAM is hardware that stores data and instructions while they are actively being used. A conventional operating system manages the physical RAM available in the machine, allocating it among the kernel, applications, file caches, device drivers, and other users.
Applications normally request memory through operating-system allocation interfaces. For example, a process may request a buffer, create a data structure, or reserve a larger region for future use. The operating system decides how to satisfy that request. When the application no longer needs the memory, it releases it through the operating system or runtime environment.
An application normally does not select physical RAM addresses directly. Instead, it receives addresses from its process address space. The operating system and processor hardware translate those addresses into locations backed by physical memory or, when appropriate, another backing mechanism.
Example: an Application on a Physical Server
A database process requests memory from its operating system. The process receives virtual addresses, while the operating system and CPU map active pages to installed RAM. If some data becomes inactive and memory pressure occurs, the operating system may page data to storage or reclaim it from a cache.
The important point is that the application works with virtual addresses. It does not need to know which RAM module or physical address contains each byte.
Operating-System Virtual Memory
Virtual memory is an abstraction that gives each process its own address space. A virtual address space is the range of addresses that a process or operating system can use independently of the physical RAM layout.
A virtual address is an address used by software. A physical address identifies a location in actual machine memory. These are different address types:
- Virtual address: generated and used by a process or operating system.
- Physical address: refers to a location in physical memory from the perspective of the relevant hardware layer.
The processor's memory management unit (MMU), working with operating-system data structures, translates virtual addresses into physical addresses. The operating system establishes mappings and protection rules; the MMU applies them during memory access.
Why Operating Systems Use Virtual Memory
- Process isolation: one process normally cannot read or modify another process's memory.
- Memory protection: pages can be marked as readable, writable, executable, or inaccessible.
- Independent address spaces: processes can use similar virtual addresses without requiring identical physical locations.
- Larger usable address spaces: a process can have an address space larger than the amount of RAM currently resident for that process.
- Memory-mapped files: file contents can be exposed through a process's virtual address space.
- Paging and swapping: memory can be managed in page-sized units, and inactive contents may be moved to backing storage when necessary.
CPU and Hardware Support for Memory Virtualization
Modern processors provide hardware mechanisms that support address translation and memory protection. The MMU uses pages, which are fixed-size units of memory, and page tables, which contain mappings between virtual pages and physical pages.
When software accesses a virtual address, the processor uses the relevant page-table information to determine the corresponding physical page and offset. It also checks permissions. A translation lookaside buffer, or TLB, commonly caches recent translations so that repeated memory accesses do not require a full page-table lookup each time.
CPU virtualization and memory virtualization are related but distinct:
- CPU virtualization provides an execution environment in which a guest operating system can run safely on a processor controlled by a hypervisor.
- Memory virtualization provides address translation and protection between guest memory views and the host's actual memory.
Both depend on processor hardware support for privilege enforcement, translation, and protection. A hypervisor coordinates these mechanisms so that multiple guests can share one physical server without sharing unrestricted access to one another's memory.
Memory Layers in a Virtual Machine
A virtual machine introduces additional memory layers. The guest operating system behaves much like an operating system on a physical computer, but the RAM it sees is virtual hardware provided by ESXi.
| Layer | Managed By | Address Type | What It Represents |
|---|---|---|---|
| Application or process virtual memory | Guest operating system, with CPU support | Guest virtual address | Addresses generated by an application running inside the VM |
| Guest operating system virtual memory | Guest operating system | Guest virtual address mapped to guest physical address | The guest's normal process and kernel memory abstraction |
| Guest physical memory | Virtual hardware presented by ESXi and managed by the guest OS | Guest physical address | RAM-like memory visible to the guest operating system |
| Host physical memory | ESXi | Host physical address | Actual RAM installed in the ESXi server |
A guest virtual address is generated by an application inside a VM. A guest physical address belongs to the memory address space presented to that VM. A guest physical address is not necessarily a direct physical RAM address on the ESXi host. ESXi performs the additional mapping to a host physical address, which refers to actual RAM in the server.
How ESXi Virtualizes Memory
ESXi is VMware's bare-metal hypervisor. A hypervisor creates and manages isolated virtual-machine execution environments on shared hardware.
When a VM is powered on, ESXi creates a protected, addressable memory environment for it. The administrator configures the VM with a memory capacity, such as 8 GB. This configured value represents the amount of guest physical memory presented to the guest operating system.
The guest operating system detects that virtual hardware as available RAM and manages it normally. Applications inside the guest request memory from the guest OS, and the guest OS creates its usual virtual-to-guest-physical mappings. ESXi then maps the VM's guest memory activity to resources in host physical memory.
Several VMs can run concurrently on one host. Each VM has its own guest operating system, page tables, and guest-visible address space. ESXi maintains the mappings and protection needed to keep those memory environments separate.
Memory Isolation
Memory isolation is protection that prevents one process or virtual machine from reading or modifying another's memory. In vSphere, a guest operating system cannot simply use a guest physical address to access another VM's memory. ESXi and processor protection mechanisms validate the access against the VM's permitted memory mappings.
Isolation supports:
- Security: workloads cannot freely inspect another VM's data.
- Stability: a faulty guest cannot normally overwrite another guest's operating-system memory.
- Fault containment: a failure in one guest is less likely to corrupt the memory environment of other guests.
- Consolidation: independent workloads can share one physical server while retaining separate memory views.
Configured VM Memory and Address-Space Behavior
VM memory is selected during VM creation or later in the VM's configuration. If an administrator configures a VM with 8 GB of memory, the guest OS generally sees 8 GB of RAM-like guest physical memory.
That configured capacity is not the same as the amount of memory actively used by guest workloads. A guest may have 8 GB available while its applications currently use only 2 GB. The remaining capacity may be unused, used by the guest kernel or file cache, or available for later allocations.
The guest-visible memory also does not need to correspond to one contiguous range of host RAM. From the guest's perspective, its physical memory can appear as a consistent addressable range. ESXi can map different guest pages to different host physical locations, subject to the host's memory-management requirements.
| Concept | Meaning |
|---|---|
| Configured VM memory | Guest-visible physical-memory capacity assigned in the VM configuration |
| Guest workload usage | Memory actively used by applications, the guest kernel, caches, and other guest components |
| Address-space allocation | A range of addresses reserved or made available to software |
| Physical-memory residency | Whether a page currently has backing in active RAM at a particular layer |
Address Translation Relationship
The complete conceptual translation path is:
Application virtual address
↓ guest OS page tables
Guest physical address
↓ ESXi and processor-assisted translation
Host physical address
↓
Actual host RAM| Step | Address or Mapping | Component Responsible | Purpose |
|---|---|---|---|
| 1 | Application virtual address | Application generates it; guest CPU execution uses it | Identifies data or instructions from the application's view |
| 2 | Guest virtual to guest physical translation | Guest operating system and guest MMU support | Maps the application's address to the VM's guest physical memory view |
| 3 | Guest physical to host physical translation | ESXi and processor-assisted virtualization mechanisms | Maps guest memory to permitted locations in the ESXi host |
| 4 | Access to host RAM | Host processor and memory subsystem | Reads or writes the actual physical memory location |
The guest OS performs its normal virtual-memory management without needing to know the host's physical RAM layout. ESXi maintains the additional translation and protection required to share the host safely. Modern processors commonly support this with nested address translation, a hardware-assisted mechanism that handles the extra guest-to-host mapping layer.
Nested address translation does not eliminate the guest OS's own page tables. Instead, it supports the additional translation needed after the guest has translated an application address into a guest physical address.
Physical Versus Virtualized Memory Responsibilities
| Environment | Operating System Role | Hypervisor Role | Physical RAM Relationship |
|---|---|---|---|
| Nonvirtualized host | Manages applications, virtual memory, and the machine's available RAM | None | The OS ultimately manages the installed physical RAM directly |
| Virtual machine guest | Manages guest processes, guest virtual memory, and guest physical memory presented as RAM | ESXi supplies virtual hardware and maps guest memory to host resources | Guest physical memory is an abstraction, not the same address space as host physical memory |
| ESXi host | ESXi manages host hardware resources rather than acting as a conventional application host OS | Creates VM environments, enforces isolation, and manages host memory allocation | Host physical memory is the actual RAM installed in the server |
Paging and Swapping at Different Layers
Paging is memory management in page-sized units. A guest OS may page memory between active guest memory and its own backing storage. This is a guest-level decision based on the guest's view of memory.
Swapping generally means moving memory contents to storage when RAM is insufficient. Swapping can occur inside a guest OS, or host-level memory-management actions can occur under ESXi resource pressure. These are different layers and should not be treated as the same event.
A guest can have an allocated virtual address range whose pages are not all actively used. Similarly, a VM's configured capacity does not imply that every byte is continuously active in host RAM. Allocation, usage, mapping, and residency must be considered separately.
Practical vSphere Example
One VM Configured with 8 GB
An administrator configures a VM with 8 GB of memory. The guest operating system detects 8 GB of guest physical memory and makes it available to its kernel and applications.
- An application requests memory from the guest OS.
- The guest OS gives the application guest virtual addresses.
- The guest OS maps the application's active pages to guest physical pages.
- ESXi maps those guest physical pages to locations in host physical memory.
- The processor performs the required translations and checks access permissions.
The VM's 8 GB is therefore a guest-visible capacity. It is not a promise that one exclusive, permanently contiguous 8 GB block of host RAM has been exposed directly to the guest.
Several VMs on One Host
Several VMs may share the host's physical RAM. Each guest has independent memory addresses and an independent operating-system environment. ESXi maintains separate mappings so that a memory access made by one VM cannot be used to address another VM's assigned memory.
This is the foundation of memory-based consolidation: workloads share hardware resources, but each VM retains its own execution and memory environment.
Common Misunderstandings and Troubleshooting
“An 8 GB VM must occupy one contiguous 8 GB block of host RAM.”
The configured 8 GB is the guest-visible memory capacity. ESXi maps guest pages to host resources and does not need to expose a contiguous host-RAM range to the guest.
“Guest physical memory and host physical memory are the same.”
They are different address spaces. The guest uses guest physical addresses, and ESXi maps those addresses to actual host physical memory.
“Virtual memory means every requested byte is immediately in RAM.”
Virtual address-space allocation and physical-memory residency are separate. Demand paging, inactive pages, memory-mapped files, caches, and backing storage can affect where data resides.
“The guest OS knows where its memory is located in the ESXi server.”
The guest sees virtual hardware and manages its own memory abstraction. It normally does not know the host's physical RAM layout. ESXi manages that additional layer transparently.
Administration Perspective
The VM configuration interface is where an administrator assigns the VM's memory capacity. The guest OS then reports and uses that capacity as virtual hardware memory. For practical investigation, the vSphere Client provides host and VM memory views that can help relate configured capacity to observed activity, but those observations should not be confused with the address-translation model itself.
When analyzing memory behavior, first identify the layer being discussed: application virtual memory, guest operating-system memory, guest physical memory, or host physical memory. This avoids interpreting a guest value as a direct measurement of a fixed host-RAM location.
Exam-Relevant Summary
- Physical memory is the actual RAM installed in a computer or ESXi host.
- Virtual memory gives software virtual addresses that are translated to physical memory locations.
- The MMU, page tables, and processor protection mechanisms support address translation.
- A VM contains application virtual addresses, guest virtual memory, and guest physical memory.
- ESXi maps guest physical memory to host physical memory.
- Guest physical addresses are not automatically host physical addresses.
- Configured VM memory is guest-visible capacity, not necessarily actively used memory.
- A guest-visible contiguous memory range does not require contiguous host RAM.
- Guest paging and host-level memory management are separate layers.
- ESXi provides memory isolation so VMs can share a host while remaining separate.
For a concise reference, see Physical and Virtualized Host Memory.