vmfs device name of datastore

139 views
Skip to first unread message

Sadanand Alegaonkar

unread,
May 27, 2020, 7:12:03 AM5/27/20
to Ansible Project
Hello All,

I am trying to find out vmfs device name i.e. storage Lun number or WWPN  (naa.60002ac0000000000000000000000000 )  
 I searched in vmware datastore facts module not able to get the exact result.

Please help me to get.

Thanks
Sadanand

Abhijeet Kasurde

unread,
May 28, 2020, 1:49:37 AM5/28/20
to ansible...@googlegroups.com
Hi Sadanand,

Could you please share the playbook that you are using?

Thanks

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/e932b607-a7b3-408d-9a4c-132ed5aa412a%40googlegroups.com.


--
Thanks,
Abhijeet Kasurde

Sadanand Alegaonkar

unread,
May 28, 2020, 1:57:31 AM5/28/20
to ansible...@googlegroups.com
Hello Abhijeet,

Thanks for giving reply.

As of now i am searching ansible module that will help me to get list of datastore WWPN number, so that not able to write playbook for the same.

I tried your existing VMware playbook examples but didnt find vmfs device number in that..

I appreciate your help.

Thanks 
Sadanand




--
Thanks and Regards
 Sadanand V.Alegaonkar
Cell No:9975632660

Abhijeet Kasurde

unread,
May 28, 2020, 6:02:07 AM5/28/20
to ansible...@googlegroups.com
Hi Sadanand,

Can you try this, this will give you all extent of given VMFS volume and then you can extract diskName

- name: Get all Datastore facts
vmware_datastore_info:
validate_certs: False
hostname: '{{ vcenter_hostname }}'
username: '{{ vcenter_username }}'
password: '{{ vcenter_password }}'
datacenter: "Asia-Datacenter1"
name: ds_171_1
schema: vsphere
register: all_datastores

- debug:
msg: "{{ item.info.vmfs.extent }}"
with_items: "{{ all_datastores['datastores'] }}"




--
Thanks,
Abhijeet Kasurde

Sadanand Alegaonkar

unread,
May 28, 2020, 7:26:28 AM5/28/20
to ansible...@googlegroups.com
Hello Abhijit, 

I tried using 'vmware_datastore_facts' module , gives below error .

[root@root are]# ansible-playbook pb_datacenter1.yml

PLAY [Gather cluster information for vCenter] **************************************************************************************************************************
included: /etc/ansible/vmware/login.yml for localhost

TASK [Login into vCenter] **********************************************************************************************************************************************
ok: [localhost]

TASK [Get all Datastore Facts] *****************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Unable to gather datastore facts in datacenter ********** "}

PLAY RECAP *************************************************************************************************************************************************************
localhost                  : ok=2    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0






Reply all
Reply to author
Forward
0 new messages