Can not attach CM rom in Vmware

Greetings all. Apologies if this is not the correct place to post this but I wasn’t able to find anything related to this.

So I have recently began playing with Ansible and I am trying to build some VMs in Vmware Sphere using the Ansible module. However I can’t seem to be able to attach the CD rom to the VM with VMware. Below is the error I receive along with the syntax of my playbook. Any assistance would be much appreciated.

My error:

PLAY [all] ********************************************************************

TASK: [vsphere_guest ] ********************************************************
failed: [EXAMPLE-Web01] => {“failed”: true}
msg: unsupported parameter for module: vm_cdrom

FATAL: all hosts have already failed – aborting

PLAY RECAP ********************************************************************
to retry, use: --limit @/home/ansible/create_vm.retry

EXAMPLE-Web01 : ok=0 changed=0 unreachable=0 failed=1

hi,

try making vm_cdrom a parameter under vm_hardware

vm_hardware:
memory_mb: “{{ memory }}”
num_cpus: “{{ cpucount }}”
osid: “{{ osid }}”
scsi: paravirtua
vm_cdrom:
type: “iso”
iso_path: “datastore1/iso/ansible-ks.iso”

Dude, thank you so much. It worked! Of course I tried moving the entry everywhere else other than what you suggested lol. But yeah man you finally gave me some peace.

You’re welcome. Sometimes all it takes is a fresh pair of eyes.

Hi,
Were you able to connect the cdrom?
I get the cdrom mounted with the ISO, but not connected.

Thanks.
Asaf.

I saw the same problem and have not found a fix for it yet.

Me too - Still looking for a solution. If anyone knows how to connect it that would be really helpful, thanks!