Article ID: 122261, created on Jul 6, 2014, last review on Jul 6, 2014

  • Applies to:
  • Virtuozzo containers for Linux 4.7


If the network configuration script contains IP address (e.g. in a comment, or in a different section - like IPv6-via-IPv4 tunnel configuration), such IP address cannot be assigned using vzctl set CTID --ipadd IP.ADD.RE.SS command. The command finished successfully, the IP address is added to the container's configuration file, but it does not get added to the network configuration in the container and thus does not work.

The following section can appear in the file and block adding an IP address:

# IPv6 tunnel via Hurricane Electric
auto he-ipv6
iface he-ipv6 inet6 v4tunnel
    endpoint HE.END.POI.NT      # HE gateway IPc4 address
    address LOC:AL:IPv6::ADDR   # dedicated IPv6 address
    netmask 64
    local IP.ADD.RE.SS          # local IPv4 address - the one in the question
    gateway HE:GW:IPv6::ADDR    # HE gateway IPv6 address
    ttl 255

Here, IP.ADD.RE.SS cannot be assigned to a container.


The cause of the issue is the presence of the IP address as a string in a comment or in the custom section.

For example, this can be a configuration for IPv6 tunnel interface in /etc/network/interfaces in the container (or in the template file /etc/network/interfaces.template, if it exists then it is used to generate the interfaces file).

The script which should update the network configuration in the container checks for presence of the sub-string which contains IP address, finds the stanza "local" and treats it as if the IP address is configured in the container, doing nothing in the result.


The internal request PSBM-27897 has been placed to the development team for correction of the IP address check.

As a workaround it is necessary to modify the script /etc/sysconfig/vz-scripts/dists/scripts/

In the function "add_ip()" the presence of the IP address is checked by the command:

if grep -qw "${ip}" ${CFGFILE}.bak 2>/dev/null; then

It is necessary to change it with the following command:

if { sed 's~#.*~~' | grep -w address | grep -qw "${ip}"; } < ${CFGFILE}.bak 2>/dev/null; then

Search Words

cannot assign ip address

ip address does not work

ip address does not respond

e8e50b42231236b82df27684e7ec0beb 2897d76d56d2010f4e3a28f864d69223 d02f9caf3e11b191a38179103495106f 0c05f0c76fec3dd785e9feafce1099a9

Email subscription for changes to this article
Save as PDF