🎓 BookMCQ
← Back to 16. Virtual Machines

📝 Type 1 hypervisor bare metal (10 MCQs)

Hypervisor Running Directly on Physical Hardware

A Type 1 hypervisor, also called a bare-metal hypervisor, runs directly on the physical computer rather than as an application hosted by a general-purpose operating system. It controls processor scheduling, memory virtualisation, and device access for guest operating systems. This architecture is widely used in servers and data centres where multiple virtual machines share a managed hardware platform.

Why Removing a General Purpose Host Layer Matters

A hosted hypervisor depends on an existing operating system for device access and resource services. In a bare-metal design, the hypervisor controls hardware resources more directly, reducing reliance on an additional general-purpose host layer. This can improve control, isolation, and performance predictability for consolidated enterprise workloads.

Booting Guests and Scheduling Physical Resources

The computer starts the hypervisor during boot. The hypervisor initialises supported hardware, creates virtual machine environments, and allocates virtual CPUs, memory, and devices. Guest operating systems boot inside those environments. The hypervisor schedules guest execution on physical processors and mediates access to memory, storage, networking, and peripherals.

Example of a Bare Metal Server

A data centre server boots a Type 1 hypervisor on a 24-core processor with 128 GB RAM. The administrator creates separate Linux and Windows guests for web and database workloads. Each guest receives configured virtual resources, while the hypervisor manages their competing requests and device access.

Performance, Isolation and Administration Requirements

Type 1 hypervisors are suited to server consolidation, virtual infrastructure, and cloud platforms. Direct hardware management can reduce host operating system overhead, but specialised drivers and configuration are required. Hypervisor vulnerabilities remain critical because compromise can affect multiple guests, and overcommitted resources may cause contention despite bare-metal execution.

Misconceptions About Type 1 Hypervisors

'A Type 1 hypervisor runs inside Windows or Linux as an application' describes Type 2 hosting. 'Bare metal means no management software is present' is false because the hypervisor itself manages resources. 'Type 1 guarantees zero overhead' ignores scheduling, virtualisation, and device mediation costs.

Exam Focus: Bare Metal Architecture and Resource Control

Identify the hypervisor's position directly above physical hardware and explain how guests are started and scheduled. Compare Type 1 with hosted Type 2 architectures. Questions may examine performance, device management, isolation, and why bare-metal hypervisors are common in data centres and enterprise server environments.

Key Terms of Type 1 Hypervisors

  • Type 1 - Hypervisor running directly on hardware.
  • Bare metal - Physical machine without a host OS layer.
  • Guest - Operating system managed by the hypervisor.
  • Hypervisor - Layer controlling virtual machine resources.
  • Consolidation - Hosting multiple workloads on one server.
2
Easy
5
Medium
3
Hard

📝 All Type 1 hypervisor bare metal MCQs

Q1. A data center wants to run multiple guest OSes directly on hardware without an underlying host OS. Which hypervisor type should they choose?

A.Type 1 (bare‑metal) hypervisor ✅
B.Type 2 (hosted) hypervisor
C.Paravirtualization layer
D.Full system emulator
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: The correct choice is Type 1 because it installs directly on the physical server and manages guest operating systems without a host OS. Type 2 requires an underlying operating system, which adds extra layers and latency. Paravirtualization still needs a host OS, and a full system emulator runs entirely in software, making it unsuitable for high‑performance data‑center workloads.

Q2. What is the primary role of a virtual CPU (VCPU) in a Type 1 hypervisor?

A.Execute guest instructions directly
B.Represent the guest’s CPU state to the hypervisor ✅
C.Provide network I/O services
D.Manage persistent storage for the VM
💡 Difficulty: easy | ✅ Correct: B

📖 Explanation: A VCPU does not run code itself; it holds the register contents, program counter, and control flags that the guest believes belong to its own processor. By saving and restoring this state, the hypervisor can switch between guests efficiently. Executing instructions is done by the physical CPU, while the VCPU merely mirrors the logical view of the guest operating system.

Q3. A guest kernel attempts a privileged instruction while the VM is in user mode. How does a Type 1 hypervisor typically handle this situation?

A.The hypervisor ignores the fault and lets the guest continue
B.The hypervisor restarts the VM immediately
C.The hypervisor traps the instruction, emulates its effect, and updates the VCPU state ✅
D.The hypervisor converts the instruction to a no‑operation
💡 Difficulty: medium | ✅ Correct: C

📖 Explanation: When a privileged instruction is issued from user mode, the CPU generates a trap that transfers control to the hypervisor. The hypervisor then emulates the instruction’s semantics, modifies the virtual CPU registers as needed, and resumes the guest. Ignoring the fault would break isolation, and restarting or turning the instruction into NOP would not preserve correct program behavior.

