Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

IPv6 support on host #437

Closed
DennisGlindhart opened this issue Sep 27, 2020 · 30 comments
Closed

IPv6 support on host #437

DennisGlindhart opened this issue Sep 27, 2020 · 30 comments
Assignees
Labels
comp:platform Platform related (CentOS, various components) enhancement 🆕

Comments

@DennisGlindhart
Copy link

Currently it's only possible to configure IPv4 for management (SSH, RPC etc.) on the host/hypervisor.

It would be nice if it was possible to use IPv6 instead (or also aka dual-stack) in IPv6-only environments so one don't have to provision and maintain IPv4-networks.

@olivierlambert
Copy link
Member

Hi,

Can you report exactly what's the issue with IPv6?

@DennisGlindhart
Copy link
Author

@olivierlambert I'm not able to configure IPv6 address, DNS etc. during (and after) install.

I.e. in this step: https://xcp-ng.org/docs/install.html#_9-networking

@olivierlambert
Copy link
Member

So it's just a matter of adding some fields during the install, and after? IDK if it's just an UI thing or a deeper thing. I wonder if there's a way to configure/test IPv6 outside installer/TUI

@DennisGlindhart
Copy link
Author

I've tried to locate the IP configuration after install, but only place I can find the IP is in /etc/firstboot.d/data/management.conf

The firstboot.d kindda indicates that it will probably have no effect once booted first time, but I haven't tested to be honest.

That file contains MODEV6='none' which seems to be used different places in the installer, i.e. https://github.com/xcp-ng/host-installer/blob/master/backend.py#L1760

So it does seem IPv6 is supported (at least somehow) in the "deeper" part, but it's unclear how to activate it.

So, yes, I guess a first step is to be able to enable it in the UI - or maybe just document how to enable it.

I'll be happy to test it out if given some pointers.

@olivierlambert
Copy link
Member

Okay because few weeks ago I asked XAPI devs and they told me IPv6 shouldn't be an issue. So I assume it's more a "platform" thing. We'll continue to investigate.

@olivierlambert olivierlambert added the comp:platform Platform related (CentOS, various components) label Sep 28, 2020
@stormi
Copy link
Member

stormi commented Sep 28, 2020

Quoting Citrix Hypervisor's FAQ:

Does Citrix Hypervisor support IPv6?

Guest VMs hosted on Citrix Hypervisor can use any combination of IPv4 and IPv6 configured addresses.

However, Citrix Hypervisor doesn’t support the use of IPv6 in its Control Domain (Dom0). You can’t use IPv6 for the host management network or the storage network. IPv4 must be available for the Citrix Hypervisor host to use.

@olivierlambert
Copy link
Member

Yes, but I'm not sure why. Maybe it's not that a big deal after all (to make it work). That's what I'd like to measure before trying to fix (or not).

@olivierlambert
Copy link
Member

Maybe @rosslagerwall can help to know what's needed to do? That would help us to work directly into the right direction :)

@olivierlambert
Copy link
Member

@DennisGlindhart so if we find a way to improve that (code and/or design) we might have IPv6 support: xapi-project/xcp-networkd#156

@ieugen
Copy link

ieugen commented Dec 8, 2020

looking forward to seeing ipv6 support on the host.
I can get ipv6 subnet from ISP so I've decided to switch most/all of the services to IPV6.

@olivierlambert
Copy link
Member

@ieugen note that @benjamreis is working on it 👍

@DennisGlindhart
Copy link
Author

For the impatient: I got IPv6 enabled in a more or less hacky way, but it works

  1. In /etc/sysctl.d/90-net.conf change net.ipv6.conf.all.disable_ipv6 and net.ipv6.conf.default.disable_ipv6 to 0 insted of 1
  2. In /etc/sysconfig/network change NETWORKING_IPV6 to yes
  3. systemctl enable ip6tables
  4. xe pif-reconfigure-ipv6 uuid= mode=static DNS=2001:0db8::2,2001:0db8::3 gateway=2001:0db8::1 IPv6=2001:0db8::10/64
  5. Reboot

