1. What is Virtualization?

It's technology that allows you to run multiple operating systems on one physical machine simultaneously.

The Concept

Imagine your laptop is a large apartment building.

Virtual Machines (VMs) are separate rooms inside.

Each room has its own OS (Windows, Linux, Kali) but shares the building's resources.

Why use it?

  • 🧪 Testing: Safe playground for malware.
  • 🐧 Learning: Run Linux inside Windows.
  • 💰 Cost: 1 Server replaces 10 physical ones.
  • 🛡️ Safety: If VM breaks, Host is safe.

2. The Hypervisor

The Hypervisor is the software that creates and manages VMs. It's the "Landlord".

Type 1 (Bare Metal)

Runs directly on hardware. No Host OS.

Used in: Data Centers, Enterprise Servers.

Examples: VMware ESXi, Microsoft Hyper-V.

Type 2 (Hosted)

Runs as an app on your OS.

Used for: Learning, Labs, Personal Use.

Examples: VirtualBox, VMware Workstation.

3. Inside a VM

vCPU

Virtual Processors.

Don't allocate all cores!

vRAM

Virtual Memory.

Takes from real RAM.

vDisk

Virtual Hard Drive.

Just a file (.vdi) on disk.

4. Practical: Setup a Lab

1

Install VirtualBox

Download from virtualbox.org.

Install with default settings.

2

Download ISO

Get Kali Linux or Ubuntu ISO.

Always choose 64-bit Installer.

3

Create VM

Control + N in VirtualBox.

Name: "Kali Lab". Type: Linux.

4

Attach ISO

Settings -> Storage.

Empty CD -> Choose Disk File (ISO).

⚠️ Golden Rule of RAM

Never give a VM more than 50% of your total RAM.

Example: 16GB Total -> Give VM 4GB-8GB max. Host needs the rest!

5. Deep Dive

Virtual Networking

NAT: VM hides behind Host (Internet works easily).

Bridged: VM gets its own IP address on the network.

Hardware Req (VT-x)

Virtualization needs hardware support.

If VM is slow or fails, enable Intel VT-x or AMD-V in BIOS.