First Steps

Welcome to Oracle VirtualBox.

Oracle VirtualBox is a cross-platform virtualization application. That means it extends the capabilities of your existing computer so that it can run multiple operating systems, inside multiple virtual machines (VMs), at the same time. As an example, you can run Windows and Linux on your Mac, run Windows Server 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.

Oracle 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 data center deployments and even Cloud environments.

In this User Guide, we will begin simply with a quick introduction to virtualization and how to get your first virtual machine running with the easy-to-use Oracle 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 Guide before you can use Oracle VirtualBox.

You can find a summary of Oracle VirtualBox's capabilities in Features Overview. For existing Oracle VirtualBox users who just want to find out what is new in this release, see the Change Log.

Why is Virtualization Useful?

The techniques and features that Oracle VirtualBox provides are useful in the following scenarios:

  • Running multiple operating systems simultaneously. Oracle VirtualBox enables you to run more than one OS at a time. This way, you can run software written for one OS on another, such as 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 OS, you can install an old OS such as DOS or OS/2 even if your real computer's hardware is no longer supported by that OS.

  • 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 Oracle VirtualBox, such a complex setup, 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 Oracle 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.

    Using virtual machines enables you to build and test a multinode networked service, for example. Issues with networking, operating system, and software configuration can be investigated easily.

    In addition to that, with the use of another Oracle 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, such as problems after installing software or infecting the guest with a virus, you 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.

Some Terminology

When dealing with virtualization, and also for understanding the following chapters of this documentation, it helps to acquaint yourself with some important terminology, especially the following terms:

  • Host operating system (host OS). This is the OS of the physical computer on which Oracle VirtualBox was installed. There are versions of Oracle VirtualBox for Windows, macOS, Linux, and Oracle Solaris hosts. See Available Installation Packages.

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

  • Guest operating system (guest OS). This is the OS that is running inside the virtual machine. Theoretically, Oracle VirtualBox can run any x86 OS such as DOS, Windows, OS/2, FreeBSD, and OpenBSD on an x86 host. 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 OSs. So while your favorite OS may run as a guest, we officially support and optimize for a select few, which include the most common OSs.

    See Guest Operating Systems.

  • Virtual machine (VM). This is the special environment that Oracle VirtualBox creates for your guest OS while it is running. In other words, you run your guest OS in a VM. Normally, a VM is shown as a window on your computer's desktop. Depending on which of the various frontends of Oracle VirtualBox you use, the VM might be shown in full screen mode or remotely on another computer.

    Internally, Oracle VirtualBox treats a VM as a set of parameters that specify its behavior. Some parameters describe hardware settings, such as the amount of memory and number of CPUs assigned. Other parameters describe the state information, such as whether the VM is running or saved.

    You can view these VM settings in VirtualBox Manager, in the Settings window, and by running the VBoxManage command. See VBoxManage.

  • Guest Additions. This refers to special software packages which are shipped with Oracle VirtualBox but designed to be installed inside a VM to improve performance of the guest OS and to add extra features. See Guest Additions.

Features Overview

The following is a brief outline of Oracle VirtualBox's main features:

  • Portability. Oracle VirtualBox runs on a large number of 64-bit host operating systems. See Available Installation Packages.

    Oracle VirtualBox is a so-called hosted hypervisor, sometimes referred to as a type 2 hypervisor. Whereas a bare-metal or type 1 hypervisor runs directly on the hardware, Oracle VirtualBox requires an existing OS to be installed. It can thus run alongside existing applications on that host.

    To a very large degree, Oracle VirtualBox is functionally identical on all of the host platforms, and the same file and image formats are used. This enables you to run virtual machines created on one host on another host with a different host OS. For example, you can create a virtual machine on Windows and then run it on Linux.

    In addition, virtual machines can easily be imported and exported using the Open Virtualization Format (OVF), an industry standard created for this purpose. You can even import OVFs that were created with a different virtualization software. See Importing and Exporting Virtual Machines.

    For users of Oracle Cloud Infrastructure the functionality extends to exporting and importing virtual machines to and from the cloud. This simplifies development of applications and deployment to the production environment. See Exporting an Appliance to Oracle Cloud Infrastructure.

  • Guest Additions: shared folders, seamless windows, 3D virtualization. The Oracle VirtualBox Guest Additions are software packages which can be installed inside of supported guest systems to improve their performance and to provide additional integration and communication with the host system. After installing the Guest Additions, a virtual machine will support automatic adjustment of video resolutions, seamless windows, accelerated 3D graphics and more. See Guest Additions.

    In particular, Guest Additions provide for shared folders, which let you access files on the host system from within a guest machine. See Shared Folders.

  • Comprehensive hardware support. Among other features, Oracle VirtualBox supports the following:

    • Guest multiprocessing (SMP). Oracle VirtualBox can present up to 32 virtual CPUs to each virtual machine, irrespective of how many CPU cores are physically present on your host.

    • USB device support. Oracle VirtualBox implements a virtual USB controller and enables you to connect arbitrary USB devices to your virtual machines without having to install device-specific drivers on the host. USB support is not limited to certain device categories. See USB Settings.

    • Hardware compatibility. Oracle VirtualBox virtualizes a vast array of virtual devices, among them many devices that are typically provided by other virtualization platforms. That includes IDE, SCSI, and SATA hard disk controllers, several virtual network cards and sound cards, virtual serial ports and an Input/Output Advanced Programmable Interrupt Controller (I/O APIC), which is found in many computer systems. This enables easy cloning of disk images from real machines and importing of third-party virtual machines into Oracle VirtualBox.

    • Full ACPI support. The Advanced Configuration and Power Interface (ACPI) is fully supported by Oracle VirtualBox. This enables easy cloning of disk images from real machines or third-party virtual machines into Oracle VirtualBox. With its unique ACPI power status support, Oracle VirtualBox can even report to ACPI-aware guest OSes the power status of the host. For mobile systems running on battery, the guest can thus enable energy saving and notify the user of the remaining power, for example in full screen modes.

    • Multiscreen resolutions. Oracle VirtualBox virtual machines support screen resolutions many times that of a physical screen, allowing them to be spread over a large number of screens attached to the host system.

    • Built-in iSCSI support. This unique feature enables you to connect a virtual machine directly to an iSCSI storage server without going through the host system. The VM accesses the iSCSI target directly without the extra overhead that is required for virtualizing hard disks in container files. See iSCSI Servers.

    • PXE Network boot. The integrated virtual network cards of Oracle VirtualBox fully support remote booting using the Preboot Execution Environment (PXE).

  • Multigeneration branched snapshots. Oracle VirtualBox can save arbitrary snapshots of the state of the virtual machine. You can go back in time and revert the virtual machine to any such snapshot and start an alternative VM configuration from there, effectively creating a whole snapshot tree. See Snapshots. You can create and delete snapshots while the virtual machine is running.

  • VM groups. Oracle VirtualBox provides a groups feature that enables the user to organize and control virtual machines collectively, as well as individually. In addition to basic groups, it is also possible for any VM to be in more than one group, and for groups to be nested in a hierarchy. This means you can have groups of groups. In general, the operations that can be performed on groups are the same as those that can be applied to individual VMs: Start, Pause, Reset, Close (Save state, Send Shutdown, Poweroff), Discard Saved State, Show in File System, Sort.

  • Clean architecture and unprecedented modularity. Oracle VirtualBox has an extremely modular design with well-defined internal programming interfaces and a clean separation of client and server code. This makes it easy to control it from several interfaces at once. For example, you can start a VM simply by clicking on a button in the Oracle VirtualBox graphical user interface and then control that machine from the command line, or even remotely. See Alternative Front Ends.

    Due to its modular architecture, Oracle VirtualBox can also expose its full functionality and configurability through a comprehensive software development kit (SDK), which enables integration of Oracle VirtualBox with other software systems. See Oracle VirtualBox Programming Interfaces.

  • Remote machine display. The VirtualBox Remote Desktop Extension (VRDE) enables high-performance remote access to any running virtual machine. This extension supports the Remote Desktop Protocol (RDP) originally built into Microsoft Windows, with special additions for full client USB support.

    The VRDE does not rely on the RDP server that is built into Microsoft Windows. Instead, the VRDE is plugged directly into the virtualization layer. As a result, it works with guest OSes other than Windows, even in text mode, and does not require application support in the virtual machine either. The VRDE is described in detail in Remote Display (VRDP Support).

    On top of this special capacity, Oracle VirtualBox offers you more unique features:

    • Extensible RDP authentication. Oracle VirtualBox already supports Winlogon on Windows and PAM on Linux and Oracle Solaris for RDP authentication. In addition, it includes an easy-to-use SDK which enables you to create arbitrary interfaces for other methods of authentication. See RDP Authentication.

    • USB over RDP. Using RDP virtual channel support, Oracle VirtualBox also enables you to connect arbitrary USB devices locally to a virtual machine which is running remotely on an Oracle VirtualBox RDP server. See Remote USB.

Alternative Front Ends

Oracle VirtualBox has a very flexible internal design that enables you to use multiple interfaces to control the same virtual machines. For example, you can start a virtual machine with the VirtualBox Manager window and then stop it from the command line. With Oracle VirtualBox's support for the Remote Desktop Protocol (RDP), you can even run virtual machines remotely on a headless server and have all the graphical output redirected over the network.

The following front ends are shipped in the standard Oracle VirtualBox package:

  • VirtualBox. This is the VirtualBox Manager, a graphical user interface that uses the Qt toolkit. This interface is described throughout this user guide. While this is the simplest and easiest front end to use, some of the more advanced Oracle VirtualBox features are not included.

  • VBoxManage. A command-line interface for automated and detailed control of every aspect of Oracle VirtualBox. See VBoxManage.

  • VBoxHeadless. A front end that produces no visible output on the host at all, but can act as a RDP server if the VirtualBox Remote Desktop Extension (VRDE) is installed and enabled for the VM. As opposed to the other graphical interfaces, the headless front end requires no graphics support. This is useful, for example, if you want to host your virtual machines on a headless Linux server that has no X Window system installed. See VBoxHeadless, the Remote Desktop Server.

  • Separate mode. A front end that is based on VBoxHeadless, but does not require VRDE or an RDP viewer. See Separate Mode.

If the above front ends still do not satisfy your particular needs, it is possible to create yet another front end to the complex virtualization engine that is the core of Oracle VirtualBox, as the Oracle VirtualBox core neatly exposes all of its features in a clean API. See Oracle VirtualBox Programming Interfaces.

Available Installation Packages

