Related to this: Netbox Plugin Enhancements
I recently started using Netbox and set up the sync plugin through XO from sources to give it a try. In general, it's pretty nice (much better than manually keeping up with things). However, one issue I ran into that was similar to the one reported in the referenced post was things getting deleted in Netbox that I had manually added.
In my case, I have two VMs that are full HVM appliances with no xentools integration, so XCP cannot see their IP addresses. If I manually add the IP address in Netbox to the interfaces, they will get deleted on the next sync (the code deletes any existing IP addresses on a NB interface that don't exist on the XCP interface). In my particular case, XCP will never see any IP addresses, so I need to track them manually.
There was a similarly related request for more control of the sync with Github issue #5965.
The overall idea is to introduce a tag system to control the Netbox sync on a per-VM level. I think this may be the most versatile way of handling tweaks like this. A standard namespace could be introduced (e.g. nbsync_*) that holds the different config options for a VM. Maybe it could start with something like this:
nbsync_keep_ips - Keep existing IP addresses assigned to an interface in Netbox even when the IP address no longer exists in XCP
nbsync_keep_interfaces - Keep existing interfaces in Netbox even when the interface no longer exists in XCP
nbsync_exclude - Exclude this VM from the Netbox sync
I've looked at the Netbox code a little to understand the sync process, and these options don't seem too complicated to add. I'd love to help out, but I've done zero node.js programming, so it would/will take me a while to get acquainted with the nuances of the language (probably a lot of copy-and-paste-and-tweak from existing code).