Kickstart validation

Customizing a kickstart file to meet your requirements can be challenging.  One typo or incorrect setting and it simply won't work.  Validation of a success or fail can be achieved with a time consuming reboot.  However, there is a quicker solution.

yum install system-config-kickstart
ksvalidator kickstart.ks

Be certain to validate the kickstart on the same operating system version as the kickstart file or you may get a whole lot of errors in the output. As this output will show a CentOS 7 kickstart file verified on a CentOS 6 box.

[root@localhost centos7]# ksvalidator ks7.cfg
The following problem occurred on line 83 of the kickstart file:

no such option: --vckeymap

The following problem occurred on line 96 of the kickstart file:

no such option: --boot-drive

The following problem occurred on line 98 of the kickstart file:

no such option: --type

[root@localhost centos7]# ksvalidator ks7.cfg
The following problem occurred on line 83 of the kickstart file:

no such option: --vckeymap

The following problem occurred on line 96 of the kickstart file:

no such option: --boot-drive

The following problem occurred on line 98 of the kickstart file:

no such option: --type

Alternately, using the -v on a CentOS box will permit versioning up to that version of that OS.

ksvalidator -v RHEL7 10-RHEL_7_VRT_kickstart.txt

Case, using the "-l" will list supported versions.  On a CentOS6 box, validation is possible through RHEL6. The results below are truncated:

[root@localhost centos6]# ksvalidator -l
DEVEL
F10
...
RHEL6

The same command on a CentOS7 box didn't work for me without adding the config to the end of it.

ksvalidator -l ks.cfg

 

Source(s)
https://ihazem.wordpress.com/2012/04/05/validate-kickstart-file-without-having-to-reboot-system/
https://access.redhat.com/solutions/2132051