Oracle VirtualBox runs on the following host Operating Systems (OSs):

  • x86-64 Windows hosts:

    • Windows 11

    • Windows 10

    • Windows Server 2025

    • Windows Server 2022

  • Intel x86-64 macOS hosts:

    • 14 (Sonoma)

    • 13 (Ventura)

    • 12 (Monterey)

    • 11 (Big Sur)

    See also Known Limitations.

  • Arm macOS hosts (64-bit):

    • 14 (Sonoma)

    • 13 (Ventura)

    • 12 (Monterey)

    • 11 (Big Sur)

    See also Guest Operating Systems for limitations on the VMs you can create on an Arm host.

  • x86-64 Linux hosts. Includes the following:

    • Ubuntu 24.04 LTS, 22.04 LTS and 20.04 LTS

    • Debian GNU/Linux 12 (Bookworm) and 11 (Bullseye)

    • Oracle Linux 9 and 8

    • CentOS/Red Hat Enterprise Linux 9 and 8

    • Fedora 40 and 39

    • SUSE Linux Enterprise server 15

    • openSUSE Leap 15.5, 15.4 and 15.3

    It should be possible to use Oracle VirtualBox on most systems based on Linux kernel 2.6 or later, using either the Oracle VirtualBox installer or by doing a manual installation. See Installing on Linux Hosts. However, the formally tested and supported Linux distributions are those for which we offer a dedicated package.

  • Oracle Solaris hosts (64-bit only). The following versions are supported with the restrictions listed in Known Limitations:

    • Oracle Solaris 11.4

Note that any feature that is marked as experimental is not supported. Feedback and suggestions about such features are welcome.

Host and Guest Combinations

Table 1. Host and Guest (VM) Platform Combinations Available in VirtualBox. Matrix of available host platforms and the Virtual machines they run.
Host Hardware Architecture Host OS (all 64 bit) Guest Virtual Hardware Architecture Guest OS
x86-64 (for example Intel or AMD)

Windows

Windows Server

macOS (requires Intel hardware)

Linux (various distributions)

Oracle Solaris

x86 and x86-64

Windows

Windows Server

Oracle Solaris

Linux (various distributions)

Arm64 macOS (requires Apple Silicon hardware) Arm64 Linux (various distributions)

Arm Host Limitations

The following limitations apply when using an Arm platform host:

  • Virtual machines must use an Arm-based guest operating system. Running an x86-based guest operating system on an Arm host platform is not supported.

  • Only VMSVGA is supported as a graphics controller.

  • Unattended installation isn't available.

  • The following System page settings aren't available for Arm guests:

    • Motherboard tab: Chipset, TPM

    • Processor tab: Extended Features such as Enable PAE/NX, Enable Nested VT-x/AMD-V

Intel Host CPU Requirements

Intel host CPUs must have SSE2 (Streaming SIMD Extensions 2).

Installing Oracle VirtualBox and Extension Packs

Oracle VirtualBox comes in many different packages, and installation depends on your host OS. If you have installed software before, installation should be straightforward. On each host platform, Oracle VirtualBox uses the installation method that is most common and easy to use. If you run into trouble or have special requirements, see Installation Details for details about the various installation methods.

Oracle VirtualBox is split into the following components:

  • Base package. The base package consists of all open source components and is licensed under the GNU General Public License V3.

  • Extension packs. Additional extension packs can be downloaded which extend the functionality of the Oracle VirtualBox base package. Currently, Oracle provides a single extension pack, available from: http://www.virtualbox.org. The extension pack provides the following added functionality:

    For details of how to install an extension pack, see Installing an Extension Pack.

Starting Oracle VirtualBox

After installation, you can start Oracle VirtualBox as follows:

  • Windows hosts. In the Programs menu, click the item in the VirtualBox group. On some Windows platforms, you can also enter VirtualBox in the search box of the Start menu.

  • macOS hosts. In the Finder, double-click the VirtualBox item in the Applications folder. You may want to drag this item onto your Dock.

  • Linux or Oracle Solaris hosts. Depending on your desktop environment, an Oracle VirtualBox item may have been placed in either the System or System Tools group of your Applications menu. Alternatively, you can enter VirtualBox in a terminal window.

When you start Oracle VirtualBox, the VirtualBox Manager interface is shown. See Configuring Oracle VirtualBox.

Configuring Oracle VirtualBox

Before creating, adding or importing any Virtual Machines, you must set up Oracle VirtualBox to work with your network and host machine.

You can also set preferences and customize the interface for your convenience.

Oracle VirtualBox Preferences

The Preferences window offers a selection of settings, which apply to all virtual machines of the current user.

Note:

The available Preferences settings depend on the selected experience level. To display all Preference settings, ensure the experience level is set to Expert.

See Experience Levels for VirtualBox Manager.

To display the Preferences window, do either of the following:

  • Select File, Preferences.

  • Click Preferences on the Welcome screen in VirtualBox Manager.

The following settings are available:

  • General. Enables you to specify the default folder or directory for VM files, and the VRDP Authentication Library.

  • Input. Enables you to specify keyboard shortcuts, both in VirtualBox Manager and in individual VMs. For example you might want to specify a different Host key. This is the key that toggles whether the cursor is in the focus of the VM or the Host OS windows, see Capturing and Releasing Keyboard and Mouse. The Host key is also used to trigger certain VM actions, see Typing Special Characters.

  • Update. Enables you to specify various settings for Automatic Updates.

  • Language. Enables you to specify the language used for menus, labels, and text in VirtualBox Manager.

  • Display. Enables you to specify the screen resolution, and its width and height. A default scale factor can be specified for all guest screens.

    A default font scaling factor can be set for all guest screen displays.

    Other extended features can be selected, to ensure that guest screens work well with the host display.

  • Proxy. Enables you to configure an HTTP proxy server.

  • Interface. Enables you to select a color theme for the VirtualBox Manager user interface.

    Note:

    This setting is only available on Windows host platforms.

Experience Levels for VirtualBox Manager

When you use VirtualBox Manager to configure settings for virtual machines, you can select an experience level for the user interface. The following experience levels are available:

  • Basic. Only a limited number of settings and tools are shown. Workflows are used to display settings and configuration options. This is the default setting for new installations.

    This level is suitable for a first time user of Oracle VirtualBox.

  • Expert. All available settings and tools are shown.

    Single pages show all settings and configuration options. This is the default setting for upgrades when a user already has at least one saved VM.

    This level is suitable for an experienced user who needs more control of virtual machine settings.

Experience levels can be configured in the following places in VirtualBox Manager:

  • The Welcome screen, for new installations only.

  • The Preferences window.

  • The Settings window for a virtual machine.

Wherever you set it, the preference applies throughout VirtualBox Manager.

Selecting the Experience Level

  1. In the File menu, choose Preferences.
  2. Click Basic or Expert to select the required experience level.

    The number of available settings and tools changes depending on the selected experience level.

Global Tools

In the left pane of the VirtualBox Manager window, click the Menu icon in the Tools banner located above the machine list. The Global Tools menu is displayed.

A drop-down list enables you to select from the following global tools:

  • Welcome. Displays the VirtualBox Manager welcome message. The VirtualBox Manager toolbar is also included, to enable you to get started with using Oracle VirtualBox.

  • Extensions. Displays the Extension Pack Manager tool. This tool is used to install and uninstall Oracle VirtualBox Extension Packs. See The Extension Pack Manager.

  • Media. Displays the Virtual Media Manager tool. This tool is used to manage the disk images used by Oracle VirtualBox. See The Virtual Media Manager.

  • Network. Displays the Network Manager tool. This tool is used to create and configure some types of networks used by Oracle VirtualBox. See Network Manager.

  • Cloud. Displays the Cloud Profile Editor tool. This tool is used to configure connections to a cloud service, such as Oracle Cloud Infrastructure. See Using the Cloud Profile Manager.

  • Activities. Displays the VM Activity Overview tool. This tool is used to monitor performance and resource usage of virtual machines. See Monitoring of Virtual Machines.

The Pin icon is used to keep the Tools banner visible as you scroll down the entries in the machine list.

Note:

The available tools may vary, depending on the selected experience level for the VirtualBox Manager user interface.

See Experience Levels for VirtualBox Manager.

Adding Virtual Machines

  • If you want to create a completely new VM, click New and follow the steps in Creating a Virtual Machine.
  • If you already have a VM saved on your machine, you can add it to the machine list by clicking Add.
  • If you have a VM on a different machine, you can import it by clicking Import Appliance. See Importing an Appliance in OVF Format.
  • If you want to view an OCI instance from within VirtualBox Manager, see Adding a Cloud VM.

Creating a Virtual Machine

In the VirtualBox Manager window, click New. The Create Virtual Machine workflow is shown, to guide you through the required steps for setting up a new virtual machine (VM).

The exact settings on the workflow pages depend on the architecture of the host platform.

If you don't see the workflow, change the experience level to Basic. See Experience Levels for VirtualBox Manager.

Once created, the virtual machine is displayed in the machine list on the left side of the VirtualBox Manager window, with the name that you entered on the first page of the workflow.

You can change the settings later, after you have created the VM, using the Machine Settings.

You must supply an operating system image, in ISO format, for the operating system you intend to install on the VM. Oracle VirtualBox does not supply the OS or any license required to use it.

Specify Name and Operating System

  1. Give the virtual machine (VM) a name. The name you enter is shown in the machine list in VirtualBox Manager and is also used for the virtual machine's files on disk. Be sure to assign each VM an informative name that describes the OS and software running on the VM. For example, Windows 10 with Visio. The name is also used to help Oracle VirtualBox suggest the appropriate OS and related field contents automatically.
  2. Select the location where VMs are stored on your computer, called the machine folder. Ensure that the folder location has enough free space, especially if you intend to use the snapshots feature. See also The Machine Folder.
  3. Select the ISO image file for the operating system you intend to install on the new VM. The image file can be used directly to install an OS on the new VM as part of an unattended installation, or it can be attached to a DVD drive on the new VM. If the image contains more than one edition, select the edition you want to use.
  4. Oracle VirtualBox will populate the Type, Subtype, and Version fields if it can detect the operating system in the ISO. If it cannot detect the OS, then set these according to your OS. For example, if the Type is Linux, the Subtype might be Oracle Linux and the Version might be Oracle Linux 8.x (64-bit). The options available for the guest OS are also limited by the host architecture. See Guest Operating Systems for more information.

    The supported OSs are grouped into types. If you want to install something very unusual that is not listed, select the Other type. Depending on your selection, Oracle VirtualBox will enable or disable certain VM settings that your guest OS may require. This is particularly important for 64-bit guests (see 64-bit Guests) but you must always set this field to the correct value.

  5. By default, Oracle VirtualBox will install the chosen OS using the ISO image provided, if the image supports unattended installation. See also Configure Unattended Guest OS Install.

    If you prefer to install the OS manually, you can disable the unattended guest operating system install feature by selecting Skip Unattended Installation. In that case, the selected ISO image is mounted automatically on the DVD drive of the new VM and you must install the OS from there.

    Not all images support unattended installation.

  6. Click Next to Configure Unattended Guest OS Install (if using) or to Set Up VM Hardware.

Configure Unattended Guest OS Install

If you choose Unattended guest OS Installation, Oracle VirtualBox installs the OS on the new virtual machine (VM) automatically. You must supply certain configuration options to be used in the installation.

See also Using VBoxManage Commands for Unattended Guest Installation for details of how to configure unattended installation from the command line.

