Skip to main content
IMHCloud Logo
Back to glossary

Glance

Glance is the OpenStack image service that stores, catalogs, and retrieves disk images used to launch instances in a cloud environment.

What is Glance in cloud hosting?

Glance is the OpenStack image service responsible for storing, cataloging, and retrieving disk images. These disk images serve as templates that contain a complete operating system, pre-installed software, and configuration settings. When you launch an instance (virtual machine), Glance provides the disk image that Nova uses to create the instance's root filesystem.

Glance acts as a central registry for all available images in an OpenStack cloud. Administrators and users can upload custom images, share images between projects, and manage image metadata. Glance supports multiple storage backends, allowing images to be stored on local filesystems, object storage systems like Swift, or distributed storage solutions.

Related Terms

  • Nova: The OpenStack compute service that requests disk images from Glance when launching new instances, such as when creating a web server or database instance.
  • Instance: A virtual machine running in the cloud that boots from a disk image retrieved from Glance, such as a Linux or Windows server.
  • Volume: A persistent block storage device that can be created from a Glance image, such as when you want bootable storage that survives instance deletion.
  • Snapshot: A point-in-time copy of an instance's disk that can be uploaded to Glance as a new image, such as when capturing a configured server state.
  • Swift: The OpenStack object storage service that can serve as a backend for storing Glance images, such as when you need scalable, distributed image storage.

Why Glance Exists

Before centralized image services existed, cloud operators faced significant challenges managing disk images. Images were scattered across multiple storage locations without consistent metadata or version tracking. There was no standardized way to share images between users or projects, leading to duplicated storage and inconsistent deployments.

Glance solves these problems by providing a single registry for all disk images in an OpenStack cloud. It tracks image metadata such as operating system type, architecture, and minimum hardware requirements. Glance controls image visibility, determining which users and projects can access each image. It also handles the actual storage and retrieval of image data, abstracting away the underlying storage backend.

Without Glance, administrators would need to manually copy disk images to each compute node before launching instances. Users would have no way to browse available images or share custom configurations. Nova would need to implement its own image storage and retrieval logic, duplicating functionality and increasing complexity.

What Does Glance Actually Do?

  • Stores disk images in one or more configured storage backends such as local filesystem, Swift, Ceph, or Amazon S3.
  • Maintains a catalog of all available images with metadata including name, format, size, architecture, and minimum resource requirements.
  • Controls image visibility with three levels: public images visible to all users, private images visible only to the owner, and shared images visible to specific projects.
  • Provides a REST API that Nova and other services use to download images when launching instances.
  • Supports multiple image formats including QCOW2 (QEMU Copy On Write), RAW, VHD (Hyper-V), VMDK (VMware), and ISO.
  • Handles image uploads from users and administrators, validating format and generating checksums for integrity verification.
  • Manages image properties and tags that users can filter and search when selecting images for deployment.

When Would I Use Glance?

You interact with Glance whenever you launch an instance from an image. The Horizon dashboard displays available images when you create a new instance, and that list comes directly from Glance. You use Glance when uploading a custom disk image containing your organization's standard operating system configuration and pre-installed software. When you create a snapshot of a running instance to capture its current state, that snapshot is stored in Glance as a new image.

Administrators use Glance to manage the library of images available to users. They upload and maintain public images for common operating systems like Ubuntu, CentOS, and Windows Server. They configure image properties to indicate minimum flavor requirements, ensuring users select appropriately sized instances.

When Would I NOT Use Glance?

Glance is not suitable for storing application data or user files. It stores complete disk images, not individual files or application assets. For file storage, use Swift (object storage) or Cinder volumes (block storage).

You would not use Glance to transfer data between running instances. Glance images are read-only templates used at instance launch time. Once an instance is running, changes to its disk are not automatically reflected back to the source image.

If you need to store very large images that change frequently, Glance may not be the most efficient option. Each image upload creates a complete copy, so incremental changes require uploading the entire image again. For frequently changing data, consider using volumes that can be snapshotted incrementally.

Real-World Example

Company A runs an e-commerce platform on OpenStack. Their operations team maintains three base images in Glance: a minimal Ubuntu Server image for general workloads, a pre-configured LAMP stack image for web servers, and a PostgreSQL image for database servers.

When the development team needs a new staging environment, they select the LAMP stack image from Glance and launch five instances. Each instance boots from an identical copy of that image, ensuring consistent configuration. After customizing one instance with additional software, they create a snapshot that Glance stores as a new private image called "staging-v2." Future deployments can use this snapshot to launch instances with all customizations already in place.

The security team discovers a vulnerability and updates the base Ubuntu image. They upload the patched version to Glance with a new version tag. Existing instances continue running from their original images, but new deployments automatically use the patched version.

Frequently Asked Questions

What image formats does Glance support? Glance supports QCOW2 (the most common format for OpenStack), RAW (uncompressed disk images), VHD (Hyper-V compatible), VMDK (VMware compatible), and ISO (CD/DVD images). QCOW2 is recommended because it supports compression and copy-on-write, reducing storage space and enabling faster instance launches.

How do I share an image with another project? You can share a private image by adding member projects through the Glance API or Horizon dashboard. Shared images appear in the recipient's image list but remain owned by the original creator. Only the owner can delete or modify the shared image.

What happens to my instances if I delete a Glance image? Running instances are not affected when you delete their source image. Instances copy the image data to their local storage at launch time. However, you will not be able to launch new instances from that image or rebuild existing instances.

How do I upload a custom image to Glance? Use the Horizon dashboard by navigating to Project, Compute, then Images and clicking "Create Image." Alternatively, use the OpenStack CLI command openstack image create with the --file flag pointing to your disk image file. Specify the disk format (such as qcow2) and container format (usually bare).

What is the difference between public, private, and shared images? Public images are visible to all users in the cloud and are typically managed by administrators. Private images are visible only to the project that created them. Shared images are private images that the owner has explicitly granted access to specific other projects, allowing controlled collaboration without making images public.

Summary

  • Glance is the OpenStack image service that stores and manages disk images used to launch instances.
  • It supports multiple image formats including QCOW2, RAW, VHD, and VMDK, with QCOW2 being the recommended format.
  • Glance controls image visibility through public, private, and shared access levels.
  • Nova retrieves images from Glance when launching instances, making Glance essential for instance provisioning.
  • Users can upload custom images and create snapshots of running instances, both of which are stored in Glance.

Related Terms

Read definition

Nova

Nova is the OpenStack compute service that manages the lifecycle of virtual machine instances, including creation, scheduling, and termination across a cluster of compute nodes.

Compute
Learn more
Read definition

Instance

An instance is a virtual machine running on a cloud provider's infrastructure with its own operating system, CPU, memory, and storage that you can create, configure, and manage on demand.

Compute
Learn more
Read definition

Image

An image is a template file that contains a pre-configured operating system, software, and settings used to create instances in cloud hosting. It acts as a blueprint that determines what your virtual machine will run when it starts.

Compute
Learn more