100% Free Forever
AI-Powered Learning
Industry Expert Content
Certificates & Badges
Learn At Your Own Pace

What Are the Types of Hypervisors?

Learn the two hypervisor types — bare-metal Type 1 and hosted Type 2 — with examples and OS interview questions answered.

mediumQ128 of 224 in Operating Systems Est. time: 6 minsLast updated:
Open Code Lab

Expected Interview Answer

Hypervisors come in two types: Type 1 (bare-metal) runs directly on physical hardware with no host OS underneath it, giving near-native performance and used in data centers, while Type 2 (hosted) runs as an application on top of a conventional host OS, trading some performance for convenience on desktops.

A Type 1 hypervisor — examples include VMware ESXi, Microsoft Hyper-V, and KVM (which turns a Linux kernel itself into a bare-metal hypervisor) — installs directly on the physical server and schedules guest VMs’ access to CPU, memory, and I/O itself, without an intervening general-purpose OS, which minimizes overhead and is the standard choice for production virtualization and cloud infrastructure. A Type 2 hypervisor — examples include VirtualBox and VMware Workstation — installs as a regular application inside an existing host OS like Windows or macOS, relying on that host OS’s scheduler and drivers, which adds a layer of overhead but makes it far easier to run a VM alongside normal desktop use. Both types provide the same core function — presenting virtual hardware to a guest OS and isolating it from other guests — but differ in where that virtualization layer sits relative to the physical hardware and host OS, which directly affects performance, isolation strength, and deployment complexity.

  • Explains why cloud providers use Type 1 hypervisors exclusively
  • Clarifies the performance and isolation trade-off between the two types
  • Helps choose the right hypervisor for production vs desktop development
  • Foundation for understanding container vs VM architecture differences

AI Mentor Explanation

A Type 1 hypervisor is like a purpose-built international cricket stadium that exists solely to host matches directly on its own turf, with ground staff scheduling every team’s access to the pitch with no intermediary venue owner involved. A Type 2 hypervisor is like a community sports club that occasionally hosts a cricket match on a field normally used for other activities, requiring the club’s own booking system and staff (host OS) to coordinate around its regular usage. The dedicated stadium gives players near-perfect conditions with minimal interference, while the shared field always carries some scheduling overhead from the club’s other commitments.

Step-by-Step Explanation

  1. Step 1

    Type 1 install

    A bare-metal hypervisor (ESXi, Hyper-V, KVM) is installed directly on physical hardware, replacing the need for a general-purpose host OS.

  2. Step 2

    Type 1 scheduling

    The hypervisor itself schedules guest VMs' access to CPU, memory, and I/O with minimal overhead.

  3. Step 3

    Type 2 install

    A hosted hypervisor (VirtualBox, VMware Workstation) is installed as an application on top of an existing host OS.

  4. Step 4

    Type 2 scheduling

    The host OS's own scheduler and drivers mediate the hypervisor's access to hardware, adding a layer of overhead.

What Interviewer Expects

  • Correct distinction: Type 1 bare-metal vs Type 2 hosted, with real examples of each
  • Understanding why Type 1 has lower overhead and is used in data centers
  • Awareness that KVM turns the Linux kernel itself into a Type 1 hypervisor
  • Ability to explain the performance and isolation trade-offs clearly

Common Mistakes

  • Saying Type 2 hypervisors are never used in production (they can be for dev/test)
  • Confusing a hypervisor with a container runtime
  • Not knowing KVM is a Type 1 example built into the Linux kernel
  • Thinking both types have identical performance characteristics

Best Answer (HR Friendly)

There are two kinds of hypervisors, the software that lets you run virtual machines. A Type 1 hypervisor runs directly on the physical server with no operating system underneath it, so it’s fast and used in data centers and cloud platforms. A Type 2 hypervisor runs as just another application inside a regular operating system, like installing VirtualBox on your laptop, which is more convenient for everyday use but has a bit more overhead.

Code Example

Conceptual sketch: who schedules the VM's CPU time in each hypervisor type
/* Type 1 (bare-metal): the hypervisor itself is the scheduler */
void type1_schedule_vcpu(struct vm *guest) {
    /* hypervisor directly programs hardware VT-x/AMD-V structures */
    vmx_vmlaunch(guest->vmcs);
}

/* Type 2 (hosted): the hypervisor is a process the host OS schedules */
void type2_schedule_vcpu(struct vm *guest) {
    /* host OS scheduler decides when this process gets CPU time,
       then the hypervisor process itself enters guest mode        */
    if (host_os_schedule(current_process()) == RUNNING) {
        vmx_vmlaunch(guest->vmcs);
    }
}

Follow-up Questions

  • How does KVM turn a Linux kernel into a Type 1 hypervisor?
  • Why do cloud providers exclusively use Type 1 hypervisors for production workloads?
  • What hardware features (VT-x, AMD-V) do hypervisors rely on for performance?
  • How does a hypervisor's isolation model differ from a container runtime's?

MCQ Practice

1. What defines a Type 1 hypervisor?

Type 1 (bare-metal) hypervisors install directly on hardware and schedule guest VMs themselves, without a general-purpose host OS.

2. Which of these is a Type 2 (hosted) hypervisor?

VirtualBox runs as an application on top of an existing host OS like Windows or macOS, making it a Type 2 hosted hypervisor.

3. Why do Type 1 hypervisors typically outperform Type 2 hypervisors?

Because Type 1 hypervisors run directly on hardware, they skip the overhead of a host OS mediating resource access.

Flash Cards

Type 1 vs Type 2 hypervisor?Type 1: bare-metal, no host OS (ESXi, Hyper-V, KVM). Type 2: hosted, runs atop a host OS (VirtualBox, Workstation).

Why is Type 1 used in data centers?It has lower overhead since it schedules VMs directly without a host OS layer in between.

Give an example of a Type 1 hypervisor built into Linux.KVM, which turns the Linux kernel itself into a bare-metal hypervisor.

What is the main trade-off of a Type 2 hypervisor?Easier to run alongside normal desktop use, but adds host-OS scheduling overhead.

1 / 4

Continue Learning