Create an Ubuntu Cloud Template in GNS3


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, packages
  • meta-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:

This produces:

  • Private keyid_ed25519
  • Public keyid_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.

If you want a password instead (or in addition):

You will need to generate the password hash using the command:


Step 3 — Create the meta-data file

This file is simple:


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:


Option B — WSL (Ubuntu on Windows)

Inside WSL:

Then copy it back to Windows:


Step 5 — Attach the ISO in GNS3

In GNS3:

  1. Edit your QEMU VM
  2. Go to Drives
  3. Add a CD-ROM drive
  4. Select seed.iso
  5. Boot the VM

On first boot, cloud-init reads the ISO and:

  • creates the ubuntu user
  • installs your SSH key
  • sets hostname
  • configures sudo

After that, you can SSH in immediately:


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

Your email address will not be published. Required fields are marked *