Skip to main content
IMHCloud Logo
Back to support home

Creating and Managing Images in OpenStack Horizon

Images in OpenStack provide the base operating system and software configuration for your virtual machines (instances). Whether you need to create a custom image with pre-configured software, upload an existing disk image, or manage your image library, OpenStack Glance (the image service) gives you complete control through the Horizon dashboard.

This guide walks you through creating custom images, uploading existing images, and managing your image library effectively.

Understanding OpenStack Images

An image in OpenStack is a bootable file containing an operating system and (optionally) pre-installed software. Images are stored and managed by Glance, OpenStack's image service.

Image Types:

  • Public Images: Available to all projects in your OpenStack environment (managed by administrators)
  • Private Images: Only accessible within your specific project
  • Shared Images: Explicitly shared with specific projects

Common Image Formats:

  • QCOW2 (recommended): Supports snapshots, thin provisioning, and compression
  • RAW: Uncompressed disk image, larger file size but faster performance
  • VHD/VHDX: Virtual Hard Disk format (Hyper-V compatible)
  • VMDK: VMware disk format
  • ISO: Installation disc image for manual OS installation

Accessing the Images Panel

Navigate to the Images section in Horizon:

  1. Log in to your OpenStack Horizon dashboard
  2. From the left sidebar, select Compute > Images
  3. You will see your available images listed with details like name, type, status, format, and size

The Images panel displays both public images (provided by your cloud administrator) and your private project images.

Creating a Custom Image from an Instance

The most common way to create a custom image is by taking a snapshot of an existing, configured instance.

When to Create Custom Images

Create a custom image when you:

  • Have configured an instance with specific software packages
  • Want to replicate a working environment across multiple instances
  • Need to preserve a particular system configuration
  • Want to create templates for rapid deployment

Step-by-Step: Create Image from Instance

Step 1: Prepare Your Instance

Before creating an image:

  1. Clean up temporary files and logs
  2. Remove SSH host keys (they should be regenerated on first boot)
  3. Clear command history if it contains sensitive information
  4. Shut down unnecessary services
  5. Run package updates to ensure the latest software

For Linux instances, run cleanup commands:

