Skip to content

Commit

Permalink
Merge pull request #12450 from agrare/vmware/infra/bz_1384122_vm_memo…
Browse files Browse the repository at this point in the history
…ry_reservation

Disable MemoryReserveLockedToMax
(cherry picked from commit df363f1)

https://bugzilla.redhat.com/show_bug.cgi?id=1496597
  • Loading branch information
blomquisg authored and simaishi committed Sep 27, 2017
1 parent f734671 commit bf6afbd
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,13 @@ def set_cpu_and_memory_allocation(vm)
set_spec_option(rai, :limit, :memory_limit, nil, :to_i)
set_spec_option(rai, :reservation, :memory_reserve, nil, :to_i)
end

# Only explicitly disable #MemoryReservationLockedToMax if the memory reserve
# is less than the total vm memory
if get_option(:memory_reserve).to_i < get_option(:vm_memory).to_i
# memoryReservationLockedToMax was added in vSphere 5.0
vmcs.memoryReservationLockedToMax = false if source.ext_management_system.api_version >= '5.0'
end
end

_log.info("Calling VM reconfiguration")
Expand Down

0 comments on commit bf6afbd

Please sign in to comment.