What a “cloud image ISO” actually is
Ubuntu cloud images are designed to boot in cloud environments (AWS, Azure, OpenStack). It is a minimal, preconfigured base disk designed to be cloned thousands of times, with all customization deferred to cloud-init.
They expect configuration to arrive via cloud-init, which reads:
user-data→ user accounts, SSH keys, passwords, packagesmeta-data→ instance ID, hostname
Cloud-init looks for these files on:
- a virtual CD-ROM
- a NoCloud datasource
- cloud provider metadata endpoints
The structure of the seed ISO
The ISO contains exactly two files:
seed.iso
├── user-data
└── meta-data
Cloud-init reads them on first boot and configures the VM accordingly.
Step 1 — Generate an SSH key pair
You can generate the key on Windows, Linux, or WSL.
Here’s the Windows PowerShell version:
ssh-keygen -t ed25519 -C "ubuntu-cloud"
This produces:
- Private key →
id_ed25519 - Public key →
id_ed25519.pub
You will embed the public key inside user-data.
Step 2 — Create the user-data file
This file tells cloud-init to create the ubuntu user and install your SSH key.
#cloud-config
users:
- name: ubuntu
ssh_authorized_keys:
- ssh-ed25519 AAAA...yourpublickey...
sudo: ALL=(ALL) NOPASSWD:ALL
shell: /bin/bash
If you want a password instead (or in addition):
#cloud-config
password: ubuntu
chpasswd:
expire: false
ssh_pwauth: true
You will need to generate the password hash using the command:
mkpasswd –method=sha-512
Step 3 — Create the meta-data file
This file is simple:
instance-id: gns3-ubuntu
local-hostname: ubuntu-gns3
Step 4 — Build the seed ISO
You have two main ways to do this on Windows:
Option A — Native Windows tool (cloud-localds.exe)
If you installed Cloudbase-Init tools:
cloud-localds.exe seed.iso user-data meta-data
Option B — WSL (Ubuntu on Windows)
Inside WSL:
sudo apt install cloud-image-utils
cloud-localds seed.iso user-data meta-data
Then copy it back to Windows:
cp seed.iso /mnt/c/Users/{user}/Desktop/
Step 5 — Attach the ISO in GNS3
In GNS3:
- Edit your QEMU VM
- Go to Drives
- Add a CD-ROM drive
- Select
seed.iso - Boot the VM
On first boot, cloud-init reads the ISO and:
- creates the
ubuntuuser - installs your SSH key
- sets hostname
- configures sudo
After that, you can SSH in immediately:
ssh -i .ssh/key_name ubuntu@<vm-ip>
Why this workflow is so powerful
It gives you:
- deterministic VM builds
- no manual password setting
- no copying keys by hand
- perfect reproducibility for labs
- ideal for automation (Ansible, Terraform, etc.)
Leave a Reply