vsphere/virtual_machine_config_structure.go
func getMemoryReservationLockedToMax(d *schema.ResourceData) *bool {
	if d.Get("memory_reservation").(int) != d.Get("memory").(int) {
		return structure.BoolPtr(false)
	}
	return nil
}
func getMemoryReservationLockedToMax(d *schema.ResourceData) *bool {
	if d.Get("memory_reservation").(int) != d.Get("memory").(int) {
		return structure.BoolPtr(false)
	}
	return nil
}
// getMemoryReservationLockedToMax determines if the memory_reservation is not
// set to be equal to memory. If they are not equal, then the memory
// reservation needs to be unlocked from the maximum. Rather than supporting
// the locking reservation to max option, we can set memory_reservation to
// memory in the configuration. Not supporting the option causes problems when
// cloning from a template that has it enabled. The solution is to set it to
// false when needed, but leave it alone when the change is not necessary.