It seems to work mostly - Except console-access (and possibly stats) seems to be broken from both XCP-ng Center and XOA (Just a heads up this might be a problem when IPv6 can be enabled "the right way")

I tried setting IPv6 as primary address with xe pif-set-primary-address-type primary_address_type=ipv6 but then Console does not work even when connecting via IPv4.

@olivierlambert
Copy link
Member

We got a working console with our modifications, but it's "a bit" more complex than those hacks ;)

When @benjamreis will be around, he'll probably give you other details.

@benjamreis
Copy link
Collaborator

Hi all,

We worked on supporting an ipv6 recently and we have a testable alpha iso for that so please take a look here: https://xcp-ng.org/forum/topic/4202/xcp-ng-ipv6-dom0-alpha

Any kind of feedback is welcomed! :)

@DennisGlindhart
Copy link
Author

@benjamreis Awesome.. Will try to get it established somehow..

Is it possible to "upgrade" an existing xcp-ng installation to using the IPv6-repository (With all kinds of warnings about alpha/unsupported etc. ignored :p )

@benjamreis
Copy link
Collaborator

hmm nope because once installed in IPv4 an host cant be put into IPv6

this has to be a fresh install, perhaps an iso upgrade would work but i'm not sure

@DennisGlindhart
Copy link
Author

DennisGlindhart commented Feb 22, 2021

Tried to reinstall xcp-ng host with the IPv6 image. The host uses a bonded network, so I have to set network up manually after installation.

MGT_NET_UUID=$(xe network-list name-label=Bonded params=uuid | awk '{ print $5}')
PRIMPIF=$(xe pif-list network-uuid=$MGT_NET_UUID params=uuid | awk '{ print $5 }')
xe pif-reconfigure-ipv6 uuid=$PRIMPIF mode=static DNS=2001:db8::2,2001:db8::3 gateway=2001:db8::1 IPv6=2001:db8::100/64
host-management-reconfigure pif-uuid=$PRIMPIF

Last command gives error:

~]# xe host-management-reconfigure pif-uuid=$PRIMPIF
PIF has no IP configuration (mode currently set to 'none')
PIF: 1a1c4118-ea3d-240a-1635-1540e6e857e2

@DennisGlindhart
Copy link
Author

Trying to update packages - Seems IPv6 repo is not installed in yum.repos.d

Can I find the repo-url/file anywhere?

# yum update --disablerepo='*' --enablerepo=ipv6 
Loaded plugins: fastestmirror
Error getting repository data for ipv6, repository not found
# ls /etc/yum.repos.d/
CentOS-Base.repo  CentOS-Debuginfo.repo  CentOS-Sources.repo  epel.repo  epel-testing.repo  xcp-ng.repo

@benjamreis
Copy link
Collaborator

My bad, heres the IPv6 repo:

[xcp-ng-ipv6]
name=XCP-ng IPv6 Repository
baseurl=http://mirrors.xcp-ng.org/8/8.2/ipv6/x86_64/ http://updates.xcp-ng.org/8/8.2/ipv6/x86_64/
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-xcpng

You can put it in xcp-ng.repo.

@benjamreis
Copy link
Collaborator

Tried to reinstall xcp-ng host with the IPv6 image. The host uses a bonded network, so I have to set network up manually after installation.

I'll look into that.

MGT_NET_UUID=$(xe network-list name-label=Bonded params=uuid | awk '{ print $5}')
PRIMPIF=$(xe pif-list network-uuid=$MGT_NET_UUID params=uuid | awk '{ print $5 }')
xe pif-reconfigure-ipv6 uuid=$PRIMPIF mode=static DNS=2001:db8::2,2001:db8::3 gateway=2001:db8::1 IPv6=2001:db8::100/64
host-management-reconfigure pif-uuid=$PRIMPIF

Last command gives error:

~]# xe host-management-reconfigure pif-uuid=$PRIMPIF
PIF has no IP configuration (mode currently set to 'none')
PIF: 1a1c4118-ea3d-240a-1635-1540e6e857e2

looks like xe host-management-reconfigure causes the issue. I'll have a look as well.

@DennisGlindhart
Copy link
Author

Tried to reinstall xcp-ng host with the IPv6 image. The host uses a bonded network, so I have to set network up manually after installation.

MGT_NET_UUID=$(xe network-list name-label=Bonded params=uuid | awk '{ print $5}')
PRIMPIF=$(xe pif-list network-uuid=$MGT_NET_UUID params=uuid | awk '{ print $5 }')
xe pif-reconfigure-ipv6 uuid=$PRIMPIF mode=static DNS=2001:db8::2,2001:db8::3 gateway=2001:db8::1 IPv6=2001:db8::100/64
host-management-reconfigure pif-uuid=$PRIMPIF

Last command gives error:

~]# xe host-management-reconfigure pif-uuid=$PRIMPIF
PIF has no IP configuration (mode currently set to 'none')
PIF: 1a1c4118-ea3d-240a-1635-1540e6e857e2

Thanks @benjamreis

Think I solved the management config with

xe pif-set-primary-address-type primary_address_type=ipv6 uuid=$PRIMPIF

Going to test a bit more, but i'm further for now :)

@benjamreis
Copy link
Collaborator

benjamreis commented Feb 22, 2021

Oh right! The IPv6 address type is set to the management interface when installing the host.

The bond's PIF address_type should reflect the ones of its members. Thanks for the report. :)

@DennisGlindhart
Copy link
Author

All seems to work fine so far with IPv6.

Only problem I've found is in XO which returns error getaddrinfo ENOTFOUND when using a DNS-name which only has an IPv6 record (AAAA). But it can be added using the IPv6-address in brakcets instead [2001:db8::100] and the Console + Stats is working

@benjamreis
Copy link
Collaborator

Yes, the [] is a known issue, UI would need to be changed to separate IP and port so that we know where to put the brackets in the IPv6 case. :)

Glad to hear it's going well for now, I've already make PRs at Citrix to solve your bond issue: xapi-project/xen-api#4324 👍

@DennisGlindhart
Copy link
Author

Yes, the [] is a known issue, UI would need to be changed to separate IP and port so that we know where to put the brackets in the IPv6 case. :)

From a users perspective I'm kinda used to put brackets around IPv6-addresses - That's a pretty common thing and IMHO not something that needs "fixing". If providing a IPv6/AAAA-only DNS-hostname would just work, it is all perfect from my point of view - no changes in the UI needed :)

@benjamreis benjamreis self-assigned this Feb 26, 2021
@DennisGlindhart
Copy link
Author

Has been working fine for a while now - no problems so far. (I'm using local storage and no NFS etc. so the "missing features" from the blog post is not relevant for me).

Is there any current plan/ETA when it can be expected to be merged into a final release - can it be a minor/patch update to 8.2, or are we talking next minor (8.3) or even 9.0?

@stormi
Copy link
Member

stormi commented Apr 26, 2021

I'm not sure our mind is set regarding the target release. We'll try to retrofit it to XCP-ng 8.2 if we can. However, this would require extensive testing since it's a LTS and we cannot afford any regression.

@nagilum99
Copy link

Please don't risk anything on an LTSR. Keep changes for 8.3 (whenever it's coming, didn't hear much from Citrix for a while).

@benjamreis
Copy link
Collaborator

Feature is available in XCP-ng 8.3! 🎉

@stormi
Copy link
Member

stormi commented Jan 25, 2023

Or rather, will be, since XCP-ng 8.3 is not released yet :)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
comp:platform Platform related (CentOS, various components) enhancement 🆕
Projects
None yet
Development

No branches or pull requests

6 participants