Article ID: 112599, created on Oct 21, 2011, last review on Jun 17, 2016

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

Information

Article KB#1013 works for standard (STD) templates.

For easy (EZ) templates use this article.

NOTE: Be EXTREMELY careful while performing these steps! Using wrong options or interrupting the process may corrupt files inside container AND ON HARDWARE NODE!

To verify container binary files integrity run the following sequence of commands replacing YOUR_CTID with the actual container ID:

CTID=YOUR_CTID
vzctl stop ${CTID}
vzctl mount ${CTID}
OSTEMPLATE=`vzpkg list -O ${CTID}|awk '{print $1}'`
PKGMAN=`vzpkg info ${OSTEMPLATE} package_manager | awk '{getline;print $NF}'`
/usr/share/libvznbdmig/run_from_chroot /vz/pkgenv/${PKGMAN}/ /usr/lib/rpm/rpmq -Va --root /vz/root/${CTID}/ | egrep '^..5|missing'

A real-life example:

[18:29:10][~]# CTID=671
[18:29:16][~]# vzctl stop ${CTID}
Stopping the Container ...
Container was stopped
Container is unmounted
[18:29:37][~]# vzctl mount ${CTID}
Container is mounted
[18:29:40][~]# OSTEMPLATE=`vzpkg list -O ${CTID}|awk '{print $1}'`
[18:29:46][~]# PKGMAN=`vzpkg info ${OSTEMPLATE} package_manager | awk '{getline;print $NF}'`
[18:29:51][~]# /usr/share/libvznbdmig/run_from_chroot /vz/pkgenv/${PKGMAN}/ /usr/lib/rpm/rpmq -Va --root /vz/root/${CTID}/ | egrep '^..5|missing'
S.5....T    /usr/sbin/suexec
S.5....T    /usr/sbin/libgcc_post_upgrade
S.5....T    /usr/bin/eu-elflint
S.5....T    /usr/bin/eu-nm
S.5....T    /usr/bin/eu-readelf
S.5....T    /usr/bin/eu-size
S.5....T    /usr/bin/eu-strip
S.5....T    /usr/bin/curl

This container has modified files inside bin directories, thus it is potentially compromised.

Solution #1

Restore the container from the latest good backup.

Solution #2

# vzctl reinstall 101

This command will create a brand new CT on the same OS template as the broken one, install the same application templates into it, and restore users' credentials. The contents of the old CT will be copied into the /old directory.

Search Words

top

network is not working in ubutunu

disk space limit

Unable to execute bash: Exec format error

Error: Unable to execute bash: No such file or directory

Error: Unable to execute bash: Exec format error

Container is unmounted Failed to start the Container

Error: /usr/lib/rpm/rpmi failed, exitcode=1

d02f9caf3e11b191a38179103495106f e8e50b42231236b82df27684e7ec0beb a26b38f94253cdfbf1028d72cf3a498b 2897d76d56d2010f4e3a28f864d69223 0dd5b9380c7d4884d77587f3eb0fa8ef c62e8726973f80975db0531f1ed5c6a2

Email subscription for changes to this article
Save as PDF