Note:

You will not see these options if you selected the Skip Unattended Installation option.

  1. Enter the Username and Password for a default user on the guest OS.
  2. For Windows guests, enter the Product Key supplied with Windows.

  3. Enter the Hostname for the VM. By default, this is the same as the VM name.

  4. Enter the Domain Name for the VM.

  5. Select Install in Background if you want to enable headless mode for the VM rather than using a graphical user interface.
  6. Unattended Guest Additions installation is available for some x86 guests. Select Guest Additions if you would like Oracle VirtualBox to install the Guest Additions after the OS. Download the Guest Additions installation ISO to the host, and select the file location.
  7. Click Next to Set Up VM Hardware.

Set Up VM Hardware

  1. For Base Memory, select the amount of RAM that Oracle VirtualBox should allocate to the virtual machine (VM) every time it is started. The guest OS will report this size as the VM's installed RAM.
    CAUTION:

    Choose this setting carefully. The memory you give to the VM will not be available to your host OS while the VM is running.

    Do not specify more than you can spare, whilst ensuring you allocate enough for your guest OS and applications to run properly. For example, if your host machine has 4 GB of RAM and you enter 2048 MB as the base memory for a VM, you will have 2 GB left for all the other software on your host while that VM is running.

    A guest OS may require at least 1 or 2 GB of memory to install and boot up. If you intend to run more than one VM at a time, plan accordingly. A VM will not start if it does not have enough RAM to boot.

    Always ensure that the host OS has enough RAM remaining. If insufficient RAM remains, the system might excessively swap memory to the hard disk, which will effectively bring the host system to a standstill.

  2. For Processor(s), select the number of virtual processors to assign to the VM. Do not assign more than half of the total processor threads from the host machine.
  3. Select Enable EFI if you want to enable Extensible Firmware Interface (EFI) booting for the guest OS.
  4. Click Next to Specify a Virtual Hard Disk.

Specify a Virtual Hard Disk

There are many ways in which Oracle VirtualBox can provide hard disk space to a VM, see Virtual Storage.

The most common way is to use a virtual hard disk. This is a large image file on your physical hard disk, whose contents Oracle VirtualBox presents to your VM as if it were a complete hard disk. You can copy this file to another host, and use it with another Oracle VirtualBox VM.

To prevent your physical hard disk on the host OS from filling up, Oracle VirtualBox limits the size of the image file. But the image file must be large enough to hold the contents of the guest OS and the applications you want to install. For a Windows or Linux guest, you will probably need several gigabytes for any serious use. The size limit of the image file can be changed later, see VBoxManage modifymedium.

Note:

If you choose Do Not Add a Virtual Hard Disk at this stage you will need to attach a hard disk using VirtualBox Manager or VBoxManage commands before you can install a guest operating system.

Create a Virtual Hard Disk

Follow these steps to create a virtual hard disk to use with this VM. To prevent your physical hard disk on the host OS from filling up, Oracle VirtualBox limits the size of the image file. But the image file must be large enough to hold the contents of the guest OS and the applications you want to install. For a Windows or Linux guest, you will probably need several gigabytes for any serious use. The limit of the image file size can be changed later, see VBoxManage modifymedium.
  1. Select Create a Virtual Hard Disk Now. This creates a new empty virtual hard disk image, located in the VM's machine folder.

  2. Enter the following settings:

    • Disk Size. Use the slider to select a maximum size for the hard disk in the new VM.

    • Pre-Allocate Full Size. This setting determines the type of image file used for the disk image. Select this setting to use a fixed-size file for the disk image. Otherwise, Oracle VirtualBox will use a dynamically allocated file for the disk image.

      The different types of image file behave as follows:

      • Dynamically allocated file. This type of image file only grows in size when the guest actually stores data on its virtual hard disk. Therefore, this file is small initially. As the drive is filled with data, the file grows to the specified size.

      • Fixed-size file. This type of image file immediately occupies the file specified, even if only a fraction of that virtual hard disk space is actually in use. While occupying much more space, a fixed-size file incurs less overhead and is therefore slightly faster than a dynamically allocated file.

      For more details about the differences, see Disk Image Files (VDI, VMDK, VHD, HDD).

Use an Existing Virtual Hard Disk

Follow these steps to use a virtual hard disk that already exists on the host. Ensure the image file is in a suitable location (usually the machine folder) and not in use by other VMs.
CAUTION:
Data on the disk image may be deleted.
  1. Select Use an Existing Virtual Hard Disk File

  2. Select the image file to use with the new VM, and then click Add.

Running a Virtual Machine

To start a virtual machine (VM), you have the following options:

  • Double-click the VM's name in the machine list in VirtualBox Manager.

  • Select the VM's name in the machine list in VirtualBox Manager, and click Start in the toolbar the top of the window.

  • Go to the VirtualBox VMs folder in your system user's home directory. Find the subdirectory of the machine you want to start and double-click the machine settings file. This file has a .vbox file extension.

The VM you started appears in a new window and you will see it start to boot up, or prompt you to install an operating system as required. Everything that would normally be seen on the virtual system's monitor is shown in the window.

In general, you can use the virtual machine as you would use a real computer. The following topics describe a few points to note when running a VM.

Starting a New VM for the First Time

When you start a VM for the first time the OS installation process is started automatically, using the ISO image file specified in the Create Virtual Machine workflow.

Follow the onscreen instructions to install your OS.

Virtual Machine Status Bar

A status bar is displayed at the bottom of the virtual machine window. The status bar contains icons that enable you to view and change settings for the virtual machine, as follows:

  • Highlight an icon to show details of the current settings.

  • Right-click an icon to change a setting.

    Some settings, such as audio, can be changed directly by right-clicking the status bar icon. For other settings, you select from the displayed menu options.

See Configuring Virtual Machines for detailed information about the available virtual machine settings.

Table 2 describes the icons on the status bar.

Table 2. Virtual Machine Status Bar Icons. Describes icons on the status bar located at the bottom of the virtual machine window

Icon

Description

Storage (SATA)

Settings for attached SATA storage devices, such as hard disk drives.

See also Storage Settings.

Storage (IDE)

Settings for attached IDE storage devices, such as optical CD-ROM drives.

See also Storage Settings.

Right-click to show options for adding and removing IDE devices.

See also Changing Removable Media.

Audio

Settings for audio output and audio input.

Right-click to change a setting. The status bar icon is updated automatically to show which settings are enabled.

See also Audio Settings.

Network

Settings for attached network adapters.

Right-click to connect or disconnect a network adapter.

See also Network Settings.

USB

Settings for attached USB devices.

Right-click to select from the available USB devices on the host and to specify a USB filter.

See also USB Settings.

Shared Folders

Settings for shared folders.

Right-click to change shared folder settings or to add a new shared folder.

See also Shared Folders.

Display

Settings for the virtual machine display.

Right-click to show options for resizing and scaling the display.

See also Resizing the Machine's Window.

Recording

Settings for video and audio recording.

Right-click to show options to enable and disable recording, or to change recording settings.

To enable recording, right-click the status bar icon and select the Recording option. The icon changes to show a movie reel animation, as follows:

To disable recording, right-click the status bar icon and deselect the Recording option. The icon changes back to the default image.

See also Recording Tab.

Processor

Settings for the CPU used by the virtual machine.

The colored bar in the icon indicates current processor activity. Red indicates high CPU usage, Green indicates low CPU usage.

A green turtle icon indicates that a native hypervisor, such as Hyper-V, is running on the host.

See also Processor Tab.

Mouse Integration

Settings for capturing the host mouse pointer.

The icon indicates whether mouse integration is on (green arrow) or off (yellow arrow) and whether the pointer is captured (mouse icon colored) or not (mouse icon gray).

Right-click to enable or disable mouse integration.

See also Capturing and Releasing Keyboard and Mouse.

Host Key

Settings for capturing the host keyboard.

The arrow on the icon is green if the keyboard is captured, and black if not.

The background is blue if the host key is not pressed, and white when it is pressed.

A check icon appears when the VM is waiting for a host key combination to be typed.

The current host key is displayed to the right of the icon.

Right-click to show options for configuring the host key combination and other keyboard shortcuts.

Right-click to insert a special key combination, such as Ctrl-Alt-Del.

See also Typing Special Characters.

Configuring the Status Bar

You can configure the status bar as follows:

  • To hide the status bar, right-click in the status bar area and deselect Show Status Bar.

  • To show the status bar, select View, Status Bar, Show Status Bar from the virtual machine's menu bar.

  • To modify the status bar contents, right-click in the status bar area and select Status Bar Settings. You can then do the following:

    • Select icons that you want to include in the status bar.

    • Deselect icons that you want to remove from the status bar.

    • Drag and drop icons to change their order in the status bar.

    Click the check mark button to save your changes to the status bar.

    See also User Interface for other options to change the status bar.

Capturing and Releasing Keyboard and Mouse

Oracle VirtualBox provides a virtual USB tablet device to new virtual machines through which mouse events are communicated to the guest OS. If you are running a modern guest OS that can handle such devices, mouse support may work out of the box without the mouse being captured as described below. See Motherboard Tab.

Otherwise, if the virtual machine detects only standard PS/2 mouse and keyboard devices, since the OS in the virtual machine does not know that it is not running on a real computer, it expects to have exclusive control over your keyboard and mouse. But unless you are running the VM in full screen mode, your VM needs to share keyboard and mouse with other applications and possibly other VMs on your host.

After installing a guest OS and before you install the Guest Additions, described in Guest Additions, either your VM or the rest of your computer can own the keyboard and the mouse. Both cannot own the keyboard and mouse at the same time. You will see a second mouse pointer which is always confined to the limits of the VM window. You activate the VM by clicking inside it.

To return ownership of keyboard and mouse to your host OS, Oracle VirtualBox reserves a special key on your keyboard: the Host key. By default, this is the right Ctrl key on your keyboard. On a Mac host, the default Host key is the left Command key. You can change this default using the Preferences window. See Oracle VirtualBox Preferences. The current setting for the Host key is always displayed at the bottom right of your VM window.

Figure 1. Host Key Setting on the Virtual Machine Status Bar
Host Key Setting on the Virtual Machine Status Bar

This means the following:

  • Your keyboard is owned by the VM if the VM window on your host desktop has the keyboard focus. If you have many windows open in your guest OS, the window that has the focus in your VM is used. This means that if you want to enter text within your VM, click the title bar of your VM window first.

    To release keyboard ownership, press the Host key. As explained above, this is typically the right Ctrl key.

    Note that while the VM owns the keyboard, some key sequences, such as Alt+Tab, will no longer be seen by the host, but will go to the guest instead. After you press the Host key to reenable the host keyboard, all key presses will go through the host again, so that sequences such as Alt+Tab will no longer reach the guest. For technical reasons it may not be possible for the VM to get all keyboard input even when it does own the keyboard. Examples of this are the Ctrl+Alt+Del sequence on Windows hosts or single keys grabbed by other applications on X11 hosts such as the GNOME desktop Locate Pointer feature.

  • Your mouse is owned by the VM only after you have clicked in the VM window. The host mouse pointer will disappear, and your mouse will drive the guest's pointer instead of your normal mouse pointer.

    Note that mouse ownership is independent of that of the keyboard. Even after you have clicked on a titlebar to be able to enter text into the VM window, your mouse is not necessarily owned by the VM yet.

    To release ownership of your mouse by the VM, press the Host key.

