Configuring-a-virtual-machine

From Daelphinux
Jump to: navigation, search

Introduction

In this tutorial we will cover the basics of configuring a virtual machine, how to set various required settings, and a basic understanding on what the virtual machine is.

Warning: Do not, under any circumstances, double click the ISO file, or in any way mount the ISO file to your host computer. This can lead, in rare cases, to an overwrite of the host system. Only use the files downloaded as instructed.

Objectives

  • Understand how to configure a virtual machine
  • Explain the various components of a virtual machine
  • Explain the abstraction of virtualization
  • Demonstrate complete creation and configuration of a virtual machine

Pre-Requisites

  • VirtualBox must be installed

Requirements

  • Your Host system must have the following resources available
    • 4 GB RAM free
    • 20 GB Hard Drive Space Free
    • 1 or more Virtual Processors

Optional

  • You will need the Parrot Security ISO from the Homelab Tutorials page for the next tutorial. If you would like, now would be a good time to download it.

Discussion and Process

Virtualization

We are going to create a virtual machine in this tutorial. A virtual machine is an abstraction of a computer, completely separate from the host, that is running on emulated hardware. In a computer there are multiple layers of abstraction that work together to create the system. The lowest of these layers is the Hardware layer. In our virtual machine's case, the hardware layer will be at the first abstraction layer to create an emulated set of hardware resources the (virtual) computer requires (Processor, Display Adapter, Hard Disks, RAM, etc.). In order for the virtual machine to be completed, we can look at the process just like building a physical computer.

1. Hardware Requirements

The first step in configuring the system is going to be gathering the hardware requirements for the system. In this case we will need a basic Driver for our homelab. This means we will shoot for pretty basic specifications as we will only be performing basic penetration testing in this series. To that end, we will implement the following specifications:

  • 4 GB RAM
    • This will be sufficient to run most basic applications with running data in a reasonable amount of time.
  • 20 GB Hard Drive
    • We will pretty much only need to store transient files and maybe some notes. This should be more than sufficient
  • 2 Virtual Processors
    • Having 2 virtual processors will allow some scripts and programs to run across multiple cores to increase efficiency. This should also allow for sufficient multi-tasking ability.

These are fairly standard specifications for a basic computer.

2. Assemble the Hardware

In the case of building a real computer, this would be where we would purchase the hardware components and physically assemble them. In our case we are going to use the Virtualbox System configuration wizard and configure the values, as opposed to getting physical hardware.

1. Open VirtualBox to the main screen.

A screenshot of VirtualBox's home screen
A screenshot of VirtualBox's Tools screen


2. Select the New option from the main screen

A screenshot of the VirtualBox home screen with the New option highlighted in a red rectangle.
The New option

3. In the resultant window, select the "Expert Mode" Option.

VirtualBox Basic Configuration Wizard

4. We are all experts now! In this window we will configure the following options, click "create" when done.

  1. Name: "Driver"
  2. Type: "Linux"
  3. Version: "Debian (64-bit)"
    1. This shows the system how to virtualize hardware that will work with our desired operating system.
    2. We will discuss more about the different flavors of Linux in the next tutorial.
  4. Memory Size: "4096 MB"
    1. This is where we configure our desired RAM size.
    2. 4096 MB is the 4 GB we discussed earlier.
  5. Select "Create a virtual hard disk now"
    1. This will take us to a wizard that will let us configure the virtual hard drive.
The Virtualbox Expert configuration window. Each step numbered as in the text.

4. Set the file Size of the Drive to 20.00 GB and click Create

Set the size, and click create!

5. At this point you have created the virtual machine!

Your newly created Virtual Machine!

Next Steps

In the next tutorial we will discuss installing an operating system on our virtual machine to make it more useful. Right now we have, essentially, a completely blank system. Until we install an operating system on it to interact with, it is largely useless in its current state.

Optional Self-Study Questions

  1. What 2 primary components for a computer did we configure for our virtual machine?
  2. Is the virtual machine the same as the host machine, or is it a separate entity?
    1. What is the relationship between the host and the virtual machine?

Bonus research question

If you want to no more about operating systems and abstraction layers, take a look at these articles: