Netbox plugin: XO manages IP addresses for VMs with no xen-tools
-
Hello,
Virtual machines that have no xen-tools package installed have no way to tell XO which IP addresses they use, which Xen Orchestra apparently interprets as them having no addresses at all and removes all addresses in Netbox which were manually assigned to their virtual interfaces. Would be possible to make XO avoid managing addresses in Netbox for virtual machines with no xen-tools installed?
Perhaps the following patch would be enough to solve the issue?
diff --git a/packages/xo-server-netbox/src/index.js b/packages/xo-server-netbox/src/index.js index 7b3361180..01c7847fd 100644 --- a/packages/xo-server-netbox/src/index.js +++ b/packages/xo-server-netbox/src/index.js @@ -783,6 +783,8 @@ class Netbox { log.warn('Synchronizing IPs: cannot find VM from UUID custom field', { vm: nbVm.custom_fields.uuid }) continue } + if (!xoVm.managementAgentDetected) + continue // Find the Netbox interface associated with the vif const nbVmIfs = filter(nbIfs, { virtual_machine: { id: nbVm.id } })
Unfortunately I couldn't test this patch myself.
Netbox version: 4.2.7
XO commit: 70d59ebThanks
-
@r10n_fumo Why are you unable to install the guest tools into a given VM?
That seems like the better approach without some sort of justification..
-
@DustinB Guest tools simply don't support the system I'm running.