bb-Ricardo / netbox-sync

Sync objects from VMware or redfish sources to NetBox
MIT License
282 stars 65 forks source link

manually set IP address will be overwritten #378

Open BastiAtWork opened 6 months ago

BastiAtWork commented 6 months ago

Hello,

Some of our VMs are synchronized without an IP address because they do not have VM Guest Tools installed. If we set the IP address manually in Netbox, it will be set to "none" again at the next sync. Is it possible to deactivate the overwriting of the primary IP?

I had already tried to prevent this with the option: set_primary_ip: never

But unfortunately the primary IP is still removed.

Thank you for this great project!!

bb-Ricardo commented 6 months ago

Thank you, will have a look at it.

alainseys commented 4 months ago

@BastiAtWork seems like intended so netbox should act as single source of truth so if you manualy change the ip. The sync will get back to the vmware api and try to get the ipadres if nothing is found this wil report back (everything in your source dataset is the truth).

you can use exclude vm to allow to be excluded so the sync will not process this vm no longer. (i should place a tag on that vm so you can filter on the non sync vms / devices).

i have the same issue with contact that i had linked to a vm , i added custom fields on vcenter to sync this

smasharov commented 3 months ago

Wi have a similar, but slightly different situation, described in #302

VM have a trunk interface, and several IP addresses. each vlan have own IP vm-tools reports all IPs, but without vlan information.

slave interfaces created in netbox, but after the sync all IP adresses from them will be re-assigned to the parent interface.

I think in such situations IP re-assignment must be skipped if the IP already assigned to the slave interface inside vm