10 Technical background 10.1.2 Machines created by VirtualBox versions before 4.0 If you have upgraded to VirtualBox 4.0 from an earlier version of VirtualBox, you probably have settings files and disks in the earlier file system layout. Before version 4.0, VirtualBox separated the machine settings files from virtual disk images. The machine settings files had an .xml file extension and resided in a folder called “Machines” under the global VirtualBox configuration directory (see the next section). So, for example, on Linux, this was the hidden $HOME/.VirtualBox/Machines directory. The default hard disks folder was called “HardDisks” and resided in the .VirtualBox folder as well. Both locations could be changed by the user in the global preferences. (The concept of a “default hard disk folder” has been abandoned with VirtualBox 4.0, since disk images now reside in each machine’s folder by default.) The old layout had several severe disadvantages. 1. It was very difficult to move a virtual machine from one host to another because the files involved did not reside in the same folder. In addition, the virtual media of all machines were registered with a global registry in the central VirtualBox settings file ($HOME/.VirtualBox/VirtualBox.xml). To move a machine to another host, it was therefore not enough to move the XML settings file and the disk images (which were in different locations), but the hard disk entries from the global media registry XML had to be meticulously copied as well, which was close to impossible if the machine had snapshots and therefore differencing images. 2. Storing virtual disk images, which can grow very large, under the hidden .VirtualBox directory (at least on Linux and Solaris hosts) made many users wonder where their disk space had gone. Whereas new VMs created with VirtualBox 4.0 or later will conform to the new layout, for maximum compatibility, old VMs are not converted to the new layout. Otherwise machine set- tings would be irrevocably broken if a user downgraded from 4.0 back to an older version of VirtualBox. 10.1.3 Global configuration data In addition to the files of the virtual machines, VirtualBox maintains global configuration data. On Windows, Linux and Solaris, this is in $HOME/.VirtualBox (which makes it hidden on Linux and Solaris), whereas on a Mac this resides in $HOME/Library/VirtualBox. VirtualBox creates this configuration directory automatically if necessary. Optionally, you can supply an alternate configuration directory by setting the VBOX_USER_HOME environment vari- able. (Since the global VirtualBox.xml settings file points to all other configuration files, this allows for switching between several VirtualBox configurations entirely.) Most importantly, in this directory, VirtualBox stores its global settings file, another XML file called VirtualBox.xml. This includes global configuration options and the list of registered virtual machines with pointers to their XML settings files. (Neither the location of this file nor its directory has changed with VirtualBox 4.0.) Before VirtualBox 4.0, all virtual media (disk image files) were also contained in a global registry in this settings file. For compatibility, this media registry still exists if you upgrade VirtualBox and there are media from machines which were created with a version before 4.0. If you have no such machines, then there will be no global media registry with VirtualBox 4.0, each machine XML file has its own media registry. Also before VirtualBox 4.0, the default “Machines” folder and the default “HardDisks” folder resided under the VirtualBox configuration directory (e.g. $HOME/.VirtualBox/Machines on Linux). If you are upgrading from a VirtualBox version before 4.0, files in these directories are not automatically moved in order not to break backwards compatibility. 154
Previous Page Next Page