Skip to content
hostcomplex

What Is a Virtual Machine?

Maarten Soetens 2 min read

A Virtual Machine Defined: A Computer Made of Software

A virtual machine (VM) is a software-based computer that runs inside a physical host and behaves like a separate physical computer. It has its own virtual processors, memory, disk and network adapters, and it runs its own operating system. To the software inside it, the environment looks like a real machine.

A hypervisor creates and runs the VM, mapping its virtual hardware onto the host's physical hardware. The VM is stored as a set of files, usually a virtual disk image and a configuration file. This makes a VM easier to copy, back up and move than a physical machine.

Virtual Hardware, the Guest OS and Shared Resources

Inside the VM, the guest operating system detects its virtual hardware and installs drivers for it, just as it would for real hardware. The virtual CPU runs the guest's instructions on physical cores. The virtual disk appears as a normal drive, while the hypervisor stores its data in the host's storage.

Resources are usually shared rather than permanently fixed. A host with 64 GB of memory might run four VMs with 8 GB each and keep some memory for itself. Whether a VM's resources are reserved or shared on demand depends on the platform and the settings chosen.

Why a VPS Is a Virtual Machine

A virtual private server (VPS) is usually a virtual machine that a hosting provider rents to one customer. The customer receives a guest operating system with administrator access, a set amount of CPU, memory and storage, and a public IP address. The provider runs many such VMs on each physical server.

Because the customer controls the guest OS, the VPS can run its own software, firewall and services. The provider controls the physical host and decides how many guests to place on it. For this reason, the quality of a VPS depends heavily on the host it runs on.

Frequently asked questions

What is the difference between a VM and a physical server?

A physical server is a whole computer with its own hardware, running one operating system. A VM is one of several guests sharing a physical host through a hypervisor. Physical servers give the most direct access to hardware, while VMs offer more flexibility because they can be created, resized and moved more easily. The bare metal vs virtual machine comparison covers this in more detail.

Can a virtual machine run a different operating system from the host?

Yes. A Windows VM can run on a Linux host, and a Linux VM can run on a Windows host, as long as the hypervisor supports the guest OS. Each VM keeps its own kernel, software and settings. Containers, which share the host's kernel, take a different approach.

  • Two-Factor Authentication

    Two factor authentication hosting adds a second check to control panel, domain and CMS logins. Learn which methods are strongest and why 2FA helps.

  • What Is an A Record?

    What is an A record? Learn how this DNS record maps a hostname to an IPv4 address, why domains use several A records and the root and www pattern.

  • Billing and Automation Platforms

    What is WHMCS? Learn how this commercial billing and automation platform helps hosts sell plans, collect payments and create accounts automatically.