What is a virtual machine?

In its simplest form, a virtual machine, or VM, is a digitized version of a physical computer. Virtual machines can run programs and operating systems, store data, connect to networks, and do other computing functions. However, a VM uses entirely virtual resources instead of physical components. 

VMs enable businesses to create isolated environments on host hardware that behave like separate machines. A more straightforward way to understand what a virtual machine is to think of it as a virtual computer within another computer. But instead of a physical computer like a server, laptop, or smartphone, a VM is defined by software. 

Much of the technology we benefit from today, such as cloud computing and artificial intelligence, is rooted in the concept of the virtual machine, which allows operating systems and software to be separated from a physical machine. For instance, VMs in cloud computing are used to virtualize the resources of cloud service providers’ servers, enabling the multi-tenant cloud architecture that allows customers to share resources. 

Learn more about virtual machines from Google Cloud and the different VM family types available for use on our cloud-based computing infrastructure. Ready to get started? Deploy a preconfigured VM cluster solution recommended by Google experts. 

Virtual machine defined

A VM is a virtualized environment of a physical computer. It can perform almost all of the same functions, including running applications and operating systems.

Ready to get started? Deploy a preconfigured VM cluster solution recommended by Google experts. 

How do virtual machines work?

Virtual machines use virtualization technology to create virtual hardware—or a virtual version of a computer on a physical machine. The physical machine on which the VMs run is called the host, and the VMs running on the host are called guests

Each guest VM runs on an isolated partition on the host, completely separated from other guests. You can host multiple VMs on a single host machine, often a server, running on a software layer known as the hypervisor.

The hypervisor abstracts the host machine’s physical resources, such as compute, memory, or storage, into a pool that can be provisioned and dynamically allocated to guest VMs as needed, providing more flexibility and increasing overall efficiency.

Types of virtual machines

Generally speaking, there are two types of virtual machines: process VMs and system VMs. 

  • Process VM: A process VM, also called an application virtual machine or managed runtime environment (MRE), creates a virtual environment of an OS while an app or single process is running and destroys it as soon as you exit. Process VMs enable creating a platform-independent environment that lets an app or process run the same way on any platform.
  • System VM: A system VM (sometimes called hardware virtual machines) simulates a complete operating system, allowing multiple OS environments to live on the same machine. Typically, this is the type of VM people are referring to when they talk about “virtual machines.” System VMs can run their own OS and applications, and a hypervisor monitors and distributes the physical host machine’s resources between system VMs. 

More recently, you may have also heard people discussing virtual machines in the cloud or a cloud VM. Cloud virtual machines are simply virtual machines that run on virtual servers in the cloud. Many cloud service providers let you create and run cloud virtual machines on their infrastructure, allowing you to use their powerful servers as host machines and leverage other software-defined services such as memory and network storage. 

Watch the video episode of VM End to End below to learn more about what a virtual machine is in cloud computing and what your business can do with a cloud VM. 

Benefits of virtual machines

Virtual machines offer many benefits, particularly if you opt for a cloud VM, including the following: 

Scalability

Cloud-based VMs make it easier to scale your applications, increasing availability and performance. You can increase your capacity according to demand without having to invest in your own physical servers. 

Portability 

A virtual machine is a single software package with hardware resources, an operating system, and all its applications. You can easily move VMs from one server to another, or even from on-premises hardware into cloud environments. 

Reduced footprint and costs

VMs allow you to run multiple virtual environments from a single machine, helping reduce your physical infrastructure footprint, electricity bill, and maintenance and management costs. 

Faster provisioning 

VMs can be easily duplicated, enabling businesses to spin up new, identical environments without having to set them up from scratch.

Reliability

Virtual machines and their components exist virtually and remain isolated from other guest VMs. If VM crashes, the other guest VMs will remain operational, and the physical host machine won't be affected. 

Better security

Virtual machines allow you to run multiple operating systems without impacting the host operating system. VMs let you create safe, virtual  environments to test apps or even study security vulnerabilities without high risk to the host machine. 

Potential challenges of virtual machines

There are, however, some considerations to keep in mind when running VMs. One of the biggest potential challenges of virtual machines is that running multiple operating systems and a hypervisor layer can come with a performance cost if the host machine isn’t robust enough. In addition, virtual hardware may not be as efficient as the physical hardware of a physical machine. 

Many of these concerns though can be overcome by choosing to use VMs offered by a cloud service provider. Cloud VMs provide many advantages over traditional VMs since they offer organizations access to the computing power of an entire data center’s worth of computers, rather than a single machine. 

For example, Google Cloud virtual machines sizes can expand to include higher CPU and memory. It also optimizes its machine types around specific customer needs for compute-intensive workloads, high memory configurations, or demanding workloads like machine learning or high performance computing

Google Cloud even offers shielded virtual machines for extra security and verifiable integrity of your VM instances. Google Cloud shielded virtual machines leverage advanced platform security capabilities and controls that protect enterprise workloads from threats like remote attacks, privilege escalation, and malicious insiders. 

How are virtual machines used?

VMs are the basic building blocks of virtualized computing resources and play a primary role in creating any application, tool, or environment—both in the cloud or on-premises. 

Here are a few of the more common ways businesses use virtual machines:

  • Consolidate servers: Multiple physical machines can be reconfigured as a VM and run on a host alongside other VMs, allowing organizations to reduce sprawl.
  • Create development and test environments: VMs can serve as isolated environments for testing and development that include full functionality but have no impact on the surrounding infrastructure.
  • Support DevOps: VMs can easily be turned off or on, migrated, and adapted, providing maximum flexibility for development. 
  • Enable workload migration: The flexibility and portability that VMs provide are key to increasing the velocity of migration initiatives.
  • Improve disaster recovery and business continuity: Replicating systems in cloud environments using VMs can provide an extra layer of security and certainty. Cloud environments can also be continuously updated.
  • Create a hybrid environment: VMs provide the foundation for creating a cloud environment alongside an on-premises one, bringing flexibility without abandoning legacy systems.

How to get started with VMs

Compute Engine is Google Cloud’s flexible virtual machine offering, allowing you to create and run virtual machines in predefined or custom machine sizes on Google’s infrastructure. Compute Engine provides all the tools you need to help you accelerate your digital transformation and bring your existing applications to the cloud. 

With Compute Engine, you can validate, run, and migrate your systems without having to rewrite your applications, modify images, or change your management processes. 

Need help choosing the right VM for your workload? Explore the VM selection tool to get our recommendations.  

Solve your business challenges with Google Cloud

New customers get $300 in free credits to spend on Google Cloud.
Talk to a Google Cloud sales specialist to discuss your unique challenge in more detail.

Virtual machine solutions from Google Cloud

Take the next step

Start building on Google Cloud with $300 in free credits and 20+ always free products.

Google Cloud
  • ‪English‬
  • ‪Deutsch‬
  • ‪Español‬
  • ‪Español (Latinoamérica)‬
  • ‪Français‬
  • ‪Indonesia‬
  • ‪Italiano‬
  • ‪Português (Brasil)‬
  • ‪简体中文‬
  • ‪繁體中文‬
  • ‪日本語‬
  • ‪한국어‬
Console
Google Cloud