vz-net_add(5)
| vz-net_add(5) | File Formats Manual | vz-net_add(5) |
NAME
vz-net_add - Container's script for adding an IP alias
SYNOPSIS
/usr/share/libvzctl/scripts/vz-net_add
DESCRIPTION
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).
OPTIONS
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.
DIAGNOSTICS
The script is expected to return 0 on success, any other return code will be printed by vzctl.
SEE ALSO
COPYRIGHT
Copyright (c) 1999-2017, Parallels International GmbH. All rights reserved. Copyright (c) 2017-2019 Virtuozzo International GmbH. All rights reserved.
| October 2009 | OpenVZ |
