Use this when designing or fixing a pipeline that builds VMs end to end — clone, size, customize, configure and register.
Automated Deployment
Automated deployment chains provisioning steps — clone template, set CPU/RAM/disk/network, inject identity with cloud-init or Sysprep, configure the guest, register in monitoring — into a pipeline that runs the same way every time.
1. Automated deployment chains provisioning, configuration and validation.
2. Pipelines with approvals.
3. Validate (ping, health checks).
4. Roll back on failure.
5. Audit trail.
commit → pipeline → provision → configure → validate
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
terraform planPrimary Commands
Configuration and operational commands for this Topic.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Checks Verify boundary
Step 2 Checks Verify boundary
- Pipeline is idempotent (re-run safe).
- Failure triggers cleanup.
- Notifications to the requester.
Step 3 Common mistakes Narrow the fault
- No cleanup on failure, leaving half-built VMs.
- Secrets in pipeline logs.
- Each stage needs its own success check.
- Partial builds must be cleaned up or resumable.
- IP and name allocation must be atomic.
CI pipeline run— build → test → deployterraform apply -auto-approve (pipeline)— applyansible-playbook post-deploy.yml— configure
ReferenceWhy it matters1 section · depth on demand
In depth
Automated deployment pipelines for VMs: commit → CI validates (lint, terraform plan, Packer build test) → approval → apply → post-deployment tests (SSH/WinRM reachable, services up, monitoring green) → registration in CMDB/backup.
Guardrails: naming policy and tag validation, quotas per team, mandatory backup/monitoring tags, and automatic rollback or clean-up of half-created VMs when a step fails.
ReferenceHow it works1 section · depth on demand
Tools
| Stage | Tool |
|---|---|
| Image | Packer |
| Provision | Terraform / API |
| Configure | Ansible, cloud-init, DSC |
| Pipeline | GitLab CI, GitHub Actions, Jenkins |
ReferenceImportant terms & boundaries1 section · depth on demand
Typical pipeline
1. Validate inputs.
2. Provision VM (Terraform/API).
3. Configure guest (Ansible).
4. Run tests (service health).
5. Register (DNS, CMDB, monitoring, backup).
6. Notify owner.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Automation → Automated Deployment. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://libvirt.org/html/index.html · confidence 94%