vz-net_add − Container’s script for adding an IP alias
/etc/sysconfig/vz-scripts/vz-net_add
The vz-net_add script is called by vzctl(8). The script can be any executable file and is usually a shell script.
This script adds source routing for given IP, by executing command "/sbin/ip route add addr dev venet0 src srcaddr", where addr is IP address given, and srcaddr is first local non-loopback address.
Also, it adds public ARP records for given IP on all interfaces excluding those with LOOPBACK or NOARP flags set. It does so with the command "/sbin/ip neigh add proxy addr dev device", where addr is IP address and device is network interface device name (like eth0).
Parameters are passed to the script in the form of environment variables. The following variables can be defined:
VEID |
Numeric id of CT. | ||
IP_ADDR |
IP address(es) to add as an alias to CT. Several addresses are divided by space. | ||
VE_STATE |
This (optional) variable is telling the state of CT and can be one of the following: running, starting, stopping, stopped. |
The script is expected to return 0 on success, any other return code will be printed by vzctl.
vzctl(8).
Copyright (c) 1999-2015 Parallels IP Holdings GmbH. All rights reserved.