By default, the mouse is captured if the user clicks on the guest window and the guest expects relative mouse coordinates at this time. This happens if the pointing device is configured as PS/2 mouse and the guest has not yet started the Oracle VM VirtualBox Guest Additions. For instance, the guest is booting or the Guest Additions are not installed, or if the pointing device is configured as a USB tablet but the guest has no USB driver loaded yet. Once the Guest Additions become active or the USB guest driver is started, the mouse capture is automatically released.
The default behavior is sometimes not desired. Therefore it can be configured as follows:
VBoxManage setextradataVM-name GUI/MouseCapturePolicymode
The default behavior as described above.
The mouse is only captured if the Host Key is toggled.
The mouse is never captured, also not by toggling the Host Key
This is a per-VM setting.