ansible-for-nsxt icon indicating copy to clipboard operation
ansible-for-nsxt copied to clipboard

"Multiple VMs with same display name. Please provide virtual_machine_id to identify the target VM"

Open rogerscuall opened this issue 2 years ago • 1 comments

Describe the bug

The module "vmware.ansible_for_nsxt.nsxt_vm_tags" will throw the error:

"Multiple VMs with same display name. Please provide virtual_machine_id to identify the target VM"

In this case for 2 VMs with the same name. There is a feature in VMware named VM Fault Tolerance, that creates 2 identical VMs, in this specific case it would make sense that this module will configure both VM identically because these tags are used for firewall rules.

Reproduction steps

1. Create on VMware vCenter a VM, select the VM and configure Fault Tolerance on it.
2. Using the module `vmware.ansible_for_nsxt.nsxt_vm_tags` use the name of the VM on the field virtual_machine_display_name. 
3. Run the playbook.

Expected behavior

Both VMs in the fault tolerance group should be configured identically for the security tags, that is the entire reason for fault tolerance, that in the absence of one VM the other one takes over, if the security tags are not identically different firewall treatment can be applied.

Additional context

No response

rogerscuall avatar May 18 '22 15:05 rogerscuall

Fault Tolerance is not supported by NSX-T : https://kb.vmware.com/s/article/55653

tvigneron avatar Feb 21 '23 18:02 tvigneron