Article ID: 115638, created on Mar 4, 2013, last review on May 11, 2014

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


Custom network interface settings specified in  /etc/network/interfaces are not applied in Debian-based containers or virtual machines.


Interface configuration in the file /etc/network/interfaces is automatically generated and all customizations are overwritten.
In virtual machines, the file is generated by Parallels Tools.
In containers, it is generated by scripts /etc/sysconfig/vz-scripts/dists/scripts/ in routed mode and /etc/sysconfig/vz-scripts/dists/scripts/ in bridged mode.


To have those custom settings applied upon the interface's activation, the separate interface initialization script should be defined instead.

1. Create /etc/network/if-up.d/additional and specify custom settings there.

[root@debian.ct ~]# cat /etc/network/if-up.d/additional
#!/bin/bash -x
[ "$MODE" = "stop" -o -z "$MODE" ] && exit 0
case "$IFACE" in
eth0) ## custom commands for eth0
      ip route add mm.nn.245.0/24 via xx.yy.19.2 dev eth0
exit 0
[root@debian.ct ~]#

2. Set correct permissions on the script:
chmod 755 /etc/network/if-up.d/additional

a26b38f94253cdfbf1028d72cf3a498b 2897d76d56d2010f4e3a28f864d69223 d02f9caf3e11b191a38179103495106f 0dd5b9380c7d4884d77587f3eb0fa8ef e8e50b42231236b82df27684e7ec0beb

Email subscription for changes to this article
Save as PDF