Article ID: 120088, created on Feb 12, 2014, last review on May 10, 2014

  • Applies to:
  • Virtuozzo 6.0


  1. Setting a name server and a search domain for a running container does not update the content of the file "/etc/resolv.conf" in the container - the following commands update the configuration file of the container only, and the settings are applied on the container's restart only.

    ~# vzctl set $CTID --save --nameserver IP.ADD.RE.SS
    ~# vzctl set $CTID --save --searchdomain domain.tld
  2. The package "resolvconf" is installed in the container.


If the package "resolvconf" is installed, the file "/etc/resolv.conf" is replaced with a symbolic link pointing to a memory-stored file, and the content of this file is managed by the tool resolvconf.

To propagate settings in this case, the information about name servers and search domains is stored in the file "/etc/resolvconf/resolv.conf.d/base" instead.

The support of resolvconf was added in the scope of the request PSBM-22822.


1 .To apply the changes, run the following command:

    ~# vzctl exec $CTID resolvconf -u
  1. To apply changes to containers automatically, add the following lines in the script "/etc/sysconfig/vz-scripts/dists/scripts/", to the very end of the function "set_dns()"

    if which resolvconf >/dev/null 2>&1 && runlevel >/dev/null 2>&1; then
            resolvconf -u >/dev/null 2>&1

Search Words


c62e8726973f80975db0531f1ed5c6a2 2897d76d56d2010f4e3a28f864d69223 0dd5b9380c7d4884d77587f3eb0fa8ef

Email subscription for changes to this article
Save as PDF