Rename Networks on XO Hosts
-
What I mean is this:
Host1:
eth0: management
eth1: lan
eth2: dedicated application 1 (not available on host 2)
eth3: dedicated application 2 (not available on host 2)Host2:
eth0: management
eth1: lan
eth2: not-used
eth3: local storage-network (not available on host 1)However, at the moment it is not possible to name the networks like that.
-
Because you are asking for an anti-pattern.
If a network is meant to be only available on one host, create an host internal network instead. It won't be attached to any real PIF, so you can name it as you like.
-
Those applications need access to those physical networks.
-
If you use a pool, it's for sharing a network and/or a storage.
If you don't want to share a network across PIFs between hosts, then don't use a pool
-
@olivierlambert said in Rename Networks on XO Hosts:
If you use a pool, it's for sharing a network and/or a storage.
If you don't want to share a network across PIFs between hosts, then don't use a pool
I get it. Though I would prefer not having to buy another server when I can run a VM. And in fact it works fine, just naming networks is a little odd at the moment.
What I would like to see is that networks can be connected to different physical nics on different hosts.
I.e. something like this:
Network Management:
Host 1: eth0
Host 2: eth1
Host 3: eth0
Host 4: eth4Network Someother:
Host 1: eth1
Host 2: n/a
Host 3: eth1
Host 4: eth1Network Another:
Host 1: eth2
Host 2: eth2
Host 3: eth2
Host 4: eth2Then in the VM you can assign the "Network" as normal. If the VM is migrated to another host, then XCP-ng would choose the correct PIF/NIC. This can be an advantage where one or several hosts have extra NICs, maybe with higher speeds. But during migration (rolling upgrades, service, or whatnot), the VMs still work but with reduced performance when moved to another host.
Another example would be if we have a spare host off-site/another building where the network layout cannot be fully replicated as in the datacenter.
-
I have hard time to follow your idea, at least it's completely alien to the concept of pool. Maybe @fohdeesha can help in there.
-
@olivierlambert I believe he means be able to rename / map a hosts physical interfaces to different namings. For instance on host 1, "network 0 / eth0" would be mapped to the physical eth0 interface, but on another host in the pool with a different NIC configuration, he could map the same pool "network 0 / eth0" to the server's physical eth1.
@S-Pam this certainly isn't currently supported, I believe it would take a lot of rewriting the network backend to make it possible.
-
@fohdeesha Yes, you are right. That's what precisely what I meant.
-
@s-pam said in Rename Networks on XO Hosts:
@olivierlambert said in Rename Networks on XO Hosts:
If you use a pool, it's for sharing a network and/or a storage.
If you don't want to share a network across PIFs between hosts, then don't use a pool
I get it. Though I would prefer not having to buy another server when I can run a VM. And in fact it works fine, just naming networks is a little odd at the moment.
What I would like to see is that networks can be connected to different physical nics on different hosts.
I.e. something like this:
Network Management:
Host 1: eth0
Host 2: eth1
Host 3: eth0
Host 4: eth4Network Someother:
Host 1: eth1
Host 2: n/a
Host 3: eth1
Host 4: eth1Network Another:
Host 1: eth2
Host 2: eth2
Host 3: eth2
Host 4: eth2Then in the VM you can assign the "Network" as normal. If the VM is migrated to another host, then XCP-ng would choose the correct PIF/NIC. This can be an advantage where one or several hosts have extra NICs, maybe with higher speeds. But during migration (rolling upgrades, service, or whatnot), the VMs still work but with reduced performance when moved to another host.
Another example would be if we have a spare host off-site/another building where the network layout cannot be fully replicated as in the datacenter.
Did you ever find a solution to this? I'm literally trying to do the same thing because I have hosts with uneven numbers of NICs...
-
@joeydee518 no.
-
@s-pam Yikes, thanks for the reply!
-
Any idea @fohdeesha ?
-
@olivierlambert like I said in my previous reply I believe this would take quite a bit of rewriting in XAPI to accommodate pools with mismatched hardware. The interface rename tool might work in the meantime? https://xcp-ng.org/docs/networking.html#renaming-nics
-
I came across this and the solution I upvoted i.e. renaming in pool view, works for me. However, I would like to +1 the idea @Forza put in his post. Cause organizing it all can get quite confusing. XOA being the excellent tool that it is, has this lacking.
For those who come across this and feel discouraged? Do please mention your needs to the team here! They are VERY good at putting these kinds of things on the roadmap if there is a need/want for it!
For myself, I use a spreadsheet to keep track of networks, hosts and pools. I do not rely on XOA alone. Which tbh is probably best practice anyway, in case a backup fails or the world blows up.