OpenVZ Forum


Home » General » Support » VE networking question
Re: VE networking question [message #32700 is a reply to message #32693] Mon, 25 August 2008 03:30 Go to previous messageGo to previous message
satimis is currently offline  satimis
Messages: 39
Registered: August 2008
Member
piavlo wrote on Mon, 25 August 2008 04:33

Did you actually change $CTID to $VEID in you script?
3.0.22 is the latest versionb available at http://wiki.openvz.org/Download/utils and it works with $VEID
If it does not work put set -x at the beginning of your EXTERNAL_SCRIPT and see where exactly is the problem first occurs.
And don't just try someone's script, unless you understand exactly for which setup it was written (my was given only as example without describing my network setup).


Hi piavlo,


I also tried the external scrip here including yours.

From record;


[HN]# vzctl stop 101
Stopping VE ...
VE was stopped
VE is unmounted



The external script;

[HN]# cat /usr/sbin/vznetaddbr
#!/bin/bash
# /usr/sbin/vznetaddbr
# a script to add virtual network interfaces (veth's) in a CT to a bridge on CT0

CONFIGFILE=/etc/vz/conf/$VEID.conf
. $CONFIGFILE
VZHOSTIF=`echo $NETIF |sed 's/^.*host_ifname=\(.*\),.*$/\1/g'`

if [ ! -n "$VZHOSTIF" ]; then
   echo "According to $CONFIGFILE CT$VEID has no veth interface configured."
   exit 1
fi

if [ ! -n "$VZHOSTBR" ]; then
   echo "According to $CONFIGFILE CT$VEID has no bridge interface configured."
   exit 1
fi

echo "Adding interface $VZHOSTIF to bridge $VZHOSTBR on CT0 for CT$VEID"
/sbin/ifconfig $VZHOSTIF 0
echo 1 > /proc/sys/net/ipv4/conf/$VZHOSTIF/proxy_arp
echo 1 > /proc/sys/net/ipv4/conf/$VZHOSTIF/forwarding
/usr/sbin/brctl addif $VZHOSTBR $VZHOSTIF

exit 0



[HN]# vzctl start 101
Starting VE ...
VE is mounted
Setting CPU units: 1000
Configure meminfo: 65536
Set hostname: satimis-desktop32
File resolv.conf was modified
Configure veth devices: veth101.0 
/usr/sbin/vznetcfg: 20: source: not found
VE start in progress...


Same error "/usr/sbin/vznetcfg: 20: source: not found"


[HN]# brctl show
bridge name	bridge id		STP enabled	interfaces
br0		8000.000ea6f9a35b	no		eth0



Put "set -x" on /etc/vz/vznet.conf

[HN]# cat /etc/vz/vznet.conf
#!/bin/bash
set -x
EXTERNAL_SCRIPT="/usr/sbin/vznetaddbr"



[HN]# vzctl start 101
Starting VE ...
VE is mounted
Setting CPU units: 1000
Configure meminfo: 65536
Set hostname: satimis-desktop32
File resolv.conf was modified
Configure veth devices: veth101.0 
/usr/sbin/vznetcfg: 20: source: not found
VE start in progress...

Same output as abovementioned.


Following thread is relevent to my problem;
http://www.proxmox.com/forum/showthread.php?t=423

I use bridge NOT venet. Unfortunately the thread was discontinued. Neither can I figure out how to "delete the assigned IP address (Virtual Network Addresses (venet)) and click save. now you can select bridge." as "tom" mentioned on the thread.


B.R.
satimis
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: What control panel for testing server.
Next Topic: which ve's start on machine boot
Goto Forum:
  


Current Time: Fri Sep 27 09:22:03 GMT 2024

Total time taken to generate the page: 0.04363 seconds