VirtualBox log files
By Fat Bloke on Jul 27, 2010
OK, I have to admit that this entry is one for the connoisseur, but some of these blogs entries double up as my extended memory, so before I forget...
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.
Log File Location
VirtualBox log files live in a per-user/per-vm directory that will be something like:
- On Windows, this is %HOMEDRIVE%%HOMEPATH%\\.VirtualBox\\Machines\\<vm name>\\Logs; typically some- thing like C:\\Documents and Settings\\Username\\.VirtualBox\\Machines\\<vm name>\\Logs\\vbox.log
- On Mac OS X, this is $HOME/Library/VirtualBox/Machines/<vm name>/Logs
- On Unix-like systems (Linux, Solaris), this is $HOME/.VirtualBox/Machines/<vm name>/Logs
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.
Log File Format
The layout of the logfile varies based on whether you are resuming or starting initially but roughly follows this pattern:
Section Content Starts around...
Host OS information;
Host hardware info
Start of file
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 a 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 'POWERING_ON'
Changing the VM state from 'CREATED' to 'LOADING'
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'
orChanging the VM state from 'LOADING' to 'SUSPENDED'
Changing the VM state from 'SUSPENDED' to 'RESUMING'.
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 \*\*\*
The statistics collected during the session are dumped out.
\*\*\* Statistics \*\*\*
One final tip when you're looking to make sense of log files: each line begins with a timestamp. e.g.
00:00:01.817 VRDP: TCP server listening on port 3389.
This is in the format HH:MM:SS.ms and is usually relative to the start of the vm. If you prefer wall clock time you can set the environment variable before starting the vm:
export VBOX_RELEASE_LOG_FLAGS=time; VBoxManage startvm Android