💻

Understanding Virtual Machines and Their Uses

Aug 21, 2024

Virtual Machines Lecture Notes

Introduction to Virtual Machines

  • Definition: Virtual machines (VMs) are computers within a computer, created through virtualization technology.
  • Benefits: Great for learning hacking, Linux, IT, and understanding virtualization.
  • Installation: Setting up a VM is quick, simple, and free.

What is a Virtual Machine?

  • Concept: A VM acts as a separate computer but runs on the existing hardware of the host machine (laptop/desktop).
  • Components of a Computer:
    • CPU
    • RAM
    • Storage
    • GPU
    • Network Interface Card
  • Operating System Requirement: A VM requires an operating system to function.

Hypervisor

  • Definition: A hypervisor is an application that runs on the host operating system to create and manage VMs.
  • Types of Hypervisors:
    • Type 1 Hypervisor: Runs directly on hardware (e.g., VMware ESXi).
    • Type 2 Hypervisor: Runs on top of an existing OS (e.g., VirtualBox).
  • Popular Hypervisors: VirtualBox is favored for being free and feature-rich.

Why Use Virtual Machines?

  1. Learning Hacking: Safest way to learn hacking techniques with minimal risk.
  2. Exploring Different OS: Experiment with various operating systems without needing extra hardware.
  3. Safe Testing Environment: Allows breaking and testing configurations without affecting the host OS.

Setting Up a Virtual Machine

Requirements

  • A computer (preferably less than 10 years old).
  • At least 4GB RAM.
  • Enable hardware virtualization in BIOS.

Installation Steps

  1. Download OS: Download the desired OS (e.g., Kali Linux, Ubuntu) in .iso format.
  2. Download VirtualBox: Install VirtualBox from its official site.
  3. Extension Pack: Install VirtualBox extension pack for better functionality.
  4. Creating a VM:
    • Name the VM and select the OS type and version.
    • Allocate resources (CPU, RAM).
    • Create a virtual hard disk (size and type).

Configuring Settings

  • Adjust CPU Allocation: Ensure that you don’t allocate too many resources to avoid slow performance.
  • Networking Settings: Choose between NAT or bridged mode depending on desired network accessibility.
  • Shared Clipboard: Enable clipboard sharing for copying and pasting between host and guest OS.

Features of VirtualBox

  • Pause/Resume: Pause the VM to save resources while performing other tasks.
  • Snapshots: Save the state of the VM for easy restoration after changes.
  • Cloning: Create copies of VMs for backup or testing.

Conclusion

  • Virtual machines are essential for learning IT skills, hacking, and experimenting with OS safely.
  • Further knowledge in virtualization can lead to learning advanced topics like Docker and WSL2.
  • Encouragement to engage with the content by liking and subscribing to the channel.