Search

Language:  
Search for:

Available article translations:

Customizing network interface configuration in Debian/Ubuntu containers/VMs

Article ID: 115638 
Created On: Mar 3, 2013
Last Review: Apr 19, 2013
Views:
Was this article helpful?
No Yes
APPLIES TO:
  • Parallels Cloud Server
  • Parallels Virtuozzo Containers for Linux
  • Parallels Server

Symptoms

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

Cause

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/debian-add_ip.sh in routed mode and /etc/sysconfig/vz-scripts/dists/scripts/debian-add_netif.sh in bridged mode.

Resolution

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.

Example:
[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
      ;;
esac
exit 0
[root@debian.ct ~]#

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



ca05eaf5b843fbd53589c90d7228a6df 64d8d09669cff87d685a09b84f40c490 2897d76d56d2010f4e3a28f864d69223 909d99074e442b52ce54cc7b31cf065d bf1c3a170005eae151f49ba2720abde9 eb0ea3b827d18de2329b6477e24c1d59

Was this article helpful?
No Yes
 
 
 
 
 
 
For Home
For Hosters
For SaaS
For IaaS
 
Desktop Virtualization
- Parallels Desktop 8 for Mac
- Parallels Transporter
- Parallels Mobile
- Parallels Desktop Switch to Mac Edition
- Parallels Desktop for Mac Enterprise Edition
- Parallels Management-Mac for Microsoft SCCM
Server Virtualization
- Parallels Cloud Server
- Parallels Virtuozzo Containers
Automation
- Parallels Automation
- Parallels Automation for Cloud Infrastructure
- Parallels Business Automation Standard
- Parallels Virtual Automation
- Parallels Plesk Panel Suite
- Web Presence Builder
- Parallels Plesk Automation
- Parallels Small Business Panel
- Parallels Domain/SSL Reseller Program
- Value-added Services for Hosters
- Parallels Partner Storefront