VirtualBox How To

Notes

First Steps with VirtualBox


Table of Contents

1.1. Why is virtualization useful?

1.2. Some terminology

1.3. Features overview

1.4. Supported host operating systems

1.5. Host CPU Requirements

1.6. Installing VirtualBox and extension packs

1.7. Starting VirtualBox

1.8. Creating your first virtual machine

1.9. Running your virtual machine

1.9.1. Starting a new VM for the first time

1.9.2. Capturing and releasing keyboard and mouse

1.9.3. Typing special characters

1.9.4. Changing removable media

1.9.5. Resizing the machine's window

1.9.6. Saving the state of the machine

1.10. Using VM groups

1.11. Snapshots

1.11.1. Taking, restoring and deleting snapshots

1.11.2. Snapshot contents

1.12. Virtual machine configuration

1.13. Removing virtual machines

1.14. Cloning virtual machines

1.15. Importing and exporting virtual machines

1.16. Global Settings

1.17. Alternative front-ends

Welcome to Oracle VM VirtualBox!

VirtualBox is a cross-platform virtualization application. What does that mean? For one thing, it installs on your existing Intel or AMD-based computers, whether they are running Windows, Mac, Linux or Solaris operating systems.

Secondly, it extends the capabilities of your existing computer so that it can run multiple operating systems (inside multiple virtual machines) at the same time.

So, for example, you can run Windows and Linux on your Mac, run Windows Server 2008 on your Linux server, run Linux on your Windows PC, and so on, all alongside your existing applications. You can install and run as many virtual machines as you like — the only practical limits are disk space and memory.

VirtualBox is deceptively simple yet also very powerful. It can run everywhere from small embedded systems or desktop class machines all the way up to datacenter deployments and even Cloud environments.

The following screenshot shows you how VirtualBox, installed on a Mac computer, is running Windows 8 in a virtual machine window:

In this User Manual, we'll begin simply with a quick introduction to virtualization and how to get your first virtual machine running with the easy-to-use VirtualBox graphical user interface.

Subsequent chapters will go into much more detail covering more powerful tools and features, but fortunately, it is not necessary to read the entire User Manual before you can use VirtualBox.

You can find a summary of VirtualBox's capabilities inSection1.3, “Features overview”. For existing VirtualBox users who just want to see what's new in this release, there is a detailed list inChapter15,Change log.

1.1.Why is virtualization useful?

The techniques and features that VirtualBox provides are useful for several scenarios:

  • Running multiple operating systems simultaneously.VirtualBox allows you to run more than one operating system at a time. This way, you can run software written for one operating system on another (for example, Windows software on Linux or a Mac) without having to reboot to use it.

    Since you can configure what kinds of "virtual" hardware should be presented to each such operating system, you can install an old operating system such as DOS or OS/2 even if your real computer's hardware is no longer supported by that operating system.

  • Easier software installations.Software vendors can use virtual machines to ship entire software configurations.

    For example, installing a complete mail server solution on a real machine can be a tedious task. With VirtualBox, such a complex setup (then often called an "appliance") can be packed into a virtual machine.

    Installing and running a mail server becomes as easy as importing such an appliance into VirtualBox.

  • Testing and disaster recovery.Once installed, a virtual machine and its virtual hard disks can be considered a "container" that can be arbitrarily frozen, woken up, copied, backed up, and transported between hosts.

    On top of that, with the use of another VirtualBox feature called "snapshots", one can save a particular state of a virtual machine and revert back to that state, if necessary.

    This way, one can freely experiment with a computing environment. If something goes wrong (e.g. after installing misbehaving software or infecting the guest with a virus), one can easily switch back to a previous snapshot and avoid the need of frequent backups and restores.

    Any number of snapshots can be created, allowing you to travel back and forward in virtual machine time. You can delete snapshots while a VM is running to reclaim disk space.

  • Infrastructure consolidation.Virtualization can significantly reduce hardware and electricity costs. Most of the time, computers today only use a fraction of their potential power and run with low average system loads.

    A lot of hardware resources as well as electricity is thereby wasted. So, instead of running many such physical computers that are only partially used, one can pack many virtual machines onto a few powerful hosts and balance the loads between them.

1.2.Some terminology

When dealing with virtualization (and also for understanding the following chapters of this documentation), it helps to acquaint oneself with a bit of crucial terminology, especially the following terms:

Host operating system (host OS).

This is the operating system of the physical computer on which VirtualBox was installed.

There are versions of VirtualBox for Windows, Mac OS X, Linux and Solaris hosts; for details, please seeSection1.4, “Supported host operating systems”.

Most of the time, this User Manual discusses all VirtualBox versions together. There may be platform-specific differences which we will point out where appropriate.

Guest operating system (guest OS).

This is the operating system that is running inside the virtual machine. Theoretically, VirtualBox can run any x86 operating system (DOS, Windows, OS/2, FreeBSD, OpenBSD), but to achieve near-native performance of the guest code on your machine, we had to go through a lot of optimizations that are specific to certain operating systems.

So while your favorite operating systemmayrun as a guest, we officially support and optimize for a select few (which, however, include the most common ones).

SeeSection3.1, “Supported guest operating systems”for details.

Virtual machine (VM).

This is the special environment that VirtualBox creates for your guest operating system while it is running. In other words, you run your guest operating system "in" a VM.

Normally, a VM will be shown as a window on your computer's desktop, but depending on which of the various frontends of VirtualBox you use, it can be displayed in full screen mode or remotely on another computer.

In a more abstract way, internally, VirtualBox thinks of a VM as a set of parameters that determine its behavior. They include hardware settings (how much memory the VM should have, what hard disks VirtualBox should virtualize through which container files, what CDs are mounted etc.) as well as state information (whether the VM is currently running, saved, its snapshots etc.).

These settings are mirrored in the VirtualBox Manager window as well as theVBoxManagecommand line program; seeChapter8,VBoxManage. In other words, a VM is also what you can see in its settings dialog.

Guest Additions.

This refers to special software packages which are shipped with VirtualBox but designed to be installedinsidea VM to improve performance of the guest OS and to add extra features.