Duplicate virtual machine names across different clusters
Hey,
we have several VMware sources in one config file. In cluster cluster01 there is one VM monitoring and in cluster Cluster01 there is one VM monitoring.
As soon as the second source is analyzed, all parameters of VM monitoring in cluster cluster01 would be changed to the parameters of VM monitoring from cluster Cluster01.
No new VM monitoring in Cluster Cluster01 is created, but the existing one, with an identical name, is changed.
I have already tried to manually create a VM interface with a MAC address, but this is also overwritten.
Can this be prevented? The following is set for each source:
vm_tenant_relation = .* = <tenant>
Hi, is it possible that you copied the VM from one vCenter to the other vCenter?
No, both are new VMs. I also checked the instanceId and both are different. Also the mac addresses. To manually set the mac addresses and the instanceId in the field of the serial number changes nothing. It will be overwritten.
However, renaming cluster01 to cluster-01 works.
Is it possible that when checking the associated cluster names of the VMs, upper/lower case is not taken into account across multiple VMware sources?
Here is the output of grep monitoring log from the run where it doesn't work:
2025-07-30 12:18:05,852 - DEBUG: Parsing vCenter VM: monitoring
2025-07-30 12:18:06,135 - DEBUG2: Found a matching vm_tenant_relation 'Customer1' (.*) for monitoring
2025-07-30 12:18:06,312 - DEBUG2: Found a exact matching virtual machine object: monitoring (cluster01)
2025-07-30 12:18:06,312 - DEBUG2: Found a matching virtual machine object: monitoring (cluster01)
2025-07-30 12:18:06,312 - DEBUG2: Parsing 'virtual machine' data structure: monitoring
2025-07-30 12:18:06,312 - DEBUG2: Found a matching vm_role_relation 'Virtual Server' (.*) for monitoring
2025-07-30 12:18:06,312 - DEBUG2: Parsing 'virtual machine' data structure: monitoring
2025-07-30 12:18:06,325 - DEBUG2: Found '1' NICs in NetBox for 'monitoring'
2025-07-30 12:18:06,325 - DEBUG2: Parsing 'virtual machine interface' data structure: vNIC 1 (VM Network) (monitoring)
2025-07-30 12:18:06,326 - DEBUG2: Parsing 'virtual machine interface' data structure: vNIC 1 (VM Network) (monitoring)
2025-07-30 12:18:06,354 - DEBUG2: Parsing 'virtual machine interface' data structure: vNIC 1 (VM Network) (monitoring)
2025-07-30 12:19:24,396 - DEBUG: Parsing vCenter VM: monitoring
2025-07-30 12:19:25,506 - DEBUG2: Found a matching vm_tenant_relation 'Customer2' (.*) for monitoring
2025-07-30 12:19:25,949 - DEBUG2: Found a exact matching virtual machine object: monitoring (cluster01)
2025-07-30 12:19:25,949 - DEBUG2: Found a matching virtual machine object: monitoring (cluster01)
2025-07-30 12:19:25,949 - DEBUG2: Parsing 'virtual machine' data structure: monitoring
2025-07-30 12:19:25,950 - INFO: Virtual machine 'monitoring' attribute 'cluster' changed from 'cluster01' to 'Cluster01'
2025-07-30 12:19:25,950 - INFO: Virtual machine 'monitoring' attribute 'memory' changed from '16000' to '4000'
2025-07-30 12:19:25,950 - INFO: Virtual machine 'monitoring' attribute 'vcpus' changed from '16.0' to '4'
2025-07-30 12:19:25,950 - INFO: Virtual machine 'monitoring' attribute 'site' changed from 'Büro' to 'Customer2'
2025-07-30 12:19:25,950 - INFO: Virtual machine 'monitoring' attribute 'device' changed from 'None' to 'esx02'
2025-07-30 12:19:25,950 - INFO: Virtual machine 'monitoring' attribute 'serial' changed from '52aa1c83-80cf-62a7-3c49-db4414740486' to '503641c7-5446-9e0d-77ea-65e10ada86dd'
2025-07-30 12:19:25,950 - INFO: Virtual machine 'monitoring' attribute 'tenant' changed from 'Customer1' to 'Customer2'
2025-07-30 12:19:25,950 - DEBUG: Updated virtual machine object: monitoring
2025-07-30 12:19:25,950 - DEBUG2: Found a matching vm_role_relation 'Virtual Server' (.*) for monitoring
2025-07-30 12:19:25,951 - DEBUG2: Parsing 'virtual machine' data structure: monitoring
2025-07-30 12:19:25,958 - INFO: Virtual disk 'Hard disk 1' attribute 'description' changed from 'Persistent / ThinProvisioned / [PoolA] monitoring/monitoring.vmdk' to 'Persistent / ThinProvisioned / [SAN01] monitoring/monitoring.vmdk'
2025-07-30 12:19:25,964 - DEBUG2: Found '1' NICs in NetBox for 'monitoring'
2025-07-30 12:19:25,965 - DEBUG2: Parsing 'virtual machine interface' data structure: vNIC 1 (VM Network) (monitoring)
2025-07-30 12:19:25,965 - INFO: Virtual machine interface 'vNIC 1 (VM Network) (monitoring)' attribute 'description' changed from 'Network adapter 1 (VirtualE1000)' to 'Network adapter 1 (VirtualVmxnet3)'
2025-07-30 12:19:25,965 - DEBUG: Updated virtual machine interface object: vNIC 1 (VM Network) (monitoring)
2025-07-30 12:19:25,973 - DEBUG2: Parsing 'virtual machine interface' data structure: vNIC 1 (VM Network) (monitoring)
2025-07-30 12:19:25,973 - INFO: Virtual machine interface 'vNIC 1 (VM Network) (monitoring)' attribute 'primary_mac_address' changed from '00:0C:29:85:5E:DC' to '00:50:56:B6:D3:87'
2025-07-30 12:19:25,974 - DEBUG: Updated virtual machine interface object: vNIC 1 (VM Network) (monitoring)
2025-07-30 12:19:26,078 - DEBUG: Current interface 'eth0 (monitoring)' for IP '192.168.0.10/24' and this one 'vNIC 1 (VM Network) (monitoring)' are both enabled. The virtual machine will be checked later again to see if current interface status or association has changed
2025-07-30 12:19:26,079 - INFO: IP address is no longer assigned to vNIC 1 (VM Network) (monitoring) and therefore removed from this interface
2025-07-30 12:19:26,079 - INFO: Setting attribute 'primary_ip4' for 'monitoring' to None
2025-07-30 12:19:26,079 - DEBUG2: Parsing 'virtual machine interface' data structure: vNIC 1 (VM Network) (monitoring)
2025-07-30 12:19:26,080 - INFO: Virtual machine interface 'vNIC 1 (VM Network) (monitoring)' attribute 'untagged_vlan' changed from '100 (group: Buero VLANs)' to '100 (site: Customer2)'
2025-07-30 12:19:26,080 - DEBUG: Updated virtual machine interface object: vNIC 1 (VM Network) (monitoring)
2025-07-30 12:19:30,414 - DEBUG: Parsing vCenter VM: monitoring
2025-07-30 12:19:31,420 - DEBUG2: Found a matching vm_tenant_relation 'Customer2' (.*) for monitoring
2025-07-30 12:19:31,866 - DEBUG2: Found a exact matching virtual machine object: monitoring (Cluster01)
2025-07-30 12:19:31,867 - DEBUG2: Found a matching virtual machine object: monitoring (Cluster01)
2025-07-30 12:19:31,867 - DEBUG2: Parsing 'virtual machine' data structure: monitoring
2025-07-30 12:19:31,867 - DEBUG2: Found a matching vm_role_relation 'Virtual Server' (.*) for monitoring
2025-07-30 12:19:31,867 - DEBUG2: Parsing 'virtual machine' data structure: monitoring
2025-07-30 12:19:31,878 - DEBUG2: Found '1' NICs in NetBox for 'monitoring'
2025-07-30 12:19:31,878 - DEBUG2: Parsing 'virtual machine interface' data structure: vNIC 1 (VM Network) (monitoring)
2025-07-30 12:19:31,879 - DEBUG2: Parsing 'virtual machine interface' data structure: vNIC 1 (VM Network) (monitoring)
2025-07-30 12:19:31,938 - DEBUG: Current interface 'eth0 (monitoring)' for IP '192.168.0.10/24' and this one 'vNIC 1 (VM Network) (monitoring)' are both enabled. The virtual machine will be checked later again to see if current interface status or association has changed
2025-07-30 12:19:31,939 - INFO: IP address is no longer assigned to vNIC 1 (VM Network) (monitoring) and therefore removed from this interface
2025-07-30 12:19:31,939 - DEBUG2: Parsing 'virtual machine interface' data structure: vNIC 1 (VM Network) (monitoring)
2025-07-30 12:19:33,855 - DEBUG: Parsing vCenter VM: monitoring
2025-07-30 12:19:35,192 - DEBUG2: Found a matching vm_tenant_relation 'Customer2' (.*) for monitoring
2025-07-30 12:19:35,632 - DEBUG2: Found a exact matching virtual machine object: monitoring (Cluster01)
2025-07-30 12:19:35,632 - DEBUG2: Found a matching virtual machine object: monitoring (Cluster01)
2025-07-30 12:19:35,632 - DEBUG2: Parsing 'virtual machine' data structure: monitoring
2025-07-30 12:19:35,633 - DEBUG2: Found a matching vm_role_relation 'Virtual Server' (.*) for monitoring
2025-07-30 12:19:35,633 - DEBUG2: Parsing 'virtual machine' data structure: monitoring
2025-07-30 12:19:35,642 - DEBUG2: Found '1' NICs in NetBox for 'monitoring'
2025-07-30 12:19:35,643 - DEBUG2: Parsing 'virtual machine interface' data structure: vNIC 1 (VM Network) (monitoring)
2025-07-30 12:19:35,644 - DEBUG2: Parsing 'virtual machine interface' data structure: vNIC 1 (VM Network) (monitoring)
2025-07-30 12:19:35,740 - WARNING: Current interface 'eth0 (monitoring)' for IP '192.168.0.10/24' and this one 'vNIC 1 (VM Network) (monitoring)' are both enabled. IP assignment skipped because it is unclear which one is the correct one!
2025-07-30 12:19:35,741 - INFO: IP address is no longer assigned to vNIC 1 (VM Network) (monitoring) and therefore removed from this interface
2025-07-30 12:19:35,741 - DEBUG2: Parsing 'virtual machine interface' data structure: vNIC 1 (VM Network) (monitoring)