Download a Glance image with OpenRC
This guide shows how to:
- Download an OpenStack OpenRC file from Horizon.
- Source or import the OpenRC credentials on your local system.
- Download a Glance image with
openstack image save.
Prerequisites
- Horizon user with access to the target project.
- OpenStack CLI installed locally.
- For detailed client installation steps, see the OpenStack docs: Install OpenStack command-line clients.
- On macOS, you can install the CLI with Homebrew:
brew install openstackclient. - On Windows, use WSL and run the same shell commands as Linux/macOS.
- Enough local disk space for the image file.
1. Download the OpenRC file from Horizon
- Log in to Horizon.
- Open your project.
- In the top-right user menu, click your user name.
- Select
OpenStack RC File. - Download the project OpenRC file (usually
openrc.sh).
2. Configure OpenRC locally (all OS types)
2.1 Save the OpenRC file
Open a shell (Linux terminal, macOS Terminal, or WSL on Windows) and move the downloaded file to your working directory, for example:
mv ~/Downloads/openrc.sh ~/openstack/openrc.sh
cd ~/openstack
2.2 Source the OpenRC file
source ./openrc.sh
Enter your OpenStack password when prompted.
2.3 Verify authentication
openstack token issue
2.4 List images and copy the image ID
openstack image list
2.5 Download the image
openstack image save --file my-image.qcow2 <IMAGE_ID_OR_NAME>
Hint: Use .qcow2 for qcow2 images and .raw for raw images. You can check the image format with:
openstack image show <IMAGE_ID_OR_NAME> -f value -c disk_format
Example:
openstack image save --file ubuntu-22.04.qcow2 ubuntu-22.04
3. Troubleshooting
The resource could not be found.- Check the image name/ID with
openstack image list.
- Check the image name/ID with
Missing value auth-url required for auth plugin password- OpenRC variables are not loaded correctly.
HTTP 401 Unauthorized- Re-enter password and verify project/user domain values.