Memory is used for many things:
Some of these are constants (e.g. hypervisor code) while some depend on the VM configuration (e.g. domain RAM). Xapi calls the constants “host overhead” and the variables due to VM configuration as “VM overhead”. These overheads are subtracted from free memory on the host when starting, resuming and migrating VMs.
Name | Description |
---|
Name | Description |
---|---|
VM.memory_dynamic_max | Dynamic maximum (bytes) |
VM.memory_dynamic_min | Dynamic minimum (bytes) |
VM.memory_overhead | Virtualization memory overhead (bytes). |
VM.memory_static_max | Statically-set (i.e. absolute) maximum (bytes). The value of this field at VM start time acts as a hard limit of the amount of memory a guest can use. New values only take effect on reboot. |
VM.memory_static_min | Statically-set (i.e. absolute) mininum (bytes). The value of this field indicates the least amount of memory this VM can boot with without crashing. |
VM.memory_target | Dynamically-set memory target (bytes). The value of this field indicates the current target for memory available to this VM. |
host.memory_overhead | Virtualization memory overhead (bytes). |
host_metrics.memory_free | Free host memory (bytes) |
host_metrics.memory_total | Total host memory (bytes) |
Name | Description |
---|---|
VM.assert_can_boot_here | Returns an error if the VM could not boot on this host for some reason |
VM.compute_memory_overhead | Computes the virtualization memory overhead of a VM. |
VM.get_cooperative | Return true if the VM is currently 'co-operative' i.e. is expected to reach a balloon target and actually has done |
VM.maximise_memory | Returns the maximum amount of guest memory which will fit, together with overheads, in the supplied amount of physical memory. If 'exact' is true then an exact calculation is performed using the VM's current settings. If 'exact' is false then a more conservative approximation is used |
VM.set_memory | Set the memory allocation of this VM. Sets all of memory_static_max, memory_dynamic_min, and memory_dynamic_max to the given value, and leaves memory_static_min untouched. |
VM.set_memory_dynamic_max | Set the value of the memory_dynamic_max field |
VM.set_memory_dynamic_min | Set the value of the memory_dynamic_min field |
VM.set_memory_dynamic_range | Set the minimum and maximum amounts of physical memory the VM is allowed to use. |
VM.set_memory_limits | Set the memory limits of this VM. |
VM.set_memory_static_max | Set the value of the memory_static_max field |
VM.set_memory_static_min | Set the value of the memory_static_min field |
VM.set_memory_static_range | Set the static (ie boot-time) range of virtual memory that the VM is allowed to use. |
VM.set_memory_target_live | Set the memory target for a running VM |
VM.wait_memory_target_live | Wait for a running VM to reach its current memory target |
host.compute_free_memory | Computes the amount of free memory on the host. |
host.compute_memory_overhead | Computes the virtualization memory overhead of a host. |