It seems "unit_number" should be "0" or "1". Try to replace:
unit_number: "none" with unit_number: "*0*" El miércoles, 14 de abril de 2021 a la(s) 09:11:40 UTC-5, [email protected] escribió: > Please someone help me. I am creating two vms with iso file to be > installed but get this error. I dont know what to do again. > > failed: [127.0.0.1 -> localhost] (item=my_vm_01) => {"ansible_facts": > {"discovered_interpreter_python": "/usr/bin/python"}, "ansible_loop_var": > "item", "changed": false, "item": "my_vm_01", "msg": "Invalid > cdrom.controller_number: 0 or cdrom.unit_number: none, valid values are 0 > or 1 for IDE controller."} > failed: [127.0.0.1 -> localhost] (item=my_vm_02) => {"ansible_loop_var": > "item", "changed": false, "item": "my_vm_02", "msg": "Invalid > cdrom.controller_number: 0 or cdrom.unit_number: none, valid values are 0 > or 1 for IDE controller."} > > --- > - name: create vm > hosts: localhost > gather_facts: no > connection: local > vars_files: > - multi_vm.yml > tasks: > - vmware_guest: > hostname: "{{ VMWARE_HOST }}" > username: "{{ VMWARE_USER }}" > password: "{{ VMWARE_PASSWORD }}" > validate_certs: no > folder: /ha-datacenter/vm/ > name: "{{ item }}" > state: poweredon > guest_id: ubuntu64Guest > # This is hostname of particular ESXi server on which user wants VM > to b> > esxi_hostname: "{{ esxi_host }}" > cdrom: > - iso_path: "[Datastore_3]/ubuntu-18.04.4-desktop-amd64.iso" > type: "iso" > controller_type: "ide" > controller_number: 0 > unit_number: "none" > state: "present" > disk: > - size_gb: 15 > type: thin > datastore: Datastore_3 > hardware: > memory_mb: '{{ guest_vram }}' > num_cpus: '{{ guest_vcpu }}' > networks: > - name: '{{vm_network }}' > ip: '{{ inventory_hostname }}' > netmask: '{{ guest_netmask }}' > gateway: '{{ guest_gateway }}' > dns_servers: > - '{{ guest_dns_server1 }}' > wait_for_ip_address: yes > delegate_to: localhost > register: deploy_vm > with_items: > - "{{ servers }}" > > > > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/caffb3a2-d48e-4566-a45b-0ba96204f749n%40googlegroups.com.
