Article ID: 120629, created on Mar 19, 2014, last review on Jun 17, 2016

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

Symptoms

OS Template Cache cannot be created. During packages installation stage you can see a lot of errors like these:

/sbin/ldconfig: File /usr/lib/libformw.so.5.7 is empty, not checked.
/sbin/ldconfig: File /usr/lib/libformw.so.5 is empty, not checked.
/sbin/ldconfig: File /usr/lib/libmenu.so.5.7 is empty, not checked.
/sbin/ldconfig: File /usr/lib/libmenu.so.5 is empty, not checked.
/sbin/ldconfig: File /usr/lib/libpanelw.so.5.7 is empty, not checked.
/sbin/ldconfig: File /usr/lib/libpanel.so.5.7 is empty, not checked.
/sbin/ldconfig: File /usr/lib/libpanelw.so.5 is empty, not checked.
/sbin/ldconfig: File /usr/lib/libtic.so.5 is empty, not checked.
/sbin/ldconfig: File /usr/lib/libform.so.5 is empty, not checked.
/sbin/ldconfig: File /usr/lib/libform.so.5.7 is empty, not checked.
/sbin/ldconfig: File /usr/lib/libmenuw.so.5 is empty, not checked.

Cause

Output provided by ldconfig reports lots of empty files in template area (files that shouldn't be empty).

This means contents of /vz/template/%ostemplate%/%version%/%arch%/ are corrupted, files exist but they are zero-sized. E.g.:

# ll /vz/template/centos/6/x86_64/bash-4.1.2-3.el6.x86_64/bin
total 888
-rwxr-xr-x 1 root root      0 May 30  2011 bash
lrwxrwxrwx 1 root root      4 Sep 13  2011 sh -> bash

Resolution

vzpkg won't re-download the package if files exist, regardless of their size and validity. To force re-downloading it is necessary to remove these files completely. Please follow steps below to achieve this goal:

  1. Make sure you don't have containers based on this OS template (it might be if you faced this error upon updating cache):

    # vzlist -ao ctid,ostemplate | grep %ostemplate%
    

    E.g.

    # vzlist -ao ctid,ostemplate | grep debian-6.0-x86_64
    #
    

    NOTE: If there are containers based on this template stop performing commands from this article! Migrate containers to another host first.

  2. Remove template area for this OS Template:

    # rm -rf /vz/template/%ostemplate%/%version%/%arch%/
    

    E.g.

    # rm -rf  /vz/template/debian/6.0/x86_64/
    
  3. Install template back:

  4. Create cache:

    # vzpkg create cache %ostemplate%
    

    E.g.

    # vzpkg create cache debian-6.0-x86_64
    

a26b38f94253cdfbf1028d72cf3a498b 2897d76d56d2010f4e3a28f864d69223 e8e50b42231236b82df27684e7ec0beb d02f9caf3e11b191a38179103495106f 0c05f0c76fec3dd785e9feafce1099a9 0dd5b9380c7d4884d77587f3eb0fa8ef

Email subscription for changes to this article
Save as PDF