1 | <?xml version='1.0' encoding='UTF-8'?>
|
---|
2 | <!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
|
---|
3 | <topic xml:lang="en-us" id="vboxconfigdata-machine-folder">
|
---|
4 | <title>The Machine Folder</title>
|
---|
5 |
|
---|
6 | <body>
|
---|
7 | <p>
|
---|
8 | By default, each virtual machine has a directory on your host
|
---|
9 | computer where all the files of that machine are stored: the XML
|
---|
10 | settings file, with a <filepath>.vbox</filepath> file extension,
|
---|
11 | and its disk images. This is called the <i>machine
|
---|
12 | folder</i>.
|
---|
13 | </p>
|
---|
14 | <p>
|
---|
15 | By default, this machine folder is located in a common folder
|
---|
16 | called <filepath>VirtualBox VMs</filepath>, which <ph conkeyref="vbox-conkeyref-phrases/product-name"/>
|
---|
17 | creates in the current system user's home directory. The
|
---|
18 | location of this home directory depends on the conventions of
|
---|
19 | the host operating system, as follows:
|
---|
20 | </p>
|
---|
21 | <ul>
|
---|
22 | <li>
|
---|
23 | <p>
|
---|
24 | On Windows, this is the location returned by the
|
---|
25 | <codeph>SHGetFolderPath</codeph> function of the Windows
|
---|
26 | system library Shell32.dll, asking for the user profile. A
|
---|
27 | typical location is
|
---|
28 | <filepath>C:\Users\<varname>username</varname>
|
---|
29 | </filepath>.
|
---|
30 | </p>
|
---|
31 | </li>
|
---|
32 | <li>
|
---|
33 | <p>
|
---|
34 | On Linux, macOS, and Oracle Solaris, this is generally
|
---|
35 | taken from the environment variable
|
---|
36 | <filepath>$HOME</filepath>, except for the user
|
---|
37 | <codeph>root</codeph> where it is taken from the account
|
---|
38 | database. This is a workaround for the frequent trouble
|
---|
39 | caused by users using <ph conkeyref="vbox-conkeyref-phrases/product-name"/> in combination with the
|
---|
40 | tool <userinput>sudo</userinput>, which by default does not
|
---|
41 | reset the environment variable <filepath>$HOME</filepath>.
|
---|
42 | </p>
|
---|
43 | <p>
|
---|
44 | A typical location on Linux and Oracle Solaris is
|
---|
45 | <filepath>/home/<varname>username</varname>
|
---|
46 | </filepath>
|
---|
47 | and on macOS is
|
---|
48 | <filepath>/Users/<varname>username</varname>
|
---|
49 | </filepath>.
|
---|
50 | </p>
|
---|
51 | </li>
|
---|
52 | </ul>
|
---|
53 | <p>
|
---|
54 | For simplicity, we abbreviate the location of the home directory
|
---|
55 | as <filepath>$HOME</filepath>. Using that convention, the common
|
---|
56 | folder for all virtual machines is <filepath>$HOME/VirtualBox
|
---|
57 | VMs</filepath>.
|
---|
58 | </p>
|
---|
59 | <p>
|
---|
60 | As an example, when you create a virtual machine called "Example
|
---|
61 | VM", <ph conkeyref="vbox-conkeyref-phrases/product-name"/> creates the following:
|
---|
62 | </p>
|
---|
63 | <ul>
|
---|
64 | <li>
|
---|
65 | <p>
|
---|
66 | A machine folder: <filepath>$HOME/VirtualBox VMs/Example
|
---|
67 | VM/</filepath>
|
---|
68 | </p>
|
---|
69 | </li>
|
---|
70 | <li>
|
---|
71 | <p>
|
---|
72 | In the machine folder, a settings file: <filepath>Example
|
---|
73 | VM.vbox</filepath>
|
---|
74 | </p>
|
---|
75 | </li>
|
---|
76 | <li>
|
---|
77 | <p>
|
---|
78 | In the machine folder, a virtual disk image:
|
---|
79 | <filepath>Example VM.vdi</filepath>.
|
---|
80 | </p>
|
---|
81 | </li>
|
---|
82 | </ul>
|
---|
83 | <p>
|
---|
84 | This is the default layout if you use the
|
---|
85 | <b outputclass="bold">Create New Virtual Machine</b>
|
---|
86 | wizard described in <xref href="create-vm-wizard.dita">Creating Your First Virtual Machine</xref>. Once you
|
---|
87 | start working with the VM, additional files are added. Log files
|
---|
88 | are in a subfolder called <filepath>Logs</filepath>, and if you
|
---|
89 | have taken snapshots, they are in a
|
---|
90 | <filepath>Snapshots</filepath> subfolder. For each VM, you can
|
---|
91 | change the location of its snapshots folder in the VM settings.
|
---|
92 | </p>
|
---|
93 | <p>
|
---|
94 | You can change the default machine folder by selecting <b outputclass="bold">Preferences</b>
|
---|
95 | from the <b outputclass="bold">File</b> menu in the <ph conkeyref="vbox-conkeyref-phrases/product-name"/> main window. Then, in
|
---|
96 | the displayed window, click on the <b outputclass="bold">General</b> tab. Alternatively, use
|
---|
97 | the <userinput>VBoxManage setproperty machinefolder</userinput> command. See
|
---|
98 | <xref href="vboxmanage-setproperty.dita">VBoxManage setproperty</xref>.
|
---|
99 | </p>
|
---|
100 | </body>
|
---|
101 |
|
---|
102 | </topic>
|
---|