Virtualization & Databases in the Cloud
6
Using Virtualization and Databases
Virtual machines and containers are two ways to slice up hardware; relational and non-relational databases are two ways to slice up data. This field guide lines them up side by side — with a few things to click.
$ vm list --status
# 3 VMs running · hypervisor: Type-1
✓ Test-Server01 · ✓ web-prod-02 · ✓ db-node-03
$ docker ps -a
# containers share one OS kernel — no guest OS overhead
$
Virtualization Concepts
The exam's core distinction: VMs virtualize hardware, containers virtualize the OS. Everything else in this module builds on that one line.
Why organizations virtualize
- Better resource utilization
- Easier scalability
- High availability
- Offloads hardware support to the cloud service provider
Deploying, Templating & Clustering VMs
One VM is a single point of failure. Templates make VMs repeatable; clusters make them resilient.
VM purpose choices
- General purpose · Compute optimized · Memory optimized · Storage optimized
VM management lifecycle
- Create — based on use case and software parameters
- Maintain — update the OS and applications
- Monitor — cost and performance against requirements
- Delete — when the hosted service is no longer needed
| Concept | What it does |
|---|---|
| Configuration file | Template of CPU, RAM, network, storage settings for repeatable builds |
| Clustering | Groups VMs/hosts into nodes for fault tolerance and load spread |
| Host affinity | Keeps related VM nodes on the same host for performance |
| Anti-affinity | Spreads VM nodes across hosts so one host failure doesn't take down the cluster |
| Hardware pass-through | Bypasses the hypervisor for direct hardware access (GPU, storage, NICs) |
| Cloning | Duplicates a VM's current config and data — for redundancy or backup |
Storage & Network Types
Where a VM's data lives, and how far its network reach extends.
VM network types
| Type | Reach |
|---|---|
| External | Host's NIC and the physical network beyond it |
| Internal | The host itself and other VMs on it — no external network |
| Private | Other VMs only — not the host, not the outside network |
Overlay networks
Abstract switches and routers into logical networks defined in software. Common with container clusters for IP management, load balancing, and NAT. Built on protocols like VXLAN and GRE. Not the same as SDN, which separates the control plane from the data plane.
NAS vs. SAN
| NAS | SAN | |
|---|---|---|
| What it is | Drives + a NIC, shared over the network | Dedicated storage network + servers + storage infrastructure |
| Protocol | NFS or SMB — basically a file server | Isolated network via Host Bus Adapters |
| Cost / complexity | Lower, simpler | Higher, more complex |
| Best for | Quick capacity on networks with bandwidth to spare | Enterprise-scale fault tolerance and performance |
Containerization Concepts
A container packages the application code, runtime, libraries, and settings into one portable unit that runs anywhere a container engine exists.
Container engines
- Docker · Hyper-V and Windows Containers · Kubernetes · Podman
Container images use the Open Container Initiative (OCI) standard format.
Three components of a container solution
- Configuration file — instructions (e.g. a Dockerfile)
- Container image — the built template (docker build)
- Running container — an executing instance of an image (docker run)
Deploying & Managing Containers
The Docker CLI is the reference example the exam draws from. Try a few subcommands below.
Container subcommands
| Command | Description |
|---|---|
docker container start | Start a stopped container |
docker container stop | Stop a started container |
docker container restart | Restart a container |
docker container inspect | Display detailed container information |
docker container logs | Display container logs |
Every container is identified by a container ID, assigned when it starts — you'll need it for restart and stop.
Image Registries & Cloud Container Services
Registries store the images; cloud container services run them at scale.
Registry advantages
- Scalability
- Security
- Management control
- Automation / orchestration integration
| Provider | Registry | Managed container service |
|---|---|---|
| AWS | Elastic Container Registry (ECR) | Elastic Container Service |
| Azure | Azure Container Registry | Azure Kubernetes Service |
| GCP | Google Artifact Registry | Google Compute Engine (Kubernetes/Docker) |
Container Storage, Networking & Orchestration
Containers are useless if isolated — port mapping opens them up, and storage strategy decides what survives.
Port mapping
By default a container can only talk to other containers on its internal network. Port mapping links a container port to a host port so outside clients can reach it too.
| Ephemeral storage | Persistent storage | |
|---|---|---|
| Lifecycle | Tied to the container — gone when it is | Independent of the container's lifecycle |
| Used for | Caching, logging, scratch space | Stateful apps whose data must outlive the container |
| Example | Local scratch disk | Amazon EFS mounted by an EKS cluster |
Orchestration benefits
- Efficient, flexible deployments · Simplified automated management · Scheduling & availability · Increased scalability · Container monitoring
Database Concepts
Structured data goes in tables; everything else needs a more flexible home.
Cloud database examples
| Provider | Relational | Non-relational |
|---|---|---|
| AWS | Aurora, RDS, Redshift | DynamoDB, Neptune, DocumentDB |
| Azure | SQL Server, PostgreSQL, MySQL, MariaDB | Cosmos DB |
| GCP | Bare Metal Solution, Cloud SQL, Cloud Spanner | Bigtable, Firestore, MongoDB |
Self-managed vs. provider-managed (DBaaS)
| Self-managed | Provider-managed (DBaaS) | |
|---|---|---|
| Control | Full control, avoids vendor lock-in | Less customization, possible lock-in |
| Effort | Significant time, skill, commitment | Maintenance-free, automated |
| Cost model | Your infrastructure spend | Pay-as-you-go, often cheaper overall |
Direct vs. cross-service migration
Exam Keyword Flashcards
Tap a card to flip it.
Quick Self-Check
Four questions pulled straight from the module.