One of the key tools you can use to diagnose any issues with VirtualBox is the VirtualBox log file for a vm session. VirtualBox always creates a log file which reflects the lifecycle of the virtual machine.
VirtualBox log files live in a per-user/per-vm standard directory that will be something like:
The log files are rotated such that the most recent is always called vbox.log and older ones are vbox.log.. These log files contain lots of information about the capabilities of both the host and the guest vm and should be provided whenever reporting issues with VirtualBox.
The layout of the logfile varies based on whether you are resuming or starting initially but roughly follows this pattern:
|Header||VirtualBox version, Host OS information and Host Hardware information||Beginning of file|
|CFGM Dump||A listing of the configuration information of guest (guest virtual hardware)||\*\*\* CFGM dump \*\*\*|
|Host Information (CPUID dump)||Low level CPU information of Host and what will be reflected to Guest||\*\*\* CPUID dump \*\*\*|
|Creating the VM||Information about the creation of the virtual machine environment||\*\*\* End of CPUID dump \*\*\*|
|Powering on or Loading from saved state||When powering on you'll see very little in the logs at this stage. If loading from a saved state, information from the Saved State Manager about matching previous state to current environment.||Changing the VM state from 'CREATED' to 'LOADING'|
|Resuming/Running||Once the saved state is loaded, or the vm is booted, the guest code is executed.||Changing the VM state from 'POWERING_ON' to 'RUNNING' or from 'LOADING' to 'RESUMING' or from 'SUSPENDED' to 'RESUMING'|
|Guest lifetime||This part of the log contains entries concerning the lifetime of the Guest.||Changing the VM state from 'RESUMING' to 'RUNNING'|
|Powering off or suspending||A dump of the guest state at the time the vm was powered off.||\*\*\* Guest state at power off \*\*\*|
|Statistics||The statistics collected during the session are dumped out.||\*\*\* Statistics \*\*\*|
One important thing to consider, on VirtualBox logs, is the default timestamp format:
|00:00:01.817 VRDP: TCP server listening on port 3389.|
This is in the format HH:MM:SS.ms and is relative to the start of the vm. If you prefer to also have "wall clock time" you can set the environment variable before starting the vm:
|export VBOX_RELEASE_LOG_FLAGS=time; VBoxManage startvm <vm-name>|
|set VBOX_RELEASE_LOG_FLAGS=time; VBoxManage.exe startvm <vm-name>|
Starting from VirtualBox 5.1 release a further enhancement has been introduced while managing VirtualBox logs: VBoxBugReport.
Thanks to this utility you have the ability to collect all the logs into one unique output file; options available are: