Rate This Document
Findability
Accuracy
Completeness
Readability

Configuring and Verifying Glance on OpenStack

Glance is a core component of OpenStack. It provides public image services for instances and manages images and VM snapshots.

Compute nodes with different CPU architectures use different images. Therefore, image files of the x86_64 and Arm architectures must be differentiated in hybrid deployment scenarios. Glance supports image file configuration by setting the metadata property: architecture attribute of the image file.

During VM creation, after an image with an architecture attribute is selected, the Nova scheduler automatically selects a node that matches the image architecture to create a VM.

Typical Scenarios:

  • Image attributes can be configured during the image creation.
    openstack image create
  • Attributes can also be configured on an existing image.
    openstack image set

Perform the following operations on the controller node.

  1. Source the admin credentials to gain access to admin-only CLI commands.
    1
    source  /etc/keystone/admin-openrc
    
  2. Optional: Download one x86_64 test image and one Arm test image. A proxy needs to be configured if the test image is downloaded from the Internet. If the test image exists on the local host, skip this step.
    1
    2
    wget https://download.cirros-cloud.net/0.4.0/cirros-0.4.0-aarch64-disk.img --no-check-certificate
    wget https://download.cirros-cloud.net/0.4.0/cirros-0.4.0-x86_64-disk.img --no-check-certificate
    

  3. Set the architecture attribute of an image.
    • Method 1: Set the image architecture attribute when uploading the image file to the OpenStack image repository.
      1
      openstack image create "cirros-0.4.0-x86_64" --file ./cirros-0.4.0-x86_64-disk.img --property architecture=x86_64 --disk-format qcow2 --container-format bare --public
      

    • Method 2: Set the architecture attribute for existing images in the image repository.
      1
      2
      openstack image create "cirros-0.4.0-aarch64" --file ./cirros-0.4.0-aarch64-disk.img --disk-format qcow2 --container-format bare --public
      openstack image set --property architecture=aarch64 cirros-0.4.0-aarch64
      

  4. Check whether the architecture attribute of the image is correctly set.
    1
    2
    openstack image show cirros-0.4.0-x86_64
    openstack image show cirros-0.4.0-aarch64