As this behavior is inconvenient, Oracle VirtualBox provides a set of tools and device drivers for guest systems called the Oracle VirtualBox Guest Additions. These tools make VM keyboard and mouse operations much more seamless. Most importantly, the Guest Additions suppress the second "guest" mouse pointer and make your host mouse pointer work directly in the guest. See Guest Additions.

Typing Special Characters

Some OSes expect certain key combinations to initiate certain procedures. The key combinations that you type into a VM might target the host OS, the Oracle VirtualBox software, or the guest OS. The recipient of these keypresses depends on a number of factors, including the key combination itself.

  • Host OSes reserve certain key combinations for themselves. For example, you cannot use the Ctrl+Alt+Delete combination to reboot the guest OS in your VM, because this key combination is reserved by the host OS. Even though both Windows and Linux OSes can intercept this key combination, the host OS is rebooted automatically.

    On Linux and Oracle Solaris hosts, which use the X Window System, the key combination Ctrl+Alt+Backspace normally resets the X server and restarts the entire graphical user interface. As the X server intercepts this combination, pressing it will usually restart your host graphical user interface and kill all running programs, including Oracle VirtualBox, in the process.

    On Linux hosts supporting virtual terminals, the key combination Ctrl+Alt+Fx, where Fx is one of the function keys from F1 to F12, normally enables you to switch between virtual terminals. As with Ctrl+Alt+Delete, these combinations are intercepted by the host OS and therefore always switch terminals on the host.

    If, instead, you want to send these key combinations to the guest OS in the virtual machine, you will need to use one of the following methods:

    • Use the items in the Input, Keyboard menu of the virtual machine window. This menu includes the settings Insert Ctrl+Alt+Delete and Insert Ctrl+Alt+Backspace. However, the latter setting affects only Linux guests or Oracle Solaris guests.

      This menu also includes an option for inserting the Host key combination.

    • Use special key combinations with the Host key, which is normally the right Control key. Oracle VirtualBox then translates the following key combinations for the VM:

      • Host key + Del sends Ctrl+Alt+Del to reboot the guest OS.

      • Host key + Backspace sends Ctrl+Alt+Backspace to restart the graphical user interface of a Linux or Oracle Solaris guest.

      • Host key + Function key. For example, use this key combination to simulate Ctrl+Alt+Fx to switch between virtual terminals in a Linux guest.

  • For some other keyboard combinations such as Alt+Tab to switch between open windows, Oracle VirtualBox enables you to configure whether these combinations will affect the host or the guest, if a virtual machine currently has the focus. This is a global setting for all virtual machines and can be found under File, Preferences, Input.

  • A soft keyboard can be used to input key combinations in the guest. See Soft Keyboard.

Changing Removable Media

While a virtual machine is running, you can change removable media in the Devices menu of the VM's window. Here you can select in detail what Oracle VirtualBox presents to your VM as a CD, DVD, or floppy drive.

The settings are the same as those available for the VM in the Settings window of VirtualBox Manager. But as the Settings window is disabled while the VM is in the Running or Saved state, the Devices menu saves you from having to shut down and restart the VM every time you want to change media.

Using the Devices menu, you can attach the host drive to the guest or select a floppy or DVD image, as described in Storage Settings.

The Devices menu also includes an option for creating a virtual ISO (VISO) from selected files on the host.

Resizing the Machine's Window

You can resize the VM's window while that VM is running. When you do, the window is scaled as follows:

  • If you have scaled mode enabled, then the virtual machine's screen will be scaled to the size of the window. This can be useful if you have many machines running and want to have a look at one of them while it is running in the background. Alternatively, it might be useful to enlarge a window if the VM's output screen is very small, for example because you are running an old OS in it.

    To enable scaled mode, press Host key + C, or select Scaled Mode from the View menu in the VM window. To leave scaled mode, press Host key + C again.

    The aspect ratio of the guest screen is preserved when resizing the window. To ignore the aspect ratio, press Shift during the resize operation.

    See Known Limitations for additional remarks.

  • If you have the Guest Additions installed and they support automatic resizing, the Guest Additions will automatically adjust the screen resolution of the guest OS. For example, if you are running a Windows guest with a resolution of 1024x768 pixels and you then resize the VM window to make it 100 pixels wider, the Guest Additions will change the Windows display resolution to 1124x768.

    See Guest Additions.

  • Otherwise, if the window is bigger than the VM's screen, the screen will be centered. If it is smaller, then scroll bars will be added to the machine window.

Saving the State of the Machine

When you click the Close button of your virtual machine window, at the top right of the window, just like you would close any other window on your system, Oracle VirtualBox asks you whether you want to save or power off the VM. As a shortcut, you can also press Host key + Q.

The difference between the three options is crucial. They mean the following:

  • Save the machine state: With this option, Oracle VirtualBox freezes the virtual machine by completely saving its state to your local disk.

    When you start the VM again later, you will find that the VM continues exactly where it was left off. All your programs will still be open, and your computer resumes operation. Saving the state of a virtual machine is thus in some ways similar to suspending a laptop computer by closing its lid.

  • Send the shutdown signal. This will send an ACPI shutdown signal to the virtual machine, which has the same effect as if you had pressed the power button on a real computer. This should trigger a proper shutdown mechanism from within the VM.

  • Power off the machine: With this option, Oracle VirtualBox also stops running the virtual machine, but without saving its state.

    CAUTION:

    This is equivalent to pulling the power plug on a real computer without shutting it down properly. If you start the machine again after powering it off, your OS will have to reboot completely and may begin a lengthy check of its virtual system disks. As a result, this should not normally be done, since it can potentially cause data loss or an inconsistent state of the guest system on disk.

    As an exception, if your virtual machine has any snapshots, see Snapshots, you can use this option to quickly restore the current snapshot of the virtual machine. In that case, powering off the machine will discard the current state and any changes made since the previous snapshot was taken will be lost.

The Discard button in the VirtualBox Manager window discards a virtual machine's saved state. This has the same effect as powering it off, and the same warnings apply.

Managing VMs

As you add, import or create VMs they will appear in the machine list.

To change the hardware configuration of a VM. See Configure the Settings for a VM

To use VM Groups, see Using VM Groups.

Check the Notification Center for tasks in progress and error messages. Click Open notification center to see the list of notifications. Errors are indicated by a warning triangle.

Configure the Settings for a VM

You may need to change the configuration of a Virtual Machine (VM) after it has been created. For example, you may want to add more memory.

Be careful when changing VM settings. It is possible to change all VM settings after installing a guest OS, but certain changes might prevent a guest OS from functioning correctly if done after installation.

To change the settings for a VM:
  1. Select the VM in the machine list.
  2. Ensure the VM is Powered off, not Running or Saved. You can't change fundamental characteristics of the VM if it is running.
  3. Click Settings to see the current configuration for the VM, and change the settings as required.

The settings are described in detail in Configuring Virtual Machines.

Even more parameters are available when using the VBoxManage command line interface. See VBoxManage.

Using VM Groups

Create VM groups if you want to manage several VMs together, and perform functions on them collectively, as well as individually.

The following features are available for groups:

  • Create a group using VirtualBox Manager. Do one of the following:

    • Drag a VM on top of another VM.

    • Select multiple VMs and select Group from the right-click menu.

  • Create and manage a group using the command line. Do one of the following:

    • Create a group and assign a VM. For example:

      VBoxManage modifyvm "vm01" --groups "/TestGroup"

      This command creates a group TestGroup and attaches the VM vm01 to that group.

    • Detach a VM from the group, and delete the group if empty. For example:

      VBoxManage modifyvm "vm01" --groups ""

      This command detaches all groups from the VM vm01 and deletes the empty group.

  • Create multiple groups. For example:

    VBoxManage modifyvm "vm01" --groups "/TestGroup,/TestGroup2"

    This command creates the groups TestGroup and TestGroup2, if they do not exist, and attaches the VM vm01 to both of them.

  • Create nested groups, having a group hierarchy. For example:

    VBoxManage modifyvm "vm01" --groups "/TestGroup/TestGroup2"

    This command attaches the VM vm01 to the subgroup TestGroup2 of the TestGroup group.

  • Use VirtualBox Manager menu options to control and manage all the VMs in a group. For example: Start, Pause, Reset, Close (save state, send shutdown signal, poweroff), Discard Saved State, Show in Explorer, Sort.

Snapshots

With snapshots, you can save a particular state of a virtual machine for later use. At any later time, you can revert to that state, even though you may have changed the VM considerably since then. A snapshot of a virtual machine is thus similar to a machine in Saved state, but there can be many of them, and these saved states are preserved.

To see the snapshots of a virtual machine, click the machine name in VirtualBox Manager. In the machine tools menu for the VM, click Snapshots. The Snapshots tool is displayed.

If you select multiple VMs in the machine list, all snapshots are listed for each VM.

Until you take a snapshot of the virtual machine, the list of snapshots will be empty, except for the Current State item. This item represents the current point in the lifetime of the virtual machine.

The Snapshots window includes a toolbar, enabling you to perform the following snapshot operations:

  • Take. Takes a snapshot of the selected VM. See Taking, Restoring, and Deleting Snapshots.

  • Delete. Removes a snapshot from the list of snapshots. See Taking, Restoring, and Deleting Snapshots.

  • Restore. Restores the VM state to be the same as the selected snapshot. See Taking, Restoring, and Deleting Snapshots.

  • Properties. Displays the properties for the selected snapshot. The Attributes tab is used to specify a Name and Description for the snapshot. The Information tab shows VM settings for the snapshot.

  • Clone. Displays the Clone Virtual Machine wizard. This enables you to create a clone of the VM, based on the selected snapshot.

  • Settings. Available for the Current State snapshot only. Displays the Settings window for the VM, enabling you to make configuration changes.

  • Discard. For a running VM, discards the saved state for the VM and closes it down.

  • Start. Start the VM. This operation is available for the Current State item.

Taking, Restoring, and Deleting Snapshots

