# Ansible VMware - create datastore

**URL:** <https://forum.ansible.com/t/ansible-vmware-create-datastore/37369>\
**Category:** Ansible Project\
**Tags:** vmware\
**Created:** [November 19, 2022, 3:54pm UTC](https://forum.ansible.com/t/ansible-vmware-create-datastore/37369 "2022-11-19T15:54:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mike\_Smart](https://avatars.discourse-cdn.com/v4/letter/m/c57346/32.png) [@Mike\_Smart](https://forum.ansible.com/u/Mike_Smart)\
**Post date:** [November 19, 2022, 3:54pm UTC](https://forum.ansible.com/t/ansible-vmware-create-datastore/37369/1 "2022-11-19T15:54:13Z")

</div>

Hello ,

my ESXi (Dell T350) has two virtual drives.  
1.st is 2\*SDD raid 1 for the Hypervisor 7.03 = datastore1 which is automatically created by installing the Hypervisor via kickstart.

Now my question is about the best practice on how to create the datastore2 (some TB raid5) for my VM’s later on.

Would it be possible within Ansible to create datastore2 on the second available virtual disk?  
Or is there another best practice to do so?

kr  
Mike

---

<div class="post-metadata">

**Author:** ![Walter\_Rowe](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/walter_rowe/32/4506_2.png) [@Walter\_Rowe](https://forum.ansible.com/u/Walter_Rowe)\
**Post date:** [November 21, 2022, 11:47am UTC](https://forum.ansible.com/t/ansible-vmware-create-datastore/37369/2 "2022-11-21T11:47:52Z")

</div>

Is this something you will do often and that needs to be consistent? Ansible isn’t always the right solution. This specific task may be best performed from within the vCenter or on the esxi command line since I imagine it is something you will do once.

Walter

---

<div class="post-metadata">

**Author:** ![Mike\_Smart](https://avatars.discourse-cdn.com/v4/letter/m/c57346/32.png) [@Mike\_Smart](https://forum.ansible.com/u/Mike_Smart)\
**Post date:** [November 21, 2022, 1:03pm UTC](https://forum.ansible.com/t/ansible-vmware-create-datastore/37369/3 "2022-11-21T13:03:27Z")

</div>

Hi Walter,  
yes, would do it more than a several hundred times over next years.  
Actually at this moment we do it via vCenter, but would be nicer and less typo via ansible
