Purpose of Virtual Machines
A virtual machine (VM) is a software-based computer that runs on top of physical hardware using virtualization software.
Each VM behaves like its own independent computer with its own:
Operating system
CPU allocation
Memory
Storage
Network interface
Purpose:
Allow multiple environments to run on a single physical machine.
Benefits:
Hardware efficiency
System isolation
Easier testing and development
Sandbox
A sandbox is an isolated environment used to safely run or test software.
Purpose:
Prevent potentially harmful software from affecting the main system.
Common uses:
Malware analysis
Software testing
Security research
Key concept:
Changes inside the sandbox do not affect the host system.
Test Development
Virtual machines are commonly used for software development and testing environments.
Developers can:
Test applications on multiple operating systems
Simulate production environments
Quickly reset systems after testing
Example:
Testing software on Windows, Linux, and macOS environments using separate VMs.
Application Virtualization
pplication virtualization allows an application to run independently of the underlying operating system.
Benefits:
Reduces compatibility issues
Allows older applications to run on modern systems
Legacy Software / OS
Older software sometimes requires older operating systems to function properly.
Virtual machines allow organizations to run:
Legacy operating systems
Older business applications
Example:
Running a legacy accounting program that only works on Windows XP.
Cross-Platform Virtualization
Cross-platform virtualization allows applications to run on different operating systems than they were originally designed for.
Example:
Running a Linux environment on a Windows computer using virtualization.
Virtualization Requirements
Security
Virtual environments must be secured to prevent unauthorized access.
Security considerations include:
Access control
Isolation between VMs
Secure hypervisor configuration
Network
Virtual machines require network connectivity.
Virtual networking allows:
Communication between VMs
Access to external networks
Network segmentation
Example:
A VM connecting to the internet or internal network.
Storage
Virtual machines require storage space for:
Virtual hard disks
Operating systems
Application data
Storage systems must support the capacity and speed requirements of multiple VMs.
VDI (Virtual Desktop Infrastructure)
VDI hosts desktop environments on centralized servers.
Users access the desktop remotely using thin clients or remote desktop software.
Benefits:
Centralized management
Improved security
Simplified updates and maintenance
Common in:
Corporate environments
Call centers
Remote work environments
Containers
Containers are lightweight virtualization environments used to run applications.
Unlike full VMs, containers share the host operating system kernel.
Advantages:
Faster startup
Lower resource usage
Easier application deployment
Containers package:
Application
Dependencies
Runtime environment
Common use:
Modern software development and cloud environments.
Hypervisors
A hypervisor is software that creates and manages virtual machines.
It allocates system resources such as CPU, memory, and storage.
There are two main types.
Type 1 Hypervisor (Bare-Metal)
Type 1 hypervisors run directly on the physical hardware without a host operating system.
Characteristics:
Higher performance
Used in enterprise environments
More secure and efficient
Think:
Enterprise virtualization platform
Type 2 Hypervisor (Hosted)
Type 2 hypervisors run on top of an existing operating system.
Characteristics:
Easier to install
Common for testing and development
Slightly lower performance
Think:
Desktop virtualization software
High-Yield Comparison
Concept Purpose
Virtual Machine Software-based computer
Sandbox Safe isolated testing environment
Application Virtualization Run apps independently of OS
Legacy Support Run old software on modern hardware
VDI Remote desktop hosted on servers
Containers Lightweight application environments
Type 1 Hypervisor Runs directly on hardware
Type 2 Hypervisor Runs on host operating system
Common CompTIA Scenario Triggers
Testing malware safely → Sandbox
Running legacy application → Virtual machine
Multiple desktops hosted on a server → VDI
Lightweight application environment → Container
Enterprise virtualization server → Type 1 hypervisor
Running VM on personal computer → Type 2 hypervisor