Article ID: 118838, created on Nov 24, 2013, last review on Jan 6, 2016

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

Symptoms

It is not possible to create/update OS template cache, the operation fails with the following errors:

[root@vz ~]# vzpkg create cache ubuntu-11.04-x86
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/natty/main/binary-i386/Packages  404  Not Found [IP: 91.189.92.202 80]
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/natty/restricted/binary-i386/Packages  404  Not Found [IP: 91.189.92.202 80]
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/natty/universe/binary-i386/Packages  404  Not Found [IP: 91.189.92.202 80]
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/natty/multiverse/binary-i386/Packages  404  Not Found [IP: 91.189.92.202 80]

Also the following error can be returned by vzpkg create cache command:

E: Some index files failed to download, they have been ignored, or old ones used instead.
Error: /usr/bin/apt-get failed, exitcode=100

Cause

The required packages are absent on the configured repository due to its end-of-support or other reasons.

Resolution

  1. Find out the proper repository for your OS. For example, old Ubuntu releases are moved to http://old-releases.ubuntu.com.

  2. Modify the file /vz/template/%os/%ver/%arch/config/os/default/ - add the new repositories.

    E.g. for 11.04(Natty Narwhal):

    [root@vz ~]# cat  /vz/template/ubuntu/11.04/x86/config/os/default/repositories
    ...
    http://old-releases.ubuntu.com/ubuntu/ natty main restricted universe multiverse
    http://old-releases.ubuntu.com/ubuntu/ natty-updates main restricted universe multiverse
    http://old-releases.ubuntu.com/ubuntu/ natty-security main restricted universe multiverse
    http://old-releases.ubuntu.com/ubuntu/ natty partner
    

    Make sure that all links are pointing to the correct repositories, and links like http://security.ubuntu.com or $UBU_SERVER are disabled.

  3. Create the cache:

    [root@test ~]# vzpkg update cache ubuntu-11.04-x86
    ....
    OS template ubuntu-11.04-x86 cache was updated
    

Search Words

cache 404 not found

error

create cache

vz: добавление шаблонов

os template

/usr/bin/apt-get failed

exitcode=100

404 not found

upgrade cache

a26b38f94253cdfbf1028d72cf3a498b 2897d76d56d2010f4e3a28f864d69223 d02f9caf3e11b191a38179103495106f e8e50b42231236b82df27684e7ec0beb 0dd5b9380c7d4884d77587f3eb0fa8ef

Email subscription for changes to this article
Save as PDF