# vm.get_available_memory

Get the current maximum amount of available memory to be allocated for VMs.

In case of overcommit being true, calculations are done in the following manner: 1. If a VM has requested 10G but is only consuming 5G, only 5G will be counted 2. System will consider shrinkable ZFS ARC as free memory ( shrinkable ZFS ARC is current ZFS ARC minus ZFS ARC minimum )

In case of overcommit being false, calculations are done in the following manner: 1. Complete VM requested memory will be taken into account regardless of how much actual physical memory the VM is consuming 2. System will not consider shrinkable ZFS ARC as free memory

Memory is of course a very “volatile” resource, values may change abruptly between a second but I deem it good enough to give the user a clue about how much memory is available at the current moment and if a VM should be allowed to be launched.

Type: object

##

Type: array
No Additional Items

#### Tuple Validation

##### Parameter 1: overcommit

#### overcommit

Type: boolean Default: false

Whether to include overcommitted memory in available memory calculation.

##

#### Result

Type: integer

Available memory for virtual machines in bytes.

Required roles: VM_READ