Hello,
I am trying to add an nvme disk using vmware_guest_disk
My code is:
- hosts: localhost
gather_facts: no
tasks:-
include_vars: ./vars/secrets.yml
-
include_vars: ./vars/lab_dc_vars.yml
-
name: Add Disk to vm host
vmware_guest_disk:
hostname: “{{ vcenter_server }}”
username: “{{ devtstuser }}”
password: “{{ passwddev }}”
datacenter: “{{ datacenter_name }}”
validate_certs: false
name: “{{ vmname }}”
disk:
- size_gb: “{{ secondDisk }}”
state: present
autoselect_datastore: true
controller_type: “nvme”
controller_number: 0
unit_number: 3
disk_mode: ‘independent_persistent’
delegate_to: localhost
register: vminfo
-
Fails with error
fatal: [127.0.0.1 → localhost]: FAILED! => {
“changed”: false,
“invocation”: {
“module_args”: {
“datacenter”: “Shipboard Lab”,
“disk”: [
{
“autoselect_datastore”: true,
“controller_number”: 0,
“controller_type”: “nvme”,
“disk_mode”: “independent_persistent”,
“size_gb”: 60,
“state”: “present”,
“unit_number”: 3
}
],
“folder”: null,
“hostname”: “DEV”,
“moid”: null,
“name”: “hostname”,
“password”: “VALUE_SPECIFIED_IN_NO_LOG_PARAMETER”,
“port”: 443,
“proxy_host”: null,
“proxy_port”: null,
“use_instance_uuid”: false,
“username”: “user”,
“uuid”: null,
“validate_certs”: false
}
},
“msg”: “Please specify ‘scsi_controller’ under disk parameter at index [0], which is required while creating disk.”
Thanks in advance
Stef