VirtualBox log files

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.[123]. 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...

Header

VirtualBox version;
Host OS information;
Host hardware info 

Start 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 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' 

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 

Changing the VM state from 'LOADING' to 'SUSPENDED'

Changing the VM state 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 \*\*\*

Timestamps

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

 - FB

Comments:

Post a Comment:
Comments are closed for this entry.
About

Fat Bloke

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today