Q4. Why does a Type 1 hypervisor need hardware support such as Intel VT‑x or AMD‑V?

A.To allow direct execution of privileged instructions in a non‑root mode ✅
B.To reduce the overhead of binary translation
C.To enable creation of multiple VCPUs
D.To provide better I/O virtualization
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: Hardware virtualization extensions create a new CPU mode (non‑root) where guest kernels can run privileged code without causing a trap for every instruction. This eliminates the need for costly binary translation of each privileged operation, improving performance and simplifying the hypervisor design. While the extensions also aid I/O and multi‑VCPU support, their primary purpose is to let privileged instructions execute directly.

Q5. Which statement best defines a Type 1 hypervisor?

A.It runs directly on the physical hardware and manages guest OSes ✅
B.It runs on top of a host operating system
C.It requires a paravirtualized guest kernel
D.It emulates an entire computer in software
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: A Type 1 hypervisor, often called a bare‑metal hypervisor, is installed straight onto the server’s firmware and takes control of the hardware resources. It schedules and isolates guest operating systems without relying on a separate host OS. The other options describe Type 2 hypervisors, paravirtualization, or full emulation, which are distinct approaches.

Q6. A cloud provider must guarantee that a compromised guest cannot affect other guests or the hypervisor itself. Which feature of a Type 1 hypervisor provides this isolation?

A.CPU ring protection only
B.Memory paging only
C.I/O device assignment only
D.All of the above ✅
💡 Difficulty: hard | ✅ Correct: D

📖 Explanation: Isolation is achieved through a combination of mechanisms: CPU rings (or privilege levels) keep guest kernels from executing privileged code in the hypervisor’s context; memory paging ensures each VM sees its own address space; and I/O device assignment gives exclusive control of hardware to a specific VM. Relying on a single mechanism would leave gaps, so the hypervisor employs all three to maintain strong separation.

Q7. How does trap‑and‑emulate differ from binary translation when handling privileged instructions?

A.Both intercept at runtime, but trap‑and‑emulate modifies registers directly
B.Binary translation rewrites guest code ahead of execution, while trap‑and‑emulate intercepts at runtime ✅
C.Trap‑and‑emulate requires hardware support, binary translation does not
D.Binary translation cannot handle system calls
💡 Difficulty: hard | ✅ Correct: B

📖 Explanation: Binary translation examines the guest’s binary code before it runs, replacing privileged instructions with safe sequences that the hypervisor can execute directly. In contrast, trap‑and‑emulate lets the guest code run until a privileged instruction triggers a trap, at which point the hypervisor emulates the instruction’s effect. The former reduces runtime overhead, while the latter relies on dynamic handling of each trap.

Q8. During live migration, a VM’s VCPU state must be transferred to another host. Which components of the VCPU must be saved?

A.Only the general‑purpose registers
B.Only the program counter
C.Only the control registers
D.All of the above (registers, program counter, control registers) ✅
💡 Difficulty: hard | ✅ Correct: D

📖 Explanation: A complete VCPU snapshot includes the full architectural state: general‑purpose registers, the program counter (instruction pointer), and control registers such as flags and segment selectors. Omitting any part would cause the resumed VM to behave incorrectly, potentially crashing or violating security guarantees. Therefore, the migration process captures all of these elements to reconstruct the exact execution context on the destination host.

Q9. In a Type 1 hypervisor, what is the relationship between the physical CPU mode and the virtual CPU modes?

A.Both run in root mode
B.Both run in non‑root mode
C.Virtual user/kernel modes run in non‑root while the hypervisor runs in root ✅
D.Virtual modes run in root and the hypervisor in non‑root
💡 Difficulty: medium | ✅ Correct: C

📖 Explanation: The hypervisor occupies the privileged root mode of the physical CPU, allowing it to control hardware. Guest VCPUs execute in a non‑root mode that mimics both user and kernel states, but they never reach the actual root level. This separation ensures that privileged instructions from a guest are trapped to the hypervisor, preserving isolation and security.

Q10. A guest kernel issues the HLT instruction on a system lacking VT‑x support. What will the Type 1 hypervisor do?

A.Execute HLT directly on the physical CPU
B.Trap the instruction and emulate its effect ✅
C.Convert HLT to a NOP instruction
D.Crash the virtual machine
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: Without hardware virtualization extensions, privileged instructions like HLT cause a trap when executed in user mode. The hypervisor intercepts this trap, emulates the halt behavior by pausing the guest’s execution, and later resumes it when appropriate. Direct execution would halt the entire host, converting to NOP would break semantics, and crashing the VM would be unnecessary.

🔗 Related Topics (MCQs)