Changing Hosts and XOA IP
-
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
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
-
Question for @fohdeesha
-
@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
-
-
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.
So what's the method to the madness here? Any assistance is greatly appreciated.
-
@TechGrips Can you try using vif-create to attach a new vif, rather than changing the current one first?
-
@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:
vif-create
new virtual interfacevif-plug
attach the newly created VIF (device 1) onto XOA VMvif-unplug
detach the existing VIF (device 0) from XOA VM- 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?
-
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).
-
@jmishal
XCP-ng host IP can be done in XO or XCP-ng hostMethod 1:
In XO:
You can just go to home >> host >> Edit the Address (do this for each host)
Method 2:
In XCP-ng (realistically going through XO is easier...):
Go to
next >>
enter password
once here select the correct network nic (can be confusing but the .XX are vlan etc.)
Update your IP as needed.
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...
-
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.
-
@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.
-
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
-
@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!
-
No problem. XOA is meant to be disposable