title: CentOS through a VM - no URLs in mirrorlist
body: <p>I am trying to run a <a href="https://en.wikipedia.org/wiki/CentOS" rel="noreferrer">CentOS</a> 8 server through <a href="https://en.wikipedia.org/wiki/VirtualBox" rel="noreferrer">VirtualBox</a> (6.1.30) (<a href="https://en.wikipedia.org/wiki/Vagrant_%28software%29" rel="noreferrer">Vagrant</a>), which worked just fine yesterday for me, but today I tried running a <code>sudo yum update</code>. I keep getting this error for some reason:</p>
  <pre><code>[vagrant@192.168.38.4] ~  &gt;&gt; sudo yum update
  CentOS Linux 8 - AppStream                       71  B/s |  38  B     00:00
  Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: No URLs in mirrorlist
  </code></pre>
  <p>I already tried to change the namespaces on <code>/etc/resolve.conf</code>, remove the <a href="https://en.wikipedia.org/wiki/DNF_(software)" rel="noreferrer">DNF</a> folders and everything. On other computers, this works just fine, so I think the problem is with my host machine. I also tried to reset the network settings (I am on a Windows 10 host), without success either. It's not a DNS problem; it works just fine.</p>
  <p>After I reinstalled Windows, I still have the same error in my VM.</p>
  <p>File <em>dnf.log</em>:</p>
  <pre><code>2022-01-31T15:28:03+0000 INFO --- logging initialized ---
  2022-01-31T15:28:03+0000 DDEBUG timer: config: 2 ms
  2022-01-31T15:28:03+0000 DEBUG Loaded plugins: builddep, changelog, config-manager, copr, debug, debuginfo-install, download, generate_completion_cache, groups-manager, needs-restarting, playground, repoclosure, repodiff, repograph, repomanage, reposync
  2022-01-31T15:28:03+0000 DEBUG YUM version: 4.4.2
  2022-01-31T15:28:03+0000 DDEBUG Command: yum update
  2022-01-31T15:28:03+0000 DDEBUG Installroot: /
  2022-01-31T15:28:03+0000 DDEBUG Releasever: 8
  2022-01-31T15:28:03+0000 DEBUG cachedir: /var/cache/dnf
  2022-01-31T15:28:03+0000 DDEBUG Base command: update
  2022-01-31T15:28:03+0000 DDEBUG Extra commands: ['update']
  2022-01-31T15:28:03+0000 DEBUG User-Agent: constructed: 'libdnf (CentOS Linux 8; generic; Linux.x86_64)'
  2022-01-31T15:28:05+0000 DDEBUG Cleaning up.
  2022-01-31T15:28:05+0000 SUBDEBUG
  Traceback (most recent call last):
    File &quot;/usr/lib/python3.6/site-packages/dnf/repo.py&quot;, line 574, in load
      ret = self._repo.load()
    File &quot;/usr/lib64/python3.6/site-packages/libdnf/repo.py&quot;, line 397, in load
      return _repo.Repo_load(self)
  libdnf._error.Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: No URLs in mirrorlist
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File &quot;/usr/lib/python3.6/site-packages/dnf/cli/main.py&quot;, line 67, in main
      return _main(base, args, cli_class, option_parser_class)
    File &quot;/usr/lib/python3.6/site-packages/dnf/cli/main.py&quot;, line 106, in _main
      return cli_run(cli, base)
    File &quot;/usr/lib/python3.6/site-packages/dnf/cli/main.py&quot;, line 122, in cli_run
      cli.run()
    File &quot;/usr/lib/python3.6/site-packages/dnf/cli/cli.py&quot;, line 1050, in run
      self._process_demands()
    File &quot;/usr/lib/python3.6/site-packages/dnf/cli/cli.py&quot;, line 740, in _process_demands
      load_available_repos=self.demands.available_repos)
    File &quot;/usr/lib/python3.6/site-packages/dnf/base.py&quot;, line 394, in fill_sack
      self._add_repo_to_sack(r)
    File &quot;/usr/lib/python3.6/site-packages/dnf/base.py&quot;, line 137, in _add_repo_to_sack
      repo.load()
    File &quot;/usr/lib/python3.6/site-packages/dnf/repo.py&quot;, line 581, in load
      raise dnf.exceptions.RepoError(str(e))
  dnf.exceptions.RepoError: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: No URLs in mirrorlist
  2022-01-31T15:28:05+0000 CRITICAL Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: No URLs in mirrorlist
  </code></pre>