Virtualization & Databases in the Cloud

Using Virtualization and Databases // Cloud+ Field Notes
Virtualization & Databases

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.

8 Parts 36 Exam Keywords 3 Interactive Tools Read time ~14 min
hypervisor-status.log

$ 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

$

01

Virtualization Concepts

The exam's core distinction: VMs virtualize hardware, containers virtualize the OS. Everything else in this module builds on that one line.

Virtual Machine
Container

Why organizations virtualize

  • Better resource utilization
  • Easier scalability
  • High availability
  • Offloads hardware support to the cloud service provider
Hypervisor — the component that partitions physical hardware among VMs and hands the allocated hardware to each guest OS. Sysadmins still patch and secure the guest OS themselves — the hypervisor doesn't do that for them.
02

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
ConceptWhat it does
Configuration fileTemplate of CPU, RAM, network, storage settings for repeatable builds
ClusteringGroups VMs/hosts into nodes for fault tolerance and load spread
Host affinityKeeps related VM nodes on the same host for performance
Anti-affinitySpreads VM nodes across hosts so one host failure doesn't take down the cluster
Hardware pass-throughBypasses the hypervisor for direct hardware access (GPU, storage, NICs)
CloningDuplicates a VM's current config and data — for redundancy or backup
Exam trap — a template builds a fresh, standardized VM. A clone copies an existing VM's live data and configuration. Same idea, opposite direction.
03

Storage & Network Types

Where a VM's data lives, and how far its network reach extends.

VM network types

TypeReach
ExternalHost's NIC and the physical network beyond it
InternalThe host itself and other VMs on it — no external network
PrivateOther 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

NASSAN
What it isDrives + a NIC, shared over the networkDedicated storage network + servers + storage infrastructure
ProtocolNFS or SMB — basically a file serverIsolated network via Host Bus Adapters
Cost / complexityLower, simplerHigher, more complex
Best forQuick capacity on networks with bandwidth to spareEnterprise-scale fault tolerance and performance
04

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)
Containers are stateless — changes made inside a running container don't persist. Anything that needs to stick around has to be written back into the configuration file or to persistent storage.
05

Deploying & Managing Containers

The Docker CLI is the reference example the exam draws from. Try a few subcommands below.

docker — try a subcommand

Container subcommands

CommandDescription
docker container startStart a stopped container
docker container stopStop a started container
docker container restartRestart a container
docker container inspectDisplay detailed container information
docker container logsDisplay container logs

Every container is identified by a container ID, assigned when it starts — you'll need it for restart and stop.

06

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
ProviderRegistryManaged container service
AWSElastic Container Registry (ECR)Elastic Container Service
AzureAzure Container RegistryAzure Kubernetes Service
GCPGoogle Artifact RegistryGoogle Compute Engine (Kubernetes/Docker)
Public vs. private — public registries like Docker Hub are convenient and cheap; private registries cost more effort but give you management control and security once orchestration is in place.
07

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 storagePersistent storage
LifecycleTied to the container — gone when it isIndependent of the container's lifecycle
Used forCaching, logging, scratch spaceStateful apps whose data must outlive the container
ExampleLocal scratch diskAmazon EFS mounted by an EKS cluster

Orchestration benefits

  • Efficient, flexible deployments · Simplified automated management · Scheduling & availability · Increased scalability · Container monitoring
08

Database Concepts

Structured data goes in tables; everything else needs a more flexible home.

Relational
Non-relational

Cloud database examples

ProviderRelationalNon-relational
AWSAurora, RDS, RedshiftDynamoDB, Neptune, DocumentDB
AzureSQL Server, PostgreSQL, MySQL, MariaDBCosmos DB
GCPBare Metal Solution, Cloud SQL, Cloud SpannerBigtable, Firestore, MongoDB

Self-managed vs. provider-managed (DBaaS)

Self-managedProvider-managed (DBaaS)
ControlFull control, avoids vendor lock-inLess customization, possible lock-in
EffortSignificant time, skill, commitmentMaintenance-free, automated
Cost modelYour infrastructure spendPay-as-you-go, often cheaper overall
Direct vs. cross-service migration
A direct migration moves data between two instances of the same database engine (SQL Server to SQL Server). A cross-service migration converts data between two different engines (Oracle to Amazon Aurora). Most CSPs run replication during the move to keep downtime minimal.

Exam Keyword Flashcards

Tap a card to flip it.

Quick Self-Check

Four questions pulled straight from the module.

Score: 0 / 0
Module 6 · Using Virtualization and Databases CompTIA Cloud+ Objectives 1.6 / 1.7 / 1.9