There are three operations related to snapshots, as follows:

  1. Take a snapshot. This makes a copy of the machine's current state, to which you can go back at any given time later.

    • If your VM is running:

      Select Take Snapshot from the Machine menu in the VM window.

      The VM is paused while the snapshot is being created. After snapshot creation, the VM continues to run as normal.

    • If your VM is in either the Saved or the Powered Off state, as displayed next to the VM name in the machine list:

      Display the Snapshots window and do one of the following:

      • Click Take in the Snapshots window toolbar.

      • Right-click the Current State item in the list and select Take.

    A dialog is displayed, prompting you for a snapshot name. This name is purely for reference purposes, to help you remember the state of the snapshot. For example, a useful name would be Fresh installation from scratch, no Guest Additions, or Service Pack 3 just installed. You can also add a longer text description in the Snapshot Description field.

    Your new snapshot will then appear in the snapshots list. Underneath your new snapshot, you will see an item called Current State, signifying that the current state of your VM is a variation based on the snapshot you took earlier. If you later take another snapshot, you will see that they are displayed in sequence, and that each subsequent snapshot is derived from an earlier one.

    Oracle VirtualBox imposes no limits on the number of snapshots you can take. The only practical limitation is disk space on your host. Each snapshot stores the state of the virtual machine and thus occupies some disk space. See Snapshot Contents for details on what is stored in a snapshot.

  2. Restore a snapshot. In the Snapshots window, select the snapshot you have taken and click Restore in the toolbar. By restoring a snapshot, you go back or forward in time. The current state of the machine is lost, and the machine is restored to the exact state it was in when the snapshot was taken.

    Note:

    Restoring a snapshot will affect the virtual hard drives that are connected to your VM, as the entire state of the virtual hard drive will be reverted as well. This means also that all files that have been created since the snapshot and all other file changes will be lost. In order to prevent such data loss while still making use of the snapshot feature, it is possible to add a second hard drive in write-through mode using the VBoxManage interface and use it to store your data. As write-through hard drives are not included in snapshots, they remain unaltered when a machine is reverted. See Special Image Write Modes.

    To avoid losing the current state when restoring a snapshot, you can create a new snapshot before the restore operation.

    By restoring an earlier snapshot and taking more snapshots from there, it is even possible to create a kind of alternate reality and to switch between these different histories of the virtual machine. This can result in a whole tree of virtual machine snapshots.

  3. Delete a snapshot. This does not affect the state of the virtual machine, but only releases the files on disk that Oracle VirtualBox used to store the snapshot data, thus freeing disk space. To delete a snapshot, select the snapshot name in the Snapshots window and click Delete in the toolbar. Snapshots can be deleted even while a machine is running.

    Note:

    Whereas taking and restoring snapshots are fairly quick operations, deleting a snapshot can take a considerable amount of time since large amounts of data may need to be copied between several disk image files. Temporary disk files may also need large amounts of disk space while the operation is in progress.

    There are some situations which cannot be handled while a VM is running, and you will get an appropriate message that you need to perform this snapshot deletion when the VM is shut down.

Snapshot Contents

Think of a snapshot as a point in time that you have preserved. More formally, a snapshot consists of the following:

  • The snapshot contains a complete copy of the VM settings, including the hardware configuration, so that when you restore a snapshot, the VM settings are restored as well. For example, if you changed the hard disk configuration or the VM's system settings, that change is undone when you restore the snapshot.

    The copy of the settings is stored in the machine configuration, an XML text file, and thus occupies very little space.

  • The complete state of all the virtual disks attached to the machine is preserved. Going back to a snapshot means that all changes that had been made to the machine's disks, file by file and bit by bit, will be undone. Files that were since created will disappear, files that were deleted will be restored, changes to files will be reverted.

    Strictly speaking, this is only true for virtual hard disks in "normal" mode. You can configure disks to behave differently with snapshots, see Special Image Write Modes. In technical terms, it is not the virtual disk itself that is restored when a snapshot is restored. Instead, when a snapshot is taken, Oracle VirtualBox creates differencing images which contain only the changes since the snapshot were taken. When the snapshot is restored, Oracle VirtualBox throws away that differencing image, thus going back to the previous state. This is both faster and uses less disk space. For the details, which can be complex, see Differencing Images.

    Creating the differencing image as such does not occupy much space on the host disk initially, since the differencing image will initially be empty and grow dynamically later with each write operation to the disk. The longer you use the machine after having created the snapshot, however, the more the differencing image will grow in size.

  • If you took a snapshot while the machine was running, the memory state of the machine is also saved in the snapshot. This is in the same way that memory can be saved when you close a VM window. When you restore such a snapshot, execution resumes at exactly the point when the snapshot was taken.

    The memory state file can be as large as the memory size of the VM and will therefore occupy considerable disk space.

Removing and Moving Virtual Machines

You can remove a VM from Oracle VirtualBox or move the VM and its associated files, such as disk images, to another location on the host.

  • Removing a VM. To remove a VM, right-click the VM in the VirtualBox Manager machine list and select Remove.

    The confirmation dialog enables you to specify whether to only remove the VM from the list of machines or to remove the files associated with the VM.

    Note that the Remove menu item is disabled while a VM is running.

  • Moving a VM. To move a VM to a new location on the host, right-click the VM in the VirtualBox Manager's machine list and select Move.

    The file dialog prompts you to specify a new location for the VM.

    When you move a VM, Oracle VirtualBox configuration files are updated automatically to use the new location on the host.

    Note that the Move menu item is disabled while a VM is running.

    You can also use the VBoxManage movevm command to move a VM. See VBoxManage movevm.

For information about removing or moving a disk image file from Oracle VirtualBox, see The Virtual Media Manager.

Cloning a Virtual Machine

You can create a full copy or a linked copy of an existing VM. This copy is called a clone. You might use a cloned VM to experiment with a VM configuration, to test different guest OS levels, or to back up a VM.

To clone a VM:

  1. Ensure the VM you want to clone is not running.
  2. Click the VM name in the machine list, and then select Clone from the Machine menu.

  3. Enter the following details for the clone.
    • Name: A name for the cloned machine.
    • Path: Choose a location for the cloned virtual machine, otherwise Oracle VirtualBox uses the default machines folder.
    • MAC Address Policy: Specifies whether to retain network card MAC addresses when cloning the VM.

      The Generate New MAC Addresses For All Network Adapters value assigns a new MAC address to each network card during cloning. This is the default setting. This is the best option when both the source VM and the cloned VM must operate on the same network. Other values enable you to retain the existing MAC addresses in the cloned VM.

    • Keep Disk Names: Retains the disk image names when cloning the VM.
    • Keep Hardware UUIDs: Retains the hardware universally unique identifiers (UUIDs) when cloning the VM.
  4. Click Next. The Clone Type page is displayed.
  5. The Clone Type option specifies whether to create a clone that is linked to the source VM or to create a fully independent clone:
    • Full Clone: Copies all dependent disk images to the new VM folder. A full clone can operate fully without the source VM.
    • Linked Clone: Creates new differencing disk images based on the source VM disk images. If you select the current state of the source VM as the clone point, Oracle VirtualBox creates a new snapshot.
  6. Click Next. If your VM has snapshots and you chose Full Clone, use the Snapshots page to select the parts of the snapshot tree to clone with the VM.
    • Current Machine State: Clones the current state of the VM. Snapshots are not included.
    • Everything: Clones the current machine state and all its snapshots.
  7. Click Finish to start the clone operation.

The duration of the clone operation depends on the size and number of attached disk images. In addition, the clone operation saves all the differencing disk images of a snapshot.

You can also use the VBoxManage clonevm command to clone a VM. See VBoxManage clonevm.

Importing and Exporting Virtual Machines

Oracle VirtualBox can import and export virtual machines in the following formats:

About the OVF Format

OVF is a cross-platform standard supported by many virtualization products which enables the creation of ready-made virtual machines that can then be imported into a hypervisor such as Oracle VirtualBox. Oracle VirtualBox makes OVF import and export easy to do, using VirtualBox Manager or the command-line interface.

Using OVF enables packaging of virtual appliances. These are disk images, together with configuration settings that can be distributed easily. This way one can offer complete ready-to-use software packages, including OSes with applications, that need no configuration or installation except for importing into Oracle VirtualBox.

Note:

The OVF standard is complex, and support in Oracle VirtualBox is an ongoing process. In particular, no guarantee is made that Oracle VirtualBox supports all appliances created by other virtualization software. For a list of known limitations, see Known Limitations.

Appliances in OVF format can appear in the following variants:

  • They can come in several files, as one or several disk images, typically in the widely-used VMDK format. See Disk Image Files (VDI, VMDK, VHD, HDD). They also include a textual description file in an XML dialect with an .ovf extension. These files must then reside in the same directory for Oracle VirtualBox to be able to import them.

  • Alternatively, the above files can be packed together into a single archive file, typically with an .ova extension. Such archive files use a variant of the TAR archive format and can therefore be unpacked outside of Oracle VirtualBox with any utility that can unpack standard TAR files.

Note:

OVF cannot describe snapshots that were taken for a virtual machine. As a result, when you export a virtual machine that has snapshots, only the current state of the machine will be exported. The disk images in the export will have a flattened state identical to the current state of the virtual machine.

Importing an Appliance in OVF Format

The following steps show how to import an appliance in OVF format.

  1. Double-click the OVF or OVA file.

    Oracle VirtualBox creates file type associations automatically for any OVF and OVA files on your host OS.

    The Appliance Settings page of the Import Virtual Appliance wizard is shown. This page shows the VMs described in the OVF or OVA file and enables you to change the VM settings.

  2. By default, membership of VM groups is preserved on import for VMs that were initially exported from Oracle VirtualBox. You can change this behavior by using the Primary Group setting for the VM.

    The following global settings apply to all of the VMs that you import:

    • Base Folder: Specifies the directory on the host in which to store the imported VMs.

      If an appliance has multiple VMs, you can specify a different directory for each VM by editing the Base Folder setting for the VM.

    • MAC Address Policy: Reinitializes the MAC addresses of network cards in your VMs prior to import, by default. You can override the default behavior and preserve the MAC addresses on import.

    • Import Hard Drives as VDI: Imports hard drives in the VDI format rather than in the default VMDK format.

  3. Click Finish to import the appliance.

    Oracle VirtualBox copies the disk images and creates local VMs with the settings described on the Appliance Settings page. The imported VMs are shown in the list of VMs in VirtualBox Manager.

    Because disk images are large, the VMDK images that are included with virtual appliances are shipped in a compressed format that cannot be used directly by VMs. So, the images are first unpacked and copied, which might take several minutes.

You can use the VBoxManage import command to import an appliance. See VBoxManage import.

Exporting an Appliance in OVF Format

The following steps show how to export an appliance in OVF format.

  1. Select File, Export Appliance to display the Export Virtual Appliance wizard.

    On the initial Virtual Machines page, you can combine several VMs into an OVF appliance.

    Select one or more VMs to export, and click Next.

  2. The Format Settings page enables you to configure the following settings:

    • Format: Selects the Open Virtualization Format value for the output files.

      The Oracle Cloud Infrastructure value exports the appliance to Oracle Cloud Infrastructure. See Exporting an Appliance to Oracle Cloud Infrastructure.

    • File: Selects the location in which to store the exported files.

    • MAC Address Policy: Specifies whether to retain or reassign network card MAC addresses on export.

    • Write Manifest File: Enables you to include a manifest file in the exported archive file.

    • Include ISO Image Files: Enables you to include ISO image files in the exported archive file.

  3. Click Next to show the Appliance Settings page.

    You can edit settings for the virtual appliance. For example, you can change the name of the virtual appliance or add product information, such as vendor details or license text.

    Double-click the appropriate field to change its value.

  4. Click Finish to begin the export process. Note that this operation might take several minutes.

