No, this is not a duplicate of disable YUM mirrorlist checking That question was solved by preventing update of all metadata. This is not what I want to do.
I am trying to build images behind a corporate firewall which restricts outside access. I have internal mirrors, to which I point the installer during kickstart. That part works. Image reboots. I have disabled all repos (even tried deleting the existing .repo files), and laid down a custom repo file pointing to our internal mirrors. I've put "enabled = 0" in the fastestmirror.conf file (verified it works, yum doesn't say it's loading the plugin any more), BUT I'm still getting this error, and yum bails out:
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was 14: curl#7 - "Failed to connect to 2604:1580:fe02:2::10: Network is unreachable"
Well, yes, I know it is…that's why I disabled fastest mirror. I don't use the mirror list any more, because I've disabled all default repos.
I don't want to disable caching of metadata (nor do I want to extend its life, as was done in the above solution): I want metadata from our repos to be retrieved, but I don't want it to try to access the mirror list; there is no need.
Why is it still trying to access the mirror list? How can I disable that?
Best Answer
I think this article will solve your issue here is the most relevant part first:
This should be where the mirror is:
If you want it not to look at all:
Set up /etc/yum.repos.d/CentOS-Base.repo like:
From Here: https://wiki.centos.org/HowTos/CreateLocalMirror