Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please specify either 'scsi_type' or 'controller_type' for disk index [0]. #2125

Open
kpatelsp opened this issue Aug 1, 2024 · 0 comments
Open

Comments

@kpatelsp
Copy link

kpatelsp commented Aug 1, 2024

SUMMARY

Not able to add disk on vmware server.

ISSUE TYPE
  • Bug Report
COMPONENT NAME
  • name: community.vmware
    version: 1.14.0
ANSIBLE VERSION
Ansible version :  Ansible Automation Platform Controller 4.4.8  

- name: Adding disk to the machine
  vmware_guest_disk:
      hostname: "{{ vcenter_server }}"
      username: "{{ vcenter_user }}"
      password: "{{ vcenter_pass }}"
      datacenter: "{{datacenter_name}}"
      name: "{{outer_item.value.server_name}}"
      validate_certs: no
      disk:
        - size_gb: "{{ outer_item.value['disk' ~ item ~ '_size'] }}"
          type: thin
          datastore: "{{vcenter_datastore}}"
          state: present
          controller_number: 0
          controller_type: 'paravirtual'
          unit_number: "{{item}}"
          scsi_controller: 1
          scsi_type: 'paravirtual'
  with_sequence: start=1 end={{outer_item.value.tdisk}}
COLLECTION VERSION

CONFIGURATION
  "msg": "Please specify either 'scsi_type' or 'controller_type' for disk index [0].",
  "invocation": {
    "module_args": {
      "hostname": "XXXXXXXXX",
      "username": "[email protected]",
      "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
      "datacenter": "XXXXX",
      "name": "XXXXX",
      "validate_certs": false,
      "disk": [
        {
          "size_gb": 1000,
          "type": "thin",
          "datastore": "VVOL_Datastore",
          "state": "present",
          "controller_number": 0,
          "controller_type": "paravirtual",
          "unit_number": 1,
          "scsi_controller": 1,
          "scsi_type": "paravirtual",
          "sharing": false,
          "destroy": true,
          "size": null,
          "size_kb": null,
          "size_mb": null,
          "size_tb": null,
          "disk_mode": null,
          "compatibility_mode": null,
          "rdm_path": null,
          "autoselect_datastore": null,
          "filename": null,
          "iolimit": null,
          "shares": null
        }
      ],
      "port": 443,
      "use_instance_uuid": false,
      "proxy_host": null,
      "proxy_port": null,
      "uuid": null,
      "moid": null,
      "folder": null
    }
  },
  "_ansible_no_log": null,
  "changed": false,
  "item": "1",
  "ansible_loop_var": "item",
  "_ansible_item_label": "1"
}

OS / ENVIRONMENT

Window server 2022

STEPS TO REPRODUCE
- name: Adding disk to the machine
  vmware_guest_disk:
      hostname: "{{ vcenter_server }}"
      username: "{{ vcenter_user }}"
      password: "{{ vcenter_pass }}"
      datacenter: "{{datacenter_name}}"
      name: "{{outer_item.value.server_name}}"
      validate_certs: no
      disk:
        - size_gb: "{{ outer_item.value['disk' ~ item ~ '_size'] }}"
          type: thin
          datastore: "{{vcenter_datastore}}"
          state: present
          controller_number: 0
          controller_type: 'paravirtual'
          unit_number: "{{item}}"
          scsi_controller: 1
          scsi_type: 'paravirtual'
  with_sequence: start=1 end={{outer_item.value.tdisk}}

EXPECTED RESULTS

It should add disk on scsi controller 1 and controller 1:0

ACTUAL RESULTS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant