What is a virtual machine (VM)?
An intro to virtualisation and the benefits of VMs
Virtual machines: virtual computers within computers
A virtual machine, commonly shortened to just VM, is no different than any other physical computer like a laptop, smart phone, or server. It has a CPU, memory, disks to store your files, and can connect to the internet if needed. While the parts that make up your computer (called hardware) are physical and tangible, VMs are often thought of as virtual computers or software-defined computers within physical servers, existing only as code.
How does a virtual machine work?
Virtualisation is the process of creating a software-based or "virtual" version of a computer, with dedicated amounts of CPU, memory and storage that are "borrowed" from a physical host computer — such as your personal computer — and/or a remote server — such as a server in a cloud provider's datacentre. A virtual machine is a computer file, typically called an image, that behaves like an actual computer. It can run in a window as a separate computing environment, often to run a different operating system — or even to function as the user's entire computer experience— as is common on many people's work computers. The virtual machine is partitioned from the rest of the system, meaning that the software inside a VM can't interfere with the host computer's primary operating system.
What are VMs used for?
Here are a few ways virtual machines are used:
- Building and deploying apps to the cloud.
- Trying out a new operating system (OS), including beta releases.
- Spinning up a new environment to make it simpler and quicker for developers to run dev-test scenarios.
- Backing up your existing OS.
- Accessing virus-infected data or running an old application by installing an older OS.
- Running software or apps on operating systems that they weren't originally intended for.
What are the benefits of using VMs?
While virtual machines run like individual computers with individual operating systems and applications, they have the advantage of remaining completely independent of one another and the physical host machine. A piece of software called a hypervisor, or virtual machine manager, lets you run different operating systems on different virtual machines at the same time. This makes it possible to run Linux VMs, for example, on a Windows OS, or to run an earlier version of Windows on more current Windows OS.
And, because VMs are independent of each other, they're also extremely portable. You can move a VM on a hypervisor to another hypervisor on a completely different machine almost instantaneously.
Because of their flexibility and portability, virtual machines provide many benefits, such as:
- Cost savings—running multiple virtual environments from one piece of infrastructure means that you can drastically reduce your physical infrastructure footprint. This boosts your bottom line—decreasing the need to maintain nearly as many servers and saving on maintenance costs and electricity.
- Agility and speed —spinning up a VM is relatively quick and easy, and is much simpler than provisioning an entire new environment for your developers. Virtualisation makes the process of running dev-test scenarios a lot quicker.
- Lowered downtime — VMs are portable and easy to move from one hypervisor to another on a different machine, which means that they are a great solution for back up in the event the host goes down unexpectedly.
- Scalability—VMs allow you to more easily scale your apps by adding more physical or virtual servers to distribute the workload across multiple VMs. As a result you can increase the availability and performance of your apps.
- Security benefits— Because virtual machines run in multiple operating systems, using a guest operating system on a VM allows you to run apps of questionable security and protects your host operating system. VMs also allow for better security forensics, and are often used to safely study computer viruses, isolating the viruses to avoid risking their host computer.
Related products and services for VMs
Create Linux and Windows virtual machines (VMs) in seconds and reduce costs
On-demand, highly scalable and protected virtualised infrastructure with Windows virtual machines in Azure
Create and deploy enterprise-grade open-source and community-driven software in seconds and reduce costs
Dedicated physical server to host and run virtual machines for Windows and Linux on Azure
A flexible machine learning platform for uncovering insights with R and Python
Migrate SQL Server workloads to the cloud at the lowest TCO
Use Azure to reduce cloud spend with scalable compute capacity at deep discounts
Take advantage of highly available, scalable, and secure cloud infrastructure with Azure—and only pay for the resources that you use
Read the documentation on building scalable applications with virtual machine scale sets
Frequently asked questions
The process of creating a software-based or "virtual" version of something — whether that be compute, storage, networking, servers or apps — is called virtualisation. Virtualisation as a technology enjoys a lengthy history and today it's still very relevant to building a cloud computing strategy. So, virtualisation is the process, and the machines made using that process are most commonly called virtual machines or just VMs.
Multiple virtual machines can run simultaneously on the same physical computer, all managed by a hypervisor. A hypervisor is the software that integrates the physical hardware and the VM's virtual "hardware". This is very similar to how an operating system in a typical computer works: much like a school crossing guard helps multiple students move safely back and forth across a busy intersection, the hypervisor makes sure each VM gets the resources it needs from the physical server in an orderly and timely manner.
This is the foundational category of cloud computing services. With IaaS, you rent IT infrastructure—servers and virtual machines (VMs), storage, networks, and operating systems—on a pay-as-you-go basis from a cloud provider such as Microsoft Azure.
Yes, and no! Azure Virtual Machines is the Azure infrastructure as a service (IaaS) used to deploy persistent VMs with nearly any VM server workload that you want. They are image service instances that provide on-demand and scalable computing resources with usage-based pricing.
So, Azure Virtual Machines is the service that provides VMs optimised for general purpose or storage, memory, compute and graphics-intensive workloads, and are offered in a variety of types and sizes to meet your needs and keep your budget in check.
Spot VMs are part of services offered by a cloud provider, such as Microsoft Azure, that provides scalable compute capacity at deep discounts.
Spot VMs are ideal for workloads that can be interrupted, such as:
- Select high-performance computing scenarios, batch processing jobs, or visual rendering applications.
- Dev/test environments, including continuous integration and continuous delivery workloads.
- Big data, analytics, container-based, large-scale stateless applications.
Azure Disk Storage is a service offering high-performing, highly durable block storage designed to be used with Azure Virtual Machines. With unmatched resiliency, seamless scalability, and built-in security, Azure Disk Storage delivers the price-performance you need for your mission and business-critical apps.
In general, hybrid cloud computing refers to a cloud environment that combines public cloud and on-premises infrastructure, including private cloud, by allowing data and apps to be shared between them. It expands your cloud deployment options, offering greater flexibility to scale resources and take advantage of cloud tech innovations, while giving interoperability with on-prem environments.
Cloud services providers sometimes call cloud computing services a "stack", because they build on top of one another. While infrastructure as a service (IaaS) represents the foundational element in the stack, other services are often used together with IaaS, such as platform as a service (PaaS), software as a service (SaaS), and serverless computing.
For Linux, build an NGINX web-server within an Ubuntu VM using:
For Windows, build an IIS web server within a Windows Server 2016 VM using:
Migrate to the cloud
Manage costs and migrate apps, data, and infrastructure with these free resources:
Learn how to provision VMs on Azure with step-by-step guidance from Microsoft Learn.