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 605 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

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          • First post
            Last post