Setting up Matchbox to provision CoreOS servers (for k8s)
I am trying to setup matchbox to provision CoreOS servers per these guides: Getting started with matchbox, Network Setup, and pfsense.
My Home-lab setup (ips and domain names are made up):
Physical PFsenes router/DHCP/DNS server
Pfsense provides dns and dhcp for my network.
Pfsense is set to point to the matchbox server which is running dnsmasq and matchbox
[X] enable network booting
Next Server: [10.0.20.20]
Default Bio Name: undionly.kpxe
*Note - I have also tried setting up a separate dnsmasq server with the following settings:
dhcp-range=10.0.20.1,proxy,255.255.255.0
enable-tftp
tftp-root=/var/lib/tftpboot
pxe-service=tag:#ipxe,x86PC,"PXE chainload to iPXE",undionly.kpxe
dhcp-userclass=set:ipxe,iPXE
pxe-service=tag:ipxe,x86PC,"iPXE",http://matchbox.mylocaldomain.com:8080/boot.ipxe
# verbose
log-queries
log-dhcp
Single ESXI Host
All of my servers are vms running on a single esxi host. My matchbox server is running Debian.
Matchbox/DNSmasq Server
Matchbox and dnsmasq are running on the same server (though I have also tried running them on separate servers). I have also tried using docker containers for each.
Currently my dnsmasq looks like this:
dhcp-range=10.0.20.1,proxy,255.255.255.0
enable-tftp
tftp-root=/var/lib/tftpboot
dhcp-boot=tag:!ipxe,undionly.kpxe
dhcp-match=set:ipxe,175
dhcp-boot=tag:ipxe,http://matchbox.mylocaldomain.com:8080/boot.ipxe
# verbose
log-queries
log-dhcp
Matchbox is configured as follows:
Matchbox version 0.8.0, terraform 0.11.13
matchbox service file
[Unit]
Description=CoreOS matchbox Server
Documentation=https://github.com/coreos/matchbox
[Service]
User=matchbox
Group=matchbox
Environment="MATCHBOX_ADDRESS=0.0.0.0:8080"
Environment="MATCHBOX_RPC_ADDRESS=.0.0.0.0:8081"
Environment="MATCHBOX_LOG_LEVEL=debug"
ExecStart=/usr/bin/matchbox
# systemd.exec
ProtectHome=yes
ProtectSystem=full
[Install]
I used matchbox/examples/terraform/simple-install to provision with terraform.
terraform.tvars:
matchbox_http_endpoint = "http://matchbox.mylocaldomain.com:8080"
matchbox_rpc_endpoint = "matchbox.mylocaldomain.com:8081"
ssh_authorized_key = "[pasted contents of public key generated on matchbox server]"
*Note
I can successfully curl http://matchbox.mylocaldomain.com:8080/boot.ipxe as well as assets etc . . . from other vms. Firewall rules should be correct.
Networking note
All my vms are on a separate vlan from the rest of the network but all have internet access.
The Problem
If I try to pxeboot another vm it always gets stuck in a loop and never seems to connect, usually with messages along this line:
Ipxe
tftp://10.0.20.20/undionly.kpxe. . . ok
undionly.kpxe: 67641 bytes [PXE-NBP]
PXE->EB: !PXE at . . . (shortend)
iPXE initialising devices. . . ok
iPXE 1.0.0+ . . . .
net0: . . .
Configurting (net0 . . .) . . . ok
Next server: 10.0.20.20
Filename: undionly.kpxe
tftp://10.0.20.20/undionly.kpxe. . . Connection timed out (http://ipxe.org/4c126035)
No more network devices
At this point I've tried everything I can think of. Help appreciated :)
Posted May 11, 2019, 6:15 AM UTC