# Trying to create vm's on a Dell VMware vxRails VSAN

**URL:** <https://forum.ansible.com/t/trying-to-create-vms-on-a-dell-vmware-vxrails-vsan/3556>\
**Category:** Get Help\
**Tags:** vmware, collections\
**Created:** [January 31, 2024, 8:39pm UTC](https://forum.ansible.com/t/trying-to-create-vms-on-a-dell-vmware-vxrails-vsan/3556 "2024-01-31T20:39:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![glenn.howe](https://avatars.discourse-cdn.com/v4/letter/g/0ea827/32.png) [@glenn.howe](https://forum.ansible.com/u/glenn.howe)\
**Post date:** [January 31, 2024, 8:39pm UTC](https://forum.ansible.com/t/trying-to-create-vms-on-a-dell-vmware-vxrails-vsan/3556/1 "2024-01-31T20:39:11Z")

</div>

Hopefully this is in the right place. For years we have been building systems with ansible vmware\_guest module using an HP esx host and 3Par storage. In our code we send the names or the “host” and the name of the datastore . In Vcenter, the “datastore” is browseable for files and we can see any iso files or vmdk files we created. Life is good. Ansible works, etc.

We got a new Dell set up and it uses a different file storage arrangement. I am a bit abstracted from understanding all the differences, but you cannot “browse” the datastore. So when I go to spin up a system using our playbook, I get some errors that indicate I cannot write to the datastore.

For Dell VX Rails VSAN, do I need to use some other parameters in the module or is there another module I should be using?

Code below:

- name: Deploy a VM without a CD-ROM from scratch  
vmware\_guest:  
hostname: “{{ vcenter\_hostname }}”  
username: “{{ vcenter\_username }}”  
password: “{{ vcenter\_password }}”  
datacenter: “{{ vcenter\_dc }}”  
cluster: “{{ vcenter\_cluster }}”  
datastore: “{{ guest\_datastore }}”  
folder: “{{ guest\_folder }}”  
name: “{{ guest\_name }}”  
guest\_id: “{{ guest\_id | default(‘rhel8\_64Guest’) }}”  
annotation: “{{ guest\_note }}”  
template: “{{ guest\_template\_name | default(omit) }}”  
hardware:  
boot\_firmware: efi  
secure\_boot: true  
version: 15  
num\_cpus: “{{ vm\_num\_cpus | default(‘4’) }}”  
num\_cpu\_cores\_per\_socket: “{{ vm\_num\_cpu\_cores\_per\_socket | default(‘2’) }}”  
memory\_mb: “{{ vm\_memory\_mb | default(‘16384’) }}”  
networks:  
- connected: true  
start\_connected: true  
device\_type: vmxnet3  
name: “{{ vm\_network\_name.stdout }}”

---

<div class="post-metadata">

**Author:** ![atul\_mohan](https://avatars.discourse-cdn.com/v4/letter/a/f04885/32.png) [@atul\_mohan](https://forum.ansible.com/u/atul_mohan)\
**Post date:** [January 5, 2025, 5:00pm UTC](https://forum.ansible.com/t/trying-to-create-vms-on-a-dell-vmware-vxrails-vsan/3556/2 "2025-01-05T17:00:20Z")

</div>

```auto
- name: Deploy a VM on Dell VxRail with vSAN
  vmware_guest:
    hostname: "{{ vcenter_hostname }}"
    username: "{{ vcenter_username }}"
    password: "{{ vcenter_password }}"
    datacenter: "{{ vcenter_dc }}"
    cluster: "{{ vcenter_cluster }}"
    # Use the vSAN Datastore name here
    datastore: "vsanDatastore" # Replace with your actual vSAN Datastore name
    folder: "{{ guest_folder }}"
    name: "{{ guest_name }}"
    guest_id: "{{ guest_id | default('rhel8_64Guest') }}"
    annotation: "{{ guest_note }}"
    template: "{{ guest_template_name | default(omit) }}"
    hardware:
      boot_firmware: efi
      secure_boot: true
      version: 15
      num_cpus: "{{ vm_num_cpus | default('4') }}"
      num_cpu_cores_per_socket: "{{ vm_num_cpu_cores_per_socket | default('2') }}"
      memory_mb: "{{ vm_memory_mb | default('16384') }}"
    networks:
      - connected: true
        start_connected: true
        device_type: vmxnet3
        name: "{{ vm_network_name.stdout }}"
    # Specify vSAN storage policy if available
    storage:
      - disk: 0
        size_gb: 20 # Example size
        type: thin
        # If you have specific vSAN storage policies, you can specify them here
        storage_policy: "vSAN Default Storage Policy" # Optional, replace with your policy name
  delegate_to: localhost

```

---

<div class="post-metadata">

**Author:** ![bvitnik](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/bvitnik/32/4132_2.png) [@bvitnik](https://forum.ansible.com/u/bvitnik)\
**Post date:** [January 5, 2025, 8:24pm UTC](https://forum.ansible.com/t/trying-to-create-vms-on-a-dell-vmware-vxrails-vsan/3556/3 "2025-01-05T20:24:47Z")

</div>

What is the exact error message you are getting? `vmware_guest` is the right module but maybe your user does not have necessary privileges to provision a VM.
