XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Netbox plugin: XO manages IP addresses for VMs with no xen-tools

    Scheduled Pinned Locked Moved Advanced features
    3 Posts 2 Posters 92 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R Offline
      r10n_fumo
      last edited by

      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: 70d59eb

      Thanks

      D 1 Reply Last reply Reply Quote 0
      • D Offline
        DustinB @r10n_fumo
        last edited by

        @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..

        R 1 Reply Last reply Reply Quote 0
        • R Offline
          r10n_fumo @DustinB
          last edited by

          @DustinB Guest tools simply don't support the system I'm running.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post