Virtualbox Tutorial

Ajay Krishna
BeyondX
Published in
7 min readSep 13, 2020

What is Virtualization?

Before we get into Virtualbox, let us see something about some basic stuff that defines a virtual machine! Virtualization is the process of running a virtual instance of a computer system in a layer abstracted from the actual hardware. It is the single most effective way to reduce IT expenses while boosting efficiency and agility for all size businesses. Most commonly, it refers to running multiple operating systems on a computer system simultaneously.

There are many reasons why people utilize virtualization in computing. To desktop users, the most common use is to be able to run applications meant for a different operating system without having to switch computers or reboot into a different system. For administrators of servers, virtualization also offers the ability to run different operating systems, but perhaps, more importantly, it offers a way to segment a large system into many smaller parts, allowing the server to be used more efficiently by a number of different users or applications with different needs.

Types of Virtualization

Desktop Virtualization

Desktop virtualization creates a software-based (or virtual) version of an end user’s desktop environment and operating system (OS) that is decoupled from the end user’s computing device or client. This enables the user to access his or her desktop from any computing device. Unlike traditional desktop environments that are physically installed, configured, and updated on each machine, desktop virtualization allows admins to perform mass configurations, updates, and security checks on all virtual desktops.

It is often confused with operating system virtualization — which allows you to deploy multiple operating systems on a single machine

Server Virtualization

Servers are computers designed to process a high volume of specific tasks really well so other computers — like laptops and desktops — can do a variety of other tasks. Virtualizing a server lets it to do more of those specific functions and involves partitioning it so that the components can be used to serve multiple functions.

Network Virtualization

By completely reproducing a physical network, network virtualization allows applications to run on a virtual network as if they were running on a physical network — but with greater operational benefits and all the hardware independencies of virtualization. (Network virtualization presents logical networking devices and services — logical ports, switches, routers, firewalls, load balancers, VPNs, and more — to connected workloads.)

Operating System Virtualization

Operating system virtualization happens at the kernel — the central task managers of operating systems. It’s a useful way to run Linux and Windows environments side-by-side.

Major operations of Operating System Based Virtualization are described below:

  • Hardware capabilities which can be employed, such as the network connection and CPU.
  • Connected peripherals with which it can interact with, such as webcam, printer, keyboard, or Scanners.
  • Data that can be read or written, such as files, folders and network shares.

What is a hypervisor?

A hypervisor (or virtual machine monitor, VMM, virtualizer) is computer software, firmware, or hardware that creates and runs virtual machines. A computer on which a hypervisor runs one or more virtual machines is called a host machine, and each virtual machine is called a guest machine. It is a thin layer of software that decouples the virtual machines from the host and dynamically allocates computing resources to each virtual machine as needed.

There are two types of hypervisors: type 1 and type 2.

A type 1 hypervisor is also called a native hypervisor and can run on bare metal by accessing the hardware directly. A type 1 hypervisor doesn’t require an underlying operating system (OS) because the hypervisor works as the operating system in this case. Using type 1 is optimal for large production environments. A type 2 hypervisor runs on an existing host operating system as an application. This type provides virtualization services by coordinating calls for CPU, memory, disk, and other I/O (input/output) resources through the host OS. Using a type 2 hypervisor is convenient for users who want to run a VM on their personal computers.

What is a virtual machine?

A virtual computer system is known as a “virtual machine” (VM): a tightly isolated software container with an operating system and application inside. Each self-contained VM is completely independent. Putting multiple VMs on a single computer enables several operating systems and applications to run on just one physical server, or “host.”

Properties of Virtual Machines

VMs have the following characteristics, which offer several benefits.

Partitioning

  • Run multiple operating systems on one physical machine.
  • Divide system resources between virtual machines.

Isolation

  • Provide fault and security isolation at the hardware level.
  • Preserve performance with advanced resource controls.

Encapsulation

  • Save the entire state of a virtual machine to files.
  • Move and copy virtual machines as easily as moving and copying files.

Hardware Independence

  • Provision or migrate any virtual machine to any physical server.

Oracle and VMware are leaders in providing virtualization solutions in the modern IT industry. Oracle provides VirtualBox as a hypervisor for running virtual machines (VMs) while VMware provides multiple products for running VMs in different use cases.

Oracle VirtualBox is a Type 2 hypervisor and must be installed on the host OS as a software application.

VMware Player, Workstation, and Fusion are type 2 hypervisors, and must also be installed on the underlying host OS.

VMware ESXi is a type 1 hypervisor and must be installed on bare metal.

Since Virtualbox is open source and completely free, let us focus on that.

Installing Virtualbox

  1. Go to the official VirtualBox website https://www.virtualbox.org/.

2. Click the “Download Virtualbox” button.

3. Now based on your Operating System version (Windows/Linux/Mac), click on “Windows hosts” if you are using a Windows OS, “OS X hosts” if you are using a macOS or “Linux distributions” if you are a Linux user.

4. After clicking on the respecting links, an installation file will be downloaded.

5. Now run the installation file for Virtualbox to be installed on your PC.

6. We can also install Oracle VM VirtualBox Extension Pack for USB 2.0 and USB 3.0 devices support, VirtualBox RDP, disk encryption, NVMe and PXE boot for Intel cards.

For Linux (Alternate)

  1. Open terminal.
  2. Type in “sudo apt-get install virtualbox-qt” and press enter.

Creating a Virtual Machine

  1. Gather your installation disc(s) or files — When creating a virtual machine, you will need to install the operating system just like you would on a regular computer. This means that you will need the installation disc(s) for the operating system you want to install on the virtual machine. You can also install an operating system by using its ISO file.

2. Click New. This will open the wizard that will guide you through the process to create your first virtual machine.

3. Identify the operating system. On the first screen of the wizard, you will be asked to give the new virtual machine a name as well as choose what operating system you will be installing. Choose the type of operating system from the “Type” menu, and then choose which version you are installing from the “Version” menu. Click Next after selecting the type.

4. Set the amount of RAM. You will need to designate how much of your computer’s RAM will be allocated to your virtual machine. VirtualBox will automatically choose the recommended minimum amount for the operating system you selected, but you can increase or decrease this if you’d like. Click Next.

5. Create a virtual hard drive. Select a virtual hard drive option and click Create, then click through the prompts and click Create again. Your virtual machine will need a virtual hard drive in order to install the operating system and any programs.

6. Start the operating system installation. Once the virtual machine has been configured, the wizard will close and you will be taken back to the VirtualBox main window. Double-click your new machine in the left menu.

8. If you are installing from an image file, click the folder-shaped icon to browse through your computer for the installation image file.

9. Install the operating system.

--

--