Nepedia
Back to Discover
Advanced Reader
💻

Virtual machine

technology Maturity 9-11 Next article →

A virtual machine (VM) is the virtualization or emulation of a computer system. In simple terms, it is a software-based version of a physical computer. These machines are built on computer architectures to provide the same functionality as real hardware. They can be created using specialized hardware, software, or a combination of both.

Virt-manager 3.2.0 QEMU KVM screenshot
Virt-manager 3.2.0 QEMU KVM screenshot

By using a VM, a single physical computer can act like many different machines at once. This allows for much greater flexibility in how we use computing power.

To understand how this works, we must distinguish between the "host" and the "guest." The physical, real-world hardware running the system is called the host. The virtual machine running on that hardware is called the guest.

Hardware Virtualization (copy)
Hardware Virtualization (copy)

A single host can run several guests simultaneously. Each guest can run its own unique operating system, such as Windows or Linux. This is possible because the host manages the hardware to create isolated environments for each guest.

System virtual machines, also known as full virtualization VMs, provide a complete substitute for a real machine. These machines allow an entire operating system to execute within the virtual environment. A hypervisor is the key tool used here; it manages and shares the host's hardware resources. Modern hypervisors often use hardware-assisted virtualization. This means the host's central processing unit (CPU) has specific hardware features designed to help the hypervisor run guests more efficiently.

Hardware Virtualization (copy)
Hardware Virtualization (copy)

Another type is OS-level virtualization, where the computer's kernel partitions its resources.

Process virtual machines, or application virtual machines, work differently. Instead of simulating a whole computer, they run as a normal application inside a host operating system. A process VM is created when a specific program starts and is deleted when that program closes. Its main goal is to provide a platform-independent environment. This means a programmer can write code that runs the same way on any device, regardless of the underlying hardware. The Java virtual machine (JVM) is a famous example of this technology. Other examples include the .NET Framework and the Parrot virtual machine.

The history of these technologies dates back to the 1960s. System virtual machines grew out of a concept called time-sharing. This allowed multiple users to use one computer at the same time by switching between programs in small time slices. IBM was a leader in this field with research systems like the CP-40 and CP-67, which provided early examples of full virtualization. Process virtual machines also emerged around 1964. An early example was the META II compiler-writing system. Later, the Pascal-P system in the 1970s used "p-code," a method that influenced many modern interpreters like the Java virtual machine.

Virtual machines offer many practical advantages for modern computing. One major use is server consolidation, where many virtual machines run on one strong physical machine to save resources. They are also used as "sandboxes" for testing unproven or novel software. If the software fails, it only affects the guest, not the host. Developers also use them for better debugging access and faster reboots. In embedded systems, a VM might allow a real-time operating system to run alongside a complex one like Linux.

qubes-trust-level-architecture
qubes-trust-level-architecture

There are even specialized process VMs designed for computer clusters. Instead of a single process, these systems use one process per physical machine in a group. They help programmers manage concurrent applications by handling the communication between machines. This allows the programmer to focus on algorithms rather than the complex details of how machines talk to each other. Examples include the Parallel Virtual Machine (PVM) and the Message Passing Interface (MPI). Whether used for massive server farms or running a single application, virtual machines remain a fundamental part of computer science.

622 words

Where will your curiosity go next?

Keep exploring at your chosen reading level.

🖼️ Images & Media (3)
File:Virt-manager_3.2.0_QEMU_KVM_screenshot.png
Virt-manager_3.2.0_QEMU_KVM_screenshot.png
File:Hardware Virtualization (copy).svg
Hardware Virtualization (copy).svg
qubes-trust-level-architecture.webp
More to explore

🔬 Go deeper

More advanced topics to explore

🪜 Step back

Simpler topics to build understanding

What is Nepedia?

A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.