Article ID: 123794, created on Dec 3, 2014, last review on Dec 3, 2014

  • Applies to:
  • Virtuozzo
  • Virtuozzo containers for Linux


Is is not possible to install some package into the container using "vzpkg". Similar error message can is observed:

# vzpkg install 101 -p yum
Loaded plugins: rpm2vzrpm
0 metadata files removed
0 sqlite files removed
0 metadata files removed
Loaded plugins: rpm2vzrpm [Errno 12] Timeout: <urlopen error timed out>
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: base0. Please verify its path and try again
Error: /usr/share/vzyum/bin/yum failed, exitcode=1


There are network problems/misconfiguration on the node or in the infrastructure. The repository configured for the container's OS template cannot be reached.


Investigate and resolve network issues on the node.

In case some alternative repository can be reached, you can reconfigure the OS tempate settings, for example:

  1. Find out which repositories/mirrorlist is configured for the container's OS tempalate:

    # vzpkg list -O 11154
    centos-5-x86_64                    2013-09-23 11:19:50
    # vzpkg info centos-5-x86_64 | egrep 'mirror|repo'
  2. Confirm that you can reach some other suitable repository:

    Configured repository:

    # wget --spider -SO-
    Connecting to||:80... failed: Connection timed out.
    --16:09:21--  (try: 2)
    Connecting to||:80...

    Alternative repository:

    # wget --spider -SO-
    Connecting to||:80... connected.
    HTTP request sent, awaiting response...
      HTTP/1.1 200 OK
      Date: Tue, 04 Nov 2014 10:26:05 GMT
      Server: Apache/2.2.15 (CentOS)
      Last-Modified: Thu, 23 Feb 2012 10:19:09 GMT
      ETag: "15e0bf8-fca96-4b99ef9842140"
      Accept-Ranges: bytes
      Content-Length: 1034902
      Connection: close
      Content-Type: application/x-rpm
    Length: 1034902 (1011K) [application/x-rpm]
    200 OK
  3. Find out the configuration folder for template:

    # vzpkg info centos-5-x86_64 | grep -A1 config_path
  4. Rename "mirrorlist" file if it is present in the config folder:

    # ls -l /vz/template/centos/5/x86_64/config/os/default/mirrorlist
    -rw-r--r-- 1 root root 211 Aug 14  2012 /vz/template/centos/5/x86_64/config/os/default/mirrorlist
    # mv /vz/template/centos/5/x86_64/config/os/default/mirrorlist{,_orig}
  5. Change the "repositories" file in the config folder ("/vz/template/centos/5/x86_64/config/os/default/repositories") to contain only reachable repositories
  6. Update the template metadata:

    # vzpkg update metadata centos-5-x86_64 -r
  7. Run the intended "vzpkg" operation again

Search Words

<urlopen error timed out>

[Errno 12] Timeout

Cannot retrieve repository metadata

d02f9caf3e11b191a38179103495106f 2897d76d56d2010f4e3a28f864d69223 e8e50b42231236b82df27684e7ec0beb 0dd5b9380c7d4884d77587f3eb0fa8ef

Email subscription for changes to this article
Save as PDF