Build a VirtualBox Virtual Machine

Originally developed by Sun, Oracle VirtualBox is an open source virtualization product for x86 and AMD64/Intel64 hardware. VirtualBox currently runs on Windows, Linux, Macintosh and OpenSolaris host operating systems. Because it is free, open source and stable, VirtualBox is a viable choice for desktop development environments or low cost enterprise server implementations.

Before You Begin

Download and install the most current version of VirtualBox. Version 3.1.8 was used for this tutorial. It would be helpful to review the user manual before completing this tutorial. At minimum, take a look at the section on creating your first virtual machine to become familiar with the process. The manual will also help with performance tuning and optimization tasks.

To install the operating system, you will either need to burn the Ubuntu Server ISO image to a physical disc or mount the ISO image. Daemon Tools Lite is free software that can be used to mount ISO images and make them available to your VM.

Instructions

  1. Launch the VirtualBox application and click "New" to launch the new VM wizard.
  2. Enter a meaningful name for the VM (e.g. Drupal Dev Server).
  3. Select "Linux" as the operating system and "Ubuntu (64 bit)" as the version.
  4. Set the amount of RAM to allocate to the VM. Your selection here will be determined by your available resources and use case. 1,024MB should be adequate for a development environment on a host system with 4GB or more of available RAM.
  5. Select to create a new virtual hard disk and make it the boot hard disk (selected by default). This will automatically launch with "Create New Virtual Disk Wizard"
  6. Select dynamic or fixed-size storage. Again, this will be determined by your resources and use case, but it is recommended to go with fixed-size storage for production use.
  7. Select a name, location and size for the virtual disk file. It is recommended that you store this file on a secondary drive separate from the host OS for improved performance. The size of the drive will be determined by your requirements, but the default of 8GB should be adequate for most development environments.
  8. Click "Finish" to create the virtual drive and go back to the new virtual machine wizard.
  9. Click "Finish" again to exit the wizard.
  10. Select your newly created VM and click the "Settings" button.
  11. Select "System" and make the hard disk first in the boot order.
  12. Note under the "Acceleration" tab of the System settings, that the hardware virtualization settings should be selected by default. You may have to configure your host's BIOS settings to enable these features.
  13. Select "Storage" and remove the floppy controller.
  14. While in the storage settings, select the CD/DVD device that contains your Ubuntu server installation disc.
  15. Select "Network" and change the network adapter "Attached to:" setting to "Bridged Adapter". See the VirtualBox user manual for details on networking options.
  16. Disable unnecessary devices, such as audio, serial ports and USB controllers, that you will not require.
  17. Click OK to save your settings.
  18. Select your VM and click the "Start" button to fire up your VM in a new window.
  19. Press F12 to select a boot device and select to boot from the CD-ROM to begin OS installation.

Find an error? Know a better way? Please leave a comment and help improve this cookbook.