Article ID: 120754, created on Mar 26, 2014, last review on May 11, 2014

  • Applies to:
  • Virtuozzo 6.0
  • Virtuozzo containers for Linux
  • Virtuozzo hypervisor


Cache creation fails with a similar error output that includes traceback from yum:

# vzpkg create cache redhat-el6-x86_64
Creation OS template cache for redhat-el6-x86_64 template
Loaded plugins: rpm2vzrpm
12 metadata files removed
0 sqlite files removed
0 metadata files removed
Loaded plugins: rpm2vzrpm
base0                       |  951 B     00:00
base0/filelists             |  824 B     00:00
base0/primary               | 1.3 kB     00:00
base0/other                 |  707 B     00:00
base1                       |  951 B     00:00
base1/filelists             | 2.3 kB     00:00
base1/primary               | 1.7 kB     00:00
base1/other                 | 7.2 kB     00:00
Could not retrieve mirrorlist error was
[Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 500"
Traceback (most recent call last):
  File "/usr/share/vzyum/bin/yum", line 30, in <module>
  File "/usr/share/vzyum/yum-cli/", line 317, in user_main
  File "/usr/share/vzyum/yum-cli/", line 182, in main
  File "/usr/share/vzyum/yum-cli/", line 355, in doCommands
  File "/usr/share/vzyum/yum-cli/", line 506, in doCommand
  File "/usr/share/vzyum/lib/yum/", line 1427, in <lambda>
  File "/usr/share/vzyum/lib/yum/", line 1419, in _getRepoXML
  File "/usr/share/vzyum/lib/yum/", line 1401, in _loadRepoXML
  File "/usr/share/vzyum/lib/yum/", line 1392, in _groupLoadRepoXML
  File "/usr/share/vzyum/lib/yum/", line 1238, in _commonLoadRepoXML
  File "/usr/share/vzyum/lib/yum/", line 1017, in _getFileRepoXML
  File "/usr/share/vzyum/lib/yum/", line 826, in _getFile
  File "/usr/share/vzyum/lib/yum/", line 504, in <lambda>
  File "/usr/share/vzyum/lib/yum/", line 499, in _getgrab
  File "/usr/share/vzyum/lib/yum/", line 488, in _setupGrab
  File "/usr/share/vzyum/lib/yum/", line 661, in <lambda>
  File "/usr/share/vzyum/lib/yum/", line 658, in _geturls
  File "/usr/share/vzyum/lib/yum/", line 629, in _baseurlSetup
  File "/usr/share/vzyum/lib/yum/", line 410, in check
AttributeError: 'YumRepository' object has no attribute 'mirrorlistfn'
Error: /usr/share/vzyum/bin/yum failed, exitcode=1


As it can be seen from traceback, there was an issue parsing the mirrorlist:

Could not retrieve mirrorlist error was
[Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 500"

Attempt to query mirrorlist manually returns "Internal Server Error" page:

# curl --url ""
  <img src="/img/rhn-icon-warning.gif"
       alt="error" />
  Internal Server Error
<p>The server experienced a problem which prevented your request from being filled out.  It may not be possible to execute this action at this time.</p>
<p>Please help us correct this problem by contacting us with details of how you received this message.</p>

Yum produces error because mirrorlist doesn't contain valid information (list of repositories).


To create cache it's necessary to have proper mirrorlist and repositories configuration.

Mirrorlists addresses are stored in /vz/template/%os%/%release%/%arch%/config/os/default/mirrorlist configuration file, make sure they are reachable and contain proper information (list of repositories).

If request to mirrorlist page returns anything except for the list of repositories URLs it will cause yum errors.

Example of a proper "mirrorlist" content:

# curl --url ""

If you intend to use certain repository you can comment all default mirrorlists in the configuration file except for ones starting with $SW_SERVER (they are crucial for cache creation, they provide PVC-specific packages), and put direct repository links into a repositories file in a same directory as a mirrorlist file. Example of a such configuration:

  • mirrorlist file:

    # cat /vz/template/centos/6/x86_64/config/os/default/mirrorlist
  • repositories file:

    # cat /vz/template/centos/6/x86_64/config/os/default/repositories

a26b38f94253cdfbf1028d72cf3a498b 2897d76d56d2010f4e3a28f864d69223 d02f9caf3e11b191a38179103495106f e8e50b42231236b82df27684e7ec0beb 0dd5b9380c7d4884d77587f3eb0fa8ef c62e8726973f80975db0531f1ed5c6a2

Email subscription for changes to this article
Save as PDF