After upgrading to ESXi 6.5, many users (myself included) started encountering this specific error when attempting PCI passthrough:
Failed - Invalid memory setting: memory reservation (sched.mem.min) should be equal to memsize(2048)
This occurs when trying to pass through specific hardware like Intel Cougar Point SATA controllers, particularly on Supermicro X9SCL-F motherboards. The VM would refuse to boot with the PCI device attached, despite functioning perfectly without passthrough.
Before finding the solution, I tried several unsuccessful approaches:
- Adjusting VM memory allocation up and down
- Manual memory reservation edits in the .vmx file
- Tweaking latency sensitivity settings
- Upgrading to ESXi 6.5a (Build 4887370)
Here's what actually works in ESXi 6.5's HTML5 interface:
- Navigate to the VM settings and click Edit
- Locate the small arrow under Memory settings to expand advanced options
- Set the Reservation value to exactly match the allocated memory (e.g., 2048MB reservation for 2048MB allocation)
- Save changes - the VM should now boot with PCI passthrough enabled
Unlike earlier ESXi versions, 6.5 enforces stricter memory management for devices using DMA (Direct Memory Access). The reservation requirement ensures:
- Contiguous memory blocks for PCI device DMA operations
- Prevention of memory ballooning during device initialization
- Stable addressing for device registers
For administrators managing multiple VMs, here's a PowerCLI script to apply this setting:
# Connect to ESXi host
Connect-VIServer -Server esxi-host.example.com
# Get target VM
$vm = Get-VM -Name "MyPassthroughVM"
# Set memory reservation to match allocation
$spec = New-Object VMware.Vim.VirtualMachineConfigSpec
$spec.memoryReservationMB = $vm.MemoryMB
$vm.ExtensionData.ReconfigVM($spec)
If issues persist after applying the reservation:
- Verify IOMMU groups aren't conflicting (check
lspci -nn
output) - Ensure the PCI device isn't bound to any host drivers
- Confirm BIOS settings enable VT-d/AMD-Vi properly
- Check
/var/log/vmkernel.log
for DMA-related errors
This solution has proven effective across multiple hardware configurations using Cougar Point and other PCIe controllers. The key is remembering that ESXi 6.5+ requires explicit memory reservations for reliable PCI passthrough operation.
When working with PCI passthrough on ESXi 6.5 without vSphere, many admins encounter the frustrating boot error: Failed - Invalid memory setting: memory reservation (sched.mem.min) should be equal to memsize(2048)
. This typically occurs when attempting to migrate PCI devices between VMs or after ESXi upgrades.
The problem manifests when:
- Moving passed-through devices to new VMs
- Upgrading from earlier ESXi versions
- Using specific hardware combinations (like the Cougar Point SATA controller)
VMs boot normally without passthrough but fail with the memory reservation error when PCI devices are attached.
ESXi 6.5 enforces stricter memory management for PCI passthrough:
- Requires exact memory reservation matching allocation
- HTML5 interface changes hid the reservation setting
- Latency sensitivity settings don't affect this requirement
The error occurs because the hypervisor can't guarantee DMA memory access for the passed-through device without proper reservation.
Here's the working procedure to configure memory reservation:
1. Select VM → Edit Settings 2. Expand memory options (click down arrow below memory allocation) 3. Set Reservation to match Memory Size value exactly Example: If Memory = 2048MB → Reservation = 2048 4. Save configuration
Important Notes:
- Memory locking isn't required (unlike some documentation suggests)
- Build 4887370 (6.5a) still exhibits this behavior
- Works for both existing and new VMs
For administrators managing multiple VMs, here's a PowerCLI script to automate the fix:
# Connect to ESXi host Connect-VIServer -Server esxi01.example.com -User root -Password 'yourpassword' # Get target VM and set memory reservation $vm = Get-VM -Name "PassthroughVM" $memoryMB = $vm.MemoryMB $spec = New-Object VMware.Vim.VirtualMachineConfigSpec $spec.memoryReservation = $memoryMB # Apply changes $vm.ExtensionData.ReconfigVM($spec)
For environments where GUI access isn't available, you can directly modify the .vmx file:
sched.mem.min = "2048" mem.reservation = "2048"
Remember to refresh the VM configuration after editing:
vim-cmd vmsvc/reload <vmid>
The reservation ensures:
- Contiguous physical memory allocation for DMA operations
- Memory won't be ballooned or swapped
- Stable addressing for PCI device registers
Without this, ESXi can't guarantee the memory consistency needed for passthrough devices.