Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add support for official xcp-ng installer #1475

Open
lordtangent opened this issue Jun 20, 2024 · 3 comments
Open

Add support for official xcp-ng installer #1475

lordtangent opened this issue Jun 20, 2024 · 3 comments

Comments

@lordtangent
Copy link

Is your feature request related to a problem? Please describe.
xcp-ng installer isn't currently supported. It's based on Centos and has a netinstaller ISO and documentation for netbooting so it should be possible to get it working in netboot.xyz

Describe the solution you'd like
It would be great if the netinstaller could be PXE booted with the option to use an answerfile for fully automated installs pulling from a local mirror. I'd use it to provision bare metal servers with hypervisors.

Describe alternatives you've considered
I tested getting the xcp-ng installer ISO to boot via memdisk as per the FAQ with no luck. I even tried increasing vmalloc but I'm not sure I did it correctly. (still got the error MEMDISK: boostrap too large to load )

Additional context
I'd be happy to help maintain the xcp-ng stuff once it's in but I don't think I have the skills to add xcp-ng myself. Between not being very familiar with iPXE and being rusty in Ansible the menu templates are pretty overwhelming to me.

@lordtangent lordtangent changed the title Add support for xcp-ng installer Add support for official xcp-ng installer Jun 20, 2024
@lordtangent
Copy link
Author

Update
I did some homework and a proof of concept to help validate if this is possible.

The xen kernel xcp-ng uses needs the mboot.c32 module from syslinux to boot. I haven't tried chain loading it from iPXE but I assume it would be possible. I used lpxelinux.0 as my NBP since that's very close to the example in the xcp-ng docs. The reason for going with lpxelinux.0 is I wanted to test getting stuff loading over HTTP also. HTTP worked a treat and was substantially faster than TFTP.

# here is the pxelinux.cfg/default for a purely tftp boot. It seems to be faster for some reason (even though tftp is supposed to be slow... or so they say)
DEFAULT xcp-ng
LABEL xcp-ng
    KERNEL mboot.c32
    APPEND xcp-ng/xen.gz dom0_max_vcpus=2 dom0_mem=2048M,max:2048M com1=115200,8n1 console=com1,vga --- xcp-ng/vmlinuz xencons=hvc console=hvc0 console=tty0 --- xcp-ng/install.img

# here is the pxelinux.cfg/default for a hybrid tftp / http boot. It was substantially faster than straight TFTP for loading everything.
DEFAULT xcp-ng
LABEL xcp-ng
    KERNEL http://XXX.XXX.XXX.XXX/xcp-ng/8.2.1/boot/pxelinux/mboot.c32
    APPEND http://XXX.XXX.XXX.XXX/xcp-ng/8.2.1/boot/xen.gz dom0_max_vcpus=2 dom0_mem=2048M,max:2048M com1=115200,8n1 console=com1,vga --- http://XXX.XXX.XXX.XXX/xcp-ng/8.2.1/boot/vmlinuz xencons=hvc console=hvc0 console=tty0 --- http://XXX.XXX.XXX.XXX/xcp-ng/8.2.1/install.img

@nodje
Copy link

nodje commented Dec 31, 2024

I'm in the same situation, I'd like to provision baremetal server with this hypervisor.
I'd like to test what you did but preferably with Netboot. I have it setup and wish I could avoid modifying the DHCP config.

I'm guessing there are no way to use a PXE conf from Netboot and the only way to would be to chain load this from an iPXE conf. Is that possible? I haven't seen anything like it in the provided ipxe configs.

iPXE config section in the doc (https://docs.xcp-ng.org/installation/install-xcp-ng/#-ipxe-over-http-install) doesn't seem to be automatable, as it requires some manual steps.

Additionnally, what are the entries in config/endpoints.yml used for??
I can't figure it out. It looks like this is what the "remote" section entries in the web gui are based on, but anyway how do you use them?
There are 3 assets configured for XCP-NG. But are they usable in any way?

@nodje
Copy link

nodje commented Dec 31, 2024

Actually there might be a way to build a conditional pxe boot i a dhcp server, I just never got to understand on what to base the conditionals.

I have

if option arch = 00:07 {
    filename "netboot.xyz.efi";
} elsif option arch = 00:00 {
    filename "netboot.xyz.kpxe";
} else {
    filename "netboot.xyz.efi";
}

I suppose arch is a dhcp option passed when a client call DHCP for an IP, but is it possible to target a specific machine or VM with the DHCP options? Is there a unique ID passed in the DHCP call?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants