Vmware VM is created with a default template sometime the drive letter parameter gets drifted.

22 views
Skip to first unread message

Deepak B K

unread,
Aug 23, 2023, 6:40:59 AM8/23/23
to Ansible Project
Hi Team, 

I have a strange issue while add disk to my vm image and I using the community vmware_guest_disk . when vm is created with a default template sometime the drive letter parameter is drifted.
example /dev/sdb is created instead /dev/sda. 

Please find my code below.  

 name: "Add disk for VM: {{ vm_name }}"
  community.vmware.vmware_guest_disk:
    hostname: "{{ vmware.hostname }}"
    username: "{{ vmware.username }}"
    password: "{{ vmware.password }}"
    validate_certs: "{{ vmware.validate_certs }}"
    datacenter: "{{ vmware_env.datacenter }}"
    moid: '{{ vm_info.id }}'
    disk:
      - size_kb: "{{ (vm_disk.disk_capacity / 1024)|int }}"
        type: "{{ vmware.storage_provisioning | default('thick') }}"
        datastore: "{{ vmware_env.datastore }}"
        state: present
        controller_type: "{{ vm_disk.disk_type | lower }}"
        controller_number: 0
        unit_number: 1
  delegate_to: "{{ delegation_host }}"

I appreciate your suggestion on this issue. 


Thanks 
Deepak Kumar 

Will McDonald

unread,
Aug 23, 2023, 7:03:42 AM8/23/23
to ansible...@googlegroups.com

--
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/d778487a-3c0a-4b7d-99a4-5bfc65ec7f9en%40googlegroups.com.

Deepak B K

unread,
Aug 24, 2023, 6:44:55 AM8/24/23
to Ansible Project
Hi Will, 

Thank you for the valuable link it is helping us in the understand the problem . As right said its not ansible issue but the Vmware consistent device enumeration.

Regards,
Deepak Kumar
Reply all
Reply to author
Forward
0 new messages