Appliance installation tutorial with VirtualBox

One of the fastest and easiest ways to get up and running with a TurnKey Linux appliance is to install it into a VirtualBox Virtual Machine.

The following tutorial provides a step by step walkthrough intended to illustrate to virtualization newbies just how easy it is to setup a TurnKey Linux appliance.

Once you are familiar with the basics, deploying an appliance takes just a couple of minutes, and the result is a turn-key virtual server that is perfect for development and production use.

For exemplary purposes, we use the TurnKey Joomla Appliance, but the process for installing any TurnKey Linux appliance is the same.

New: Appliance installation and usage demo. Best viewed full-screen.

Install VirtualBox

If you haven't done so already, download and install VirtualBox, a free software virtualization program available for Windows, Mac OS X and Linux. It's preferable to use a recent version (2.1+), because networking is easier to setup.

Choose a build format

Appliances are now available in two build formats:

  1. VM image: a ready-to-run VMDK hard disk image with OVF support. Includes a virtualization optimized kernel and VMWare tools.

    This is the fastest way to get up and running. The main disadvantage is that you won't go through the Live CD installer, so if security is a requirement you'll  have to change the default passwords (e.g., root password, MySQL password) yourself.
     
  2. ISO image: an installable Live CD which can be installed in a few minutes almost anywhere: on bare metal and most types of virtual machine.

Option #1: Import VM image

Today, the fastest way to get up and running with VirtualBox is to deploy the VM image using the Appliance Import Wizard:

  1. unzip the VM image
  2. Click File on the menu bar, then select Import Appliance
  3. Click the Choose button, navigate to the directory where you extracted the VM image and select the OVF file.

That's it! After VirtualBox is finished importing the VM image, you will be able to boot your virtual appliance for the first time. Depending on your usage scenario, you may want to tweak the network settings a bit.

Option #2: Install the ISO image

Create a new Virtual Machine

Start VirtualBox and click the New button from the menu. This starts a VM (Virtual Machine) creation wizard.

Give your new VM a name (e.g., TurnKey Joomla) and select Linux Ubuntu as your operating system.

Follow through the VM wizard to completion, allocating at least 256MB RAM for the VM and creating a new Virtual Disk for it with the Virtual Disk Wizard.  Just accept the defaults and a few clicks on Next and you're done.

After exiting from the VM creation wizard, you'll see your new VM in the machine list on the main screen.

Configuring the Virtual Machine

Next you'll need to tweak a few configuration settings for the new VM (e.g., Network, CD image, Boot order). Click the Settings button to start.

Configure boot order

In the General section, click on the Advanced tab and change the boot order so that Hard Disk is before CD/DVD-ROM drive. This way after we install the appliance from the appliance CD image it will boot straight from the virtual Hard Disk.

Note for users with AMD CPUs: if you have an AMD Phenom or Barcelona-level Opteron CPU enable IO APIC here to work around a Linux kernel bug.

Configure network

In the Network section, attach your VM to Host Interface (in the latest versions of VirtualBox this is called a Bridged Adapter). This bridges your VM to the local network your host machine is connected to.  If you have multiple network interface cards on the host, select which of them you want your VM to attach to. If unsure, experiment. You can always change this later.

Configure CDROM boot media

TurnKey appliances are packaged as an installable Live CD image (a bootable ISO).

In the CD/DVD-ROM section, check Mount CD/DVD Drive and the select ISO Image File. Clicking on the right-side folder icon starts the Virtual Media Manager, which allows you to select the TurnKey Joomla ISO image you previously downloaded.

Installation

Back in the VirtualBox main menu, select the TurnKey Joomla Virtual Machine and click on the "Start" button.

Once the VM starts, you will see the boot loader menu. Select the "Install to hard disk" option with the keyboard and press Enter.

This boots TurnKey Joomla straight into the appliance's installer.  Select the default "Guided" partitioning method, which figures out how to partition the virtual hard disk automatically.

Confirm the re-partitioning of the virtual hard disk.

The installer will now quickly install the appliance to the virtual hard disk. Usually this takes about a minute. After the appliance is installed you'll be asked to set the passwords for the system and MySQL root accounts. When installation is complete, restart the appliance.

The system will now reboot from the virtual Hard Disk. When it's finished booting you'll see the Configuration Console's Usage screen.

You can now use a browser to log into your newly installed TurnKey Joomla appliance. Enjoy!