>

VM Definition file is a file of XML format, it descibes the properties of a VM, each time we create a VM in VirtualBox, a VM definition file is generated automatically.

VirtualBox stores the Machine Definition File for each VM in C:\Users\user_name\VirtualBox VMs directory, each VM have a separate sub directory.
For example, for a VM with name “Centos7”, its definition file should be C:\Users\user_name\VirtualBox VMs\Centos7\Centos7.vbox.

The machine definition file is recognized by VirtualBox, this means we can double click it and VirtualBox will load the cooresponding VM (guest OS). The config file is
essentially a xml formatted file which is generated automatically by the VirtualBox when we create the VM.

When we create a VM, VirtualBox will need to create a virtual disk (an image file, e.g. VDI, vmdk, vhd, hdd) with a specified capacity residing on the physical disk of the host machine. The disk image file can be fixed-size or dynamically-allocated on creation, and a machine definition file will be generated to describe the configurations of this image file.

We can duplicate hard disk image files on the same host to quickly produce a second virtual machine with the same operating system setup. However, you should only make copies of virtual disk images using the utility supplied with VirtualBox (see VirtualBox User Manual chapter 8.24, VBoxManage clonemedium, page 158 for more details. This is because VirtualBox assigns a unique identity number (UUID) to each disk image, which is also stored inside the image, and VirtualBox will refuse to work with two images that use the same number.

Take the Centos7.vbox as an example.

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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<?xml version="1.0"?>
<!--
** DO NOT EDIT THIS FILE.
** If you make changes to this file while any VirtualBox related application
** is running, your changes will be overwritten later, without taking effect.
** Use VBoxManage or the VirtualBox Manager GUI to make changes.
-->
<VirtualBox xmlns="http://www.virtualbox.org/" version="1.15-windows">
<Machine uuid="{7d0da8b6-a004-4adf-aecc-0870e4451b73}" name="Centos7" OSType="RedHat_64" snapshotFolder="Snapshots" lastStateChange="2016-07-24T07:43:31Z" aborted="true">
<MediaRegistry>
<HardDisks>
<HardDisk uuid="{b778f3b3-e717-4a52-a030-9e361b2c8bfc}" location="D:/Program Files/VDIs/Centos7.vdi" format="VDI" type="Normal"/>
</HardDisks>
<DVDImages>
<Image uuid="{15367d43-758d-454e-923f-817e85c9d554}" location="D:/Program Files/CentOS-7-x86_64-Minimal.iso"/>
</DVDImages>
</MediaRegistry>
<ExtraData>
<ExtraDataItem name="GUI/LastCloseAction" value="Detach"/>
<ExtraDataItem name="GUI/LastNormalWindowPosition" value="8,30,720,445"/>
<ExtraDataItem name="GUI/RestrictedRuntimeDevicesMenuActions" value="HardDrives"/>
<ExtraDataItem name="GUI/RestrictedRuntimeMachineMenuActions" value="SaveState,PowerOff"/>
<ExtraDataItem name="GUI/StatusBar/IndicatorOrder" value="HardDisks,OpticalDisks,FloppyDisks,Network,USB,SharedFolders,Display,VideoCapture,Features,Mouse,Keyboard"/>
</ExtraData>
<Hardware>
<CPU>
<PAE enabled="true"/>
<LongMode enabled="true"/>
<HardwareVirtExLargePages enabled="true"/>
</CPU>
<Memory RAMSize="1694"/>
<Paravirt provider="Default"/>
<Display VRAMSize="12"/>
<RemoteDisplay enabled="false"/>
<BIOS>
<IOAPIC enabled="true"/>
</BIOS>
<USB>
<Controllers>
<Controller name="OHCI" type="OHCI"/>
</Controllers>
</USB>
<Network>
<Adapter slot="0" enabled="true" MACAddress="0800274DAC52" cable="true" type="82540EM">
<DisabledModes>
<InternalNetwork name="intnet"/>
<NATNetwork name="NatNetwork"/>
</DisabledModes>
<NAT>
<Forwarding name="Rule 1" proto="1" hostip="192.168.56.1" hostport="3088" guestip="10.0.2.15" guestport="22"/>
</NAT>
</Adapter>
<Adapter slot="1" enabled="true" MACAddress="080027827973" cable="true" type="82545EM">
<DisabledModes>
<InternalNetwork name="intnet"/>
<NATNetwork name="NatNetwork"/>
</DisabledModes>
<HostOnlyInterface name="VirtualBox Host-Only Ethernet Adapter"/>
</Adapter>
<Adapter slot="2" MACAddress="080027B6752A" cable="true" type="82545EM">
<DisabledModes>
<NATNetwork name="NatNetwork"/>
</DisabledModes>
<InternalNetwork name="intnet"/>
</Adapter>
<Adapter slot="3" MACAddress="0800272C7EC8" cable="true" type="82540EM"/>
<Adapter slot="4" MACAddress="080027A6C18A" cable="true" type="82540EM"/>
<Adapter slot="5" MACAddress="0800276B631C" cable="true" type="82540EM"/>
<Adapter slot="6" MACAddress="0800276CB44B" cable="true" type="82540EM"/>
<Adapter slot="7" MACAddress="080027404653" cable="true" type="82540EM"/>
</Network>
<LPT>
<Port slot="1" enabled="false" IOBase="0x378" IRQ="7"/>
</LPT>
<AudioAdapter codec="AD1980" driver="DirectSound" enabled="true"/>
<RTC localOrUTC="UTC"/>
<SharedFolders>
<SharedFolder name="god" hostPath="E:\god" writable="true" autoMount="true"/>
</SharedFolders>
<GuestProperties>
<GuestProperty name="/VirtualBox/HostInfo/GUI/LanguageID" value="C" timestamp="1459514481653377400" flags=""/>
</GuestProperties>
</Hardware>
<StorageControllers>
<StorageController name="IDE" type="PIIX4" PortCount="2" useHostIOCache="true" Bootable="true">
<AttachedDevice passthrough="false" type="DVD" hotpluggable="false" port="1" device="0">
<Image uuid="{02250ae0-f7a2-4435-a404-caf89a1583f2}"/>
</AttachedDevice>
</StorageController>
<StorageController name="SATA" type="AHCI" PortCount="1" useHostIOCache="false" Bootable="true" IDE0MasterEmulationPort="0" IDE0SlaveEmulationPort="1" IDE1MasterEmulationPort="2" IDE1SlaveEmulationPort="3">
<AttachedDevice type="HardDisk" hotpluggable="false" port="0" device="0">
<Image uuid="{b778f3b3-e717-4a52-a030-9e361b2c8bfc}"/>
</AttachedDevice>
</StorageController>
</StorageControllers>
</Machine>
</VirtualBox>