AOS LTS - Error creating image from URL using PE, acli and REST API

  • 17 March 2020
  • 2 replies

Userlevel 1
Badge +2

Hi all

I´m attempting to create one disk image from http server (I know that NFS is preferred) but i got errors from PE, acli and REST API.

AHV, CVM, PE, PC and the web server are one the same network (then I can exclude routing issues)  and on the web server (Centos 7.7, apache httpd-2.4.6-90) firewall and selinux are disabled and the url is called using IP to avoid dns issues.

The content is available via wget but the image creation command ends with error 503 (Service Unavailable) while on the web server with log at debug level nothing is written on error and access log.


I have tested also to stop httpd and use python -m SimpleHTTPServer 80 but doesn´t work (I got one excepction that I cannot fully read and I don´t know where is logged)


What´s wrong?
I´m missing something?

Someone have a suggestion?


Here some operation samples:


Download test using wget to check http service


nutanix@cmv:~/tmp$ wget
--2020-03-17 16:28:38--
Connecting to connected.
HTTP request sent, awaiting response... 200 OK
Length: 1605894144 (1.5G)
Saving to: ‘gm-back-test-001-scsi1.qcow2’

100%[==================================================================================================================>] 1,605,894,144  275MB/s   in 6.0s



Image creation test using acli


nutanix@cmv: acli image.create "gm-back-test-001-scsi1a" image_type=kDiskImage source_url= container=OsImages
gm-back-test-001-scsi1a: pending
gm-back-test-001-scsi1a: UploadFailure: Could not access the URL The requested URL returned e[...]
----- gm-back-test-001-scsi1a -----
UploadFailure: Could not access the URL The requested URL returned error: 503 Service Unavailable



Test using REST API Explorer


curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{
 "annotation": "http created image",
 "image_import_spec": {
   "storage_container_uuid": "c2960ea4-f12e-45cd-bc7a-32d6abdfc61a",
   "url": "http://HTTP-IP/images/gm-back-test-001-scsi1.qcow2"
 "image_type": "DISK_IMAGE",
 "name": "gm-back-test-001-scsi1a"
' 'https://PE-IP:9440/PrismGateway/services/rest/v2.0/images/'



Test from PE. Start but fails after 2 minutes…


From Nutanix documentation:

Image Source: Do one of the following:

  • Click the From URL radio button to import the image from the Internet. Enter the appropriate URL address in the field using the following syntax for either NFS or HTTP:
    nfs://[hostname|IP_addr]/path http://[hostname|IP_addr]/path


acli image create references

Create an image
Optionally, a checksum may also be specified if we are creating an image from a source_url in order to verify the correctness of the image.

<acropolis> image.create name [annotation="annotation" ] [architecture="architecture" ] [clone_from_vmdisk="clone_from_vmdisk" ] [compute_checksum="{ true | false }" ] [container="container" ] [image_type="{raw|vhd|vmdk|vdi|iso|qcow2|vhdx}" ] [product_name="product_name" ] [product_version="product_version" ] [sha1_checksum="sha1_checksum" ] [sha256_checksum="sha256_checksum" ] [source_url="source_url" ] [wait="{ true | false }" ]




Best answer by Piero 18 March 2020, 09:11

View original

This topic has been closed for comments

2 replies

Userlevel 1
Badge +2

Hi all,

I found the problem!

Inside the Prims Element proxy configuration both http and https check box where flagged and all the http communications redirected to the proxy...

I tested two solutions:

- Removal of http check box (I don´t think that any http communication is required inside the cluster)
-Add the http storage to the proxy whitelist.

Both solution are working and now I can create images from PE/acli/REST API using http as source at the speed of light.

Have Fun

Userlevel 6
Badge +5

Hi Piero, thank you for sharing the solution!