Back to top

Create new Oracle VirtualBox virtual machine

There are some useful tricks and details you need to know if you want to install a virtual machine through VirtualBox without too much hassle. This article illustrates the procedure with screenshots so you can easily follow this guide and get it working on the first try.

I'm installing an older Fedora version (19) in the virtual machine but this applies to any OS you choose. Only the last few steps of actually installing the OS after the virtual machine is up will look different depending on the actual OS you chose to install.

Create virtual machine

Have the OS disk image downloaded in advance so you can complete the installation all the way through once you start the creation process.

Set VM name, Type (Linux) and Version (Distribution)

Choose the type and Version of the OS you want to install:

Create VirtualBox virtual machine

VM Memory size

You can choose the amount of memory according to what is available to you on the host machine and on whether you plan to do memory-intensive tasks on the virtual one:

VirtualBox Memory size

VM Hard drive options

The Hard drive option can be confusing. Unless you understand all the options here and need full control simply choose to create a virtual drive. In the end, it will be a file on the host machine that will act as the HDD storage for the virtual machine.

VirtualBox Hard drive option

As before, unless you know you need something else choose the default VDI (VirtualBox Disk Image):

VirtualBox Hard drive file type

One of the later options will be to choose the size of the virtual hard drive (8 GB was already recommended, although that may not be enough for certain OSes).

If you choose the Dynamically allocated storage, it means that the disk footprint of the virtual hard drive on your host machine will be smaller than the size you set for it. It will grow as you use the virtual machine and more data gets added to it.

In my case, Fedora 19 took around 4.1 GB after the installation, even though I set the drive to over 30 GB.

VirtualBox Storage on physical hard drive Dynamically allocated

After the virtual machine is created you can see its settings in the VirtualBox Manager window:

VirtualBox Manager VM Settings

Choose the OS disk image file under Storage

You can see that the Storage IDE Controller is empty. We need to set it to use the OS disk image file we want to install by going to Settings > Storage > Controller: IDE > Empty and clicking on the disk icon drop-down:

VirtualBox choose Storage OS disk image

In my case the file was Fedora 19 disk image file:

VirtualBox choosen Storage OS disk image

Before starting the virtual machine for the first time and installing the OS you can adjust various useful options in the Settings.

Allow More CPU cores/threads

If your host machine has enough CPU cores you can allow the virtual machine to use more than one, without affecting the host machine performance:

VirtualBox number of Processors (CPUs)

Share Clipboard and Folders between VM and host

If you have VirtualBox Guest Additions installed (on the host machine) some useful options are available, such as copying between the host and the virtual machine:

VirtualBox share clipboard between VM and host

Or sharing files from locations on the host machine:

VirtualBox share files from locations on the host

Start the virtual machine for the first time

VirtualBox Fedora 19 Live start

Install OS to Hard Drive

You're probably doing all this to install the OS:

VirtualBox install Fedora 19 to Hard Drive

The first option is to choose the language:

VirtualBox OS installation language choice

Next comes Keyboard layout:


Choose Automatic Installation destination

You don't have to do any special disk partitioning to use the virtual hard drive created in previous steps:

VirtualBox Installation destination

With Storage set you can Begin installation:

VirtualBox Installation summary

During the installation you can set the root user password and create a regular user (note the passwords you set here, and mind the keyboard layout currently used, it may not be the one set to be used after the installation!):

VirtualBox OS installation

This is what the Create user screen looks like (don't forget to check which keyboard layout is being used, as you may use characters you don't intend to if you're used to them being in a different position in a different layout):

VirtualBox Fedora Create user

When the installation is complete you see this screen and the message to reboot, which is usually done when installing an OS the usual way, but in VirtualBox we need to do some more steps before starting the new VM again, the first time after the installation:

VirtualBox Installation complete

Shutdown to adjust Boot Order

The system now needs to shut down, not reboot, because we need to adjust some virtual machine settings before we boot it again.

To shut it down click on the Live System User drop-down in the top right corner and choose Power Off:

Power Off Gnome

We have installed OS on the virtual drive so we don't need the disk image any more:

VirtualBox Remove disk image from virtual drive

If you choose to keep it the disk image just in case you'll have to keep it in the same location, or update the location of the file if you move it.

Boot Priority Hard Disk

Move the Hard Disk option on top, and you can turn off the CD/DVD option:

VirtualBox System Boot Order

Start the VM for the first time after OS installation

When you start the VM for the first time after the OS installation you will see whatever the OS designers programmed you to see. In my case on Fedora 19 it was to show Gnome 3 intro video, in the language of your choice:

VirtualBox Fedora 19 Gnome Welcome video

After that you can enjoy your new virtual but very real OS the usual way:

VirtualBox Fedora 19

How to install #Linux on #Oracle #VirtualBox #VirtualMachineTweet this

Need any help with this or any other similar problem? Contact me for a friendly chat, share about your project and see how I can help you solve any issues you might have.
What did you think of this article?