Symptoms

Creating cache of SUSE-12.3 OS template fails with error:

# vzpkg create cache suse-12.3-x86_64 failed with error
Error: /usr/bin/zypper failed, exitcode=4

or

# vzpkg create cache centos-6-x86_64
Error: failure: repodata/filelists.xml.gz from base0: [Errno 256] No more mirrors to try.
    Error: /usr/share/vzyum/bin/yum failed, exitcode=1

or

# vzpkg create cache debian-7.0-x86-64
E: Unable to correct problems, you have held broken packages.
Error: /usr/bin/apt-get failed, exitcode=100

Cause

Packages versions\names were changed on the repository and now vzpkg cannot fetch them according to the existing metadata.

Resolution

Update metadata for the OS template and re-run cache creation.

# vzpkg update metadata Os_Template_Name -r
# vzpkg update cache Os_Template_Name

Internal content

Link on internal Article