6.3. Creating a New Virtual Machine in VirtualBox

To create a new virtual machine, you need to start VirtualBox. On the host where you installed Oracle VDI and VirtualBox, select the Applications menu on the desktop, then the System Tools menu, and then Oracle VM VirtualBox. Alternatively, you can run the VirtualBox command in a terminal. The Oracle VM VirtualBox Manager is displayed, as shown in Figure 6.4.

Figure 6.4. Oracle VM VirtualBox Manager

The image shows Oracle VM VirtualBox Manager. No virtual machines have been defined.

Tip

All the following steps for creating a virtual machine can be performed using the VirtualBox command line. However, if you are new to VirtualBox, you will probably find the Oracle VM VirtualBox Manager easier to use.

In the toolbar, click the New button. The Create Virtual Machine wizard is displayed in a new window. The wizard enables you to configure the basic details of the virtual machine. Enter a descriptive name for the virtual machine in the Name field and select the operating system and version that you are going to install from the drop-down lists, as shown in Figure 6.5. It is important to select the correct operating system and version as this determines the default settings VirtualBox uses for the virtual machine. You can change the settings later after you have created the virtual machine.

Figure 6.5. VM Name and OS Type Step

The image shows the virtual machine wizard screen for entering the name and operating system of the virtual machine.

Click the Next button to move though the various steps of the wizard. On the Memory Size step, you can simply accept the default. This is the amount of host memory (RAM) that VirtualBox assigns to the virtual machine when it runs. You can change the settings of the virtual machine later, when you import the template into Oracle VDI.

On the Hard Drive step, ensure Create a virtual hard drive now is selected (see Figure 6.6), and click Next.

Figure 6.6. Virtual Hard Disk Step

The image shows the virtual machine wizard screen for creating a new virtual disk.

On the following steps, select VDI (VirtualBox Disk Image) as the hard drive file type, Dynamically allocated as the physical storage type, and accept the defaults for the virtual disk file location and size, and then click Create to create the virtual machine. The wizard is closed and the newly-created virtual machine is listed in Oracle VM VirtualBox Manager, as shown in Figure 6.7.

Figure 6.7. Virtual Machine Added

The image shows Oracle VM VirtualBox Manager and the virtual machine you just created.

Since you want to install an operating system in the virtual machine, you need to make sure the virtual machine can access the installation media. To do this, you edit the virtual machine settings. In Oracle VM VirtualBox Manager, select the virtual machine and then click the Settings button in the toolbar. The Settings window is displayed. In the navigation on the left, select Storage, as shown in Figure 6.8.

Figure 6.8. Virtual Machine Storage Settings

The image shows the Settings window. The storage section is selected.

In the Storage Tree section, select Empty below the IDE Controller. The CD/DVD Drive attributes are displayed. Click the CD/DVD icon next to the CD/DVD Drive drop-down list and select the location of the installation media, as follows:

Figure 6.9 shows an ISO image inserted in the virtual CD/DVD drive.

Figure 6.9. Virtual Machine CD/DVD Drive Settings

The image shows the CD/DVD settings for a virtual machine. An ISO image is attached.

Click OK to apply the storage settings. The Settings window is closed. If you connected the virtual machine's CD/DVD drive to the host's physical CD/DVD drive, insert the installation media in the host's CD/DVD drive now. You are now ready to start the virtual machine and install the operating system.

In Oracle VM VirtualBox Manager, select the virtual machine and click the Start button in the toolbar. A new window is displayed, which shows the virtual machine booting up. Depending on the operating system and the configuration of the virtual machine, VirtualBox might display some warnings first. It is safe to ignore these warnings. The virtual machine should boot from the installation media, as shown in Figure 6.10.

Figure 6.10. An Installation Program in a Running Virtual Machine

The image shows a running virtual machine with the Windows installation settings screen.

You can now perform all your normal steps for installing the operating system. Be sure to make a note of the user name and password of the administrator user account you create in the virtual machine, which you will need in order to log in to the virtual machine. Do not join the virtual machine to a Windows domain (it can be a member of a workgroup) as the domain configuration is performed later. The virtual machine might reboot several times during the installation. When the installation is complete, you might also want to let Windows Update install any software updates.

Next, you need to install the VirtualBox Guest Additions, as described in Section 6.4, “Installing the VirtualBox Guest Additions”.