When installing a template or a package into a Debian/Ubuntu-based container, an error like this can occur (it can fail on any package;
postfix is just one possible package):
~# vzpkg install CTID pp11 pp11-postfix ... debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable dpkg: error processing /vz/template/debian/6.0/x86_64/pm//archives/postfix_2.7.1-1+squeeze1_amd64.vz.deb (--unpack): subprocess new pre-installation script returned error exit status 1 ... ~#
Further attempts to install anything to a container may fail with a dependency check:
~# vzpkg install CTID pp11 pp11-postfix ... W: GPG error: ftp://ftp.de.debian.org squeeze/updates InRelease: Could not open file /vz/template/debian/6.0/x86_64/pm//lists/partial/ftp.de.debian.org_debian-security_dists_squeeze_updates_InRelease - RunGPGV (2: No such file or directory) W: GPG error: ftp://ftp.de.debian.org squeeze Release: No keyring installed in /vz/tmp//vzpkg.3AP8B0/trusted.gpg.d/. W: GPG error: http://nginx.org squeeze Release: No keyring installed in /vz/tmp//vzpkg.TiPgQq/trusted.gpg.d/. E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution). Error: /usr/bin/apt-get failed, exitcode=100. ~#
The cause of the failure is a file lock on the configuration file of the Debian Configuration utility.
The error itself seems to be very intermittent and it occurs rarely - presumably, if the command to install templates/packages is run right after starting the container, e.g., as it is provisioned from Parallels Operation Automation.
To fix the issue with dependencies, use the following command, as it is suggested during installation attempts and redoes the operation:
~# vzctl exec CTID apt-get -f install
The locking issue has not yet been investigated in details because it is not reproducible in the test environment and is very intermittent.