/lxc/doc/ |
H A D | lxc.container.conf | 7 # The network has several of kind of configuration: 9 # * veth : the network will use the veth virtual device, the specified 11 # * macvlan : the network will use the macvlan device, the specified link 13 # * phys : the network will use a physical network device, the specified 15 lxc.network.type = macvlan 17 # specify the flags to be used for the network, actually only <up> is allowed 18 # which mean the network should be set up when created. If the network is set 20 lxc.network [all...] |
/lxc/hooks/ |
H A D | clonehostname | 22 $LXC_ROOTFS_MOUNT/etc/sysconfig/network \ 23 $LXC_ROOTFS_MOUNT/etc/sysconfig/network-scripts/ifcfg-* \
|
/lxc/src/tests/ |
H A D | lxc-test-createconfig | 37 lxc.network.type = veth 38 lxc.network.hwaddr = 00:16:3e:xx:xx:xx
|
H A D | lxc-test-cloneconfig | 51 verify_unchanged_number lxc.network.type "network defs" 55 verify_unchanged_number lxc.network.hwaddr "hwaddr defs" 56 grep ^lxc.network.hwaddr $CONTAINER_PATH/config | while read line; do 83 lxc.network.type = veth 84 lxc.network.link = lxcbr0 89 lxc.network.type = veth 90 lxc.network.link = lxcbr0 95 lxc.network.type = veth 96 lxc.network [all...] |
H A D | lxc-test-apparmor-mount | 103 lxc.network.type = veth 104 lxc.network.link = lxcbr0
|
H A D | lxc-test-unpriv | 119 lxc.network.type = veth 120 lxc.network.link = lxcbr0
|
H A D | lxc-test-usernic.in | 83 lxc.network.type = empty
|
/lxc/templates/ |
H A D | lxc-openmandriva.in | 57 mkdir -p ${rootfs_path}/etc/sysconfig/network-scripts/ 59 # configure the network using the dhcp 60 cat <<EOF > ${rootfs_path}/etc/sysconfig/network-scripts/ifcfg-eth0 69 cat <<EOF > ${rootfs_path}/etc/sysconfig/network 241 lxc.network.type = $lxc_network_type 242 lxc.network.flags = up 243 lxc.network.link = $lxc_network_link 244 lxc.network.name = eth0 245 lxc.network.mtu = 1500 249 lxc.network [all...] |
H A D | lxc-altlinux.in | 92 cat <<EOF > ${rootfs_path}/etc/sysconfig/network 111 for service in network syslogd random NetworkManager 279 #lxc.network.type = $lxc_network_type 280 #lxc.network.flags = up 281 #lxc.network.link = $lxc_network_link 282 #lxc.network.name = veth0 283 #lxc.network.mtu = 1500 287 lxc.network.ipv4 = $ipv4 292 lxc.network.ipv4.gateway = $gw 297 lxc.network [all...] |
H A D | lxc-sshd.in | 46 $rootfs/etc/sysconfig/network-scripts \ 152 if [ -d /etc/sysconfig/network-scripts ]; then 154 lxc.mount.entry = /etc/sysconfig/network-scripts etc/sysconfig/network-scripts none ro,bind 0 0 165 grep -q "^lxc.network.ipv4" $path/config || touch $rootfs/run-dhcp
|
H A D | lxc-download.in | 528 ## Extract all the network config entries 529 sed -i -e "/lxc.network/{w ${LXC_PATH}/config-network" -e "d}" \ 552 ## Re-add the previously removed network config 553 if [ -e "${LXC_PATH}/config-network" ]; then 556 cat ${LXC_PATH}/config-network >> ${LXC_PATH}/config 557 rm ${LXC_PATH}/config-network
|
H A D | lxc-oracle.in | 201 sed -i 's|-f /proc/sys/net/ipv4/ip_forward|-w /proc/sys/net/ipv4/ip_forward|' $container_rootfs/etc/rc.d/init.d/network 202 sed -i 's|-f /proc/sys/net/ipv4/ip_always_defrag|-w /proc/sys/net/ipv4/ip_always_defrag|' $container_rootfs/etc/rc.d/init.d/network 206 rm -f $container_rootfs/etc/sysconfig/network-scripts/init.ipv6-global 230 sed -i 's|action $"Setting network parameters|# LXC action $"Setting network parameters|' $container_rootfs/etc/init.d/network 2>/dev/null 231 sed -i 's|action $"Setting network parameters|# LXC action $"Setting network parameters|' $container_rootfs/etc/init.d/NetworkManager 2>/dev/null 329 # configure the network to use dhcp. we set DHCP_HOSTNAME so the guest 331 cat <<EOF > $container_rootfs/etc/sysconfig/network [all...] |
H A D | lxc-fedora.in | 223 # configure the network using the dhcp 224 cat <<EOF > ${rootfs_path}/etc/sysconfig/network-scripts/ifcfg-eth0 236 cat <<EOF > ${rootfs_path}/etc/sysconfig/network 326 # legacy chkconfig command to enable the network startup 328 chroot ${rootfs_path} chkconfig network on 352 chroot ${rootfs_path} chkconfig network on 1107 if [[ "${KEY}" != "lxc.network.hwaddr" ]] 1111 if [[ "${KEY}" == "lxc.network.link" ]] 1113 echo "lxc.network.hwaddr = $(create_hwaddr)" >> $config_path/config 1136 #lxc.network [all...] |
H A D | lxc-sparclinux.in | 130 rm -f $container_rootfs/etc/sysconfig/network-scripts/init.ipv6-global 204 # configure the network to use dhcp. we set DHCP_HOSTNAME so the guest 206 cat <<EOF > $container_rootfs/etc/sysconfig/network-scripts/ifcfg-eth0 216 cat <<EOF > $container_rootfs/etc/sysconfig/network 328 # see if the default network settings were already specified 329 lxc_network_type=`grep '^lxc.network.type' $cfg_dir/config | awk -F'[= \t]+' '{ print $2 }'` 331 echo "lxc.network.type = veth" >>$cfg_dir/config 335 lxc_network_link=`grep '^lxc.network.link' $cfg_dir/config | awk -F'[= \t]+' '{ print $2 }'` 337 echo "lxc.network.link = lxcbr0" >>$cfg_dir/config 341 lxc_network_hwaddr=`grep '^lxc.network [all...] |
H A D | lxc-centos.in | 248 # configure the network using the dhcp 249 cat <<EOF > ${rootfs_path}/etc/sysconfig/network-scripts/ifcfg-eth0 261 cat <<EOF > ${rootfs_path}/etc/sysconfig/network 389 chroot ${rootfs_path} chkconfig network on 608 if [[ "${KEY}" != "lxc.network.hwaddr" ]] 612 if [[ "${KEY}" == "lxc.network.link" ]] 614 echo "lxc.network.hwaddr = $(create_hwaddr)" >> $config_path/config 637 #lxc.network.type = $lxc_network_type 638 #lxc.network.flags = up 639 #lxc.network [all...] |
H A D | lxc-ubuntu.in | 94 # configure the network using the dhcp 95 cat <<EOF > $rootfs/etc/network/interfaces 96 # This file describes the network interfaces available on your system 99 # The loopback network interface 200 # A function to try and autodetect squid-deb-proxy servers on the local network 504 # if there is exactly one veth network entry, make sure it has an 506 nics=`grep -e '^lxc\.network\.type[ \t]*=[ \t]*veth' $path/config | wc -l` 508 grep -q "^lxc.network.hwaddr" $path/config || sed -i -e "/^lxc\.network\.type[ \t]*=[ \t]*veth/a lxc.network [all...] |
H A D | lxc-alpine.in | 343 cat <<-EOF > etc/network/interfaces 502 The installed system is preconfigured for a loopback and single network
|
H A D | lxc-gentoo.in | 514 #let's do some drity bash things to parse lxc network conf 520 if [[ "${key}" == "lxc.network.type" ]]; then 538 if [[ "${key}" == "lxc.network.hwaddr" ]]; then 542 if [[ "${key}" =~ ^lxc.network.ipv(4|6) ]]; then 546 if [[ "${key}" =~ ^lxc.network.name ]]; then 562 printf "container_net(): setting container network conf... \n" 564 #Analyse network configuration in config 571 # provision of the 'net' dep. If we do not, network dependent services 583 store_user_message "No network interface for this container 586 lxc.network [all...] |
H A D | lxc-ubuntu-cloud.in | 61 # if there is exactly one veth network entry, make sure it has an 63 nics=`grep -e '^lxc\.network\.type[ \t]*=[ \t]*veth' $path/config | wc -l` 65 grep -q "^lxc.network.hwaddr" $path/config || sed -i -e "/^lxc\.network\.type[ \t]*=[ \t]*veth/a lxc.network.hwaddr = 00:16:3e:$(openssl rand -hex 3| sed 's/\(..\)/\1:/g; s/.$//')" $path/config 69 ## Relocate all the network config entries 70 sed -i -e "/lxc.network/{w ${path}/config-network" -e "d}" $path/config 98 ## Re-add the previously removed network config 101 cat $path/config-network >> [all...] |
/lxc/src/lxc/ |
H A D | confile.c | 49 #include "network.h" 149 { "lxc.network.type", config_network_type }, 150 { "lxc.network.flags", config_network_flags }, 151 { "lxc.network.link", config_network_link }, 152 { "lxc.network.name", config_network_name }, 153 { "lxc.network.macvlan.mode", config_network_macvlan_mode }, 154 { "lxc.network.veth.pair", config_network_veth_pair }, 155 { "lxc.network.script.up", config_network_script_up }, 156 { "lxc.network.script.down", config_network_script_down }, 157 { "lxc.network 410 struct lxc_list *network = &lxc_conf->network; local 492 get_netdev_from_key(const char *key, struct lxc_list *network) argument 554 network_netdev(const char *key, const char *value, struct lxc_list *network) argument [all...] |
H A D | start.c | 662 static inline int count_veths(struct lxc_list *network) argument 668 lxc_list_for_each(iterator, network) { 677 static int read_unpriv_netifindex(struct lxc_list *network) argument 684 lxc_list_for_each(iterator, network) { 754 if (read_unpriv_netifindex(&handler->conf->network) < 0) 964 lxc_list_for_each(iterator, &conf->network) { 1082 if (!lxc_list_empty(&handler->conf->network)) { 1086 * before creating network interfaces, since goto 1099 ERROR("Failed to create the network."); 1139 if (am_unpriv() && (nveths = count_veths(&handler->conf->network))) { [all...] |
H A D | conf.c | 87 #include "network.h" 2340 /* empty network namespace */ 2418 /* set the network device up */ 2429 /* the network is up, make the loopback up too */ 2516 static int setup_network(struct lxc_list *network) argument 2521 lxc_list_for_each(iterator, network) { 2531 if (!lxc_list_empty(network)) 2532 INFO("network has been setup"); 2615 lxc_list_init(&new->network); 2978 struct lxc_list *network local 3002 struct lxc_list *network = &handler->conf->network; local 3033 struct lxc_list *network = &handler->conf->network; local 3216 lxc_assign_network(const char *lxcpath, char *lxcname, struct lxc_list *network, pid_t pid) argument 3491 struct lxc_list *network = &handler->conf->network; local [all...] |
H A D | conf.h | 60 * @mask : network mask 77 * @mask : network mask 113 * Defines a structure to configure a network device 114 * @link : lxc.network.link, name of bridge or host iface to attach if any 115 * @name : lxc.network.name, name of iface on the container side 116 * @flags : flag of the network device (IFF_UP, ... ) 117 * @ipv4 : a list of ipv4 addresses to be set on the network device 118 * @ipv6 : a list of ipv6 addresses to be set on the network device 271 * @network : network configuratio 304 struct lxc_list network; member in struct:lxc_conf [all...] |
H A D | criu.c | 45 #include "network.h" 485 additional = lxc_list_len(&opts->c->lxc_conf->network) * 2; 492 lxc_list_for_each(it, &opts->c->lxc_conf->network) { 555 ERROR("unexpected network type %d", n->type); 729 lxc_list_for_each(it, &c->lxc_conf->network) { 738 ERROR("Found un-dumpable network: %s (%s)", lxc_net_type_to_str(n->type), n->name); 754 lxc_list_for_each(it, &c->lxc_conf->network) { 814 ERROR("failed restoring network info");
|
/lxc/src/python-lxc/examples/ |
H A D | api_test.py | 93 assert("name" in container.get_keys("lxc.network.0")) 94 assert(len(container.network) == 1)
|