Search

Language:  
Search for:

Available article translations:

Creating cache for customized EZ OS template fails

APPLIES TO:
  • Parallels Cloud Server
  • Parallels Virtuozzo Containers for Linux
  • Parallels Server

Symptoms

creating cache for a customized OS template (vzpkg create cache "template") fails with

"Error: "/usr/sbin/vzctl exec2 50 "LANG=C DEBIAN_FRONTEND=noninteractive dpkg --configure --pending --force-configure-any --force-confold --force-depends"" return 1"

or some alternative error.

Cause

There is misconfiguration of the template, missing scripts in the new customized template

Resolution

  1. in the output of the vzpkg create cache command the first error/failure needs to be located, for example:

    Setting up libpam-modules-bin (1.1.3-7ubuntu2) ...
    Setting up base-files (6.5ubuntu6.5) ...
    rmdir: failed to remove `/var/run': Directory not empty        !!!<<<=========      
    dpkg: error processing base-files (--install):
     subprocess installed post-installation script returned error exit status 1
    Setting up libpam-modules (1.1.3-7ubuntu2) ...
    Setting up libpam-runtime (1.1.3-7ubuntu2) ...
    ...
    Setting up udev (175-0ubuntu9.4) ...
    runlevel:/var/run/utmp: No such file or directory
    initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
    start: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
    invoke-rc.d: initscript udev, action "restart" failed.
    dpkg: error processing udev (--configure):
     subprocess installed post-installation script returned error exit status 1
    dpkg: plymouth: dependency problems, but configuring anyway as you requested:
     plymouth depends on udev (>= 166-0ubuntu4); however:
      Package udev is not configured yet.
     plymouth depends on initramfs-tools; however:
    Setting up plymouth (0.8.2-2ubuntu31.1) ...
    update-initramfs: deferring update (trigger activated)
    Setting up initramfs-tools (0.99ubuntu13.1) ...
    dpkg: initramfs-tools: dependency problems, but configuring anyway as you requested:
     initramfs-tools depends on udev (>= 147~-5); however:
      Package udev is not configured yet.
    update-initramfs: deferring update (trigger activated)
    Processing triggers for libc-bin ...
    ldconfig deferred processing now taking place
    Processing triggers for initramfs-tools ...
    Errors were encountered while processing:
     base-files
     procps
     udev
    Error: "/usr/sbin/vzctl exec2 50 "LANG=C DEBIAN_FRONTEND=noninteractive dpkg --configure --pending --force-configure-any --force-confold --force-depends"" return 1
    Unmounting file system at /vz/tmp/vzpkg.AtbrOY/cache-private/root
    Unmounting device /dev/ploop50630   
    
  2. check the different between the default template's scripts and the customized one which is based on it:

    [root@vserv27 ~]# ls -al /vz/template/ubuntu/12.04/x86_64/config/os/default/ /vz/template/ubuntu/12.04/x86_64/config/os/vps-root
    /vz/template/ubuntu/12.04/x86_64/config/os/default/:
    total 104
    drwxr-xr-x 3 root root 4096 Feb 25 09:38 .
    drwxr-xr-x 4 root root 4096 Jun 19  2012 ..
    -rw-r--r-- 1 root root   84 May 18  2012 description
    -rw-r--r-- 1 root root    7 May 18  2012 distribution
    drwxr-xr-x 2 root root 4096 Jun 19  2012 doc
    -rwxr-xr-x 1 root root   42 May 18  2012 mid-post-install
    -rwxr-xr-x 1 root root  124 May 18  2012 mid-pre-install
    -rw-r--r-- 1 root root    6 Sep  6  2012 osrelease
    -rw-r--r-- 1 root root    8 May 18  2012 package_manager
    -rw-r--r-- 1 root root 1101 May 18  2012 packages
    -rw-r--r-- 1 root root 1124 Jun 26  2012 packages.rpmorig
    -rw-r--r-- 1 root root  587 May 18  2012 packages_0
    -rw-r--r-- 1 root root  535 Jun 19  2012 packages_1
    -rwxr-xr-x 1 root root  834 May 18  2012 post-cache
    -rwxr-xr-x 1 root root 7531 Feb 25 09:38 post-install
    -rwxr-xr-x 1 root root 9343 Jun 26  2012 post-install.rpmorig
    -rwxr-xr-x 1 root root 2218 May 18  2012 pre-cache
    -rw-r--r-- 1 root root    2 May 18  2012 release
    -rw-r--r-- 1 root root    2 May 18  2012 release.rpmorig
    -rw-r--r-- 1 root root  217 Jun 19  2012 repositories
    -rw-r--r-- 1 root root  186 Jun 26  2012 repositories.rpmorig
    -rw-r--r-- 1 root root   62 May 18  2012 summary
    -rw-r--r-- 1 root root    0 May 18  2012 upgradable_versions
    -rw-r--r-- 1 root root    6 May 18  2012 version
    
    
    /vz/template/ubuntu/12.04/x86_64/config/os/vps-root:
    total 64
    drwxr-xr-x 2 root root 4096 Aug 20 23:30 .
    drwxr-xr-x 4 root root 4096 Jun 19  2012 ..
    -rw-r--r-- 1 root root   98 Aug  2 10:29 description
    -rw-r--r-- 1 root root  862 Aug  2 10:29 packages
    -rw-r--r-- 1 root root  587 Aug  2 10:29 packages_0
    -rw-r--r-- 1 root root  535 Aug  2 10:29 packages_1
    -rwxr-xr-x 1 root root  834 Aug  2 10:29 post-cache
    -rwxr-xr-x 1 root root 7263 Aug  2 10:29 post-install
    -rwxr-xr-x 1 root root 2218 Aug  2 10:29 pre-cache
    -rw-r--r-- 1 root root    4 Aug  2 10:29 release
    -rw-r--r-- 1 root root  336 Aug  2 10:29 repositories
    -rw-r--r-- 1 root root   76 Aug  2 10:29 summary
    -rw-r--r-- 1 root root    6 Aug  2 10:29 version
    
  3. as can be seen from the cache creation process output, failure occurs on removing /var/run directory. search any relevant scripts in the original template:

    [root@pvclinux64 ~]# grep '/var/run' /vz/template/ubuntu/12.04/x86_64/config/os/default/*
    /vz/template/ubuntu/12.04/x86_64/config/os/default/mid-pre-install:rm -rf /var/run > /dev/null 2>&1
    /vz/template/ubuntu/12.04/x86_64/config/os/default/mid-pre-install:ln -s /run /var/run > /dev/null 2>&1
    /vz/template/ubuntu/12.04/x86_64/config/os/default/pre-cache:irc:x:39:39:ircd:/var/run/ircd:/bin/sh
    
  4. As we can see, the mid-pre-install script contains the necessary command, which means that mid-pre-install needs to be included in the customized template.

  5. Also, if osrelease if present in the original template, it needs to be copied to the customized one, it contains the version of the kernel which will be shown as the used one in container, which is necessary for GlibC library to work properly.

Search words:

Error: "/usr/sbin/vzctl exec2 50

vzpkg create cache

template cache creation fails

create cache fails




ca05eaf5b843fbd53589c90d7228a6df 2897d76d56d2010f4e3a28f864d69223 909d99074e442b52ce54cc7b31cf065d eb0ea3b827d18de2329b6477e24c1d59 bf1c3a170005eae151f49ba2720abde9

FEEDBACK
Was this article helpful?
Tell us how we may improve it.
Yes No
 
 
 
 
 
 
Desktop Virtualization
- Parallels Desktop 8 for Mac
- Parallels Transporter
- Parallels Desktop Switch to Mac Edition
- Parallels Desktop for Mac Enterprise Edition
- Parallels Management-Mac for Microsoft SCCM
Server Virtualization
- Parallels Cloud Server
- Parallels Containers for Windows 6.0 Beta
- Parallels Virtuozzo Containers
Automation
- Parallels Automation
- Parallels Automation for Cloud Infrastructure
- Parallels Business Automation Standard
- Parallels Virtual Automation
- Parallels Plesk Panel Suite
- Web Presence Builder
- Parallels Plesk Automation
- Parallels Small Business Panel
- Value-added Services for Hosters
- Parallels Partner Storefront
Services & Resources
- Cloud Acceleration Services
- Professional Services
- Support Services
- Training & Certification