OpenVZ Forum - RDF feed
type: channel
items: Removing venet0 from VE (OpenVZ7 - Virtuozzo Linux 7.2)

Removing venet0 from VE (OpenVZ7 - Virtuozzo Linux 7.2)
type: item
description: Hi community, the article about the network mode "bridged" (https:// docs.openvz.org/openvz_users_guide.webhelp/_bridged_mode_for _containers.html) in the documentation says this mode can only be an addition to the host-routed network. But a VE without a host-routed network is exactly what I want to have. My VEs should have only a bridged interface. So I was able to get rid of venet0 on the physical host and I removed the network "Host-Only". But venet0 still exists in the VE. It seems like no network traffic can go through venet0 on the VE anymore and that's great. But how do I remove the network device of the VE. I really want this net device to disappear. Has someone an idea? This is what I've done to get rid of venet0 on the physical host: 1) I modified /usr/libexec/vz so the function setup_net is looking like this (got the idea from here https://openvz.org/Disable_venet_interface): setup_net() { local hwcsum_set=1 tso_set=1 val local rx=on tx=on sg=on tso=on local ethtool_args= iface_params # We do not want to export the whole config file. eval $(. ${VZCONF} && echo USE_NET_TSO="${USE_NET_TSO}" \ USE_NET_HWCSUM="${USE_NET_HWCSUM}") if [ -n "${VE_ROUTE_SRC_DEV}" ]; then setup_venet fi if [ "${USE_NET_HWCSUM}" = "yes" ]; then ethtool_args="${ethtool_args} rx on tx on sg on" elif [ "${USE_NET_HWCSUM}" = "no" ]; then ethtool_args="${ethtool_args} rx off tx off sg off" else hwcsum_set=0 fi if [ "${USE_NET_TSO}" = "yes" ]; then ethtool_args="${ethtool_args} tso on" elif [ "${USE_NET_TSO}" = "no" ]; then ethtool_args="${ethtool_args} tso off" else tso_set=0 fi if [[ ${hwcsum_set} -eq 0 || ${tso_set} -eq 0 ]]; then # Get minimal common subset of capabilities. for iface in $(get_physical_interfaces); do iface_params=$(ethtool -k "${iface}" | awk ' /^rx-checksumming:/{print "rx", $2}; /^tx-checksumming:/{print "tx", $2}; /^scatter-gather:/{print "sg", $2}; /^tcp-segmentation-offload:/{print "tso", $2}') for param in rx tx sg tso; do val=$(echo "${iface_params}" | awk "/$…
creator: A(r|d)min
date: 2017-02-07T17:03:42-00:00