Skip to main content

Virtual Machine

In Turkish
Sanal Makine
Updated 2 min read

Share this page

Send the link, quote the definition with a link back, or show it as a card on your own site.

https://softwaredictionary.org/terms/virtual-machine

In short

A virtual machine is a software-based computer that runs its own operating system on shared physical hardware, isolated from other machines on the same host.

What is a virtual machine?

A virtual machine (VM) is a complete computer simulated in software. It has its own virtual CPU, memory, disk, and network card, and it runs a full operating system, called the guest, just as a physical computer would. One physical server, called the host, can run many VMs side by side, each isolated from the others.

The software that makes this possible is a hypervisor, which divides the host's real hardware between the VMs and keeps them separated. Type 1 hypervisors, such as KVM and Xen, run directly on the hardware and power most data centers and cloud platforms, while type 2 hypervisors, such as VirtualBox, run as an app on a regular desktop operating system. Modern CPUs include hardware virtualization features that let VMs run at close to native speed.

If containers are like apartments that share one building's plumbing, VMs are more like detached houses built on shared land: the land (the physical hardware) is shared, but each house has its own foundation and utilities (its own operating system and kernel). When you rent a virtual server from a cloud provider, you are almost always renting a VM running on someone else's hardware.

Virtual machines are often confused with containers. A VM includes an entire guest operating system with its own kernel, so it is larger, often measured in gigabytes, and slower to boot, but it is more strongly isolated and can run a different operating system than the host, such as Windows on a Linux server. A container shares the host's kernel and packages only the application, which makes it lighter and faster, and in the cloud, containers very often run inside VMs.

Key takeaways

  • A VM is a software-emulated computer with its own operating system.
  • A hypervisor shares one physical host's hardware among many isolated VMs.
  • A VM can run a different operating system than its host.
  • Compared with containers, VMs are heavier but more strongly isolated.
  • Most cloud servers are VMs running on shared physical hardware.

Example

Creating a virtual machine with QEMU/KVM on Linuxbash
# Check that the CPU supports hardware virtualization (a result above 0 means yes)
grep -Ec '(vmx|svm)' /proc/cpuinfo

# Create a 20 GB virtual disk for the VM
qemu-img create -f qcow2 disk.qcow2 20G

# Boot a VM with 4 GB of RAM and 2 CPUs from an installer image
qemu-system-x86_64 -enable-kvm -m 4096 -smp 2 \
  -drive file=disk.qcow2,format=qcow2 \
  -cdrom installer.iso

Readers ask

What is the difference between a virtual machine and a container?

A virtual machine runs a full guest operating system with its own kernel on virtualized hardware, while a container shares the host's kernel and isolates only the application. VMs offer stronger isolation and can run any operating system; containers are smaller and start much faster.

What is a hypervisor?

A hypervisor is the software that creates and runs virtual machines by sharing the host's CPU, memory, storage, and network among them. Type 1 hypervisors run directly on the hardware, while type 2 hypervisors run on top of a regular operating system.

Is a cloud server a virtual machine?

Usually, yes. Most cloud compute instances are VMs running on the provider's physical servers, although many providers also offer bare-metal servers that give you an entire physical machine.

Often compared

See also

Spotted a mistake or something missing on this page?Suggest an edit

Read a random page
Open today's review
Switch to the dark theme
Read this page in Türkçe

More

Settings