[root@cobbler-server ~]# cobbler check The following are potential configuration items that you may want to fix:
1 : debmirror package is not installed, it will be required to manage debian deployments and repositories 2 : fencing tools were not found, and are required to use the (optional) power management features. install cman or fence-agents to use them
[root@cobbler-server ~]# mount -o loop CentOS-7-x86_64-Minimal-1908.iso /mnt/CentOS-7 mount: /dev/loop0 is write-protected, mounting read-only
[root@cobbler-server ~]# cobbler import --arch=x86_64 --path=/mnt/CentOS-7/ --name=CentOS7 task started: 2020-03-26_144343_import task started (id=Media import, time=Thu Mar 26 14:43:43 2020) Found a candidate signature: breed=suse, version=opensuse15.0 Found a candidate signature: breed=suse, version=opensuse15.1 Found a candidate signature: breed=redhat, version=rhel6 Found a candidate signature: breed=redhat, version=rhel7 Found a matching signature: breed=redhat, version=rhel7 Adding distros from path /var/www/cobbler/ks_mirror/CentOS7-x86_64: creating new distro: CentOS7-x86_64 trying symlink: /var/www/cobbler/ks_mirror/CentOS7-x86_64 -> /var/www/cobbler/links/CentOS7-x86_64 creating new profile: CentOS7-x86_64 associating repos checking for rsync repo(s) checking for rhn repo(s) checking for yum repo(s) starting descent into /var/www/cobbler/ks_mirror/CentOS7-x86_64 for CentOS7-x86_64 processing repo at : /var/www/cobbler/ks_mirror/CentOS7-x86_64 need to process repo/comps: /var/www/cobbler/ks_mirror/CentOS7-x86_64 looking for /var/www/cobbler/ks_mirror/CentOS7-x86_64/repodata/*comps*.xml Keeping repodata as-is :/var/www/cobbler/ks_mirror/CentOS7-x86_64/repodata *** TASK COMPLETE *** [root@cobbler-server ~]# cobbler signature update task started: 2020-03-26_144402_sigupdate task started (id=Updating Signatures, time=Thu Mar 26 14:44:02 2020) Successfully got file from https://cobbler.github.io/signatures/2.8.x/latest.json *** TASK COMPLETE ***
[root@cobbler-server ~]# cobbler distro list CentOS7-x86_64
[root@cobbler-server ~]# cobbler distro report --name=CentOS7-x86_64 Name : CentOS7-x86_64 Architecture : x86_64 TFTP Boot Files : {} Breed : redhat Comment : Fetchable Files : {} Initrd : /var/www/cobbler/ks_mirror/CentOS7-x86_64/images/pxeboot/initrd.img Kernel : /var/www/cobbler/ks_mirror/CentOS7-x86_64/images/pxeboot/vmlinuz Kernel Options : {} Kernel Options (Post Install) : {} Kickstart Metadata : {'tree': 'http://@@http_server@@/cblr/links/CentOS7-x86_64'} Management Classes : [] OS Version : rhel7 Owners : ['admin'] Red Hat Management Key : <<inherit>> Red Hat Management Server : <<inherit>> Template Files : {}
[root@cobbler-server ~]# cobbler system add --name=test --profile=CentOS7-x86_64
[root@cobbler-server ~]# cobbler system report --name=test Name : test TFTP Boot Files : {} Comment : Enable gPXE? : <<inherit>> Fetchable Files : {} Gateway : Hostname : Image : IPv6 Autoconfiguration : False IPv6 Default Device : Kernel Options : {} Kernel Options (Post Install) : {} Kickstart : <<inherit>> Kickstart Metadata : {} LDAP Enabled : False LDAP Management Type : authconfig Management Classes : <<inherit>> Management Parameters : <<inherit>> Monit Enabled : False Name Servers : [] Name Servers Search Path : [] Netboot Enabled : True Owners : <<inherit>> Power Management Address : Power Management ID : Power Management Password : Power Management Type : ipmitool Power Management Username : Profile : CentOS7-x86_64 Internal proxy : <<inherit>> Red Hat Management Key : <<inherit>> Red Hat Management Server : <<inherit>> Repos Enabled : False Server Override : <<inherit>> Status : production Template Files : {} Virt Auto Boot : <<inherit>> Virt CPUs : <<inherit>> Virt Disk Driver Type : <<inherit>> Virt File Size(GB) : <<inherit>> Virt Path : <<inherit>> Virt PXE Boot : 0 Virt RAM (MB) : <<inherit>> Virt Type : <<inherit>>
[root@cobbler-server ~]# cobbler system edit --name=test --gateway=192.168.57.10 --hostname=machine_0
[root@cobbler-server ~]# cobbler system report Name : test TFTP Boot Files : {} Comment : Enable gPXE? : <<inherit>> Fetchable Files : {} Gateway : 192.168.57.10 Hostname : machine_0 Image : IPv6 Autoconfiguration : False IPv6 Default Device : Kernel Options : {} Kernel Options (Post Install) : {} Kickstart : <<inherit>> Kickstart Metadata : {} LDAP Enabled : False LDAP Management Type : authconfig Management Classes : <<inherit>> Management Parameters : <<inherit>> Monit Enabled : False Name Servers : [] Name Servers Search Path : [] Netboot Enabled : True Owners : <<inherit>> Power Management Address : Power Management ID : Power Management Password : Power Management Type : ipmitool Power Management Username : Profile : CentOS7-x86_64 Internal proxy : <<inherit>> Red Hat Management Key : <<inherit>> Red Hat Management Server : <<inherit>> Repos Enabled : False Server Override : <<inherit>> Status : production Template Files : {} Virt Auto Boot : <<inherit>> Virt CPUs : <<inherit>> Virt Disk Driver Type : <<inherit>> Virt File Size(GB) : <<inherit>> Virt Path : <<inherit>> Virt PXE Boot : 0 Virt RAM (MB) : <<inherit>> Virt Type : <<inherit>>
lines to debug/verify tftp and dhcp
1 2
tftp -m binary "192.168.56.11" -c get "pxelinux.0" dhclient
Verify the PXE boot via L3, DHCP Relay
Start machine_0, and it worked ;-).
Start machine_0, and it worked ;-).
From log we could see machine_0 PXE nic got its DHCP IP and default route asssigned in subnet B (192.168.57.0/24) via cobbler-server in subnet A (192.168.56.0/24).
Then the PXE boot succeeded in L3 network routed via our v_router.
cobbler_server
1 2 3 4 5 6 7 8 9 10 11 12
[root@cobbler-server ~]# tail /var/log/messages
Mar 29 02:16:01 cobbler-server dhcpd: DHCPDISCOVER from 08:00:27:15:bd:34 via 192.168.57.10 Mar 29 02:16:02 cobbler-server dhcpd: DHCPOFFER on 192.168.57.101 to 08:00:27:15:bd:34 via 192.168.57.10 Mar 29 02:16:02 cobbler-server dhcpd: DHCPREQUEST for 192.168.57.101 (192.168.56.11) from 08:00:27:15:bd:34 via 192.168.57.10 Mar 29 02:16:02 cobbler-server dhcpd: DHCPACK on 192.168.57.101 to 08:00:27:15:bd:34 via 192.168.57.10 Mar 29 02:18:58 cobbler-server in.tftpd[12800]: Client ::ffff:192.168.56.10 finished pxelinux.0
Sun Mar 29 02:16:07 2020 - INFO | REMOTE generate_kickstart; user(?) Sun Mar 29 02:16:07 2020 - INFO | generate_kickstart
vrouter
1 2 3 4 5 6 7 8
root@vrouter:/home/ubuntu# tcpdump -i enp0s8 -n port 67 and port 68 and -i enp0s9 -n port 67 and port 68 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on enp0s9, link-type EN10MB (Ethernet), capture size 262144 bytes 06:43:21.321035 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 08:00:27:15:bd:34, length 380 06:43:22.305331 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 08:00:27:15:bd:34, length 380 06:43:22.323428 IP 192.168.57.10.67 > 192.168.57.100.68: BOOTP/DHCP, Reply, length 300 06:43:24.282418 IP 0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 08:00:27:15:bd:34, length 392 06:43:24.297630 IP 192.168.57.10.67 > 192.168.57.100.68: BOOTP/DHCP, Reply, length 300
screen captured for machine_0
Issue notes
I tried to complie cobbler in Ubuntu 18.04 while failed in several phases, to save time switched to epel-release build Cobbler binary package in CentOS 7
default vNIC type not working properly on tftp, corrected for machine_0
dhcp server configuration, I shouldn’t have put DHCP for subnet A(was removed already), in which case, machine_0 will be with IP address from subnet A while gateway in subnet B and it led L3 network failure, see below failure: