Download glance image from openstack CLI client
search cancel

Download glance image from openstack CLI client

book

Article ID: 321800

calendar_today

Updated On:

Products

VMware Integrated OpenStack

Issue/Introduction

Symptoms:

  • Users could not download the Glance image from the OpenStack CLI client.
  • When downloading an image from Openstack CLI, there is an error:
glance image-download --file centos-7-20220930 --progress 8d8fe6fd-8172-4416-94d9-f5ed1427044d
[===========> ] 38%[Errno 32] Corrupt image download. Hash was 0c0eecad5adad6cdd6c1a7a57a74038a6dec2d8afffd69420c4335face227ba9228bff5c069741c12fe8be5025bdbeff93f552b535552df2322e8a113e79c48e expected 9d194a05d74b00cc7d47856da6cf1d1f95f3a30258a68b8fd086ffef90d5136fbc068266f81143bc52fbd901f93b991c6970888cbd14a72026d24f341695e958



Environment

7.x

Cause

VIO stores the image as a VM template in the vSphere datastore by default. The md5sum value is not saved between VMDK and VM template.

See VMware Integrated OpenStack 7.2.0.1 Release Notes


Resolution

The image needs to be uploaded with this flag: –-property vmware_create_template=false

#openstack image create --disk-format vmdk --file ./xenial-server-cloudimg-amd64-disk1.img --property vmware_create_template=false image.vmdk

To download use the below command:

#openstack image save image.vmdk --file download.img

Workaround:
User can also download the image file via vshpere-client.

Example

  1. Find direct_url property using the command:
openstack image show 13fe0f1e-0ee6-4dc7-8b22-b518b3320c5d
direct_url='vi://vcsa01.gslabs.local/DC/vm/OpenStack/Project (f036f4c6e5184dc2a7cbff22541c1f91)/Images/13fe0f1e-0ee6-4dc7-8b22-b518b3320c5d-vcsa01-3DSAWS
  1.  Browse the datastore in vCenter and search for the image id from direct_url property and download the vmdk file.



Additional Information