liveBook · Manning

Virtual machine

As explained in Grokking Software Architecture

A virtual machine is a software-defined computer that emulates a physical machine and runs an operating system with allocated virtual resources.

A virtual machine (VM) is a software-defined computer that runs an operating system using virtual resources. In cloud Infrastructure as a Service (IaaS), the provider supplies and manages the physical hardware; you choose the operating system, install runtimes, configure networking, and deploy your code. Think of it as renting an empty warehouse: the building is ready, but fitting it out is your job. section 9.4.1

That responsibility brings both control and upkeep:

  • Root access lets you customize operating-system settings, install background services, and run legacy software. section 9.4.1
  • You must maintain the machine, including responding to security alerts and patching it. VM charges can continue even when no one is using your application. section 9.4.1

Treat replaceable servers like cattle

Cloud VMs can be started quickly and rented by the minute. Instead of nursing a failed instance, an automated script can terminate it and start a replacement. Numbering these servers rather than treating each as a unique pet makes them easier to replace. section 9.3.2

VMs are a strong option when a project needs close operating-system control, strict compliance, or a quick migration of a legacy server. They also bring responsibility for maintenance and potentially paying for idle capacity. Choose based on the balance of control and convenience your project needs. section 9.4.1 section 9.4.6

Table 9.1 Architect’s Cheat Sheet: The Compute Spectrum
Model
What It Is
Control Level
"Clarity" Best Use Case
The Hidden Architectural Trap
IaaS (Virtual Machines)
Renting the metal.
High (OS-level access)
Legacy applications or strict legal/compliance requirements.
"Lift and Shift": Moving legacy problems to the cloud and paying 24/7 for idle time.
CaaS (Containers)
Renting the shipping port.
Medium (Environment & runtime)
Standardized, portable deployments across different environments.
Orchestration Overhead: You still have to manage the complex system (Kubernetes) and route the boxes.
PaaS (Platform as a Service)
Renting the runtime.
Medium-Low (App code & config only)
Rapid prototyping and standard web apps, where you want zero infrastructure chores without learning Docker.
The "Black Box": If your app suddenly needs a custom system-level library, you are out of luck and heavily locked into that vendor's ecosystem.
FaaS (Serverless)
Renting the millisecond.
Low (Pure logic/code)
Spiky traffic or new startups wanting infinite scale with zero idle costs.
 "Cold Starts" and Time Limits: Latency spikes when waking up code, and hard execution limits that brutally kill long-running processes mid-flight.
AIaaS (AI Models)
Renting the reasoning.
Zero (Prompts & payload)
Adding complex language or data processing without building ML infrastructure.
Hallucinations: The model confidently invents facts, requiring strict "RAG" guardrails.

Compare VMs with containers, managed platforms, and serverless computing by control level, use case, and architectural tradeoff. section 9.4.6

How Grokking Software Architecture covers it

How deep it goes
Explains provider and customer responsibilities, control and maintenance tradeoffs, then compares VMs with other deployment models.
Examples
Uses AWS EC2, Google Compute Engine, Azure VMs, legacy-server migration, and an overnight vulnerability alert as examples.
What you can do after
Evaluate whether operating-system control or legacy compatibility outweighs maintenance work and idle-time costs.
How it connects
Connects virtual machines with IaaS, cloud computing, operating systems, containers, and serverless computing.

Also explained in

Compare how 19 books explain virtual machine →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Grokking Software Architecture. The section links point to the parts of the book it draws on.