Cannot find a valid baseurl for repo: CentOS

If you’re customizing a kickstart file starting from the one created by Anaconda during the install, and you get an error lamenting that the installer cannot find a valid baseurl for repo CentOS, make sure that you comment out the line:

repo --name="CentOS"  --baseurl=cdrom:sr0 --cost=100

Anaconda already have a valid repo for CD/DVD based installations.