Article ID: 111113, created on Apr 12, 2011, last review on Jun 17, 2016

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


1) Obtain 'vzkernel-devel', 'vzkernel' and 'vzmodules' packages for your kernel by following this knowledge base article:

6732 How to obtain kernel headers on PVC node in order to compile a third-party driver

2) Download the required driver for your device from the hardware vendor.

3) Create a temporary container based on CentOS 5 or RHEL 5 OS template and start it:

[root@node]# vzctl create 55 --ostemplate centos-5-x86_64 --config slm.1024MB --hostname drivers
[root@node]# vzctl set 55 --diskspace 10000000 --save
[root@node]# vzctl start 55

4) Install 'devel' template into container or separate packages (as in case of RHEL template):

[root@node]# vzpkg install 55 devel

or if there is no 'devel' template installed for the selected OS template it is possible to install packages in the following way:

# vzpkg install 55 -p autoconf213 psutils patchutils rpm-build rpm-python gcc gcc-c++ gcc-gnat gcc-java gcc-objc gdb openjade openssl-perl patch tetex tetex-latex tetex-dvips libtool automake14 automake15 automake16 automake17 cpp cvs passivetex texinfo dejagnu gettext flex dos2unix doxygen distcache bc bison byacc gperf docbook-style-xsl xmlto strace docbook-dtds tetex-latex tetex-dvips xmltex gnutls-devel apr-devel apr-util-devel gd-devel cups-devel curl-devel db4-devel rpm-devel distcache-devel python-devel gettext-devel glib-devel glib2-devel gmp-devel gettext-devel expect-devel bzip2-devel beecrypt-devel httpd-devel kudzu-devel libattr-devel libacl-devel hesiod-devel krb5-devel libselinux-devel libgcrypt-devel libgpg-error-devel audit-libs-devel libusb-devel zlib-devel unixODBC-devel sendmail-devel tcl-devel pam-devel readline-devel slang-devel libtiff-devel libxml2-devel libxslt-devel ncurses-devel net-snmp-devel newt-devel openssl-devel libpng-devel freetype-devel fontconfig-devel libgcj-devel

5) Copy kernel headers and driver sources to container:

[root@node]# cp ./* /vz/root/55/root

6) Enter to the temporary container:

[root@node]# vzctl enter 55
entered into Container 55
-bash-3.2# su -
[root@drivers ~]#

7) Install kernel, kernel modules and kernel headers:

[root@drivers ~]# rpm -ihv *.rpm --nodeps

8) Extract driver sources.

9) Compile the driver.

[root@drivers ~]# cd path/to/driver/sources/
[root@drivers sources]# make all

10) Archive compiled drivers:

[root@drivers sources]# mkdir /root/compiled 
[root@drivers sources]# DEST_DIR=/root/compiled make copyfiles copyrpmfiles
[root@drivers sources]# tar zcf /root/drivers-`uname -r`.x86_64.tar.gz -C /root/compiled .

11) Install drivers to the node:

[root@drivers sources]# exit
-bash-3.2# exit
exited from Container 55
[root@node]# tar -zxf /vz/root/55/root/drivers-`uname -r`.x86_64.tar.gz -C /
[root@node]# depmod -a

NOTE: Some specific drivers may require additional actions, like initrd image generation, special installation action, etc. Please contact the driver vendor for more details.

Additional information

See also related articles:

6732 How to install kernel headers on PVC node in order to compile a third-party driver

6731 How to build HP-ILO modules for PVC

111112 How to compile IBM RDAC drivers for PVC kernel

Search Words

kernel update

compile drivers

transmit timed out, resetting

compile custom drivers


virtuozzo kernel

unable to detect disks

a26b38f94253cdfbf1028d72cf3a498b 2897d76d56d2010f4e3a28f864d69223 e8e50b42231236b82df27684e7ec0beb d02f9caf3e11b191a38179103495106f 0dd5b9380c7d4884d77587f3eb0fa8ef

Email subscription for changes to this article
Save as PDF