The memory ballooning control inflates and deflates the memory balloon of VMs based on the VMs free memory and the requested maximum balloon size.
To set up the memory ballooning control the maximum ballooning size a VM can reach needs to be set. This can be specified using the command line, as follows:
--balloon-max <Size in MB>
Using a per-VM basis extradata value, as follows:
VBoxManage setextradata <VM-Name> VBoxInternal2/Watchdog/BalloonCtrl/BalloonSizeMax <Size in MB>
Using a global extradata value, as follows:
VBoxManage setextradata global VBoxInternal2/Watchdog/BalloonCtrl/BalloonSizeMax <Size in MB>
If no maximum ballooning size is specified by at least one of the parameters above, no ballooning will be performed at all.
Setting the ballooning increment in MB can be either done using command line, as follows:
--balloon-inc <Size in MB>
Using a global extradata value, as follows:
VBoxManage setextradata global VBoxInternal2/Watchdog/BalloonCtrl/BalloonIncrementMB <Size in MB>
The default ballooning increment is 256 MB if not specified.
The same options apply for a ballooning decrement. Using the command line, as follows:
--balloon-dec <Size in MB>
Using a global extradata value, as follows:
VBoxManage setextradata global VBoxInternal2/Watchdog/BalloonCtrl/BalloonDecrementMB <Size in MB>
The default ballooning decrement is 128 MB if not specified.
The lower limit in MB for a balloon can be defined using the command line, as follows:
--balloon-lower-limit <Size in MB>
Using a global extradata value, as follows:
VBoxManage setextradata global VBoxInternal2/Watchdog/BalloonCtrl/BalloonLowerLimitMB <Size in MB>
The default lower limit is 128 MB if not specified.