Virtual Machines in Operating System (original) (raw)

Last Updated : 5 Dec, 2025

A Virtual Machine (VM) is a software-based computer that runs within a physical computer (known as the host). It emulates the behavior of a physical machine and can run its own operating system (guest OS) and applications independently just like a real computer.

For example, you can run a Linux VM inside a Windows PC using tools like VirtualBox or VMware.

Working of Virtual Machines

A VM uses virtualization technology to abstract the hardware of a physical machine (CPU, memory, storage, etc.) into a virtual environment. This is managed by a special software called a hypervisor, which allocates system resources to multiple VMs.

Each VM behaves like a separate computer, even though it's running on shared hardware. It includes:

**Example: When you run multiple processes on a regular OS, they appear to have separate CPUs and memory (thanks to CPU scheduling and virtual memory). A VM extends this illusion to the OS level itself.

virtual_machines

Virtual Machines Diagram

Types of Virtual Machines

There are **two main types of VMs:

**1. Process Virtual Machine

**2. System Virtual Machine

**➣Learn More About : Types of Virtual Machines

How to Set Up a Virtual Machine

Setting up a VM involves the following steps (example for installing a Linux VM):

  1. Create a new virtual machine
  2. Allocate virtual disk space
  3. Attach a virtual network adapter
  4. Install the guest operating system (Linux)
  5. Register and activate the VM (if needed)
  6. Install necessary drivers or guest additions

Most platforms like VirtualBox or VMware offer wizards to simplify this setup.

Uses of Virtual Machines

Hypervisor

A hypervisor is software (sometimes firmware or hardware-based) that enables virtualization by separating physical resources from VMs.

There are **two types:

The hypervisor is responsible for assigning CPU, memory, disk, and network to each VM.

Advantages of Virtual Machines

Types of Virtualization (Beyond VM)

Virtualization is not limited to just virtual machines. Here are 5 major types:

1. Hardware Virtualization (Server Virtualization)

Hardware virtualization is the process of creating multiple virtual machines (VMs) that run on a single physical server using a **hypervisor.

**Benefits:

2. Software Virtualization

Software virtualization allows an operating system or application to run in an environment that is different from its native platform.

**Benefits:

3. Storage Virtualization

Storage virtualization combines multiple physical storage devices into a single **logical storage pool, making management easier and more flexible.

**Benefits:

4. Network Virtualization

Network virtualization abstracts network resources, allowing multiple virtual networks to be created on a single physical infrastructure.

**Benefits:

5. Desktop Virtualization

Desktop virtualization separates the desktop environment from the physical machine and stores it on a remote server.

**Benefits: