A virtual machine (VM) is a virtual representation or emulation of a physical computer that uses software instead of hardware to run programs and deploy applications.
By using the resources of a single physical machine, such as memory, CPU, network interface and storage, VMs enable businesses to run multiple machines virtually with different operating systems on a single device.
VMs are typically referred to as guests, with one or more “guest” machines running on a physical machine called the “host” machine. VM technology includes virtual servers, virtual server instances (VSIs) and virtual private servers (VPSs).
In a Global Market Insights (GMI) report (link resides outside ibm.com), the virtual machine market size exceeded USD 9.5 billion in 2023. GMI projects this market to expand at a compound annual growth rate (CAGR) of around 12% between 2024 and 2032, driven by the steady adoption of cloud computing. As businesses move to the cloud for its scalability, flexibility and cost efficiency, cloud providers continue integrating virtual machines and other critical technologies (for example, containers) to provide consistent IT infrastructure.
VMs work by using virtualization, a process of creating software-based or virtual versions of resources (compute, storage, networking, servers) or applications.
Virtualization allows for more efficient use of physical computer hardware and is foundational to cloud computing.
Virtualization is made possible with a hypervisor, also known as a virtual machine monitor (VMM). This lightweight software layer manages virtual machines as they run alongside each other.
The birth of virtualization goes back to 1964, when IBM designed and introduced CP-40, an experimental time-sharing research project for the IBM System/360. The CP-40, which later evolved into the CP-67 and then Unix, provided computer hardware capable of supporting multiple simultaneous users and laid the groundwork for virtual machines.
On August 2, 1972, IBM rolled out what many regard as the first virtual machine, the VM/370, and the first System/370 mainframes that supported virtual memory.
In 1998, VMware (link resides outside ibm.com) developed the x86 operating system, which enabled a single machine to be segmented into several virtual machines, each with its own operating system. In 1999, the company launched VM Workstation 1.0, the first commercial product that allowed users to run multiple operating systems as virtual machines on a single PC.
Today, virtualization is a standard practice for enterprise-grade IT infrastructure and a driving force in cloud computing economics, enabling businesses to drive higher capacity utilization and reduce costs. All IT infrastructure can be virtualized, including desktop environments, operating systems, storage hardware, data centers and more.
Virtualization relies on hypervisor technology. This software layer placed on a physical computer or server (also known as a bare metal server) allows the physical computer to separate its operating system and applications from its hardware. These virtual machines can run their operating systems and applications independently while still sharing the original resources (memory, RAM, storage and so on) from the server, which the hypervisor manages. In essence, the hypervisor acts like a traffic cop, allocating resources to virtual machines and ensuring they don’t disrupt each other.
Two primary types of hypervisors exist:
In addition to classification according to hypervisor management, virtual machines fall into two main categories: system virtual machines (also called full virtualization machines) and process virtual machines.
System VMs allow for the sharing of underlying physical machine resources between different virtual machines, each running its own operating system. In contrast, process virtual machines (also called application virtual machines) run an application inside an OS and support a single process. Java virtual machines, which run programs that are compiled in Java, are examples of process VMs.
VMs offer numerous advantages over traditional physical hardware.
Because multiple VMs run on a single physical computer, customers don’t have to buy a new server every time they want to run another OS. Therefore, they can get more return from each piece of hardware they already own, significantly reducing IT costs related to capital and operating expenses.
Since VMs are software-based, it’s easy to spin up new ones, making it faster to scale up to meet new workload demands compared to provisioning new hardware-based environments.
Businesses can relocate VMs as needed among the physical computers in a network. This capability makes it possible to allocate workloads to servers with spare computing power. VMs can even move between on-premises and cloud environments, making them useful for hybrid cloud scenarios where you share computing resources between your data center and a cloud service provider.
Creating a VM is faster and easier than installing an OS on a physical server because you can clone a VM with the OS already installed. Developers and software testers can create new environments on demand to handle new tasks as they arise.
VMs improve security in several ways compared to operating systems, which run directly on hardware. Using an external program, you can scan a VM file for malicious software. You can create a snapshot of the VM at any point and restore it to that state if it becomes infected with malware, effectively taking the VM back in time. The fast, easy creation of VMs also makes it possible to delete and recreate a compromised VM quickly, hastening recovery from malware infections.
With fewer physical servers needed to run workloads and applications, you can dramatically reduce energy consumption to improve your environmental impact.
While VMs have many benefits, they do have a few disadvantages to consider.
VMs depend on the hardware resources made available to them on the host computer. Limited resources can lead to reduced performance and inefficiencies.
Virtual machines can be complex to configure and manage, requiring teams with technical knowledge and expertise to set up and maintain them.
VMs pose the risk of single point of failure by relying on one physical computer.
VMs have a wide range of uses for both enterprise IT administrators and users, including the following:
The first company to successfully commercialize the virtualization of the x86 microprocessor architecture, VMware is a leader in the virtualization market (link resides outside ibm.com). VMware provides Type 1 and Type 2 hypervisor and VM software to enterprise customers.
Most hypervisors support VMs running the Windows OS as a guest. Microsoft’s Hyper-V hypervisor comes as part of the Windows operating system. When installed, it creates a parent partition that contains itself and the primary Windows OS, each getting privileged access to the hardware. Other operating systems, including Windows guests, run in child partitions and communicate with the hardware through the parent partition.
Google’s open-source Android OS is common on mobile and connected home devices.
The Android OS runs only on the ARM processor architecture typical to these devices, but enthusiasts, Android gamers or software developers might want to run it on PCs. This situation can be problematic because PCs run on an entirely different x86 processor architecture and a hardware virtualization hypervisor only passes instructions between the VM and the CPU. It doesn’t translate them for processors with varying sets of instructions.
Various projects, like Shashlik or Genymotion, can address this problem by using an emulator that re-creates the ARM architecture in software. One alternative, the Android-x86 project, ports Android to the x86 architecture instead. To run it, you must install the Android-x86 program as a virtual machine that uses the VirtualBox type 2 hypervisor. Another alternative, Anbox, runs the Android operating system on the kernel of a host Linux OS.
Apple allows its macOS system to only run on Apple hardware. This means you can’t run it on non-Apple hardware as a VM or under its end-user license agreement. However, you can use Type 2 hypervisors on Mac hardware to create VMs with a macOS guest.
It is impossible to run iOS in a VM today because Apple strictly controls its iOS OS and only allows it to run on iOS devices.
The closest thing to an iOS VM is the iPhone simulator that ships with the Xcode integrated development environment, which simulates the entire iPhone system in software.
The Java platform is an execution environment for programs that are written in the Java software development language. Java’s promise—“write once, run anywhere”—means that any Java program could run on any Java platform, which is why the Java platform included a Java virtual machine (JVM).
Java programs contain bytecode, which is a form of instruction that is intended for the JVM. The JVM compiles this bytecode to machine code, which is the lowest-level language that is used by the host computer. The JVM in one computing platform’s Java platform creates a different set of machine code instructions to the JVM in another’s, based on the machine code that the processor expects.
Therefore, the JVM doesn’t run an entire OS and doesn’t use a hypervisor as other VMs do. Instead, it translates application-level software programs to run on particular hardware.
Like the JVM, the Python VM doesn’t run on a hypervisor or contain a guest OS. It is a tool that enables programs that are written in Python to run on various CPUs.
Similar to Java, Python translates its programs into an intermediate format that is called bytecode and stores them in a file ready for execution. When the program runs, the Python VM translates the bytecode into machine code for fast execution.
Linux is a typical guest OS used in many VMs. It is also a typical host OS used to run VMs and even has its own hypervisor, the kernel-based virtual machine (KVM). Although it is an open-source project, Red Hat® owns KVM.
Ubuntu is a Linux distribution that is produced by Canonical. It is available in desktop and server versions, which you can install as a VM. Users can deploy Ubuntu as a guest OS on Microsoft Hyper-V. It provides an optimized version of Ubuntu Desktop that works well in Hyper-V’s Enhanced Session Mode, providing tight integration between the Windows host and Ubuntu VM. It includes support for clipboard integration, dynamic desktop resizing, shared folders and moving the mouse between the host and guest desktops.
Public or multi-tenant virtual machines are virtual machines with multiple users sharing a common physical infrastructure. This model is the most cost-effective and scalable approach to provisioning virtual machines. However, multi-tenant environments lack some isolation characteristics that organizations with strict security or compliance mandates might prefer.
Two models for single-tenant virtual machines are dedicated hosts and dedicated instances.
A pay-as-you-go model has no upfront costs for the virtual machine, and users simply pay for what they use. Customers pay by the hour or second, depending on the provider and instance type.
The lowest-cost model of VMs, transient or spot instances take advantage of a provider’s excess capacity but can be reclaimed by the provider at any time. Transient/spot instances are useful for applications that don’t always need to be on or are prohibitively expensive in any other model.
Unlike pay-as-you-go models, reserved cases come with an explicit term commitment, usually between one and three years, but are also coupled with steep discounts.
A user typically pays the total cost of the physical server and is billed in whatever increments the provider offers dedicated servers, typically hourly or monthly.
Bare metal servers are all about raw hardware, power and isolation. They’re single-tenant, physical servers completely void of hypervisor cycles (virtualization software) and entirely dedicated to a single customer—you.
Workloads prioritizing performance and seclusion, like data-intensive applications and regulatory compliance mandates, are typically best suited for bare metal servers, especially when deployed over sustained periods.
Enterprise resource programs (ERP), customer relationship management (CRM), supply chain management (SCM), e-commerce and financial services applications are just a few workloads ideal for bare metal servers.
In contrast, when your workloads demand maximum flexibility and scalability, you are better off placing a hypervisor on the bare metal hardware to make a virtual machine. Virtual machines increase server capacity and utilization. They are ideal for moving data from one VM to another, resizing data sets and dividing dynamic workloads.
The easiest way to understand a container is to know how it differs from a traditional virtual machine (VM). In traditional virtualization, whether on-premises or in the cloud, a hypervisor helps to virtualize physical hardware. Each VM then contains a guest OS, a virtual copy of the hardware the OS requires to run and an application and its associated libraries and dependencies.
Instead of virtualizing the underlying hardware, containers virtualize the operating system (typically Linux). Each container contains only the application and its libraries and dependencies. The absence of the guest OS is why containers are so lightweight, fast and portable.
Containers and Kubernetes, the open source container orchestration platform that manages them, have become the de facto units of modern cloud-native and microservices architectures. While containers are most commonly associated with stateless services, organizations can also use them for stateful services. Containers are standard in hybrid cloud scenarios because they can run consistently across public cloud, private cloud and traditional, on-premises settings. Today, an organization might run the application on its private cloud, but tomorrow, it might need to deploy it on a public cloud from a different provider. Containerizing applications provides teams the flexibility they need to handle the many software environments of modern IT.
It’s important to note that businesses can coexist with containers and virtual machines. For instance, it is commonplace to run containers in VMs since many enterprises have VM-based infrastructure.
A company may choose a container to run an application and have a virtual machine provide the underlying infrastructure. This method combines the portability and speed of containers with the security of virtual machines. In another scenario, a financial institution may use VMs for its database systems, ensuring tighter security with resource isolation and use containers for front-end applications like customer-facing mobile apps.
The blog post "Containers versus VMs: What's the difference?" explains more.
The following video breaks down the basics of containerization and how it compares to using VMs:
Selecting a virtual machine and cloud provider starts with reviewing your workload needs and budget requirements, along with other critical factors. Below are 10 things to consider when selecting a virtual machine service provider.
Accelerate your business transformation with cloud solutions designed for innovation and growth. Explore cutting-edge tools and insights to stay ahead of the competition.
Ready to modernize your business? Discover the most efficient cloud migration strategies that can optimize performance, reduce costs and enhance scalability.
Explore how Infrastructure as a Service (IaaS) can empower your business with scalable, flexible and cost-efficient cloud infrastructure solutions tailored to your needs.
Learn how IaaS, PaaS and SaaS can transform your operations, offering flexibility, scalability and cost-efficiency. Understand the differences and choose the perfect solution for your growth.
Discover how NoSQL databases can enhance your data management strategy with flexible, scalable solutions. Learn about the types and benefits of NoSQL to stay ahead in today’s data-driven world.
Discover how Techwave used IBM Cloud bare metal servers to drive digital transformation, ensuring flexibility, scalability and full control for its clients.
Use our cloud services, powered by our IBM Consulting Advantage platform, to speed your journey to hybrid cloud, driving cost efficiency, increased productivity, sustainability and faster time to market.
Dedicated server hosting from IBM provides total isolation, control, and security for mission-critical workloads with customizable options.
IBM Cloud Virtual Server for VPC is family of Intel x86, IBM Z, and IBM LinuxONE virtual servers built on IBM Cloud Virtual Private Cloud.