Create a Development Environment in VirtualBox

Posted by Justin O'Brien, David Harding

Creating a development environment with VirtualBox

For Mac and Windows, go to the VirtualBox Download page and download the version for your system. Linux users can follow these instructions instead.

Downloading Virtual

Open the directory where you downloaded the VirtualBox install file and double-click on it. Then click on the indicated icon to install:

First VirtualBox screen

Click Continue to scan your system for what components are needed:

Scan for components

Click Continue again to start the installer:

Start the installer

Either accept the default install location by clicking Install or choose another location on your disk drive and then click Install.

Choose the install location

If necessary, enter your user password to allow VirtualBox to install itself:

Enter your user password

VirtualBox will begin installing. This may take a few minutes:

Installing VirtualBox

VirtualBox is now installed. Click the Close button:

Install complete

Creating an Ubuntu Virtual Machine (VM)

Go to your Applications menu, find the VirtualBox listing, and double-click it:

Double-click VirtualBox listing

That should start VirtualBox. Now click the New button in the top-left corner.

VirtualBox main screen

On the Operating System screen, fill in the following details:

  • Name: EESTI-VB (or you may use any name you want)

  • Type: Linux

  • Version: Ubuntu (64-bit)

Then click the Continue button.

Enter operating system details

On the Memory size screen, ensure that you allocate at least 512 MB of memory. If VirtualBox recommends a higher amount than that (here it recommends 768), you should use its recommendation.

Then press the Continue button again.

Memory size selection

On the Hard disk screen, select Create a virtual hard disk now. Press the Create button to initialize your disk image.

Hard disk selection

On the Hard disk file type screen, select VDI (VirtualBox Disk Image). Then click Continue to move forward.

Hard disk file type selection

On the Storage on physical hard disk, you may choose either option; the default option is recommended. Click Continue to go to the next step.

Storage on physical hard disk selection

On the File location and size screen, assign at least 8 GB to the image. You may assign more if you want, but none of the tutorials on currently require more than 8 GB.

Press the Create button to complete creation of the VM. This may take a few minutes, especially if you chose to create a fixed-size disk image.

Create VM

Installing Ubuntu

Download Ubuntu 14.04 (Trusty Tahr)..

After you've downloaded the above Ubuntu ISO file, return to VirtualBox and click the green arrow on the toolbar that says Start

Starting the VM

This will prompt you to select a file to use as a virtual CDROM. Click the folder icon to open the file picker:

Opening the file picker

Browse to where you downloaded the Ubuntu ISO, click on it, and click Open.

Choosing an ISO for the VM

Then click the Start button to start the Ubuntu installer within VirtualBox

Start the Ubuntu installer

Note: when you click your mouse into VirtualBox, it captures it. In order to get it out of VirtualBox, you will need to press the "host" key:

  • Windows: Right Ctrl key
  • Linux: Right Ctrl key
  • Mac: Left Command key

On the first screen, select English as the language. (We recommend this even if English is not your preferred language so that all of the following screenshots match what you actually see.)

Choose language, part 1

Choose Install Ubuntu Server to begin the installation procedure:

Main options screen

Choose English again as the language to use:

Choose language, part 2

When asked whether you want your keyboard layout automatically detected, choose Yes. This is prompt you to type some characters, which it will use to configure your keyboard layout correctly.

Keyboard layout prompt

After your keyboard layout is configured, select Continue.

Continuing after keyboard layout detection

When prompted for a hostname, you can use the default Ubuntu. When prompted for a domain name, you can use the default blank result.

Hostname prompt

When prompted for a username, enter test for both the Full name and the username.

Username prompt

When asked whether to encrypt your home directory, choose No (it doesn't offer any additional security on a virtualized system):

Encrypt home directory

Your timezone should be automatically configured. If it is correct, choose Yes; if not, choose No and enter your current location.

Timezone detection

You may see the following screen if your timezone doesn't match the language settings you chose earlier. If you do see the following screen, we recommend that you choose the United States locale in order to continue with this tutorial.

Locale chooser

On the partitioning screen, choose the default which is Guided -- Use entire disk and setup LVM. Since you're doing this inside a virtual machine, there's no risk to you computer's real hard drive.

Partitioning screen

Choose the default disk selection (you may only have one option here):

Disk options screen

On the review screen, choose Yes to make the changes.

Approve changes screen

When prompted for how much disk space to use, choose the default (all of it):

Disk space prompt

On the second review screen, choose Yes to make the changes.

Another approve changes screen

On the proxy configuration screen, enter your HTTP proxy if you have one (some schools and businesses have a proxy); otherwise, leave the field blank and continue.

HTTP Proxy configuration

When asked about security updates, we suggest choosing Install security updates automatically.

Security updates prompt

When prompted whether you want to install any software automatically, select Continue without making any choices.

Software packages prompt

When prompted whether you want to install the Grub bootloader, choose Yes. (This only affects the virtual disk in your virtual system, not your real hard disk.)

Grub install prompt

Finally, choose Continue to reboot your virtual system. After a few moments this should shutdown VirtualBox.

Booting into Ubuntu

From the VirtualBox main screen, boot into Ubuntu again. This time, it should take you to the login prompt. Here you can enter your username (test) and whatever password you provided earlier.

Login screen

Then follow the instructions in Introduction to 21 to install 21.