# ansible vmware 0:7 reserved scsi controller card

**URL:** <https://forum.ansible.com/t/ansible-vmware-0-7-reserved-scsi-controller-card/33145>\
**Category:** Ansible Project\
**Tags:** vmware\
**Created:** [June 10, 2020, 4:53pm UTC](https://forum.ansible.com/t/ansible-vmware-0-7-reserved-scsi-controller-card/33145 "2020-06-10T16:53:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bhanu\_Prakash](https://avatars.discourse-cdn.com/v4/letter/b/df705f/32.png) [@Bhanu\_Prakash](https://forum.ansible.com/u/Bhanu_Prakash)\
**Post date:** [June 10, 2020, 4:53pm UTC](https://forum.ansible.com/t/ansible-vmware-0-7-reserved-scsi-controller-card/33145/1 "2020-06-10T16:53:37Z")

</div>

Hello Team,

I need to add 15 disks , I am getting error because of 0:7 reservation.

Is there any automation …please find my below code and help

- name: Add disks  
vmware\_guest\_disk:  
hostname: “{{location}}”  
username: “{{vcenteruser}}”  
password: “{{vcenterpass}}”  
validate\_certs: no  
datacenter: “{{datacentername}}”  
name: “{{hostname}}”  
disk:
- size\_gb: “{{ item }}”  
type: thin  
datastore: “{{datastoredetails}}”  
state: present  
scsi\_controller: 0  
unit\_number: “{{ my\_idx + 1 }}”  
scsi\_type: ‘paravirtual’  
loop: “{{ storage }}”  
loop\_control:  
index\_var: my\_idx  
delegate\_to: localhost

---

<div class="post-metadata">

**Author:** ![Dick\_Visser](https://avatars.discourse-cdn.com/v4/letter/d/d9b06d/32.png) [@Dick\_Visser](https://forum.ansible.com/u/Dick_Visser)\
**Post date:** [June 10, 2020, 7:49pm UTC](https://forum.ansible.com/t/ansible-vmware-0-7-reserved-scsi-controller-card/33145/2 "2020-06-10T19:49:35Z")

</div>

What does your ‘storage’ variable look like?

---

<div class="post-metadata">

**Author:** ![Bhanu\_Prakash](https://avatars.discourse-cdn.com/v4/letter/b/df705f/32.png) [@Bhanu\_Prakash](https://forum.ansible.com/u/Bhanu_Prakash)\
**Post date:** [June 11, 2020, 3:15am UTC](https://forum.ansible.com/t/ansible-vmware-0-7-reserved-scsi-controller-card/33145/3 "2020-06-11T03:15:59Z")

</div>

This are dynamic values like this

[5,4,3,2,5,4]

as it’s in loop it creates disks accordingly …

---

<div class="post-metadata">

**Author:** ![Dick\_Visser](https://avatars.discourse-cdn.com/v4/letter/d/d9b06d/32.png) [@Dick\_Visser](https://forum.ansible.com/u/Dick_Visser)\
**Post date:** [June 11, 2020, 3:44am UTC](https://forum.ansible.com/t/ansible-vmware-0-7-reserved-scsi-controller-card/33145/4 "2020-06-11T03:44:17Z")

</div>

Well then just remove 7 from that list if that can’t be used. Also there are duplicates - even if that isn’t a problem you can optimize the loop by removing those. See [https://docs.ansible.com/ansible/latest/user\_guide/playbooks\_filters.html#set-theory-filters](https://docs.ansible.com/ansible/latest/user_guide/playbooks_filters.html#set-theory-filters)
