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

    Changing Hosts and XOA IP

    Scheduled Pinned Locked Moved Xen Orchestra
    14 Posts 7 Posters 4.2k 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
      jmishal
      last edited by

      Greeting

      I have a XOA with 4 hosts (XCP-NG) and all contain a number of running VMs

      Now I need to change the management IPs of those Hosts as well as XOA

      alt text

      Do I need Down Time or is it easy? can do it without any effect on the customer clients.

      I can access the hosts through direct connection (vga,keyboard), I do not know how important management IP is in this.

      please advice before I start changing the IPs

      tjkreidlT fohdeeshaF 2 Replies Last reply Reply Quote 1
      • olivierlambertO Offline
        olivierlambert Vates 🪐 Co-Founder CEO
        last edited by

        Question for @fohdeesha

        1 Reply Last reply Reply Quote 0
        • tjkreidlT Offline
          tjkreidl Ambassador @jmishal
          last edited by tjkreidl

          @jmishal At least for XenServer/CH, you can do this on the fly through the management console. If it is for more than one host, the order is important (do the primary/master host first, then the other hosts). Should work fine also for XCP-ng. https://support.citrix.com/article/CTX121235/how-to-change-the-primary-management-interface-on-xenserver-with-xsconsole

          1 Reply Last reply Reply Quote 0
          • fohdeeshaF Offline
            fohdeesha Vates 🪐 Pro Support Team @jmishal
            last edited by

            @jmishal As @tjkreidl says, you can do this quite easily through the management console in your screenshot. But be aware if this is a pool, change the master first, then each slave. This won't affect VM traffic on the network or running VMs.

            1 Reply Last reply Reply Quote 0
            • TechGripsT Offline
              TechGrips
              last edited by

              Hi, I stumbled upon this article and others a few weeks ago but am still really struggling with this...

              It appears OP asked about changing the IP address of his hosts as well as his XOA VM. This thread only answers changing the host's management IP! I've looked everywhere possible around my host's physical Management Console and it doesn't allow you to change a VM's IP config from there.

              So part of OP's (as well as my own) question still stands: What's the easiest and most direct way to change the IP address of the XOA VM if you've lost access to Xen Orchestra?

              Per the CLI docs, on the command shell I've tried using xe vif-configure-ipv4 against my XOA VM's VIF but I keep getting a super annoying "You attempted an operation on a VM which lacks the feature"... This occurs regardless if the XOA VM is running or shutdown.
              b45d35f9-2751-4d76-add2-efb09f16355b-image.png

              So what's the method to the madness here? Any assistance is greatly appreciated.

              nick.lloydN 1 Reply Last reply Reply Quote 0
              • nick.lloydN Offline
                nick.lloyd @TechGrips
                last edited by

                @TechGrips Can you try using vif-create to attach a new vif, rather than changing the current one first?

                TechGripsT 1 Reply Last reply Reply Quote 0
                • TechGripsT Offline
                  TechGrips @nick.lloyd
                  last edited by

                  @Nick-085 Thanks for the suggestion, I'm not real familiar with this stuff but this method seems to make sense.

                  However after trying it out, the XOA VM still retains the same inaccessible IP address as before. I'm unsure if I'm doing this the right way though, I performed the following:
                  8e2b6452-9126-4d45-97f8-d06edd002b57-image.png

                  1. vif-create new virtual interface
                  2. vif-plug attach the newly created VIF (device 1) onto XOA VM
                  3. vif-unplug detach the existing VIF (device 0) from XOA VM
                  4. wondering how the newly created VIF has any network config, I tried to give it some with the vif-configure-ipv4

                  ...and still same annoying ambiguous "You attempted an operation on a VM which lacks the feature" error... Tried to reboot the XOA VM to no differences. I don't understand why this isn't more intuitive.

                  Did I follow the right syntax and order of operations here?

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

                    Hi,

                    In XCP-ng, you do not change a VM IP address via the hypervisor. This change has to be done inside the VM itself, or via an external mechanism (xenstor, Cloudinit and such).

                    W TechGripsT 2 Replies Last reply Reply Quote 0
                    • W Offline
                      wilsonqanda @olivierlambert
                      last edited by wilsonqanda

                      @jmishal
                      XCP-ng host IP can be done in XO or XCP-ng host

                      Method 1:
                      In XO:
                      You can just go to home >> host >> Edit the Address (do this for each host)
                      d7147c2a-182f-42d8-81b6-b853d6e974cf-image.png

                      Method 2:
                      In XCP-ng (realistically going through XO is easier...):
                      Go to
                      865d0048-85cd-4b1f-81ba-27a7b9e4d445-image.png
                      next >>
                      8b1b4dc9-011d-4e7d-9403-6c5bad0ffd28-image.png
                      enter password
                      once here select the correct network nic (can be confusing but the .XX are vlan etc.)
                      45f82b20-1c55-4c69-8e5b-8465c686da71-image.png
                      Update your IP as needed.
                      b196c0b8-df28-4300-807e-037cacd1e8c1-image.png

                      As for changing XO IP that is a VM running on XCP-ng so you can change it there or if it is dhcp your firewall is managing that. Hard to tell how you set the XO up...

                      1 Reply Last reply Reply Quote 0
                      • TechGripsT Offline
                        TechGrips @olivierlambert
                        last edited by

                        Hi Olivier, super appreciative of your attention to this!

                        @olivierlambert said in Changing Hosts and XOA IP:

                        Hi,

                        In XCP-ng, you do not change a VM IP address via the hypervisor. This change has to be done inside the VM itself, or via an external mechanism (xenstor, Cloudinit and such).

                        Are you saying this in terms of what is proper and "the right way to do it" so to speak? Or are you saying that what I'm trying to do is impossible?

                        This is the context for why I NEED to be able to change the XOA IP from the hypervisor...

                        • This particular hypervisor was brought into my previous employer to assist with a lack of compute during a big modernization & migration project. XCP-ng was setup from scratch on this server on that company's network. It was then shutdown and shelved when the extra compute was no longer needed.
                        • Fast-forward a few years later, I've started my own company and need to incorporate this box into a private cloud I've been building. I would like to access various resources on this box, however, all the virtual networking is configured onto a network which no longer exists now. I don't want to factory-wipe/reinstall because then I'll lose a ton of hours of work across its VMs.
                        • If I can just access XOA again, I can fix all the other VM networks.
                        • I've tried to create a route to the XOA VM from my firewall but just can't get XOA to become accessible again from the new network.

                        This is why I believe resetting XOA's network from the hypervisor (if possible) is the most optimal approach to access XOA again.

                        TechGripsT 1 Reply Last reply Reply Quote 0
                        • TechGripsT Offline
                          TechGrips @TechGrips
                          last edited by TechGrips

                          @olivierlambert Moreover, what's weird is on the new network I've made to try and access the XOA VM again, it does indeed show up on my firewall's ARP table, albeit with an incomplete MAC, which I've never seen that before. It also doesn't return pings and of course I can't connect to its web app.

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

                            What you are trying to do via XCP-ng API is simply not possible. That's what I'm telling 🙂

                            Note you can select the IP address during XOA deploy because we use a specific mechanism (via xenstore), because the VM itself is reading those keys/values to set itself. You might try to re set the IP address of your XOA by providing the right key/values. See https://xen-orchestra.com/docs/xoa.html#via-a-manual-xva-download

                            TechGripsT 1 Reply Last reply Reply Quote 0
                            • TechGripsT Offline
                              TechGrips @olivierlambert
                              last edited by

                              @olivierlambert Understood! I forgot how incredibly easy it is to just deploy another Xen Orchestra VM... I feel like an idiot and wish I didn't dump so many hours into recovering the previous XOA VM but atleast I can move forward now!

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

                                No problem. XOA is meant to be disposable 🙂

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