Uploading images through the openstack image create command fails with 500 Internal Server Error
search cancel

Uploading images through the openstack image create command fails with 500 Internal Server Error

book

Article ID: 321715

calendar_today

Updated On: 11-11-2024

Products

VMware Integrated OpenStack

Issue/Introduction

  • Uploading  images through the openstack image create command fails
root@vio6 [ ~ ]# toolbox
[root@vioadmin1-vioshim-5b94d4fb6d-t4x4q /]# openstack image create --disk-format vmdk  \
--container-format ova --public  --file photon-hw11-3.0-26156e2.ova Photon

HTTP 500 Internal Server Error: The server has either erred or is incapable of performing the requested operation.
  • The Glance API container log has the following error:
#oslog glance-api-569699456f-sxq55 -c glance-api | grep -i error
TypeError: 'NoneType' object is not iterable



Environment

7.x

Cause

If vcenter and esxi hosts are not in the same network, sometimes NFC session can not be established which will cause the image upload to fail.

Resolution

Workaround:
--property vmware_vcenter_upload=true must be set when uploading images.  Similar to the default properties of photon-3.0.ova image.

root@vio6 [ ~ ]#  osget glance glance1 -o yaml
container_format: bare
id: null
image_file: /opt/vmware/data/glance-images/photon-3.0.ova
image_type: vmdk
min_disk: 1
name: Photon 3.0
private: false
properties:
    vmware_extra_config: '''{"smbios.assetTag":"OpenTelekomCloud"}'''
    vmware_vcenter_upload: true


The command must be:

openstack image create --disk-format vmdk  --container-format ova --public \
--property vmware_vcenter_upload=true \
--file photon-hw11-3.0-26156e2.ova Photon