Virtualbox Use Physical Disk

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.

To create an image that represents an entire physical hard disk (which will not contain any actual data, as this will all be stored on the physical disk), on a Linux host, use the command VBoxManage internalcommands createrawvmdk -filename /path/to/file.vmdk -rawdisk /dev/sda. VirtualBox allows you to add new Hard Disks from the UI, you can just goto Virtual machine settings and add new hard disks, but its a bit tricky if you want to use as one of your hard disk partitions as the new hard disk, specially if your host is Windows OS. We are going to use VBoxManage utility which was installed with VirtualBox. VBoxRawdisk is a small utility that makes it a little easier to generate the raw disk (VMDK) file required to load a real disk drive into VirtualBox. It implements the steps described in Section 9 of the VirtualBox manual - 9.9.1.1 Access to entire physical hard disk and 9.9.1.2 Access to individual physical hard disk partitions, running VBoxManage to perform the steps based on data you supply.

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.

Virtualbox Use Physical Drive

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

Virtualbox use physical disk usb

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.

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.

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


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 Usb

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

  • Log viewer
  • Add floppy drive
  • Oracle VirtualBox course

      VirtualBox basicsWhat is virtualization?What is hypervisor?Virtualization benefitsWhat is Oracle VM VirtualBox?Oracle VirtualBox featuresHow Oracle VirtualBox works?Executables and componentsInstall VirtualBoxSystem requirementsDownload Oracle VirtualBoxInstall Oracle VirtualBox on WindowsInstall Oracle VirtualBox on LinuxCreate virtual machinesWhat is virtual machine?What is guest operating system?Create virtual machineInstall guest OSInstall UbuntuVirtualBox Guest AdditionsUse virtual machinesStart virtual machinePause virtual machineVirtual Machine snapshotsTake snapshotRestore snapshotDelete snapshotClone virtual machineVirtual machine groupsAdminister virtual machinesChange virtual machine nameMemory managmentMove virtual machineRemove virtual machineLog viewerConfigure devicesAdd DVD or CD-ROM driveAdd floppy driveUSB settingsVirtual diskHard disk controllerDisk image filesConfigure networkingVirtual networkingNetwork modesConfigure NAT NetworkingConfigure bridged networkingConfigure internal networkingConfigure host-only networking

    Virtualbox Using Physical Hard Disk