ideadevice / ansible-ahv-provider-plugin

Ansible plugins to interact with AHV APIs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

nutanix_vm: Creating VM with CD-rom throws error

yannickstruyf3 opened this issue · comments

The disk_list below raises following execption:
fatal: [instance]: FAILED! => {"changed": false, "msg": "INVALID_ARGUMENT: Invalid Argument: 6\n :CDROM device must reside on IDE or SATA bus on PC platform. Requested bus type: scsi is invalid.", "vm_ip_address": "", "vm_status": {}, "vm_uuid": ""}

    disk_list:
          - clone_from_image: "{{centos_image_info.image_uuid}}"
            device_type: "DISK"
            adapter_type: "SCSI"
            size_mib: 100000
          - size_mib: 100000
            device_type: "DISK"
            adapter_type: "SCSI"
          - device_type: "CDROM"
            adapter_type: "IDE"
            size_mib: 1

The above error is due to clone_from_image: "{{centos_image_info.image_uuid}}" looks like it is an iso image
PC api expects device_type: CDROM and adapter_type: IDE for all ISO image types

The image_type was indeed incorrect. Great catch. Thanks