OpenVZ Forum


Home » General » Support » OpenVZ and Debian
OpenVZ and Debian [message #823] Sun, 15 January 2006 22:11 Go to next message
adebisi is currently offline  adebisi
Messages: 18
Registered: January 2006
Location: Italy
Junior Member
Hi all,
i read many many posts about vserver VS OpenVZ so here i am Smile

I would like to try it but i am not able to compile kernel after patch.

I receive a lot of hunks during patching kernel and after make menuconfig when i did make bzImage ld error and die.

I read that kernel patch was tested only on redhat and CENTOS..

There is no way to install OpenVZ on a debian system ?


Thanks in advance
Re: OpenVZ and Debian [message #824 is a reply to message #823] Sun, 15 January 2006 22:31 Go to previous messageGo to next message
Valmont is currently offline  Valmont
Messages: 225
Registered: September 2005
Senior Member
Probably you patch kernel-source of wrong version or it from your distr.

You should get kernel from http://www.kernel.org 2.6.8 )
and apply patch to it, or get already patched, full version from here:
http://download.openvz.org/kernel/022stab061.1/ovzkernel-2.6 .8-022stab061.1.src.rpm


[Updated on: Sun, 15 January 2006 22:31]

Report message to a moderator

Re: OpenVZ and Debian [message #825 is a reply to message #824] Sun, 15 January 2006 23:18 Go to previous messageGo to next message
adebisi is currently offline  adebisi
Messages: 18
Registered: January 2006
Location: Italy
Junior Member
No.
I downloaded 2.6.8 from kernel.org and after applied patch.

Anyway i will try rpm source and let you know.
Re: OpenVZ and Debian [message #826 is a reply to message #825] Mon, 16 January 2006 00:27 Go to previous messageGo to next message
adebisi is currently offline  adebisi
Messages: 18
Registered: January 2006
Location: Italy
Junior Member
My fault.

I downloaded 2.6.0 instead of 2.6.8

I am really sorry to let you loose time about my errors.
Re: OpenVZ and Debian [message #827 is a reply to message #826] Mon, 16 January 2006 02:14 Go to previous messageGo to next message
adebisi is currently offline  adebisi
Messages: 18
Registered: January 2006
Location: Italy
Junior Member
Anyway...

I receive following error when i try to compile module builtin:

kernel/built-in.o(.text+0x25da4): In function `init_ve_proc':
: undefined reference to `proc_fs_type'
kernel/built-in.o(.text+0x2605b): In function `init_ve_devpts':
: undefined reference to `devpts_fs_type'
kernel/built-in.o(.text+0x2610b): In function `init_ve_shmem':
: undefined reference to `tmpfs_fs_type'
kernel/built-in.o(.text+0x261af): In function `init_ve_sysfs':
: undefined reference to `class_obj_subsys'
kernel/built-in.o(.text+0x261c7): In function `init_ve_sysfs':
: undefined reference to `class_obj_subsys'
kernel/built-in.o(.text+0x261cf): In function `init_ve_sysfs':
: undefined reference to `class_obj_subsys'
kernel/built-in.o(.text+0x2621b): In function `init_ve_sysfs':
: undefined reference to `class_subsys'
kernel/built-in.o(.text+0x26233): In function `init_ve_sysfs':
: undefined reference to `class_subsys'
kernel/built-in.o(.text+0x2623b): In function `init_ve_sysfs':
: undefined reference to `class_subsys'
kernel/built-in.o(.text+0x2628b): In function `init_ve_sysfs':
: undefined reference to `net_class'
kernel/built-in.o(.text+0x26292): In function `init_ve_sysfs':
: undefined reference to `net_class'
kernel/built-in.o(.text+0x2629a): In function `init_ve_sysfs':
: undefined reference to `net_class'
make: *** [.tmp_vmlinux1] Error 1

If i try to compile as modules i receive of course another error like undefined symbol and so on..

Where i am wrong ?
Re: OpenVZ and Debian [message #830 is a reply to message #827] Mon, 16 January 2006 05:33 Go to previous messageGo to next message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

First I hope that OpenVZ patch applied well, there was no rejects and so on.

Second, it is hard to tell what's wrong without having your .config. Note that some combinations won't work (see bug #52).

So, you'd better take one of the existing configs from http://download.openvz.org/kernel/current/configs/ and put is as .config to your source tree, then run make oldconfig and compile the kernel as usual. Or check bug #52 for known issues and change config options accordingly.


Kir Kolyshkin
http://static.openvz.org/userbars/openvz-developer.png
Re: OpenVZ and Debian [message #840 is a reply to message #830] Mon, 16 January 2006 13:08 Go to previous messageGo to next message
adebisi is currently offline  adebisi
Messages: 18
Registered: January 2006
Location: Italy
Junior Member
Patch was applied well.
Problem was .config but with your help and after read your instructions everything works now.

Thanks a lot all
Re: OpenVZ and Debian [message #841 is a reply to message #840] Mon, 16 January 2006 13:44 Go to previous messageGo to next message
adebisi is currently offline  adebisi
Messages: 18
Registered: January 2006
Location: Italy
Junior Member
mmm
kernel works but after i install from source vzctl i receive this error when try to start /etc/init.d/vz

/etc/init.d/vz: line 26: /etc/rc.d/init.d/functions: No such file or directory

Anyway i did a find to try where possible file functions is and this are results:

/usr/lib/vzctl/scripts/vps-functions

i need to use this one instead or there is another solution?

I read also this thread:
http://forum.openvz.org/index.php?t=tree&th=184&mid= 822&&rev=&reveal=
but i cant still solve problem.

What do you suggest ?
Re: OpenVZ and Debian [message #842 is a reply to message #841] Mon, 16 January 2006 13:53 Go to previous messageGo to next message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

Debian needs its own init script, since it is not like RedHat or Gentoo. Currently we have one for RedHat-like systems (included into vzctl rpm) and the one for Gentoo systems (available from Gentoo portage).

So it needs to be written...even by you, if you take a look at other scripts from the same directory and see what do they do to print success/error messages and so on. I can definitely help.


Kir Kolyshkin
http://static.openvz.org/userbars/openvz-developer.png
Re: OpenVZ and Debian [message #860 is a reply to message #842] Mon, 16 January 2006 21:25 Go to previous messageGo to next message
adebisi is currently offline  adebisi
Messages: 18
Registered: January 2006
Location: Italy
Junior Member
Ok looklike it works now.

I am actually trying to create a vs debian.

Anyway i had to add following to your init script:

(from functions file taken from redhat 9)

Quote:


#. /etc/rc.d/init.d/functions

action() {
STRING=$1
echo -n "$STRING "
shift
#initlog $INITLOG_ARGS -c "$*" && success $"$STRING" || failure $"$STRING"
rc=$?
echo
return $rc
}

echo_success() {
[ "$BOOTUP" = "color" ] && $MOVE_TO_COL
echo -n "[ "
[ "$BOOTUP" = "color" ] && $SETCOLOR_SUCCESS
echo -n $"OK"
[ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL
echo -n " ]"
echo -ne "\r"
return 0
}

success() {
# if [ -z "${IN_INITLOG:-}" ]; then
# initlog $INITLOG_ARGS -n $0 -s "$1" -e 1
# else
# silly hack to avoid EPIPE killing rc.sysinit
trap "" SIGPIPE
# echo "$0 \"$1\" 1" >&21
trap - SIGPIPE
[ "$BOOTUP" != "verbose" -a -z "$LSB" ] && echo_success
return 0
}
#Disable everywhere initlog command cause i didnt find any #initlog package for debian.



Of course i could also create a file functions with these functions and let your script include it.

I used your binary packages to do that.

So .. i am checking and let you know if it works totally or not.
Re: OpenVZ and Debian [message #861 is a reply to message #860] Mon, 16 January 2006 22:19 Go to previous messageGo to next message
adebisi is currently offline  adebisi
Messages: 18
Registered: January 2006
Location: Italy
Junior Member
So
if i try to include those functions in a file and then include that file in vz init script without comment anything it looklike works fine but..

After deboostrapped and done some configuration like in kir debian template tutorial i receive the following error:

Quote:


vzctl start 777
Starting VPS ...
VPS is mounted
Adding IP address(es): 1.1.1.7
arpsend: unknown iface eth : No such device
vps-net_add WARNING: arpsend -c 1 -w 1 -D -e 1.1.1.7 eth FAILED
RTNETLINK answers: Network is down
vps-net_add ERROR: Unable to add route /sbin/ip route add 1.1.1.7 dev venet0 src 1.1.1.11
VPS start failed
Stopping VPS ...
VPS was stopped
vzquota : (error) Quota off syscall for id 777: Device or resource busy
vzquota setlimit -f failed [3]
VPS is unmounted


Ethernet module or anyway ethernet config has some problem and quota looklike have too.

Checking and checking...

Adding IP address(es): 1.1.1.6
Running: /usr/lib/vzctl/scripts/vps-net_add
arpsend: unknown iface eth : No such device
vps-net_add WARNING: arpsend -c 1 -w 1 -D -e 1.1.1.6 eth FAILED
RTNETLINK answers: Network is down
vps-net_add ERROR: Unable to add route /sbin/ip route add 1.1.1.6 dev venet0 src 1.1.1.11


iface eth ? not eth0 ? help needed :d

[Updated on: Mon, 16 January 2006 22:37]

Report message to a moderator

Re: OpenVZ and Debian [message #863 is a reply to message #861] Tue, 17 January 2006 07:09 Go to previous messageGo to next message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

Can you post the output of '/sbin/ip a l; /sbin/ip r l' here?

Kir Kolyshkin
http://static.openvz.org/userbars/openvz-developer.png
Re: OpenVZ and Debian [message #865 is a reply to message #863] Tue, 17 January 2006 07:59 Go to previous messageGo to next message
adebisi is currently offline  adebisi
Messages: 18
Registered: January 2006
Location: Italy
Junior Member
vps:~# /sbin/ip a l
1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
2: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:13:8f:0c:16:de brd ff:ff:ff:ff:ff:ff
inet 1.1.1.11/28 brd 1.1.1.15 scope global eth0

vps:~# /sbin/ip r l
1.1.1.0/28 dev eth0 proto kernel scope link src 1.1.1.11
default via 1.1.1.14 dev eth0

address and route looklike work well
Re: OpenVZ and Debian [message #866 is a reply to message #865] Tue, 17 January 2006 08:29 Go to previous messageGo to next message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

It looks like venet0 device is not up.

It happened because in the stuff you added to /etc/init.d/vz there is a shell function called 'action' which should execute the command -- and you commented out that actual command execution:

 #initlog $INITLOG_ARGS -c "$*" && success $"$STRING" || failure $"$STRING"


Please put something like this instead of the above line:
$* && success $"$STRING" || failure $"$STRING"


so the actual code passed into the function will be executed.

Alternatively, to set up venet0 device, you have to do the following:
modprobe vznetdev
modprobe vznet
ip link set venet0 up
ip addr add 0.0.0.0/0 dev venet0
sysctl -w net.ipv4.conf.venet0.send_redirects=0


Kir Kolyshkin
http://static.openvz.org/userbars/openvz-developer.png
Re: OpenVZ and Debian [message #869 is a reply to message #866] Tue, 17 January 2006 13:35 Go to previous messageGo to next message
adebisi is currently offline  adebisi
Messages: 18
Registered: January 2006
Location: Italy
Junior Member
it works.

Quote:

Please put something like this instead of the above line:

$* && success $"$STRING" || failure $"$STRING"


I just need this on functions file.


That's my functions file if you need:

Quote:

vps:~# cat /etc/init.d/functions
action() {
STRING=$1
echo -n "$STRING "
shift
$"$STRING"
$* && success $"$STRING" || failure $"$STRING"
rc=$?
echo
return $rc
}

echo_success() {
[ "$BOOTUP" = "color" ] && $MOVE_TO_COL
echo -n "[ "
[ "$BOOTUP" = "color" ] && $SETCOLOR_SUCCESS
echo -n $"OK"
[ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL
echo -n " ]"
echo -ne "\r"
return 0
}

success() {
trap - SIGPIPE
[ "$BOOTUP" != "verbose" -a -z "$LSB" ] && echo_success
return 0
}



Thanks for all!
Re: OpenVZ and Debian [message #870 is a reply to message #866] Tue, 17 January 2006 13:44 Go to previous messageGo to next message
adebisi is currently offline  adebisi
Messages: 18
Registered: January 2006
Location: Italy
Junior Member
Quote:

vps:~# vzctl start 777
Starting VPS ...
Running: /usr/sbin/vzquota show 777
Running: /usr/sbin/vzquota on 777 -r 0 -b 1048676 -B 1153534 -i 200100 -I 220100 -e 0 -n 0 -s 0
Mounting root: /vz/root/777 /vz/private/777
VPS is mounted
Set iptables mask 6079
Running: /usr/sbin/vzquota stat 777 -f
Running: vzquota setlimit 777 -b 1048576 -B 1153434 -i 200000 -I 220000 -e 0 -n 0
Adding IP address(es): 1.1.1.7
Running: /usr/lib/vzctl/scripts/vps-net_add
arpsend: unknown iface eth : No such device
vps-net_add WARNING: arpsend -c 1 -w 1 -D -e 1.1.1.7 eth FAILED
arpsend: unknown iface eth : No such device
vps-net_add WARNING: arpsend -c 1 -w 1 -U -i 1.1.1.7 -e 1.1.1.7 eth FAILED
Running VPS script: /etc/sysconfig/vz-scripts/dists/scripts/debian-add_ip.sh
Setting CPU units: 1000
VPS start in progress...
vps:~#


Vps starts but when i login i am not able to ping or connect to any host.
Quote:


root@vps:/# ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:3 errors:0 dropped:0 overruns:0 frame:0
TX packets:3 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:280 (280.0 b) TX bytes:280 (280.0 b)

venet0 Link encap:UNSPEC HWaddr 00-00-FF-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:127.0.0.1 P-t-P:127.0.0.1 Bcast:0.0.0.0 Mask:255.255.255.255
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:18 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:882 (882.0 b)

venet0:0 Link encap:UNSPEC HWaddr 00-00-FF-FF-FF-FF-00-00-00-00-00-00-00-00-00-00
inet addr:1.1.1.7 P-t-P:1.1.1.7 Bcast:0.0.0.0 Mask:255.255.255.255
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
root@vps:/# route -N
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
191.255.255.1 0.0.0.0 255.255.255.255 UH 0 0 0 venet0
0.0.0.0 191.255.255.1 0.0.0.0 UG 0 0 0 venet0

[Updated on: Tue, 17 January 2006 13:45]

Report message to a moderator

Re: OpenVZ and Debian [message #871 is a reply to message #870] Tue, 17 January 2006 14:23 Go to previous messageGo to next message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

Quote:

Vps starts but when i login i am not able to ping or connect to any host.


First, you should use *real* IP address for you VPS, if you want to be able to access internet from it.

Second, you probably missed setting nameserver inside a VPS.

Quote:

Running: /usr/lib/vzctl/scripts/vps-net_add
arpsend: unknown iface eth : No such device
vps-net_add WARNING: arpsend -c 1 -w 1 -D -e 1.1.1.7 eth FAILED



Can you please execute the following like and post its output here?
. /usr/lib/vzctl/scripts/vps-functions && vzgetnetdev && echo $NETDEVICES


Kir Kolyshkin
http://static.openvz.org/userbars/openvz-developer.png
Re: OpenVZ and Debian [message #872 is a reply to message #823] Tue, 17 January 2006 15:08 Go to previous messageGo to next message
adebisi is currently offline  adebisi
Messages: 18
Registered: January 2006
Location: Italy
Junior Member
Quote:

. /usr/lib/vzctl/scripts/vps-functions && vzgetnetdev && echo $NETDEVICES
eth


Anyway i try to contact ip on my lan such 1.1.1.1 or 1.1.1.14 for example and after i tried to go out just ping ip so i dont need for this dns settings.

Should i enable nat to share connection ?
Re: OpenVZ and Debian [message #873 is a reply to message #872] Tue, 17 January 2006 15:21 Go to previous messageGo to next message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

For the troubleshotting, can you please post the output of these two commands here?

/sbin/ip link list | egrep -v -E 'LOOPBACK|NOARP|SLAVE'

/sbin/ip link list | egrep -v -E 'LOOPBACK|NOARP|SLAVE' | awk '/^[0-9].*:/&&/UP/ {print substr($2, 0, length($2)-1)}'


Kir Kolyshkin
http://static.openvz.org/userbars/openvz-developer.png
Re: OpenVZ and Debian [message #874 is a reply to message #872] Tue, 17 January 2006 15:24 Go to previous messageGo to next message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

It is not clear whether you should use NAT or not - I do not know your network setup...

Some networking problems are caused by the fact that ppl forgot to enable IP forwarding (net.ipv4.ip_forward = 1). For details, see Quick Install document.


Kir Kolyshkin
http://static.openvz.org/userbars/openvz-developer.png
Re: OpenVZ and Debian [message #880 is a reply to message #874] Tue, 17 January 2006 16:03 Go to previous messageGo to next message
adebisi is currently offline  adebisi
Messages: 18
Registered: January 2006
Location: Italy
Junior Member
kir wrote on Tue, 17 January 2006 16:24

It is not clear whether you should use NAT or not - I do not know your network setup...

Some networking problems are caused by the fact that ppl forgot to enable IP forwarding (net.ipv4.ip_forward = 1). For details, see Quick Install document.




My network is:

Private LAN: 1.1.1.0/28
Gateway: 1.1.1.14
OpenVZ: 1.1.1.11
VPS 777: 1.1.1.7
Re: OpenVZ and Debian [message #881 is a reply to message #880] Tue, 17 January 2006 16:08 Go to previous messageGo to next message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

So I assume you use NAT somethere on the gateway...no need to NAT at OpenVZ box then.



Kir Kolyshkin
http://static.openvz.org/userbars/openvz-developer.png
Re: OpenVZ and Debian [message #883 is a reply to message #823] Tue, 17 January 2006 19:31 Go to previous messageGo to next message
adebisi is currently offline  adebisi
Messages: 18
Registered: January 2006
Location: Italy
Junior Member
Quote:

vps:~# /sbin/ip link list | egrep -v -E 'LOOPBACK|NOARP|SLAVE'
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:13:8f:0c:16:de brd ff:ff:ff:ff:ff:ff
link/void
vps:~#
vps:~# /sbin/ip link list | egrep -v -E 'LOOPBACK|NOARP|SLAVE' | awk '/^[0-9].*:/&&/UP/ {print substr($2, 0, length($2)-1)}'
eth


As you can see list link report eth and not eth0 or something like that.
I dont know if it's a problem or not but i can ping and connect to vps server(1.1.1.11) from vps guest(1.1.1.7) but i am not able to reach other host on my lan neither reach internet.
Re: OpenVZ and Debian [message #907 is a reply to message #823] Wed, 18 January 2006 14:15 Go to previous messageGo to next message
adebisi is currently offline  adebisi
Messages: 18
Registered: January 2006
Location: Italy
Junior Member
MMM from that output you can understand what's wrong with networking ?
Re: OpenVZ and Debian [message #912 is a reply to message #907] Wed, 18 January 2006 14:40 Go to previous messageGo to next message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

Sorry I can not undestand your question... Confused

Kir Kolyshkin
http://static.openvz.org/userbars/openvz-developer.png
Re: OpenVZ and Debian [message #923 is a reply to message #907] Wed, 18 January 2006 18:57 Go to previous messageGo to next message
dev is currently offline  dev
Messages: 1693
Registered: September 2005
Location: Moscow
Senior Member

please, check that
cat /proc/sys/net/ipv4/ip_forward
shows you '1', not 0.


http://static.openvz.org/userbars/openvz-developer.png
Re: OpenVZ and Debian [message #925 is a reply to message #823] Wed, 18 January 2006 19:43 Go to previous messageGo to next message
adebisi is currently offline  adebisi
Messages: 18
Registered: January 2006
Location: Italy
Junior Member
Quote:

Adding IP address(es): 1.1.1.8
Running: /usr/lib/vzctl/scripts/vps-net_add
arpsend: unknown iface eth : No such device
vps-net_add WARNING: arpsend -c 1 -w 1 -D -e 1.1.1.8 eth FAILED
arpsend: unknown iface eth : No such device
vps-net_add WARNING: arpsend -c 1 -w 1 -U -i 1.1.1.8 -e 1.1.1.8 eth FAILED
Running VPS script: /etc/sysconfig/vz-scripts/dists/scripts/debian-add_ip.sh
Setting CPU units: 1000
VPS start in progress...


That's what i meaning.

After if i login to vps 777 and do ip addr:

Quote:

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:2 errors:0 dropped:0 overruns:0 frame:0
TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:168 (168.0 b) TX bytes:168 (168.0 b)

venet0 Link encap:UNSPEC HWaddr 00-00-FF-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:127.0.0.1 P-t-P:127.0.0.1 Bcast:0.0.0.0 Mask:255.255.255.255
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:98 (98.0 b)

venet0:0 Link encap:UNSPEC HWaddr 00-00-FF-FF-FF-FF-00-00-00-00-00-00-00-00-00-00
inet addr:1.1.1.8 P-t-P:1.1.1.8 Bcast:0.0.0.0 Mask:255.255.255.255
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1


Outside vps guest this is route:

Quote:

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
1.1.1.8 0.0.0.0 255.255.255.255 UH 0 0 0 venet0
1.1.1.0 0.0.0.0 255.255.255.240 U 0 0 0 eth0
0.0.0.0 1.1.1.14 0.0.0.0 UG 0 0 0 eth0


and this is ip addr output:
Quote:


1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
2: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:13:8f:0c:16:de brd ff:ff:ff:ff:ff:ff
inet 1.1.1.11/28 brd 1.1.1.15 scope global eth0
3: venet0: <BROADCAST,POINTOPOINT,NOARP,UP> mtu 1500 qdisc noqueue
link/void


this is sysctl.conf:

Quote:

#OPENVZ#

# On Hardware Node we generally need
# packet forwarding enabled and proxy arp disabled
net.ipv4.ip_forward = 1
net.ipv4.conf.default.proxy_arp = 0
# Enables source route verification
net.ipv4.conf.all.rp_filter = 1
# Enables the magic-sysrq key
kernel.sysrq = 1
# TCP Explict Congestion Notification
#net.ipv4.tcp_ecn = 0
# we do not want all our interfaces to send redirects
net.ipv4.conf.default.send_redirects = 1
net.ipv4.conf.all.send_redirects = 0


That's all


Where i am wrong ?
Re: OpenVZ and Debian [message #926 is a reply to message #925] Wed, 18 January 2006 20:00 Go to previous messageGo to next message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

Have you actually applied the setting from /etc/sysctl.conf to the running kernel? I.e., what does
cat /proc/sys/net/ipv4/ip_forward
shows you?


Kir Kolyshkin
http://static.openvz.org/userbars/openvz-developer.png
Re: OpenVZ and Debian [message #927 is a reply to message #926] Wed, 18 January 2006 20:27 Go to previous messageGo to next message
adebisi is currently offline  adebisi
Messages: 18
Registered: January 2006
Location: Italy
Junior Member
kir wrote on Wed, 18 January 2006 21:00

Have you actually applied the setting from /etc/sysctl.conf to the running kernel? I.e., what does
cat /proc/sys/net/ipv4/ip_forward
shows you?


1

I verify many times.
Re: OpenVZ and Debian [message #939 is a reply to message #912] Thu, 19 January 2006 17:25 Go to previous messageGo to next message
adebisi is currently offline  adebisi
Messages: 18
Registered: January 2006
Location: Italy
Junior Member
I mean why when i start vps i receive this error?

Quote:

Adding IP address(es): 1.1.1.8
Running: /usr/lib/vzctl/scripts/vps-net_add
arpsend: unknown iface eth : No such device
vps-net_add WARNING: arpsend -c 1 -w 1 -D -e 1.1.1.8 eth FAILED
arpsend: unknown iface eth : No such device
vps-net_add WARNING: arpsend -c 1 -w 1 -U -i 1.1.1.8 -e 1.1.1.8 eth FAILED
Running VPS script: /etc/sysconfig/vz-scripts/dists/scripts/debian-add_ip.sh
Setting CPU units: 1000
VPS start in progress...


Re: OpenVZ and Debian [message #1393 is a reply to message #873] Tue, 07 February 2006 21:06 Go to previous messageGo to next message
phlar is currently offline  phlar
Messages: 2
Registered: February 2006
Junior Member
kir wrote on Tue, 17 January 2006 16:21

For the troubleshotting, can you please post the output of these two commands here?

/sbin/ip link list | egrep -v -E 'LOOPBACK|NOARP|SLAVE'

/sbin/ip link list | egrep -v -E 'LOOPBACK|NOARP|SLAVE' | awk '/^[0-9].*:/&&/UP/ {print substr($2, 0, length($2)-1)}'



The output is eth but it should be eth0.

The solution is to change the awk script that the output is eth0.

/sbin/ip link list | egrep -v -E 'LOOPBACK|NOARP|SLAVE' | awk '/^[0-9].*:/&&/UP/ {print substr($2, 0, length($2))}'


regards
ralph
Re: OpenVZ and Debian [message #1416 is a reply to message #1393] Wed, 08 February 2006 07:18 Go to previous messageGo to next message
kir is currently offline  kir
Messages: 1645
Registered: August 2005
Location: Moscow, Russia
Senior Member

phlar,

The problem is if I execute the command you give on my Fedora Core 4 box, it will give me 'eth0:' i.e. with comma which should be stripped off. Looks like debian awk and fedora core awk do not agree on the syntax of substr.
[kir@kir ~]$ /sbin/ip link list | egrep -v -E 'LOOPBACK|NOARP|SLAVE' | awk '/^[0-9].*:/&&/UP/ {print substr($2, 0, length($2))}'
eth0:


So what I propose is to use this construct:
/sbin/ip link list | egrep -v -E 'LOOPBACK|NOARP|SLAVE' | awk '/^[0-9].*:/&&/UP/ {print $2}' | tr -d ':'


It should work fine everythere


Kir Kolyshkin
http://static.openvz.org/userbars/openvz-developer.png
Re: OpenVZ and Debian [message #1422 is a reply to message #1416] Wed, 08 February 2006 08:41 Go to previous message
phlar is currently offline  phlar
Messages: 2
Registered: February 2006
Junior Member
kir wrote on Wed, 08 February 2006 08:18

phlar,

The problem is if I execute the command you give on my Fedora Core 4 box, it will give me 'eth0:' i.e. with comma which should be stripped off. Looks like debian awk and fedora core awk do not agree on the syntax of substr.


Yes, i suspect that the debian-awk starts not at the index zero. The first position is 1 not 0. And it is possible to start at positions lower than zero. Confused

openvz:~# echo "test"|awk '{print substr($1,1,4)}'
test
openvz:~# echo "test"|awk '{print substr($1,0,4)}'
tes
openvz:~# echo "test"|awk '{print substr($1,-1,4)}'
te
Previous Topic: filesystem: ext2 or ext3?
Next Topic: How does one add GCC to their VPS?
Goto Forum:
  


Current Time: Sun Nov 03 11:11:58 GMT 2024

Total time taken to generate the page: 0.03992 seconds