This lab is currently in Beta, content may be updated as we refine the material
LABINTERMEDIATE

Azure Managed Image

Bake a Canonical Ubuntu 24.04 managed image with Packer azure-arm on Standard_D2s_v3 in eastus, prove it with az image show, then delete the image and resource group.

45 minutes
hashicorp/packer
Azure Managed Image - Platform Engineering Hands-On Lab Icon
Share this Lab

Lab Overview

This is the hands-on lab for Section 8 of Packer 101. You write an azure-arm template that selects Canonical Ubuntu 24.04 LTS (URN Canonical:ubuntu-24_04-lts:server:latest), launches a Standard_D2s_v3 builder in eastus, provisions a marker file, deprovisions with waagent, and captures a uniquely named managed image into a resource group that setup already created. You intentionally break the template, read the validate error, and fix it. After the bake you prove the image with the Azure CLI, then delete the managed image and the resource group so leftover images do not leak cost.

You will:

  • Confirm Packer 1.16.0 and Azure service principal credentials on the lab host
  • Confirm the unique packer-101 resource group in eastus
  • Write azure-ubuntu.pkr.hcl with required_plugins azure ~> 2 and managed_image_*
  • Run packer init, fmt, and validate, then recover from a deliberate SKU and

resource group mistake

  • Build the managed image, prove it with az image show, and clean up image then RG

What You'll Learn

Confirm Packer 1.16.0 and Azure SP identity on the packer-host lab VM

Author an azure-arm HCL2 template for Canonical Ubuntu 24.04 on Standard_D2s_v3

Run packer init, fmt, and validate, and recover from a validate failure

Build a managed image, prove it with az image show, and end with waagent deprovision

Delete the managed image and then the resource group

Prerequisites

Completion of the Packer 101 Section 8 lessons on azure-arm

Basic Linux command line (bash, reading logs)

Basic Azure vocabulary (resource group, managed image, service principal)

Technologies Covered

packerazure-armazuremanaged-imageubuntugolden-imageshcl2

Part of a Course

This lab is part of the Packer 101 — Golden Images for AWS, Azure, and GCP course

View All Courses

Choose your plan

Simple, Transparent Pricing

Unlock full access to TeKanAid courses, labs, and bootcamps

Buying for a team? Private corporate training is available for up to 15 learners.View team training
MonthlyQuarterly
Try Premium free for 7 days →

Just exploring? Start free below. Want the full experience? Try Premium free for 7 days (card required, $0 today).

Pro

All courses, with lab scripts to run on your own machine

$59/month

Renews automatically. Cancel anytime.

Final price verified at checkout.

  • Full access to all courses
  • Lab scripts to download and run on your own machine (hosted labs not included)
  • Progress tracking
  • Certificate of completion
  • Community access
  • Self-paced bootcamps
  • Premium puzzle library not included (5 free puzzles available)
  • New content access
Recommended

Premium

Full access, including unlimited hosted labs

$99/month

Renews automatically. Cancel anytime.

Final price verified at checkout.

  • Everything in Pro
  • Unlimited hands-on labs, fully hosted on TeKanAid Academy (nothing to set up)
  • Full access to the puzzle library
  • Lab AI Assistant
  • Priority support

Prefer a single course?

Purchase individual courses for a one-time fee of $79. Full access to course content, quizzes, certificates, and community features, lab access is not included.

Browse Courses

Just exploring? Start free, no account needed

Three free ways to start. All bridge into the paid Premium catalog when you're ready.

Not ready to commit? The crash course is email-only. No academy account required.

Ready to Get Started?

Start this hands-on lab and build real-world Platform Engineering skills

Get Access Now