{"id":4332,"date":"2019-04-26T16:16:53","date_gmt":"2019-04-26T10:46:53","guid":{"rendered":"https:\/\/pheonixsolutions.com\/blog\/?p=4332"},"modified":"2026-10-18T17:14:47","modified_gmt":"2026-10-18T11:44:47","slug":"upload-cloud-images-openstack","status":"publish","type":"post","link":"https:\/\/pheonixsolutions.com\/blog\/upload-cloud-images-openstack\/","title":{"rendered":"How to Upload Cloud Images in OpenStack via CLI"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Post Date: April 26, 2019<br>Last Updated: October 18, 2026<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Introduction<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">OpenStack provides image management capabilities through the Glance service, allowing users to upload, manage, and delete virtual machine images. While these operations can be performed using the Horizon dashboard, the OpenStack command-line interface (CLI) offers a convenient way to manage cloud images efficiently. In this tutorial, we will explain how to download a cloud image, upload it to OpenStack Glance, verify the uploaded image, and delete an image using simple command-line instructions.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Before uploading cloud images to OpenStack through the command line, ensure that you have the following:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>A working OpenStack environment with the Glance image service configured.<\/li>\n\n\n\n<li>SSH or terminal access to an OpenStack controller or a node with the OpenStack CLI installed.<\/li>\n\n\n\n<li>Valid OpenStack administrator credentials or a user account with the required image management permissions.<\/li>\n\n\n\n<li>The OpenStack command-line client installed and configured.<\/li>\n\n\n\n<li>A cloud image file, such as a QCOW2 image, downloaded from a trusted source.<\/li>\n\n\n\n<li>Sufficient storage space to store and upload the cloud image.<\/li>\n\n\n\n<li>Network connectivity to download the image, if you are retrieving it from the internet.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Implementation<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Upload cloud images in OpenStack using the command-line interface (CLI) to manage virtual machine images efficiently. OpenStack Glance allows administrators to upload, view, and delete cloud images without using the Horizon dashboard. In this tutorial, we will demonstrate how to download a Debian QCOW2 image, upload it to Glance, verify its status, and delete it using OpenStack CLI commands.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter\"><img fetchpriority=\"high\" decoding=\"async\" width=\"323\" height=\"156\" src=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/04\/download.png\" alt=\"\" class=\"wp-image-4358\" srcset=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/04\/download.png 323w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/04\/download-300x145.png 300w\" sizes=\"(max-width: 323px) 100vw, 323px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Download an image from internet. We use debian image for example. Login to the server where the glance service is running, in our case it\u2019s a allinone node.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">cd \/root<\/pre>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">wget http:\/\/cdimage.debian.org\/cdimage\/openstack\/current-9\/debian-9-openstack-amd64.qcow2<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Source your keystone admin credentials using below source command<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">[root@os ~]# source keystonerc_admin\n[root@os ~(keystone_admin)]#<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Go to the folder where your have place cloud image qcow2 file.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">[root@os ~(keystone_admin)]# cd \/root\/\n[root@os ~(keystone_admin)]#<\/pre>\n\n\n\n<h4 id=\"mce_8\" class=\"wp-block-heading\">Upload a Cloud Image to OpenStack Glance<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Syntax :<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"> [root@os ~(keystone_admin)]# openstack image create \u2013disk-format qcow2 \u2013container-format bare\u00a0\u00a0 \u2013public \u2013file\u00a0 {Name-Cloud-Image}.qcow2\u00a0\u00a0\u00a0\u00a0 &lt;Name-of-Image><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Example : Let\u2019s assume I want to upload Debian9 qcow2 file.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">[root@os ~(keystone_admin)]# openstack image create --disk-format qcow2 --container-format bare --public --file debian-9-openstack-amd64.qcow2  debian1<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"1024\" height=\"545\" src=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/04\/Screen-Shot-2019-04-25-at-1.44.23-PM-1024x545.png\" alt=\"\" class=\"wp-image-4338\" srcset=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/04\/Screen-Shot-2019-04-25-at-1.44.23-PM-1024x545.png 1024w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/04\/Screen-Shot-2019-04-25-at-1.44.23-PM-300x160.png 300w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/04\/Screen-Shot-2019-04-25-at-1.44.23-PM-768x409.png 768w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2019\/04\/Screen-Shot-2019-04-25-at-1.44.23-PM.png 1440w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Verify Uploaded OpenStack Images<\/h4>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">[root@os ~(keystone_admin)]# openstack image list\n+--------------------------------------+------------+--------+\n| ID                                   | Name       | Status |\n+--------------------------------------+------------+--------+\n| eecc5097-4e5d-4c94-a45b-55086eac58ff | CentOS7    | active |\n| 91269ac5-d934-400f-8e97-bc7a59b33245 | Ubuntu VDK | active |\n| 2e55d18b-262d-4e7a-9d37-3af350a885f7 | cirros     | active |\n| 6be91be3-d1c0-45b2-88d5-295718555bd8 | debian     | active |\n| c3f0db79-d08d-4582-8bd1-e39308aef705 | debian9    | active |\n+--------------------------------------+------------+--------+<\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">Delete a Cloud Image in OpenStack<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Syntax :<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># openstack image delete &lt;Image-Name-or-Image-ID><\/pre>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">[root@os ~(keystone_admin)]# openstack image delete debian1\n[root@os ~(keystone_admin)]#<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Uploading cloud images in OpenStack using the command line is a simple and efficient way to manage virtual machine images. With OpenStack CLI commands such as <code>openstack image create<\/code>, <code>openstack image list<\/code>, and <code>openstack image delete<\/code>, administrators can upload new images, verify their status, and remove images that are no longer required. These commands simplify OpenStack Glance image management without relying on the Horizon dashboard. For more information about uploading, listing, and deleting cloud images, refer to the official <a href=\"https:\/\/docs.openstack.org\/python-openstackclient\/latest\/cli\/command-objects\/image\/v2\/index.html\" target=\"_blank\" rel=\"noopener\">Link<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For more tutorials, please visit <a href=\"https:\/\/pheonixsolutions.com\/blog\/\">pheonixsolutions<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">FAQs<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1. What is OpenStack Glance?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">OpenStack Glance is an image service that allows users to discover, register, store, and manage virtual machine images used to launch instances in an OpenStack cloud environment.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2. How do I upload a cloud image to OpenStack using the command line?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">You can upload a cloud image using the <code>openstack image create<\/code> command with the appropriate disk format, container format, file path, and image name.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">openstack image create --disk-format qcow2 \\\n  --container-format bare \\\n  --public \\\n  --file debian-9-openstack-amd64.qcow2 \\\n  debian1<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">3. How can I check whether an image was uploaded successfully?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Run the following command to list available images and check their status:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">openstack image list<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Realted Articles<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/pheonixsolutions.com\/blog\/how-to-install-openstack-utils-package-on-centos-7-6\/\">How to install openstack-utils package On CentOS 7.6<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/pheonixsolutions.com\/blog\/how-to-install-single-node-openstack-on-centos-7-6\/\">How to Install single node OpenStack on CentOS 7.6<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Need Help with OpenStack?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Need help with OpenStack installation, cloud image management, Glance configuration, or troubleshooting virtual machine deployments? Our experts can assist with OpenStack administration, cloud infrastructure, DevOps, Linux server management, and other technical requirements.Get in touch with our team <a href=\"https:\/\/pheonixsolutions.com\/contact\">here<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Post Date: April 26, 2019Last Updated: October 18, 2026 Introduction OpenStack provides image management capabilities through the Glance service, allowing [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[1019],"tags":[622],"class_list":["post-4332","post","type-post","status-publish","format-standard","hentry","category-cloud-aws","tag-openstack","psol-cat-cloud-aws"],"jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/phn2x7-17S","jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/4332","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=4332"}],"version-history":[{"count":2,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/4332\/revisions"}],"predecessor-version":[{"id":12367,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/4332\/revisions\/12367"}],"wp:attachment":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=4332"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=4332"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=4332"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}