You can use the VBoxManage export command to export an appliance. See VBoxManage export.

Integrating with Oracle Cloud Infrastructure

This section describes how to use the features of Oracle VirtualBox to integrate with Oracle Cloud Infrastructure.

Integrating with Oracle Cloud Infrastructure involves the following steps:

Preparing for Oracle Cloud Infrastructure Integration

Perform the following configuration steps before using Oracle VirtualBox to integrate with your Oracle Cloud Infrastructure account.

  1. Install the Extension Pack. Cloud integration features are only available when you install the Oracle VirtualBox Extension Pack. See Installing Oracle VirtualBox and Extension Packs.

  2. Create a key pair. Generate an API signing key pair that is used for API requests to Oracle Cloud Infrastructure. See Creating an API Signing Key Pair.

    Upload the public key of the key pair from your client device to the cloud service. See Uploading the Public Key to Oracle Cloud Infrastructure.

  3. Create a cloud profile. The cloud profile contains resource identifiers for your cloud account, such as your user OCID, and details of your key pair. See Creating a Cloud Profile.

Creating an API Signing Key Pair

To use the cloud integration features of Oracle VirtualBox, you must generate an API signing key pair that is used for API requests to Oracle Cloud Infrastructure.

Your API requests are signed with your private key, and Oracle Cloud Infrastructure uses the public key to verify the authenticity of the request. You must upload the public key to the Oracle Cloud Infrastructure Console.

Note:

This key pair is not the same SSH key that you use to access compute instances on Oracle Cloud Infrastructure.

  1. (Optional) Create a .oci directory to store the key pair.

    $ mkdir ~/.oci

    The key pair is usually installed in the .oci folder in your home directory. For example, ~/.oci on a Linux system.

  2. Generate the private key.

    Use the openssl command.

    • To generate a private key with a passphrase (prompt for passphrase):

      $ openssl genrsa -out ~/.oci/oci_api_key.pem -aes256 2048 
    • To generate a private key with a passphrase entered on the command line as an argument:

      $ openssl genrsa -aes256 -passout pass:user_passphrase -out ~/.oci/oci_api_key.pem 2048
    • To generate a private key without a passphrase:

      $ openssl genrsa -out ~/.oci/oci_api_key.pem 2048
  3. Change permissions for the private key.

    $ chmod 600 ~/.oci/oci_api_key.pem

    Generate the public key.

    $ openssl rsa -pubout -in ~/.oci/oci_api_key.pem -out ~/.oci/oci_api_key_public.pem

    Enter the passphrase when prompted, if you set one.

Uploading the Public Key to Oracle Cloud Infrastructure

Use the following steps to upload your public key to Oracle Cloud Infrastructure.

  1. Log in to the Oracle Cloud Console.

  2. Display the User Settings page.

    Click Profile, User Settings.

  3. Display your current API signing keys.

    Click Resources, API Keys.

  4. Upload the public key.

    Click Add Public Key.

    The Add Public Key dialog is displayed.

  5. Select one of the following options:

    • Choose Public Key File. This option enables you to browse to the public key file on your local hard disk.

    • Paste Public Keys. This option enables you to paste the contents of the public key file into the window in the dialog box.

  6. Click Add to upload the public key.

Creating a Cloud Profile

Oracle VirtualBox uses a cloud profile to connect to Oracle Cloud Infrastructure. A cloud profile is a text file that contains details of your key files and Oracle Cloud Identifier (OCID) resource identifiers for your cloud account, such as the following:

  • Fingerprint of the public key. To obtain the fingerprint, you can use the openssl command:

    $ openssl rsa -pubout -outform DER -in ~/.oci/oci_api_key.pem | openssl md5 -c
  • Location of the private key on the client device. Specify the full path to the private key.

  • (Optional) Passphrase for the private key. This is only required if the key is encrypted.

  • Region. Shown on the Oracle Cloud Infrastructure Console. Click Administration, Tenancy Details.

  • Tenancy OCID. Shown on the Oracle Cloud Infrastructure Console. Click Administration, Tenancy Details.

    A link enables you to copy the Tenancy OCID.

  • Compartment OCID. Shown on the Oracle Cloud Infrastructure Console. Click Identity, Compartments.

    A link enables you to copy the Compartment OCID.

  • User OCID. Shown on the Oracle Cloud Infrastructure Console. Click Profile, User Settings.

    A link enables you to copy the User OCID.

You can create a cloud profile in the following ways:

  • Automatically, by using the Cloud Profile Manager. See Using the Cloud Profile Manager.

    The Cloud Profile Manager is a VirtualBox Manager tool that enables you to create, edit, and manage cloud profiles for your cloud service accounts.

  • Automatically, by using the VBoxManage cloudprofile command. See VBoxManage cloudprofile.

  • Manually, by creating an oci_config file in your Oracle VirtualBox global configuration directory. For example, this is $HOME/.config/VirtualBox/oci_config on a Linux host.

  • Manually, by creating a config file in your Oracle Cloud Infrastructure configuration directory. For example, this is $HOME/.oci/config on a Linux host.

    This is the same file that is used by the Oracle Cloud Infrastructure command line interface.

    Oracle VirtualBox automatically uses the config file if no cloud profile file is present in your global configuration directory. Alternatively, you can import this file manually into the Cloud Profile Manager.

Using the Cloud Profile Manager

To open the Cloud Profile Manager click File, Cloud Profile Manager in VirtualBox Manager.

You can use the Cloud Profile Manager in the following ways:

  • To create a new cloud profile automatically.

  • To create a cloud profile by importing settings from your Oracle Cloud Infrastructure configuration file.

Creating a New Cloud Profile

  1. Click the Add icon and specify a Name for the profile.

  2. Click Properties and specify the following property values for the profile:

    • Compartment OCID

    • Fingerprint of the public key

    • Location of the private key on the client device

    • Region OCID

    • Tenancy OCID

    • User OCID

    Some of these are settings for your Oracle Cloud Infrastructure account, which you can view from the Oracle Cloud Console.

  3. (Optional) If you are using the cloud profile to connect to cloud virtual machines, select the Show VMs check box.

    This creates a new subgroup of the OCI group in VirtualBox Manager. See About the OCI VM Group.

  4. Click Apply to save your changes.

    The cloud profile settings are saved to the oci_config file in your Oracle VirtualBox global settings directory.

Importing a Cloud Profile

Follow these steps to import an existing Oracle Cloud Infrastructure configuration file into the Cloud Profile Manager:

  1. Ensure that a config file is present in your Oracle Cloud Infrastructure configuration directory. For example, this is $HOME/.oci/config on a Linux host.

  2. Click the Import icon to open a dialog that prompts you to import cloud profiles from external files.

    Note:

    This action overwrites any cloud profiles that are in your Oracle VirtualBox global settings directory.

  3. Click Import.

    Your cloud profile settings are saved to the oci_config file in your Oracle VirtualBox global settings directory.

  4. Click Properties to show the cloud profile settings.

    Double-click the appropriate field to change the value.

  5. Click Apply to save your changes.

Using Oracle VirtualBox With Oracle Cloud Infrastructure

This section describes how you can use Oracle VirtualBox with Oracle Cloud Infrastructure to do the following tasks:

Using Cloud Virtual Machines

A cloud virtual machine (cloud VM) is a type of VM that represents an instance on a cloud service. Cloud VMs are shown in the machine list in VirtualBox Manager, in the same way as local VMs are.

By using cloud VMs you can create, manage, and control your Oracle Cloud Infrastructure instances from VirtualBox Manager.

Note:

Cloud VMs do not install, export, or import instances to the Oracle VirtualBox host. All operations are done remotely on the cloud service.

Cloud VMs can be used to do the following tasks in Oracle Cloud Infrastructure:

About the OCI VM Group

All cloud VMs are shown in the machine list in VirtualBox Manager, in a special VM group called OCI.

Cloud VMs are further grouped according to the cloud profile used to connect to them. The cloud profile identifies the user and compartment for the cloud VM and includes details of the key pair used to connect to cloud instances. See Creating a Cloud Profile.

All cloud profiles registered with Oracle VirtualBox are listed automatically in the OCI group.

To enable or disable listing of cloud VMs in VirtualBox Manager for a specific cloud profile, follow these steps.

  1. Display the Cloud Profile Manager.
  2. Select or clear the List VMs check box for each cloud profile.

Creating a New Cloud VM

When you create a new cloud VM, a new Oracle Cloud Infrastructure instance is created and associated with the cloud VM.

Perform the following steps to create a new cloud VM:

  1. Click a cloud profile in the OCI group.

    The cloud VMs for the selected cloud profile are displayed.

  2. Select Group, New Machine.

  3. Configure the following settings for the new cloud VM:

    • Location: The cloud service provider that will host the new instance. Select Oracle Cloud Infrastructure.

    • Profile: The cloud profile used to connect to the new instance. Select from the available cloud profiles.

    • Source: The image that the new instance is based on. Choose from the available images and boot volumes.

  4. Change the Cloud Virtual Machine Settings as required. You will likely need to change the display name, shape, and networking configuration.

    To add an SSH key to the instance, click the SSH Authorised Keys field and paste the public key into the displayed dialog.

  5. Click Finish to create a new Oracle Cloud Infrastructure instance using the selected image or boot volume. The new instance is started automatically.

    The new cloud VM is shown in the OCI group in VirtualBox Manager.

Adding a Cloud VM

When you add a cloud VM, an existing Oracle Cloud Infrastructure instance is associated with the cloud VM. You can only add one cloud VM for each instance.

Perform the following steps to add a cloud VM:

  1. Click a cloud profile in the OCI group.

    The cloud VMs for the selected cloud profile are displayed.

  2. Select Group, Add Machine.

  3. Configure the following settings:

    • Source: The cloud service provider that hosts the instance used for the cloud VM. Select Oracle Cloud Infrastructure.

    • Profile: The cloud profile used to connect to the running instance. Select from the available cloud profiles.

    • Instances: The instance to use for the cloud VM. Choose from the available instances on your cloud service.

  4. Click Finish to add a cloud VM based on the selected instance.

    A cloud VM with the same name as the instance is added to the OCI group in VirtualBox Manager.

  5. (Optional) To change the display name for the instance, click Settings and edit the Display Name field.

    The cloud VM name in VirtualBox Manager is updated automatically.

Cloning a Cloud VM

When you clone a cloud VM, a copy of the Oracle Cloud Infrastructure instance for the cloud VM is created and associated with the new cloud VM.

