10 Technical background The contents of this chapter are not required to use VirtualBox successfully. The following is provided as additional information for readers who are more familiar with computer architecture and technology and wish to find out more about how VirtualBox works “under the hood”. 10.1 Where VirtualBox stores its files In VirtualBox, a virtual machine and its settings are described in a virtual machine settings file in XML format. In addition, most virtual machine have one or more virtual hard disks, which are typically represented by disk images (e.g. in VDI format). Where all these files are stored depends on which version of VirtualBox created the machine. 10.1.1 Machines created by VirtualBox version 4.0 or later Starting with version 4.0, by default, each virtual machine has one directory on your host com- puter where all the files of that machine are stored the XML settings file (with a .vbox file extension) and its disk images. By default, this “machine folder” is placed in a common folder called “VirtualBox VMs”, which VirtualBox creates in the current system user’s home directory. The location of this home direc- tory depends on the conventions of the host operating system: On Windows, this is %HOMEDRIVE%%HOMEPATH% typically something like C:\Documents and Settings\Username\. On Mac OS X, this is /Users/username. On Linux and Solaris, this is /home/username. For simplicity, we will abbreviate this as $HOME below. Using that convention, the common folder for all virtual machines is $HOME/VirtualBox VMs. As an example, when you create a virtual machine called “Example VM”, you will find that VirtualBox creates 1. the folder $HOME/VirtualBox VMs/Example VM/ and, in that folder, 2. the settings file Example VM.vbox and 3. the virtual disk image Example VM.vdi. This is the default layout if you use the “Create new virtual machine” wizard as described in chapter 1.7, Creating your first virtual machine, page 16. Once you start working with the VM, additional files will show up: you will find log files in a subfolder called Logs, and once you have taken snapshots, they will appear in a Snapshots subfolder. For each VM, you can change the location of its snapsnots folder in the VM settings. You can change the default machine folder by selecting “Preferences” from the “File” menu in the VirtualBox main window. Then, in the window that pops up, click on the “General” tab. Alternatively, use VBoxManage setproperty machinefolder see chapter 8.25, VBoxManage setproperty, page 125. 153
Previous Page Next Page