Build a CentOS7 server for: pxe boot, kickstart, reposync, repotrack, nfs, https (STEP 14)

STEP 14 – Test PXE Boot and Kickstart installation.

Just create a new VM instance, and don’t provide it with any installation media.
Of course it will need a vdisk for the installation to work, use ~6 or 8gb set as NVMe.
For headless servers, there usually isn’t any need for Bluetooth, Sound, 3D Video, or a Printer Port. I remove all of those from VM hardware profile.
The PXE/Kickstart install image the clients will boot utilizes a ramdisk. In current/recent versions of CentOS, Fedora, RedHat, and Oracle linux clients need 1,536 MB of vRAM to load this installation image.  As soon as the installation is completed, and the VM is capable from using it’s own disk, then the VM hardware memory allocation can be reduced… for many of my server VMs, I set it at 512MB.
1 vCPU is adequate.
Of course it will need a virtual network interface configured on the same VMNET as Fusion is providing DHCP with the PXE (“next-server”) option.
That’s it… start the VM.
If it works, there will be a lot of scrolling text… then eventually a prompt to quit/reboot… and you’ll have a working VM.
If something goes wrong, watch the screens, it’ll provide pretty good clues.  There are also methods to access (tail) the installation logs… but I’ll leave you to read up on that.  Most of the problems with relatively simple PXE/Kickstart setups like this are due to typos in the *.ks script or the “default” pxe boot menu.

 

Build a CentOS7 server for: pxe boot, kickstart, reposync, repotrack, nfs, https (STEP 13)

STEP 13 – Provide PXE boot server info to DHCP clients, via VMware Fusion vnet config (not a CentOS DHCP server).

This config is on the VMware host.  In my case, that’s a MacOS Mojave MacBook Pro running VMware Fusion. Any recent VMware hypervisors (Fusion, Workstation ESXi) are capable of providing this. VirtualBox and Parallels can to.  This scope of this guide is staying with VMware Fusion on MacOS.

Fusion doesn’t provide a GUI interface for the DHCP PXE Boot Server option. But it does support a lot of additional features through config files and/or the command line.
For this step, open a MacOS Terminal window, and:
sudo su
nano /Library/Preferences/VMware\ Fusion/vmnet2/dhcpd.conf
Put this after the “DO NOT MODIFY” section of stuff… it’s “reimplementing the subnet”…
note: on the PXE Boot Server, the “pxelinux.0″ file can be put in a subfolder, and then referenced in the DHCP config with this syntax ”  filename “pxelinux/pxelinux.0”;
My PXE server is providing the pxelinux.0 file at the default root of the tftpserver.
           the vnet dhcp config is a little less than obvious…
           the PXE Boot TFTP Server is represented by:  “next-server 10.0.0.11”

subnet 10.0.0.0 netmask 255.255.255.0 {
range 10.0.0.128 10.0.0.254;
option broadcast-address 10.0.0.255;
option domain-name-servers 10.0.0.2;
option domain-name localdomain;
default-lease-time 1800;                # default is 30 minutes
max-lease-time 7200;                    # default is 2 hours
option netbios-name-servers 10.0.0.2;
option routers 10.0.0.2;
next-server 10.0.0.11;  
  filename “pxelinux.0”;
}
host vmnet2 {
hardware ethernet 00:55:55:C0:22:22;
fixed-address 10.0.0.1;
option domain-name-servers 0.0.0.0;
option domain-name “”;
option routers 0.0.0.0;
}

* for simplicity, this VMNET config uses an entire class c range (private/non-routable of course), and then allocates the bottom half for static IP and lets the DHCP process serve the top half.


TO RESTART FUSION DHCP SERVICE: without shutting down/restarting VMs/Fusion
(2019-02-22):
sudo /Applications/VMware\ Fusion.app/Contents/Library/vmnet-cli –stop   
sudo /Applications/VMware\ Fusion.app/Contents/Library/vmnet-cli –start

Build a CentOS7 server for: pxe boot, kickstart, reposync, repotrack, nfs, https (summary of steps)

  • INTRODUCTION:  Overview of the starting point for this install, and reasons why to do it.
  • STEP  1 – clone an existing “minimal” VM (or build one).
  • STEP  2 – prepare to install/config PXE/RepoSync/RepoTrack (load software packages).
  • STEP  3 – add/config a 2nd virtual hard disk for the repo files.
  • STEP  4 – CONFIG RepoSync/RepoTrack to support multiple OS Distros, Releases, and Architectures.
  • STEP  5 – configure an EXCLUDE LINE for YUM CONFIG files
  • STEP  6 – build REPOSYNC commands for SCRIPT “rs-c7x64-update.sh”
  • STEP  7 – CREATE /etc/yum.repos.d/c7x64.repo for the CentOS 7 64-bit REPOSYNC CLIENTS
  • STEP  8 – CREATE /etc/yum.repos.d/c7x32.repo for the CentOS 7 32-bit REPOSYNC CLIENTS
  • STEP  9 – ENABLE and CONFIGURE PXE (uses vmware dhcp; does not require CentOS NTP/DHCP/DNS/vsftd/xinetd)
  • STEP 10 – Create a PXE BOOT MENU
  • STEP 11 – create the kickstart files referenced by the PXE Boot menu:
  • STEP 12 – Put the required PXE client boot files in place.
  • STEP 13 – Provide PXE boot server info to DHCP clients, via VMware Fusion vnet config (not a CentOS DHCP server).
  • STEP 14 – Test PXE Boot and Kickstart installation.
  • SIDEBAR 1 – Alternate ways to provide PXE BOOT IMAGES to clients (a brief summary)
  • SIDEBAR 2 – Optional NFS SHARE: convenient for exploring repo contents from a gui desktop VM.
  • SIDEBAR 3 – PXE client note re memory:  the boot image uses a ramdisk.