Perform the following steps to clone a cloud VM:

  1. Click a cloud profile in the OCI group.

    The cloud VMs for the selected cloud profile are displayed.

  2. Right-click the cloud VM you want to clone and select Clone.

    The Clone Name dialog is displayed.

    Enter a name for the clone.

    The name you enter is also used as the display name for the related Oracle Cloud Infrastructure instance. The default name for the clone consists of the _clone suffix appended to the original name. For example, ol9-dev_clone.

  3. Click OK to create the clone and the related Oracle Cloud Infrastructure instance. The new instance is started automatically.

    The new cloud VM is shown in the OCI group in VirtualBox Manager.

Changing Settings for a Cloud VM

Select the cloud VM in VirtualBox Manager and click Settings.

  • For a new cloud VM, you can change many settings for the Oracle Cloud Infrastructure instance, such as the display name, shape, and disk size.

  • When you add a cloud VM based on an existing Oracle Cloud Infrastructure instance you can only change the display name.

Controlling a Cloud VM

You can use VirtualBox Manager to control a cloud VM as follows:

  • Start. Use the Start button in the VirtualBox Manager toolbar.

  • Stop. Click the cloud VM name and select Machine, Stop. Menu options to shut down and power off the cloud VM are available.

  • Reset. Click the cloud VM name and select Machine, Reset. The cloud VM is stopped, then restarted automatically.

  • Terminate. Use the Terminate button in the VirtualBox Manager toolbar.

    CAUTION:

    This action deletes the instance from Oracle Cloud Infrastructure.

When you control a cloud VM in VirtualBox Manager the machine list is updated automatically with the current instance state, such as Stopped or Running.

When you control an instance using the Oracle Cloud Infrastructure console, VirtualBox Manager updates the status for the corresponding cloud VM automatically.

Monitoring Cloud VM Performance

You can monitor the performance of cloud VM instances in the following ways:

  • Use the virtual machine monitoring tools in VirtualBox Manager.

    • To show detailed performance data for a cloud VM:

      Click the cloud VM name in the machine list and select Activity in the machine tools menu.

      Several time series charts are displayed, showing resource usage and performance data. To save the data to file, click Export.

    • To show a performance summary for all cloud VMs:

      Click Activity Overview. The Activity Overview tool is displayed, showing a summary of performance metrics for all running cloud VMs and for the host system.

    See also Monitoring of Virtual Machines.

  • Use the VBoxManage cloud instance command, as follows:

    • VBoxManage cloud instance metriclist shows the available metrics for an instance.

    • VBoxManage cloud instance metricdata shows metrics data for an instance.

    See also VBoxManage cloud.

Note:

To monitor a cloud VM, the Compute Instance Monitoring plugin must be enabled and running on the Oracle Cloud Infrastructure instance. See the Oracle Cloud Infrastructure documentation for more details.

Removing a Cloud VM

You can use VirtualBox Manager to remove a cloud VM as follows:

Right-click the cloud VM name and select Remove.

  • Click Remove Only to remove the cloud VM from the machine list in VirtualBox Manager.

  • Click Delete Everything to remove the cloud VM from VirtualBox Manager and also to delete the Oracle Cloud Infrastructure instance and any associated boot volumes.

Creating an Instance Console Connection for a Cloud VM

To create a instance console connection, the cloud VM must be in Running state.

  1. Right-click the cloud VM name and select Console, Create Connection.
  2. The Public Key dialog is displayed. Paste the public key used for the instance connection into the dialog and click OK.

    By default, either the first entry in your SSH keys folder or the public key used for your previous instance console connection is used.

  3. Click Connect to connect to the instance. An instance console is displayed automatically on the host.

  4. (Optional) Click Show Log to display log messages for the instance console connection.

See the Oracle Cloud Infrastructure documentation for details about how you can use an instance console connection to troubleshoot instance problems.

Exporting an Appliance to Oracle Cloud Infrastructure

Oracle VirtualBox supports the export of VMs to an Oracle Cloud Infrastructure service. The exported VM is stored on Oracle Cloud Infrastructure as a custom Linux image. You can configure whether a cloud instance is created and started after the export process has completed.

Note:

Before you export a VM to Oracle Cloud Infrastructure, you must prepare the VM as described in Preparing a VM for Export to Oracle Cloud Infrastructure.

Use the following steps to export a VM to Oracle Cloud Infrastructure:

  1. Select File, Export Appliance.

  2. Select a VM to export, and then click Next to display the Format Settings page.

  3. From the Format drop-down list, select Oracle Cloud Infrastructure.

  4. In the Profile drop-down list, select the cloud profile used for your Oracle Cloud Infrastructure account.

  5. In the Machine Creation field, select an option to configure settings for the cloud instance created when you export to Oracle Cloud Infrastructure. The options enable you to do one of the following:

    • Configure settings for the cloud instance after you have finished exporting the VM.

    • Configure settings for the cloud instance before you start to export the VM.

    • Do not create a cloud instance when you export the VM.

    Click Next to make an API request to the Oracle Cloud Infrastructure service and open the Appliance Settings page.

  6. (Optional) Edit storage settings used for the exported virtual machine in Oracle Cloud Infrastructure. You can change the following settings:

    • The name of the bucket used to store the exported files.

    • Whether to store the custom image in Oracle Cloud Infrastructure.

    • The display name for the custom image in Oracle Cloud Infrastructure.

    • The launch mode for the cloud instance.

      Paravirtualized mode gives improved performance and is suitable for most Oracle VirtualBox VMs.

      Emulated mode is suitable for legacy OS images.

    Click Finish to continue.

  7. (Optional) Depending on the selection in the Machine Creation field, the Appliance Settings page may be displayed before or after export. This screen enables you to configure settings for the cloud instance, such as Shape and Disk Size.

    Click Finish. The VM is exported to Oracle Cloud Infrastructure.

    Depending on the Machine Creation setting, a cloud instance may be started after upload to Oracle Cloud Infrastructure is completed.

  8. Monitor the export process by using the Oracle Cloud Console.

You can also use the VBoxManage export command to export a VM to Oracle Cloud Infrastructure. See VBoxManage export.

Preparing a VM for Export to Oracle Cloud Infrastructure

Oracle Cloud Infrastructure provides the option to import a custom Linux image. Before an Oracle VirtualBox image can be exported to Oracle Cloud Infrastructure, the custom image needs to be prepared to ensure that instances launched from the custom image can boot correctly and that network connections will work. This section provides advice on how to prepare a Linux image for export from Oracle VirtualBox.

The following list shows some tasks to consider when preparing an Oracle Linux VM for export:

  • Use DHCP for network addresses. Configure the VM to use a DHCP server to allocate network addresses, rather than using a static IP address. The Oracle Cloud Infrastructure instance will then be allocated an IP address automatically.

  • Do not specify a MAC address. The network interface configuration for the VM must not specify the MAC address.

    Remove the HWADDR setting from the /etc/sysconfig/ifcfg-devicename network script.

  • Disable persistent network device naming rules. This means that the Oracle Cloud Infrastructure instance will use the same network device names as the VM.

    1. Change the GRUB kernel parameters.

      Add net.ifnames=0 and biosdevname=0 as kernel parameter values to the GRUB_CMDLINE_LINUX variable.

    2. Update the GRUB configuration.

      # grub2-mkconfig -o /boot/grub2/grub.cfg
    3. Disable any udev rules for network device naming.

      For example, if an automated udev rule exists for net-persistence:

      # cd /etc/udev/rules.d
      # rm -f 70-persistent-net.rules
      # ln -s /dev/null /etc/udev/rules.d/70-persistent-net.rules
  • Enable the serial console. This enables you to troubleshoot the instance when it is running on Oracle Cloud Infrastructure.

    1. Edit the /etc/default/grub file, as follows:

      • Remove the resume setting from the kernel parameters. This setting slows down boot time significantly.

      • Replace GRUB_TERMINAL="gfxterm" with GRUB_TERMINAL="console serial". This configures use of the serial console instead of a graphical terminal.

      • Add GRUB_SERIAL_COMMAND="serial --unit=0 --speed=115200". This configures the serial connection.

      • Add console=tty0 console=ttyS0,115200 to the GRUB_CMDLINE_LINUX variable. This adds the serial console to the Linux kernel boot parameters.

    2. Regenerate the GRUB configuration.

      # grub2-mkconfig -o /boot/grub2/grub.cfg
    3. To verify the changes, reboot the machine and run the dmesg command to look for the updated kernel parameters.

      # dmesg |grep console=ttyS0
  • Enable paravirtualized device support. You do this by adding the virtio drivers to the initrd for the VM.

    1. This procedure works only on machines with a Linux kernel of version 3.4 or later. Check that the VM is running a supported kernel:

      # uname -a
    2. Use the dracut tool to rebuild initrd. Add the qemu module, as follows:

      # dracut –-logfile /var/log/Dracut.log --force --add qemu
    3. Verify that the virtio drivers are now present in initrd.

       # lsinitrd |grep virtio

For more information about importing a custom Linux image into Oracle Cloud Infrastructure, see also:

https://docs.cloud.oracle.com/iaas/Content/Compute/Tasks/importingcustomimagelinux.htm

Importing an Instance from Oracle Cloud Infrastructure

Perform the following steps to import a cloud instance from Oracle Cloud Infrastructure into Oracle VirtualBox:

  1. Select File, Import Appliance.

    In the Source drop-down list, select Oracle Cloud Infrastructure.

    In the Profile drop-down list, select the cloud profile for your Oracle Cloud Infrastructure account.

    Choose the required cloud instance from the list in the Machines field.

    Click Next to make an API request to the Oracle Cloud Infrastructure service and display the Appliance Settings page.

  2. (Optional) Edit settings for the new local virtual machine.

    For example, you can edit the Name and Description that will be used for the VM.

    Click Finish to import the instance from Oracle Cloud Infrastructure.

  3. Monitor the import process by using the Oracle Cloud Console.

You can also use the VBoxManage import command to import an instance from Oracle Cloud Infrastructure. See VBoxManage import.

Importing an Instance: Overview of Events

The following describes the sequence of events when you import an instance from Oracle Cloud Infrastructure.

  • A custom image is created from the boot volume of the instance.

  • The custom image is exported to an Oracle Cloud Infrastructure object and is stored using Object Storage in the bucket specified by the user.

  • The Oracle Cloud Infrastructure object is downloaded to the local host. The object is a TAR archive which contains a boot volume of the instance in QCOW2 format and a JSON file containing metadata related to the instance.

  • The boot volume of the instance is extracted from the archive and a new VMDK image is created by converting the boot volume into the VMDK format. The VMDK image is registered with Oracle VirtualBox.

  • A new VM is created using the VMDK image for the cloud instance.

    By default, the new VM is not started after import from Oracle Cloud Infrastructure.

  • The downloaded TAR archive is deleted after a successful import.

Using a Cloud Network

A cloud network is a type of network that can be used for connections from a local VM to a remote Oracle Cloud Infrastructure cloud instance.

