大家好
我正在尝试从HTTP服务器创建一个磁盘映像(我知道NFS是首选),但是我从PE,ACLI和REST API出现了错误。
AHV,CVM,PE,PC和Web服务器是同一网络的一个(然后我可以排除路由问题),并且在Web服务器(CentOS 7.7,Apache HTTPD-2.4.6-90)上,防火墙和SELINUX被禁用并且URL称为使用IP来避免DNS问题。
该内容可通过WGET获得,但图像创建命令以错误503(服务不可用)结束,而在Web服务器上具有log处于DEBUG级别的log,则在错误和访问日志上没有写任何内容。
我还测试过以停止HTTPD并使用Python -M SimpleHttpserver 80,但没有工作(我得到了一个无法完全阅读的Exctuct,我不知道在哪里记录了)
怎么了?
我缺少什么?
有人有建议吗?
这里有一些操作样本:
使用WGET下载测试以检查HTTP服务
~~~
nutanix@cmv:〜/tmp $ wget http://192.168.158.40/images/gm-back-test-001-scsi1.qcow2
-2020-03-17 16:28:38-- http://192.168.158.40/images/gm-back-test-001-scsi1.qcow2
连接到192.168.158.40:80 ...连接。
http请求发送,等待响应... 200可以
长度:1605894144(1.5G)
保存到:“ gm-back-test-001-scsi1.qcow2’
100%[===================================================================================================================>] 1,605,894,144 275mb/s 6.0s
~~~
使用ACLI的图像创建测试
~~~
nutanix@cmv:acli image.create“ gm-back-test-001-scsi1a” image_type = kdiskimage source_url = http://192.168.158.40/images/images/gm-back-test-test-001-scsi1.qcow2 contuner = osimages
GM-Back-Test-001-SCSI1A:待处理
GM-BACK-TEST-001-SCSI1A:UPLOADFAILURE:无法访问URL http://192.168.158.40/images/gm-back-test-001-scsi1.qcow2:请求的URL返回e [...]
----- GM-Back-test-001-SCSI1A -----------------------
uploadFailure:无法访问URL http://192.168.158.40/images/gm-back-test-001-scsi1.qcow2:请求的URL返回错误:503服务不可用
~~~
使用REST API资源管理器测试
~~~
curl -x post -header'content -type:application/json'-header'accept:application/json'-d'{
“注释”:“ http创建的图像”,
“ 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”,
“名称”:“ GM-Back-test-001-SCSI1A”
}
''https:// pe-ip:9440/prismgateway/services/rest/v2.0/images/'
~~~
来自PE的测试。开始但两分钟后失败…
来自Nutanix文档:
图像来源:执行以下操作之一:
- 单击来自URL广播按钮以从Internet导入图像。使用以下语法在字段中输入适当的URL地址:NFS或HTTP:
nfs:// [主机名| ip_addr]/路径http:// [hostName | ip_addr]/path
ACLI图像创建参考
https://portal.nutanix.com/page/documents/details/?targetId=command-ref-aos-v510:acl-acli-image-auto-r.html
创建图像
可选地,如果我们要从源_url创建图像以验证图像的正确性,也可以指定校验和。
最好的答案皮耶罗
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...<\/p>
I tested two solutions:
- Removal of http check box (I don\u00b4t 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
-Piero
\u00a0<\/p>","className":"post__content__best_answer"}">