Virtualbox Use Physical Disk

Physical drive enumeration is a Windows property and not one that VBox can control. All that I can think of are botches, such as having two VMDK containers (one for each location) and wrapping the startvm in a script which detects whether your disk is 1 or 5. The is no option with the GUI to do it but on the command line, you can create a pseudo disk image (vmdk) that refers to a physical disk. If you attach that disk to.

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


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 New Virtual Machine Wizard is displayed in a new window, as shown in Figure 6.5.

Figure 6.5. New Virtual Machine Wizard


Click the Next button to move though the various steps of the wizard. The wizard enables you to configure the basic details of the virtual machine. On the VM Name and OS Type step, 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.6. It is important to select the correct operating system and version as this determines the default settings for VirtualBox uses for the virtual machine. You can change the settings later after you have created the virtual machine.

Figure 6.6. VM Name and OS Type Step


On the Memory 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 Virtual Hard Disk step, ensure Start-up Disk is selected (see Figure 6.7) , select Create new hard disk and click Next. The Virtual Disk Creation Wizard is displayed in a new window so you can create the new virtual disk.

Figure 6.7. Virtual Hard Disk Step


On the following steps, select VDI (VirtualBox Disk Image) as the file type, Dynamically allocated as the storage details, and accept the defaults for the virtual disk file location and size, and then click Create to create the virtual disk.

When the virtual disk is created, the Virtual Disk Creation Wizard is closed and you are returned to the Summary step of the New Virtual Machine Wizard. 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.8.

Figure 6.8. Virtual Machine Added


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 in the toolbar click the Settings button. The Settings window is displayed. In the navigation on the left, select Storage as shown in Figure 6.9.

Virtualbox Use Physical DiskVirtualbox Use Physical Disk

Figure 6.9. Virtual Machine Storage Settings


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:

  • To connect the virtual CD/DVD drive to the host's physical CD/DVD drive, select Host Drive <drive‑name>.

    To insert an ISO image in the virtual CD/DVD drive, select Choose a virtual CD/DVD disk file and browse for the ISO image.

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

Figure 6.10. Virtual Machine CD/DVD Drive Settings


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.

Attach Physical Drive To Virtualbox

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.11.

Figure 6.11. An Installation Program in a Running Virtual Machine


Virtualbox Use Physical Disk

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 to install any updates.

Virtualbox Use Physical Disk Imager

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