- Shell 100%
Documents Proxmox LXC setup, proxy DHCP, ExternalNet mode, and vetnet deployment. Co-authored-by: Cursor <cursoragent@cursor.com> |
||
|---|---|---|
| config | ||
| scripts | ||
| systemd | ||
| .gitignore | ||
| README.md | ||
bootServerPXE
PXE-Boot-Server für Heimnetze mit FritzBox-DHCP, dnsmasq Proxy-DHCP und iVentoy. ISOs werden mit iVentoy (nicht Ventoy — das ist nur für USB) über das Netzwerk gebootet.
ISO-Quelle: Proxmox-Storage ssd-data-unencr per LXC-Bind-Mount.
Referenzen: romal.de – FritzBox und PXE · iVentoy Third-party DHCP
Architektur
PXE-Client (VM/PC, gleiches LAN!)
│
├─► FritzBox (192.168.39.1) → IP, Gateway, DNS
│
├─► dnsmasq auf pxe-boot → Proxy-PXE: Boot-Server + Boot-Datei (UDP 67/4011)
│
└─► iVentoy ExternalNet → TFTP + HTTP + ISO-Menü (UDP 69, TCP 16000)
│
└─► /mnt/iso-store/pve (Bind-Mount, read-only)
│
└─► /ssdstor/unencrdata/datastor/template/iso (Proxmox-Host)
Aufteilung: Die FritzBox vergibt IPs. dnsmasq antwortet nur auf PXE-Anfragen mit iventoy_loader_16000_bios / _uefi. iVentoy (DHCP-Mode 2 = ExternalNet) startet keinen eigenen DHCP — nur TFTP/HTTP und das Boot-Menü.
Warum nicht iVentoy ProxyNet allein? ProxyNet und dnsmasq blockieren sich auf UDP 67. ExternalNet + dnsmasq ist die zuverlässige Kombination für FritzBox + iVentoy auf demselben Host.
Umgebung (vetnet)
| Parameter | Wert |
|---|---|
| Gateway / FritzBox | 192.168.39.1 |
| Subnetz | 192.168.39.0/24 |
| Hostname | pxe-boot |
| Container-IP | 192.168.39.6 (FritzBox DHCP-Reservierung) |
| VMID | 114 |
| OS | Debian 12 LXC |
| ISO-Storage | ssd-data-unencr |
Ports
| Dienst | Port |
|---|---|
| dnsmasq Proxy-DHCP | UDP 67, 4011 |
| iVentoy TFTP | UDP 69 |
| iVentoy HTTP (Boot) | TCP 16000 |
| iVentoy Web-UI | TCP 26000 |
Phase 1 — Proxmox: LXC + Host
1.1 Container anlegen
| Ressource | Wert |
|---|---|
| RAM | 1024 MB |
| CPU | 1 Core |
| Disk | 8 GB |
| OS | Debian 12 Template |
pct create 114 local:vztmpl/debian-12-standard_*.tar.zst \
--hostname pxe-boot \
--memory 1024 --swap 512 --cores 1 \
--rootfs local-lvm:8 \
--net0 name=eth0,bridge=vmbr0,ip=dhcp \
--unprivileged 1
IP in der FritzBox auf 192.168.39.6 fest reservieren (MAC des Containers).
1.2 iVentoy: DMI-Zugriff (unprivileged)
In /etc/pve/lxc/114.conf:
lxc.hook.pre-start: sh -c "chmod 444 /sys/class/dmi/id/product_uuid"
lxc.hook.post-stop: sh -c "chmod 400 /sys/class/dmi/id/product_uuid"
Alternative: pct set 114 -unprivileged 0 (privileged, einfacher).
Prüfen im Container: cat /sys/class/dmi/id/product_uuid (kein Permission denied). Siehe ventoy/PXE#53.
1.3 Bind-Mount für ISOs
ls /ssdstor/unencrdata/datastor/template/iso/*.iso
pct stop 114
pct set 114 -mp0 /ssdstor/unencrdata/datastor/template/iso,mp=/mnt/iso-store/pve,ro=1
pct start 114
Im Container: ls /mnt/iso-store/pve/*.iso
Phase 2 — Repo deployen und installieren
2.1 Konfiguration
cp config/pxe.env.example config/pxe.env
$EDITOR config/pxe.env # PXE_SERVER_IP, PXE_GATEWAY, ISO_PVE_PATH prüfen
2.2 Repo auf Container kopieren
tar czf - -C . . | ssh root@192.168.39.6 'mkdir -p /opt/bootServerPXE && tar xzf - -C /opt/bootServerPXE'
ssh root@192.168.39.6 'chmod +x /opt/bootServerPXE/scripts/*.sh'
2.3 Installation
ssh root@192.168.39.6
cd /opt/bootServerPXE
./scripts/install.sh
Installiert:
- dnsmasq — Proxy-DHCP (
config/dnsmasq-pxe.conf) - iVentoy 1.0.36 nach
/opt/iventoy - Symlinks
/opt/iventoy/iso/store/← Bind-Mount - systemd:
dnsmasq,pxe-link-isos,iventoy,iventoy-pxe
Phase 3 — Web-UI (optional)
Normalerweise nicht nötig — iventoy-start-pxe.sh setzt ExternalNet (Mode 2) und startet den PXE-Dienst.
Optional prüfen: Boot Configuration → DHCP Server Mode → ExternalNet
Optional: MAC-Filter leer lassen, Secure Boot am Client aus.
Phase 4 — Test
systemctl status dnsmasq iventoy iventoy-pxe pxe-link-isos
/opt/iventoy/iventoy.sh status
ss -ulnp | grep -E 'dnsmasq|iventoy' # dnsmasq: 67/4011, iventoy: 69
ls /opt/iventoy/iso/store/
curl -s -X POST http://127.0.0.1:26000/iventoy/json --data-raw '{"method":"sysinfo"}'
tail -f /opt/iventoy/log/log.txt
Erwartung: "status":"running", Log: DHCP service no need to start in external subnet mode, TFTP läuft.
PXE-Client: LAN-Boot → iVentoy-Menü mit ISOs.
PXE-Clients (VMs)
Wichtig: Client muss im gleichen LAN wie pxe-boot sein (z. B. Proxmox-Bridge vmbr0 → vetnet 192.168.39.0/24).
| Symptom am Client | Ursache |
|---|---|
IP 10.0.2.x, TFTP 10.0.2.4, hostname.pxe |
VM im QEMU-NAT, nicht auf vetnet |
hostname.pxe + Permission denied |
Kein Boot-Dateiname per DHCP (falsches Netz oder Proxy-PXE fehlt) |
| Keine IP | FritzBox-DHCP — nicht PXE-Server |
Fix VM: Netzwerkgerät auf vmbr0 (oder gleiche Bridge wie pxe-boot), kein isoliertes NAT. Client-IP sollte 192.168.39.x sein, TFTP-Server 192.168.39.6.
Troubleshooting
| Symptom | Ursache | Fix |
|---|---|---|
| iVentoy startet nicht | product_uuid errno 13 |
LXC-Hooks oder privileged |
| Web-UI nicht erreichbar | iVentoy-Prozess tot | cd /opt/iventoy && ./iventoy.sh status |
status: ready statt running |
PXE nicht gestartet | systemctl restart iventoy-pxe |
| Port 67-Konflikt | iVentoy ProxyNet/External parallel zu dnsmasq | ExternalNet (2) + dnsmasq, nicht ProxyNet |
| TFTP (UDP 69) fehlt | PXE-Dienst nicht gestartet | iventoy-start-pxe.sh, Log prüfen |
| Menü leer | Bind-Mount fehlt | mp0 setzen, mount-isos.sh |
| UEFI hängt | Secure Boot | Secure Boot am Client deaktivieren |
iVentoy DHCP-Modi (API)
| Mode | Name | Verwendung hier |
|---|---|---|
| 0 | Internal | iVentoy vergibt IPs (ersetzt FritzBox) |
| 1 | External | Snooping UDP 67 — Konflikt mit dnsmasq |
| 2 | ExternalNet | Standard — nur TFTP/HTTP, dnsmasq liefert Boot-Datei |
| 3 | Proxy | Nur UDP 4011 |
| 4 | ProxyNet | UDP 67+4011 — Konflikt mit dnsmasq |
ISOs hinzufügen
ISOs auf Proxmox-Storage ssd-data-unencr ablegen (/ssdstor/unencrdata/datastor/template/iso/), dann:
/opt/bootServerPXE/scripts/mount-isos.sh
systemctl restart iventoy iventoy-pxe
Keine Leerzeichen/Umlaute in Dateinamen.
Repo-Dateien
| Datei | Zweck |
|---|---|
config/pxe.env.example |
Netzwerk, Pfade, iVentoy-Version |
config/dnsmasq-pxe.conf |
Proxy-DHCP-Vorlage |
scripts/install.sh |
Hauptinstallation |
scripts/mount-isos.sh |
ISO-Symlinks |
scripts/iventoy-start-pxe.sh |
ExternalNet starten (systemd) |
systemd/iventoy.service |
iVentoy-Prozess |
systemd/iventoy-pxe.service |
PXE nach Boot starten |
Reproduzierbarkeit
| Schritt | install.sh |
Manuell |
|---|---|---|
| dnsmasq + iVentoy ExternalNet | ✓ | — |
| ISO-Symlinks | ✓ | Bind-Mount mp0 vorher |
| systemd-Dienste | ✓ | — |
| LXC anlegen | — | Proxmox |
| DMI-Hooks / privileged | — | /etc/pve/lxc/114.conf |
| IP-Reservierung | — | FritzBox |
| Client-Bridge / PXE-Test | — | Proxmox / BIOS |
iVentoy
Kostenlos für private Nutzung (Free Edition, max. 20 Clients). ventoy/PXE · iVentoy