An Introduction to Oracle VirtualBox 4 (Part 2)

by [Published on 22 March 2011 / Last Updated on 22 March 2011]

In part 1 of these series, you learned how to install VirtualBox 4.0 and how to install a Windows 7 guest operating system. In this article, we’ll dig a bit deeper into VirtualBox virtual machine.

If you would like to be notified of when Scott Lowe releases the next part in this article series please sign up to our VirtualizationAdmin.com Real Time Article Update newsletter.

If you would like to read the first part in this article series please go to An Introduction to Oracle VirtualBox 4 (Part 1).

In Part 1 of this article series, I introduced to you the newest version of Oracle’s free VirtualBox tool. VirtualBox is a popular type 2 hypervisor (a type 2 hypervisor runs atop a host operating system while a type 1 hypervisor runs directly on the hardware and is often referred to as a “bare metal” hypervisor) used by enthusiasts and others in testing a wide variety of supported guest operating systems. From Windows to Linux to Netware and more, VirtualBox makes it possible to very easily test beta releases of operating systems or even to build a lab in support of project testing. For example, in my home lab, I’m working on a number of Microsoft System Center-based initiatives, all running in a virtual environment.

Let’s start off with a look at overall details related to an already created virtual machine. As you can see in Figure 1, selecting an existing virtual machine provides you with quite a bit of detail about how that guest is configured. This at-a-glance dashboard makes it easier to keep an eye on your virtual machines.


Figure 1: Virtual machine details

Once you open the Settings page for a virtual machine, you get a screen like the one in Figure 2. Here, you can see that there are a number of settings pages available for your use. When you select the General option, the Basic tab is selected. On this page, you can provide a name for your virtual machine and specify the operating system you plan to run inside it. In the grand scheme of things, you could select any OS you want and then install something else, but you should try to provide this information as it can help make sure that other virtual machine settings are configured in ways that make sense. For example, if you’re going to run a 64-bit version of Windows, specify that fact here. That way, later on, VirtualBox will help you to make sure that the selections you make will actually work as you intend.


Figure 2: The General option, Basic tab

On the General option’s Advanced tab, you’ll see a number of options related to virtual machine operation. First up is the Snapshot Folder box in which you specify the folder in which virtual machine snapshots will be stored. We’ll be discussing snapshots in a future part of this article series.

Copy & paste are integral parts of any operating system and make life a lot easier. When you add a virtual machine to this mix, you can enable copy & paste between programs on the host machine and programs on the virtual machine and vice versa. For example, if you’re running Word on both the host and the guest, you can copy a paragraph of text just as you would if both copies of Word were open on the host. This is the function of the clipboard, which can be shared between the host and guests. There four shared clipboard options from which to choose:

  • Disabled. Do not allow the clipboard to be shared between the guest and the host.
  • Host to Guest. Allow copy & paste from the host to the guest, but not the other direction.
  • Guest to Host. Allow copy & paste from the guest to the host, but not the other direction.
  • Bidirectional. Allow copy & paste to operate in both directions.

Below the Shared Clipboard entry, you’ll see more options, including:

  • Removable Media (Remember Runtime Changes). As the virtual machine is booted and rebooted, VirtualBox will remember what media is mounted on the virtual machine.
  • Mini Toolbar. When you’re running a virtual machine in a window, you see a VirtualBox menu across the top of the window. This menu provides access to key functionality, such as mounting a virtual CD image. In full-screen or seamless mode, this menu isn’t available. However, you can enable the mini toolbar which provides the same functionality. In Figures 3, you’ll see the options for enabling the mini tool and in Figure 4, you see it in action.


Figure 3: The General option, Advanced tab


Figure 4:
Enable the Mini Toolbar

The final tab on the General option provides you with a place to keep notes about the virtual machine. Here, you could, for example, list exactly what the purpose of the virtual machine is, or even keep detailed notes about what service packs and updates have been applied to the VM, if you like.


Figure 5: The General option, Description tab

Once you move away from the General option to the System option, things start to get good. Again, the System option has three tabs and we’ll go over the options on each one of them starting with the Motherboard tab.

First up is a way for you to determine how much RAM you want to assign to your virtual machine. With virtual machines, the trick is to assign as little RAM as possible based on workload needs. In Figure 6 below, you’ll see that I’ve assigned 1 GB of RAM to this virtual machine and I’m able to assign up to 6 GB.

Boot order matters! Just like a physical machine, a virtual machine can boot from a variety of different sources. In fact, when you’re initially installing your virtual machine, you’ll want to boot from CD/DVD to install the OS and, once that’s complete, boot from the virtual hard disk. In Figure 6, notice that I’ve left the default boot order in place. Since I don’t use floppies or floppy images for anything at all, I could safely remove that option from the list by simply deselecting the checkbox next to Floppy.

VirtualBox 4.0 adds new chipset options that supplement the options that used to be available in older versions of the product. A chipset is among the most important components of a system and includes components such as PCI/PCI Express bridges and more.

  • PIIX3. The original VirtualBox chipset option.
  • ICH9. Used by newer operating systems, such as Mac OS X.

Before you jump on the ICH9 bandwagon because it’s newer, be careful. Message boards are rife with comments from VirtualBox users reporting issues with ICH9. Although PIIX3 is an older chipset, for virtual machine purposes, it tends to work very well. Only if you run into something insurmountable under PIIX3 do I recommend a move to ICH9.

At the bottom of the Motherboard tab are four additional options in the Extended Features section:

  • Enable IO APIC. If you’re going to use a 64-bit operating system or you anticipate using multiple virtual CPUs in an operating system, you have to enable this feature. Advanced Programmable Interrupt Controllers (APIC) allow a guest operating system to make use of more than 16 IRQs. If you’d like to go into a whole lot more depth about the purpose of the APIC, take a look at this document.
  • Enable EFI (special OSes only). EFI stands for Extensible Firmware Interface and is intended to replace the BIOS in some computers and is used by some operating systems. Mac OS X systems have used EFI for a while and Windows Vista and newer operating systems as well as some Linux systems can make use of EFI-based systems as well. If your guest OS doesn’t support EFI, don’t enable this option.
  • Hardware clock in UTC time. Should the local clock report time based on UTC or based on the time zone as configured on the host?
  • Enable absolute pointing device. In general usage, you won’t have to manipulate this option, but if you start using applications inside a guest that expect exclusive control of the mouse, you may want to experiment with this option.


Figure 6: The System option - Motherboard tab

You can assign from 1 to 16 virtual CPUs to your virtual machines by visiting the Processor tab and making the appropriate selection in the Processor(s) section. You shouldn’t assign more virtual CPUs than you have available physical CPUs.

The Physical Address Extensions/No eXecute (PAE/NX) option allows you to allow virtual machines to use more RAM than they would otherwise be allowed (the PAE side). For example, 32-bit versions of Windows are limited to 4 GB of RAM unless you have a system with PAE hardware support (which is enabled by this option) and that also supports PAE itself. Some operating systems require that this option be enabled. Selecting this option doesn’t actually affect the amount of RAM assigned to the VM. If you assign 4 GB to the VM, it will have 4 GB. However, with PAE enabled, if you assign 8 GB to the VM, the VM will be able to use the full 8 GB.


Figure 7: System options - Processor tab

On the Acceleration tab you’ll find two options that are related directly to hardware virtualization:

  • Enable VT-x/AMD-V. VT-x and AMD-V are now pretty well-known requirements in the virtualization world and add hardward-based virtualization extensions that make it easier for hypervisors to support virtual environments. In some cases, you are required to use VT/AMD-V. Specifically, if you’re planning to run any 64-bit guest operating system under VirtualBox, you have to make sure that this feature is enabled. Second, if you’re going to assign more than one processor a guest virtual machine, you must enable this feature. In Figure 9, you’ll see an error message that you receive if you attempt to disable VT-x/AMD-V when you’ve selected a 64-bit operating system.
  • Enable Nested Paging. Nested paging can provide a performance bump but only if your processor supports the feature and you have it enabled in your virtual machine. When you enable nested paging, you offload some of the memory management tasks from the hypervisor to the processor; hardware is almost always faster than software, so this is where your performance gain comes from. If you’d like to learn more about nested paging, take a look at this article. If your system does not support nested paging, this option will be grayed out.


Figure 8: System option - Acceleration tab


Figure 9:
The VT-x/AMD-V option must be enabled

Summary

We’ve now made it through the General and System options. In the next articles in this series, we’ll continue this journey and then move on to more advanced features, such as snapshots.

If ydou would like to be notified of when Scott Lowe releases the next part in this article series please sign up to our VirtualizationAdmin.com Real Time Article Update newsletter.

If you would like to read the first part in this article series please go to An Introduction to Oracle VirtualBox 4 (Part 1).

The Author — Scott D. Lowe

Scott D. Lowe avatar

Scott has written thousands of articles and blog posts and has authored or coauthored three books, including Microsoft Press’ Exchange Server 2007 Administrators Companion and O’Reilly’s Home Networking: The Missing Manual. In 2012, Scott was also awarded VMware's prestigious vExpert designation for his contributions to the virtualization community.

Latest Contributions

Advertisement

Featured Links