在rhev3.4红帽虚拟化平台中,遇到上传安装源异常出错的问题,提示错误信息为“'NoneType' object is not iterable”,具体如下:

    [root@rhevm ]# engine-iso-uploader --iso-domain=ISO_DOMAIN -v upload rhev-hypervisor6-6.5-20140407.0.iso 

    Please provide the REST API password for the admin@internal oVirt Engine user (CTRL+D to abort): 

    ERROR: Problem connecting to the REST API.  Is the service available and does the CA certificate exist?

    ERROR: 'NoneType' object is not iterable

    INFO: Use the -h option to see usage.

    DEBUG: Configuration:

    DEBUG: command: upload

    DEBUG: Traceback (most recent call last):

    DEBUG:   File "/usr/bin/engine-iso-uploader", line 1437, in

    DEBUG:     isoup = ISOUploader(conf)

    DEBUG:   File "/usr/bin/engine-iso-uploader", line 455, in __init__

    DEBUG:     self.upload_to_storage_domain()

    DEBUG:   File "/usr/bin/engine-iso-uploader", line 957, in upload_to_storage_domain

    DEBUG:     self.configuration.get('iso_domain')

    DEBUG: TypeError: 'NoneType' object is not iterable

官方给出的解决方案有四种,分别如下:

解决RHEV上传安装源( engine-iso-uploader)异常出错问题解决方案_第1张图片

解决RHEV上传安装源( engine-iso-uploader)异常出错问题解决方案_第2张图片

解决RHEV上传安装源( engine-iso-uploader)异常出错问题解决方案_第3张图片

但尝试了以上的解决方案都没有解决,最终提供一种最简单的方法:直接将安装源ISO文件复制到对应目录,目录为:

/path-to-iso-domain/SOME-UUID/p_w_picpaths/11111111-1111-1111-1111-111111111111/

如:


    [root@rhevm 11111111-1111-1111-1111-111111111111]# cd /home/ISO_DOMAIN/d75fefad-a4ce-4528-8055-450a98e1dd5e/p_w_picpaths/11111111-1111-1111-1111-111111111111/

    [root@rhevm 11111111-1111-1111-1111-111111111111]# ls

    cn_windows_server_2012_vl_x64_dvd_917962.iso  virtio-win_amd64.vfd

    rhev-hypervisor6-6.5-20140407.0.iso           virtio-win.iso

    rhev-tools-setup.iso                          virtio-win_x86.vfd

    virtio-win-1.7.1.iso

    [root@rhevm 11111111-1111-1111-1111-111111111111]# cp rhev-tools-setup.iso  /home/ISO_DOMAIN/d75fefad-a4ce-4528-8055-450a98e1dd5e/p_w_picpaths/11111111-1111-1111-1111-111111111111

    直接上传后,更新存储域:ISO_DOMAIN,可发现已经将ISO安装源成功上传到RHEV平台中:


解决RHEV上传安装源( engine-iso-uploader)异常出错问题解决方案_第4张图片

    在虚拟机运行选项中也可以发现上传的安装源:

解决RHEV上传安装源( engine-iso-uploader)异常出错问题解决方案_第5张图片