To create and use a cloud network, do the following:

  1. Set up a virtual cloud network on Oracle Cloud Infrastructure.

    The following steps create and configure a virtual cloud network (VCN) on Oracle Cloud Infrastructure. The VCN is used to tunnel network traffic across the cloud.

    1. Ensure that you have a cloud profile for connecting to Oracle Cloud Infrastructure. See Creating a Cloud Profile.

    2. Run the following VBoxManage cloud command:

      VBoxManage cloud --provider="OCI" --profile="vbox-oci" network setup

      where vbox-oci is the name of your cloud profile.

      Other options are available for the VBoxManage cloud network setup command, to enable you to configure details for the VCN. For example, you can configure the operating system used for the cloud gateway instance and the IP address range used by the tunneling network. See VBoxManage cloud.

      For best results, use an Oracle Linux 7 instance for the cloud gateway. This is the default option.

  2. Register the new cloud network with Oracle VirtualBox.

    Use the Cloud Networks tab in the Network Manager tool. See Cloud Networks Tab.

  3. Add cloud network adaptors to the local VMs that will use the cloud network. See Cloud Networks.

Using VBoxManage Commands With Oracle Cloud Infrastructure

This section includes some examples of how VBoxManage commands can be used to integrate with Oracle Cloud Infrastructure and perform common cloud operations.

Creating a Cloud Profile

To create a cloud profile called vbox-oci:

VBoxManage cloudprofile --provider "OCI" --profile="vbox-oci" add \
--clouduser="ocid1.user.oc1..."  --keyfile="/home/username/.oci/oci_api_key.pem" \
--tenancy="ocid1.tenancy.oc1..."  --compartment="ocid1.compartment.oc1..."  --region="us-ashburn-1"

The new cloud profile is added to the oci_config file in your Oracle VirtualBox global configuration directory. For example, this is $HOME/.VirtualBox/oci_config on a Windows host.

Listing Cloud Instances

To list the instances in your Oracle Cloud Infrastructure compartment:

VBoxManage cloud --provider="OCI" --profile="vbox-oci" list instances

Exporting an Oracle VirtualBox VM to the Cloud

To export a VM called myVM and create a cloud instance called myVM_Cloud:

VBoxManage export myVM --output OCI:// --cloud 0 --vmname myVM_Cloud \
--cloudprofile "vbox-oci" --cloudbucket myBucket \
--cloudshape VM.Standard2.1 --clouddomain US-ASHBURN-AD-1 --clouddisksize 50  \
--cloudocivcn ocid1.vcn.oc1... --cloudocisubnet ocid1.subnet.oc1... \
--cloudkeepobject true --cloudlaunchinstance true --cloudpublicip true
      

Importing a Cloud Instance Into Oracle VirtualBox

To import a cloud instance and create an Oracle VirtualBox VM called oci_Import:

VBoxManage import OCI:// --cloud --vmname oci_Import --memory 4000
--cpus 3 --ostype FreeBSD_64 --cloudprofile "vbox-oci"
--cloudinstanceid ocid1.instance.oc1... --cloudbucket myBucket
  

Creating a New Cloud Instance From a Custom Image

To create a new cloud instance from a custom image on Oracle Cloud Infrastructure:

VBoxManage cloud --provider="OCI" --profile="vbox-oci" instance create \
--domain-name="oraclecloud.com" --image-id="ocid1.image.oc1..." --display-name="myInstance" \
--shape="VM.Standard2.1" --subnet="ocid1.subnet.oc1..."

Terminating a Cloud Instance

To terminate an instance in your compartment on Oracle Cloud Infrastructure:

VBoxManage cloud --provider="OCI" --profile="vbox-oci" instance terminate \
--id="ocid1.instance.oc1..." 

Showing Cloud Instance Performance Metrics

To show CPU usage metrics for a cloud instance:

VBoxManage cloud --provider="OCI" --profile="vbox-oci" instance metricdata \
--id="ocid1.instance.oc1..." --metric-name="CpuUtilization"

For more details about the available commands for cloud operations, see VBoxManage cloud.

Soft Keyboard

Oracle VirtualBox provides a soft keyboard that enables you to input keyboard characters on the guest. A soft keyboard is an on-screen keyboard that can be used as an alternative to a physical keyboard. See Using the Soft Keyboard for details of how to use the soft keyboard.

CAUTION:

For best results, ensure that the keyboard layout configured on the guest OS matches the keyboard layout used by the soft keyboard. Oracle VirtualBox does not do this automatically.

The soft keyboard can be used in the following scenarios:

  • When the physical keyboard on the host is not the same as the keyboard layout configured on the guest. For example, if the guest is configured to use an international keyboard, but the host keyboard is US English.

  • To send special key combinations to the guest. Note that some common key combinations are also available in the Input, Keyboard menu of the guest VM window. See Typing Special Characters.

  • For guests in kiosk mode, where a physical keyboard is not present.

  • When using nested virtualization, the soft keyboard provides a method of sending key presses to a guest.

By default, the soft keyboard includes some common international keyboard layouts. You can copy and modify these to meet your own requirements. See Creating a Custom Keyboard Layout.

Using the Soft Keyboard

  1. Display the soft keyboard.

    In the guest VM window, select Input, Keyboard, Soft Keyboard.

  2. Select the required keyboard layout.

    The name of the current keyboard layout is displayed in the toolbar of the soft keyboard window. This is the previous keyboard layout that was used.

    Click the Layout List icon in the toolbar of the soft keyboard window. The Layout List window is displayed.

    Select the required keyboard layout from the entries in the Layout List window.

    The keyboard display graphic is updated to show the available input keys.

  3. Use the soft keyboard to enter keyboard characters on the guest.

    • Modifier keys such as Shift, Ctrl, and Alt are available on the soft keyboard. Click once to select the modifier key, click twice to lock the modifier key.

      The Reset the Keyboard and Release All Keys icon can be used to release all pressed modifier keys, both on the host and the guest.

    • To change the look of the soft keyboard, click the Settings icon in the toolbar. You can change colors used in the keyboard graphic, and can hide or show sections of the keyboard, such as the NumPad or multimedia keys.

Creating a Custom Keyboard Layout

You can use one of the supplied default keyboard layouts as the starting point to create a custom keyboard layout.

Note:

To permanently save a custom keyboard layout, you must save it to a file. Otherwise, any changes you make are discarded when you close down the Soft Keyboard window.

Custom keyboard layouts that you save are stored as an XML file on the host, in the keyboardLayouts folder in the global configuration data directory. For example, in $HOME/.config/VirtualBox/keyboardLayouts on a Linux host.

  1. Display the Layout List.

    Click the Layout List icon in the toolbar of the soft keyboard window.

  2. Make a copy of an existing keyboard layout.

    Highlight the required layout and click the Copy the Selected Layout icon.

    A new layout entry with a name suffix of -Copy is created.

  3. Edit the new keyboard layout.

    Highlight the new layout in the Layout List and click the Edit the Selected Layout icon.

    Enter a new name for the layout.

    Edit keys in the new layout. Click the key that you want to edit and enter new key captions in the Captions fields.

    The keyboard graphic is updated with the new captions.

  4. (Optional) Save the layout to a file. This means that your custom keyboard layout will be available for future use.

    Highlight the new layout in the Layout List and click the Save the Selected Layout into File icon.

    Any custom layouts that you create can later be removed from the Layout List, by highlighting and clicking the Delete the Selected Layout icon.

Monitoring of Virtual Machines

VirtualBox Manager includes the following tools for viewing runtime information, configuration details, and performance metrics of virtual machines and cloud VM instances.

Note:

To monitor a cloud VM, the Compute Instance Monitoring plugin must be enabled and running on the Oracle Cloud Infrastructure instance. See the Oracle Cloud Infrastructure documentation for more details.

  • VM Activity Overview. Displays an overview of performance metrics for all running virtual machines and cloud VM instances.

    See VM Activity Overview.

  • Session Information Dialog. Displays configuration and runtime information for the selected guest system or cloud VM.

    See Session Information Dialog.

VM Activity Overview

The VM Activity Overview tool displays several performance metrics for all running virtual machines and cloud VM instances, and for the host system. This provides an overview of system resources used by individual virtual machines and the host system.

To display the VM Activity Overview tool, open the global Tools menu and click Activities. The VM Activity Overview window is shown.

  • To show metrics for all virtual machines, including those that are not running, right-click the list of virtual machines and select List All Virtual Machines.
  • To show metrics for cloud VMs, right-click the list of virtual machines and select Show Cloud Virtual Machines.
  • To configure the set of metrics to be shown, click Columns in the toolbar. You can then sort the list of virtual machines by a particular metric.
  • To see more performance information for a virtual machine, select the VM name and click VM Activity in the toolbar. The VM Activity tab of the Session Information dialog is shown, see Session Information Dialog.

Session Information Dialog

The Session Information dialog includes multiple tabs that show important configuration and runtime information for the guest system. The tabs are as follows:

  • Configuration Details. Displays the system configuration of the virtual machine in a tabular format. The displayed information includes details such as storage configuration and audio settings.

  • Runtime Information. Displays runtime information for the guest session in a tabular format similar to the Configuration Details tab.

  • VM Activity. Includes several time series charts which monitor guest resource usage including CPU, RAM, Disk I/O, and Network. Note that the RAM chart requires the Guest Additions to be running on the guest system. The VM Activity tab can also be accessed directly from the VM Activity Overview tool. See VM Activity Overview.

  • Guest Control. Details of processes used by the Guest Control File Manager. See Guest Control File Manager.

Note:

For cloud VMs, only the VM Activity tab is shown.

To display session information for a guest VM or a cloud VM, select the VM name in the machine list and click Activity in the machine tools menu.

The Log Viewer

Every time you start up a VM, Oracle VirtualBox creates a log file that records system configuration and events. The Log Viewer is a VirtualBox Manager tool that enables you to view and analyze system logs.

To display the Log Viewer, do either of the following:

  • Click the VM name in the machine list and select Logs from the machine tools menu.

  • In the VM, select Machine, Show Log.

Log messages for the VM are displayed in tabs in the Log Viewer window. See Collecting Debugging Information for details of the various log files generated by Oracle VirtualBox.

If you select multiple VMs in the machine list, logs are listed for each VM.

The toolbar of the Log Viewer includes the following options:

  • Save: Exports the contents of the selected log file to a text file. Specify the destination filename and location in the displayed dialog.

  • Find: Searches for a text string in the log file.

  • Filter: Uses filter terms to display specific types of log messages. Common log message terms used by Oracle VirtualBox, such as Audio and NAT, are included by default. Select one or more terms from the drop-down list. To add your own filter term, enter the text string in the text box field.

  • Bookmark: Saves the location of a log message, enabling you to find it quickly. To create a bookmark, either click the line number, or select some text and then click Bookmark.

  • Preferences: Configures the text display used in the log message window.

  • Refresh: Refreshes the log file you are currently viewing. Only log messages in the current tab are updated.

  • Reload: Refreshes all log files. Log messages in every tab are updated.

  • Settings: Displays the Settings window for the VM, enabling you to make configuration changes.

  • Discard: For a running VM, discards the saved state for the VM and closes it down.

  • Show/Start: For a running VM, Show displays the VM window. For a stopped VM, Start displays options for powering up the VM.