Virtual Machine full configuration
2 minute read
Converting Image
To use virtual box
you will need a .vdi
file. If you have a .img
or compressed .img.xz
you will need to convert these files using the following commands.
Ubuntu
-
Uncompress the
.img.xz
by running the following command in the folder the.img
file is located:unxz -k -v yourfile.xz`
-
Convert the
.img
file to a.vdi
file by running the following command in the folder the.img
file is located:VBoxManage convertfromraw yourfile.img yourfile.vdi
Windows
-
Uncompress the
.img.xz
by using an appropriate archiver such as 7-Zip. -
Convert the
.img
file to a.vdi
file by running the following command in the folder the.img
file is located:C:\"Program Files"\Oracle\VirtualBox\VBoxManage convertfromraw yourfile.img yourfile.vdi
Setting up the Virtual Machine
Setting up the virtual machine has to be done using the folowing steps:
-
Open
VirtualBox
and click onNew
. -
In the
Create Virtual Machine
pop-up the following settings have to be selected.-
Name: desired name
-
Machine Folder: desired folder
-
Type: Linux
-
Version: Linux 2.6/3.x/4.x(64-bit)
-
-
Click
Next
. -
Set the memory size to
8000 MB
and clickNext
. -
select the
Use an existing virtual hard disk file
and click on the folder icon. -
Click the
Add
icon and browse to the desired.vdi
file. -
Click
Choose
. -
Click
Create
.A virtual machine is created. Now the Network has to be configured.
-
Click
File
and go toHost Network Manager
. -
In the
Host Network Manager
fill in the settings as following.-
Disable the DHCP Server uncheck the box
-
IPv4 Address: 192.168.2.1
-
Network Mask: 255.255.255.0
-
Note: Linux users have to add/adjust the networks.conf
file in the /etc/vbox
directory. This file should contain the following line:
cd /ect/vbox
sudo nano networks.conf
* 192.168.2.0/24
-
Close the
Host Network Manager
.The network manager is now configured. Now the system settings have to be checked.
-
click on
settings
. -
In
System
under theMotherboard
tab make sure theEnable EFI
box is checked. -
In
System
under theMotherboard
tab make sure thatProcessor(s)
is set to 4 CPU’s. -
In
Network
under theAdapter1
tab setAttached to
toHost-only Adapter
. -
Click
OK
The virtual machine has now been set up.