How to add CentOS 8 cloud / KVM image to OpenStack?, How to run CentOS 8 instance/VM on OpenStack?. Openstack Glance service enables users to discover, register, and retrieve virtual machine images. The default location these images are stored is /var/lib/glance/images/ with its backend being a file. In this guide we will upload CentOS 8 KVM Cloud image to Openstack Glance service.

For RHEL 8: How To Add RHEL 8 qcow2 Image To OpenStack Glance

The Vagrant and Cloud images for CentOS 8 were released when CentOS Linux 8 (1911) was made available for the general public. This release is derived from Red Hat Enterprise Linux 8.1 Source Code. The Cloud images are available at , for both CentOS 8 and CentOS 8 Stream.

The OpenStack Glance has support for the following image formats:

  • raw (unstructured format)
  • qcow2 (Qemu/KVM, supports Copy on Write)
  • iso (archive format for optical discs; for example, CD)
  • vhd (Hyper-V, common for virtual machine monitors from VMware, Xen, Microsoft, VirtualBox, and others)
  • vdi (Qemu/VirtualBox)
  • vmdk (VMware)
  • bare (no metadata is included)
  • aki/ami/ari (Amazon kernel, ramdisk, or machine image)
  • e.t.c.

Upload CentOS 8 Cloud Image to OpenStack Glance

Install wget for downloading the cloud image:

--- Debian / Ubuntu ---
$ sudo apt install -y wget

--- CentOS / Fedora ---
$ sudo yum -y install wget
$ sudo dnf -y install wget

Download the latest Cloud image from

--- CentOS 8 Linux x86_64 ---

--- CentOS 8 Stream Linux x86_64 ---

You can further customize qcow2 image using our guide as reference before uploading it.

How To Customize Qcow2/Raw Linux OS disk image with virt-customize

Then source openstack environment.

source ~/.keystonerc

And upload CentOS 8 Cloud Images to OpenStack Glance.

--- CentOS 8 Linux x86_64 ---
$ openstack image create \
    --container-format bare \
    --disk-format qcow2 \
    --file CentOS-8-GenericCloud-8.1.1911-20200113.3.x86_64.qcow2 \

--- CentOS 8 Stream Linux x86_64 ---
$ openstack image create \
    --container-format bare \
    --disk-format qcow2 \
    --file CentOS-Stream-GenericCloud-8-20200113.0.x86_64.qcow2\

If you don’t have openstack CLI, check: How To Install and Configure OpenStack Client on Linux

Confirm if the images are available in Glance:

$ openstack image list | grep CentOS-8
| adbe1f0c-665e-481a-b689-e32414339415 | CentOS-8        | active |
| 035221af-97e4-4801-b171-fc1b6fc2245d | CentOS-8-Stream | active |

You can also use the Horizon Web interface to upload the images – Navigate to Project > Compute > Images > CREATE IMAGE

upload centos 8 image openstack

Provide image name, description, browse and select image from source, choose image visibility click on “Create Image” button.

Once the image is uploaded, the details are available under the Images section.

upload centos 8 image openstack 02

You can now launch an instance from the uploaded image. See below example:

$ openstack server create \
 --image CentOS-8 \
 --key-name jmutai \
 --flavor m1.small \
 --security-group  7fffea2a-b756-473a-a13a-219dd0f1913a  \
 --network private  \

Confirm server creation:

$ openstack server list 
| ID                                   | Name              | Status  | Networks                          | Image     | Flavor   |
| 9e1e1b14-db2c-405e-9361-6b1b08c707b8 | mycentos8         | ACTIVE  | private=               | CentOS-8  | m1.small |

Let’s test if we can ssh to the server created.

$ ssh [email protected]
Warning: Permanently added '' (ECDSA) to the list of known hosts.
Enter passphrase for key '/home/jmutai/.ssh/id_rsa': 
Activate the web console with: systemctl enable --now cockpit.socket

[[email protected] ~]$ cat /etc/os-release 
NAME="CentOS Linux"
VERSION="8 (Core)"
ID_LIKE="rhel fedora"
PRETTY_NAME="CentOS Linux 8 (Core)"


[[email protected] ~]$ exit
Connection to closed.

We can confirm we’re logged into CentOS 8 instance by checking the /etc/os-release contents.

More guides on CentOS and OpenStack:

How To Manage CentOS 8 Linux With Cockpit Web Console

Enable Automatic Software Updates on CentOS 8 / RHEL 8

How To Join CentOS 8 / RHEL 8 System to Active Directory (AD) domain

How To Install CentOS 8 Linux – Step by Step with Screenshots

How To resize/extend Cinder Volume in OpenStack

How To rename an Instance/Server in OpenStack

How To Assign a Floating IP Address to an Instance in OpenStack

How To Create OpenStack Instance With a Fixed / Static IP Address

How To Create OpenStack projects, users and roles

Your support is our everlasting motivation,
that cup of coffee is what keeps us going!

As we continue to grow, we would wish to reach and impact more people who visit and take advantage of the guides we have on our blog. This is a big task for us and we are so far extremely grateful for the kind people who have shown amazing support for our work over the time we have been online.

Thank You for your support as we work to give you the best of guides and articles. Click below to buy us a coffee.


Please enter your comment!
Please enter your name here