1sudo apt-get clean
2sudo rm -rf /tmp/*
3sudo history -c

Step 2: Create the Snapshot

  1. Navigate to Compute > Instances
  2. Locate your configured instance in the list
  3. Click the dropdown arrow next to Create Snapshot in the Actions column
  4. In the Create Snapshot dialog:
  • Snapshot Name: Enter a descriptive name (e.g., ubuntu-22-webserver-configured)
  • Description: Add details about what software or configuration this image includes
  1. Click Create Snapshot

Step 3: Monitor Creation Progress

  1. Navigate to Compute > Images
  2. Your new image will appear with status "Queued" or "Saving"
  3. Wait for the status to change to "Active" (this may take several minutes depending on instance size)
  4. Once Active, your image is ready to launch new instances

Best Practices for Custom Images

Naming Conventions:

Use descriptive, structured names that include:

  • Operating system and version
  • Key software or purpose
  • Date created (optional)

Example: ubuntu-22.04-nginx-php8.2-2026-01

Image Cleanup:

Before creating production images:

  • Remove user-specific data
  • Clear package manager caches
  • Remove old kernels
  • Zero out free space to reduce image size

Documentation:

Add detailed descriptions including:

  • Installed software packages and versions
  • Configuration changes from base OS
  • Special requirements or dependencies
  • Intended use case

Uploading External Images

You can upload pre-built images from external sources or images you have created outside OpenStack.

Supported Image Sources

  • Operating system vendor images (Ubuntu Cloud Images, CentOS Cloud Images, etc.)
  • Custom images created with tools like Packer or VirtualBox
  • Converted images from other virtualization platforms
  • Pre-configured appliances from software vendors

Step-by-Step: Upload an Image

Step 1: Prepare Your Image File

Ensure your image:

  • Is in a supported format (QCOW2 recommended)
  • Has cloud-init or similar initialization tools installed
  • Is configured for cloud environments (DHCP networking, SSH access enabled)
  • Does not contain hardware-specific configurations

Step 2: Upload Through Horizon

  1. Navigate to Compute > Images
  2. Click Create Image button in the upper right
  3. In the Create Image dialog, configure:

Image Details:

  • Image Name: Descriptive name for the image
  • Image Description: Detailed description of OS and contents
  • File: Click Browse and select your local image file
  • Format: Select the image format (QCOW2, RAW, VHD, VMDK, ISO)

Image Requirements:

  • Architecture: Select architecture (typically x86_64)
  • Minimum Disk (GB): Minimum root disk size required
  • Minimum RAM (MB): Minimum memory required

Image Properties (expand Advanced section):

  • Protected: Check this to prevent accidental deletion
  • Visibility: Choose Project (private) or Public (if administrator)
  1. Click Create Image

Step 3: Monitor Upload Progress

The upload process may take several minutes depending on:

  • Image file size
  • Your network connection speed
  • OpenStack storage backend performance

Watch the progress indicator and wait for the status to change to "Active".

Using Image URLs

For large images or images hosted externally, you can provide a URL instead of uploading directly:

  1. In the Create Image dialog, select Image Location tab
  2. Choose Image Location format (URL)
  3. Enter the direct URL to your image file
  4. Complete the other fields as described above
  5. Click Create Image

OpenStack will download the image from the provided URL directly to the image store.

Managing Your Image Library

Effective image management helps maintain an organized, efficient cloud environment.

Viewing Image Details

To see complete information about an image:

  1. Navigate to Compute > Images
  2. Click on the image name
  3. Review tabs:
  • Overview: Basic details, format, size, visibility
  • Metadata: Custom properties and configuration details

Editing Image Properties

To modify image metadata:

  1. Click on an image name
  2. Select Update Metadata from the Actions dropdown
  3. Add or modify custom properties:
  • os_type: Operating system type (linux, windows)
  • os_version: Specific OS version
  • hw_disk_bus: Disk bus type (virtio, scsi, ide)
  • hw_vif_model: Network interface model (virtio, e1000)
  1. Click Save

Custom metadata helps with image organization and can affect instance performance.

Protecting Important Images

To prevent accidental deletion:

  1. Click on an image name
  2. Select Update Metadata
  3. Check Protected
  4. Click Save

Protected images cannot be deleted until you remove the protection flag.

Sharing Images with Other Projects

Project administrators can share private images:

  1. Click on an image name
  2. Note the Image ID from the Overview tab
  3. Use the OpenStack CLI to share:
1openstack image add project IMAGE_ID PROJECT_ID
2openstack image set --shared IMAGE_ID

The image will become available to the specified project.

Deleting Unused Images

To remove images you no longer need:

  1. Navigate to Compute > Images
  2. Find the image to delete
  3. Click the dropdown in the Actions column
  4. Select Delete Image
  5. Confirm the deletion

Important: You cannot delete:

  • Protected images (remove protection first)
  • Public images (administrators only)
  • Images currently in use by active instances

Before deleting, verify no instances depend on this image for snapshots or rebuild operations.

Image Formats and Conversion

Understanding image formats helps you choose the right format for your use case.

QCOW2 (Recommended)

Advantages:

  • Supports thin provisioning (only uses space for actual data)
  • Enables copy-on-write snapshots
  • Supports compression
  • Smaller file sizes

When to Use:

  • General purpose images
  • Images that will be snapshotted frequently
  • Limited storage environments

RAW Format

Advantages:

  • Simplest format
  • Best performance (no overhead)
  • Direct disk access

Disadvantages:

  • Larger file sizes (no compression)
  • No snapshot support
  • Takes full disk space immediately

When to Use:

  • High-performance requirements
  • Images that will not be snapshotted
  • Ample storage available

Converting Between Formats

Use qemu-img to convert images:

1# Convert RAW to QCOW2
2qemu-img convert -f raw -O qcow2 input.img output.qcow2
3
4# Convert VMDK to QCOW2
5qemu-img convert -f vmdk -O qcow2 input.vmdk output.qcow2
6
7# Compress QCOW2 image
8qemu-img convert -c -O qcow2 input.qcow2 compressed.qcow2

Always test converted images before uploading to production.

Image Storage and Quotas

Images consume storage resources in your OpenStack environment.

Understanding Image Storage

  • Images are stored in the Glance image store (typically Ceph or Swift)
  • Each image counts against your project quota
  • Larger images take longer to launch instances
  • Multiple copies of similar images waste storage

Checking Storage Usage

To view your current usage:

  1. Navigate to Compute > Images
  2. Review the Size column for each image
  3. Check your project quota at Project > Compute > Overview

Look for the Images quota section showing:

  • Number of images used vs. available
  • Total storage used by images

Optimizing Image Storage

Reduce Image Count:

  • Delete old or unused images
  • Consolidate similar images
  • Use base images and configure at launch with cloud-init

Reduce Image Size:

  • Remove unnecessary packages before snapshotting
  • Clear caches and temporary files
  • Use compression (QCOW2 format)
  • Zero out free space before creating images

Use Shared Images:

  • Share common images across projects instead of duplicating
  • Use public images when possible

Troubleshooting Common Issues

Image Upload Fails

Symptoms: Upload stalls, times out, or reports error

Solutions:

  1. Check file size limits in your OpenStack configuration
  2. Verify network connection stability
  3. Use CLI upload for very large files: openstack image create --file image.qcow2 image-name
  4. Try uploading from a location closer to your OpenStack environment

Instance Fails to Boot from Image

Symptoms: Instance enters error state or fails to respond

Possible Causes:

  1. Image format mismatch: Verify the format matches the actual file type
  2. Missing bootloader: Ensure the image has a bootloader installed
  3. Incorrect disk bus: Try different hw_disk_bus metadata values
  4. Insufficient resources: Increase minimum disk or RAM requirements

Solutions:

  • Launch with more resources than image minimum
  • Check instance console logs for boot errors
  • Verify image integrity with qemu-img check
  • Recreate image with proper cloud-init configuration

Cannot Delete Image

Symptoms: Delete operation fails or image remains

Causes:

  • Image is protected
  • Image is in use by active instances
  • Insufficient permissions

Solutions:

  1. Remove protection: openstack image set --unprotected IMAGE_ID
  2. Terminate instances using the image
  3. Contact your OpenStack administrator for public images

Image Shows "Queued" Status Indefinitely

Symptoms: Image stuck in Queued status, never becomes Active

Solutions:

  1. Check Glance service status with your administrator
  2. Verify adequate storage backend space
  3. Review Glance logs for errors: /var/log/glance/
  4. Cancel and retry the operation

Security Considerations

Image Security Best Practices

Before Creating Images:

  • Update all packages to latest security patches
  • Remove default passwords
  • Disable unnecessary services
  • Remove private SSH keys
  • Clear logs containing sensitive data
  • Scan for malware or vulnerabilities

When Uploading External Images:

  • Only use images from trusted sources
  • Verify image checksums match published values
  • Scan images for malware before uploading
  • Review installed software and configurations
  • Test in isolated environment first

Ongoing Management:

  • Regularly update base images with security patches
  • Document image contents and update frequency
  • Mark old images as deprecated rather than deleting immediately
  • Implement image naming that includes security patch level

Compliance and Auditing

For regulated environments:

  • Tag images with compliance information (HIPAA, PCI-DSS, etc.)
  • Maintain image creation audit trail
  • Document installed software versions
  • Implement image approval workflow before production use
  • Regularly audit image library for outdated or non-compliant images

Advanced Image Operations

Creating Windows Images

Windows images require additional preparation:

  1. Install VirtIO drivers for paravirtualized devices
  2. Enable Remote Desktop
  3. Configure Windows Firewall for cloud environment
  4. Run Sysprep before creating image
  5. Set minimum resources appropriately (8GB RAM minimum)

Using Cloud-Init

Linux images benefit from cloud-init for automatic configuration:

Cloud-init enables:

  • Automatic hostname configuration
  • SSH key injection
  • Network configuration via DHCP
  • User account creation
  • Package installation at first boot
  • Running custom scripts

Most modern Linux cloud images include cloud-init pre-configured.

Multi-Architecture Images

For environments with different CPU architectures:

  1. Create separate images for each architecture (x86_64, arm64)
  2. Tag images with architecture metadata
  3. Use descriptive naming to identify architecture
  4. Test images on target hardware before production use

How to Manage Images Using OpenStack CLI

While the Horizon dashboard provides a visual interface for image management, the OpenStack command-line interface offers powerful automation capabilities and additional control. The CLI is essential for scripting, bulk operations, and integrating image management into your deployment workflows.

Installing the OpenStack CLI

Before using these commands, ensure you have the OpenStack CLI installed and configured:

1# Install OpenStack CLI client
2pip install python-openstackclient
3
4# Verify installation
5openstack --version

You will need your OpenStack credentials configured. These are typically sourced from an RC file provided by your cloud administrator:

1source openstack-rc.sh

Creating an Image from an Instance

To create a snapshot of a running or stopped instance via CLI:

1# Basic syntax
2openstack server image create --name IMAGE_NAME INSTANCE_NAME
3
4# Create snapshot with description
5openstack server image create \
6 --name ubuntu-22-webserver-v1 \
7 --description "Ubuntu 22.04 with Nginx and PHP 8.2 configured" \
8 my-webserver-instance

Expected Output:

1+------------------+--------------------------------------+
2| Field | Value |
3+------------------+--------------------------------------+
4| id | 5f2a8d9c-3e4b-4f6a-9c1d-8e7f2a3b4c5d |
5| name | ubuntu-22-webserver-v1 |
6| status | SAVING |
7| visibility | private |
8| size | None |
9+------------------+--------------------------------------+

Check snapshot creation progress:

1openstack image show ubuntu-22-webserver-v1 -c status -c progress

Wait until the status changes from "queued" or "saving" to "active" before using the image.

Advanced options:

1# Create snapshot and wait for completion
2openstack server image create --name my-snapshot --wait my-instance
3
4# Create snapshot of a stopped instance (recommended for consistency)
5openstack server stop my-instance
6openstack server image create --name my-snapshot my-instance
7openstack server start my-instance

Uploading an Image

To upload an image file from your local system or a URL:

1# Upload a local QCOW2 image
2openstack image create \
3 --file /path/to/image.qcow2 \
4 --disk-format qcow2 \
5 --container-format bare \
6 --min-disk 10 \
7 --min-ram 1024 \
8 --property os_type=linux \
9 --property os_version=22.04 \
10 ubuntu-22-custom
11
12# Upload from a URL
13openstack image create \
14 --copy-from https://cloud-images.ubuntu.com/releases/22.04/ubuntu-22.04-server.img \
15 --disk-format qcow2 \
16 --container-format bare \
17 ubuntu-22-cloud-image

Available disk formats:

  • qcow2 - QEMU Copy-On-Write (recommended)
  • raw - Raw disk image
  • vhd - Virtual Hard Disk
  • vmdk - VMware disk format
  • iso - ISO 9660 format

Expected Output:

1+------------------+--------------------------------------+
2| Field | Value |
3+------------------+--------------------------------------+
4| id | a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d |
5| name | ubuntu-22-custom |
6| disk_format | qcow2 |
7| status | queued |
8| visibility | private |
9| size | 2361393152 |
10+------------------+--------------------------------------+

Upload progress monitoring:

For large images, the upload may take time. Monitor with:

1watch -n 5 'openstack image show ubuntu-22-custom -c status -c size'

Listing Images

View all available images in your project:

1# List all images (public and private)
2openstack image list
3
4# Show only your private images
5openstack image list --private
6
7# Show only public images
8openstack image list --public
9
10# Filter by name pattern
11openstack image list --name ubuntu
12
13# Show additional details in table format
14openstack image list --long

Example Output:

1+--------------------------------------+------------------------+--------+
2| ID | Name | Status |
3+--------------------------------------+------------------------+--------+
4| 5f2a8d9c-3e4b-4f6a-9c1d-8e7f2a3b4c5d | ubuntu-22-webserver-v1 | active |
5| a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d | ubuntu-22-custom | active |
6| c3d4e5f6-7a8b-9c0d-1e2f-3a4b5c6d7e8f | centos-9-stream | active |
7+--------------------------------------+------------------------+--------+

Sort and filter results:

1# Sort by creation date (newest first)
2openstack image list --sort created_at:desc
3
4# Filter by status
5openstack image list --status active
6
7# Combine filters
8openstack image list --private --status active --sort name:asc

Viewing Image Details

Get comprehensive information about a specific image:

1# Show all image properties
2openstack image show IMAGE_NAME_OR_ID
3
4# Show specific fields only
5openstack image show ubuntu-22-webserver-v1 \
6 -c name -c status -c size -c disk_format -c visibility
7
8# Output in JSON format for scripting
9openstack image show ubuntu-22-webserver-v1 -f json

Example Output:

1+------------------+--------------------------------------+
2| Field | Value |
3+------------------+--------------------------------------+
4| id | 5f2a8d9c-3e4b-4f6a-9c1d-8e7f2a3b4c5d |
5| name | ubuntu-22-webserver-v1 |
6| status | active |
7| visibility | private |
8| size | 2361393152 |
9| disk_format | qcow2 |
10| container_format | bare |
11| min_disk | 10 |
12| min_ram | 1024 |
13| created_at | 2026-01-29T10:30:45Z |
14| updated_at | 2026-01-29T10:35:12Z |
15| properties | os_type='linux', os_version='22.04' |
16+------------------+--------------------------------------+

Deleting an Image

Remove images you no longer need:

1# Delete a single image
2openstack image delete IMAGE_NAME_OR_ID
3
4# Delete multiple images
5openstack image delete image1 image2 image3
6
7# Delete with confirmation
8openstack image delete ubuntu-old-version

Note: The command does not output anything on success. Verify deletion with:

1openstack image list | grep ubuntu-old-version

Before deleting:

  1. Verify no active instances depend on this image
  2. Remove protection if enabled (see next section)
  3. Consider archiving important images instead of deleting

Cannot delete if:

  • Image is protected
  • Image is public (requires admin privileges)
  • Image is in use by active instances (though it will be queued for deletion)

Setting Image Properties

Modify image metadata to control behavior and organization:

1# Set protection to prevent accidental deletion
2openstack image set --protected IMAGE_NAME
3
4# Remove protection
5openstack image set --unprotected IMAGE_NAME
6
7# Set minimum resource requirements
8openstack image set \
9 --min-disk 20 \
10 --min-ram 2048 \
11 IMAGE_NAME
12
13# Add custom properties
14openstack image set \
15 --property os_type=linux \
16 --property os_version=22.04 \
17 --property hw_disk_bus=virtio \
18 --property hw_vif_model=virtio \
19 IMAGE_NAME
20
21# Change visibility (requires appropriate permissions)
22openstack image set --private IMAGE_NAME
23openstack image set --public IMAGE_NAME # Admin only
24openstack image set --shared IMAGE_NAME
25
26# Update name or description
27openstack image set \
28 --name ubuntu-22-webserver-v2 \
29 --description "Updated with security patches" \
30 ubuntu-22-webserver-v1

Useful image properties for performance:

1# Set disk bus type for better performance
2openstack image set --property hw_disk_bus=virtio IMAGE_NAME
3
4# Set network interface model
5openstack image set --property hw_vif_model=virtio IMAGE_NAME
6
7# Set SCSI bus for improved disk I/O
8openstack image set --property hw_scsi_model=virtio-scsi IMAGE_NAME
9
10# Enable multiqueue for network performance
11openstack image set --property hw_vif_multiqueue_enabled=true IMAGE_NAME

Common metadata properties:

| Property | Purpose | Example Values |
|----------|---------|----------------|
| os_type | Operating system type | linux, windows |
| os_distro | Linux distribution | ubuntu, centos, debian |
| os_version | OS version number | 22.04, 9, 11 |
| architecture | CPU architecture | x86_64, aarch64 |
| hw_disk_bus | Disk bus type | virtio, scsi, ide |
| hw_vif_model | Network interface | virtio, e1000 |
| hw_qemu_guest_agent | Guest agent support | yes, no |

Advanced CLI Operations

Downloading an image:

1# Download image to local file
2openstack image save --file /path/to/save/image.qcow2 IMAGE_NAME
3
4# Verify download with checksum
5openstack image show IMAGE_NAME -c checksum -f value
6md5sum /path/to/save/image.qcow2

Sharing images with other projects:

1# Add project as image member (requires image ID and project ID)
2openstack image add project IMAGE_ID PROJECT_ID
3
4# Set image to shared visibility first
5openstack image set --shared IMAGE_ID
6
7# List image members
8openstack image member list IMAGE_ID
9
10# Remove project access
11openstack image remove project IMAGE_ID PROJECT_ID

Bulk operations with scripting:

1# Delete all images matching a pattern
2openstack image list --name "test-" -f value -c ID | \
3 xargs -n1 openstack image delete
4
5# Set all private images to protected
6openstack image list --private -f value -c ID | \
7 xargs -n1 openstack image set --protected
8
9# Export image list to CSV
10openstack image list --long -f csv > images-export.csv

Working with image properties:

1# View all custom properties
2openstack image show IMAGE_NAME -c properties
3
4# Remove a specific property
5openstack image unset --property os_version IMAGE_NAME
6
7# Copy properties from one image to another
8SOURCE_PROPS=$(openstack image show source-image -c properties -f json)
9openstack image set --property "$SOURCE_PROPS" target-image

CLI Best Practices

Use image IDs for scripts:

Image IDs are permanent, while names can be changed or duplicated. In automation scripts, always reference images by ID:

1# Get image ID by name
2IMAGE_ID=$(openstack image list --name ubuntu-22-webserver -f value -c ID)
3
4# Use ID in subsequent commands
5openstack server create --image $IMAGE_ID --flavor m1.medium my-instance

Add meaningful metadata:

Include descriptive properties to track image history and requirements:

1openstack image set \
2 --property created_by="DevOps Team" \
3 --property build_date="2026-01-29" \
4 --property patch_level="2026-01" \
5 --property source="packer-build-123" \
6 ubuntu-22-webserver-v1

Verify before deploying:

Always check image status before launching instances:

1# Quick status check
2if [ "$(openstack image show my-image -c status -f value)" = "active" ]; then
3 openstack server create --image my-image --flavor m1.medium instance-1
4else
5 echo "Error: Image not ready"
6 exit 1
7fi

Use descriptive output formats:

The CLI supports multiple output formats for different needs:

1# Human-readable table (default)
2openstack image list
3
4# Values only (for scripting)
5openstack image list -f value -c ID -c Name
6
7# JSON (for parsing)
8openstack image list -f json
9
10# CSV (for spreadsheets)
11openstack image list -f csv > images.csv
12
13# YAML (for configuration)
14openstack image show my-image -f yaml

Summary

Effective image management in OpenStack provides:

Custom Images: Create configured templates by snapshotting instances with your desired software stack and configuration using both Horizon dashboard and CLI commands.

External Uploads: Import pre-built images from vendors or images you have created with external tools in formats like QCOW2, RAW, or VMDK through the GUI or command line.

Organization: Use descriptive naming, detailed descriptions, and metadata to maintain an organized, searchable image library across both interfaces.

Storage Optimization: Manage quotas by deleting unused images, compressing files, and sharing common images across projects using automated CLI scripts.

Security: Keep images updated with security patches, scan external images, and document contents for compliance using CLI automation.

Workflow Flexibility: Use Horizon for visual management and one-off tasks, and leverage the CLI for automation, scripting, and bulk operations in your deployment pipelines.

By mastering image creation and management in both OpenStack Horizon and the CLI, you can rapidly deploy pre-configured environments, maintain consistency across instances, automate image lifecycle management, and optimize your cloud infrastructure efficiency.