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

    New VM MAC address restriction

    Scheduled Pinned Locked Moved Management
    13 Posts 6 Posters 3.0k Views 6 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.
    • J Offline
      jimmymiller
      last edited by

      Maybe this has been answered somewhere else and my quick search couldn't work out the keywords.

      I'm looking to restrict (or at least set a default) for MAC address usage in XO/XCP-ng. In VMware, MAC addresses were limited to 00:50:56 (vCenter created) or 00:0c:29 (ESXi created) as a default. We currently use those first 6 octets to distinguish VMs from baremetal resources discovered on our network. I'm curious if there is a means of doing something like that as a default, in a template, etc. I understand individuals may be able to change it after the fact, but if I can set a standard for those first 6 inside XO/XCP-ng, it will make our VM create processes work better with our existing network discovery processes.

      1 Reply Last reply Reply Quote 0
      • olivierlambertO Offline
        olivierlambert Vates 🪐 Co-Founder CEO
        last edited by

        Hey 🙂

        Thanks for your feedback, asking around 🙂

        1 Reply Last reply Reply Quote 0
        • olivierlambertO Offline
          olivierlambert Vates 🪐 Co-Founder CEO
          last edited by

          That's the part we need to change:
          https://github.com/xapi-project/xen-api/blob/master/ocaml%2Fxapi%2Fxapi_vif_helpers.ml#L209

          But I think using the Xen OUI by default (00:16:3e) could leak information on the hypervisor used 🤔 So we need to make it configurable. A XAPI issue will come next week and we'll see how to work with it 🙂

          1 Reply Last reply Reply Quote 0
          • olivierlambertO Offline
            olivierlambert Vates 🪐 Co-Founder CEO
            last edited by

            Pinging @BenjiReis as a reminder so we can discuss this somewhere next week 🙂

            J 1 Reply Last reply Reply Quote 1
            • J Offline
              jimmymiller @olivierlambert
              last edited by

              @olivierlambert Did anything ever come of this?

              1 Reply Last reply Reply Quote 0
              • olivierlambertO Offline
                olivierlambert Vates 🪐 Co-Founder CEO
                last edited by

                It's doable but it's not yet on top priority list to our work on getting 8.3 released. But IIRC it's in our backlog, right @BenjiReis ?

                1 Reply Last reply Reply Quote 0
                • BenjiReisB Offline
                  BenjiReis Vates 🪐 XCP-ng Team
                  last edited by

                  It's in the backlog indeed but I don't know when the ETA to start this.
                  I guess an issue in the xen-api repo would be a good first step to see what the XAPI team think of the feature.

                  1 Reply Last reply Reply Quote 1
                  • M Offline
                    mdraugh
                    last edited by

                    I'm in the same boat -- this totally-random-MAC system is causing serious problems with my system inventory. Can we get this moved up on the priority list somehow? It seems like a pretty simple change.

                    1 Reply Last reply Reply Quote 0
                    • splastunovS Offline
                      splastunov
                      last edited by

                      It is not a problem at all.

                      You can always set MAC manually, or create VIF with certain MAC via XAPI or cli.

                      Link to XAPI https://xapi-project.github.io/xen-api/classes/vif.html
                      check create method.

                      Cli command
                      xe vif-create vm-uuid=<VM UUID> network-uuid=<NETWORK UUID> device=<ETHERNET INTERFACE NUMBER> mac=<MAC ADDRESS>
                      Device could be in range 0-15
                      MAC in format XX:XX:XX:XX:XX:XX

                      After you need "activate" new VIF by command
                      xe vif-plug uuid=<VIF UUID>
                      If VM does not running xe-guest-tools you have to switch off VM and power it on again to activate new VIF.

                      M 1 Reply Last reply Reply Quote 0
                      • M Offline
                        mdraugh @splastunov
                        last edited by

                        @splastunov -- not a problem if you have the time and can train all your people (and have them remember each time) to do this manual workaround and independently select a unique MAC, which will require having a list they can easily check (and keep updated!) so they don't duplicate a MAC. On the other hand, every other virtualization platform I've used has either had a fixed OUI or a settable OUI, so I don't think this is ridiculous to ask for.

                        splastunovS 1 Reply Last reply Reply Quote 0
                        • splastunovS Offline
                          splastunov @mdraugh
                          last edited by

                          @mdraugh sure.

                          As workaround you can create simple table with MAC-IP-VM fields, and simple script to deploy new VM with first "free" MAC. Yes, it sounds like to develop your own XO, but I belive it should help alot.

                          1 Reply Last reply Reply Quote 0
                          • olivierlambertO Offline
                            olivierlambert Vates 🪐 Co-Founder CEO
                            last edited by

                            It's not ridiculous, but it's always things to manage in our backlog. I would love to do everything at once (even if we grow fast, the backlog is still larger than our workforce). At least, it's planned.

                            1 Reply Last reply Reply Quote 1
                            • T Offline
                              tuxen Top contributor
                              last edited by tuxen

                              FYI, Xen has a registered OUI: 00:16:3E

                              edit: I didn't read @olivierlambert previous post mentioning the OUI 🙂

                              xen-oui.png


                              Source: https://www.macvendorlookup.com

                              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