OpenVZ Forum


Home » General » Support » *RESOLVED* veth setup on startup
*RESOLVED* veth setup on startup [message #7294] Tue, 10 October 2006 12:56 Go to next message
sideshowbob is currently offline  sideshowbob
Messages: 3
Registered: October 2006
Junior Member
I'm working on setting up a veth only vps server, running on debian. Following the instructions on the wiki for veth setup, I'm able to get it all working, routing correctly, etc. Now I'm trying to get everything setup automatically at boot and with vzctl start.

I've modified the dists/scripts/debian-add_ip.sh to setup the proper eth0 inside the VE, but I've hit a snag on when to setup the vethX.0 devices in VE0. I don't know if this is by design, but I'm unable to create any vethX.0 devices in VE0 until at least one VE is running. After one is running, I can create all vethX.0 devices I need, but when one isn't running I just get:

# ifconfig veth200.0 0
SIOCSIFADDR: No such device
veth200.0: ERROR while getting interface flags: No such device

The vzethdev module is loaded at all times. I notice that I am able to create the venet interface after loading vznetdev, with no vps running -- but not with veth.

This makes it hard to setup vethX.0 on VE0 in a 200.start script, because it doesn't seem to work until the vps is up, and eth0 is setup within it.

Is there a way to setup vethX.0 interfaces on VE0 before vps start? Or perhaps a better way?

[Updated on: Wed, 11 October 2006 04:51] by Moderator

Report message to a moderator

Re: veth setup on startup [message #7298 is a reply to message #7294] Tue, 10 October 2006 13:35 Go to previous messageGo to next message
dim is currently offline  dim
Messages: 344
Registered: August 2005
Senior Member
Did you check latest vzctl version (3.0.12-1)?
It contains vznetcfg script for veth setup...


http://static.openvz.org/openvz_userbar_en.gif
Re: veth setup on startup [message #7305 is a reply to message #7298] Tue, 10 October 2006 17:16 Go to previous messageGo to next message
sideshowbob is currently offline  sideshowbob
Messages: 3
Registered: October 2006
Junior Member
Thanks for the tip-I hadn't looked at that. (The most recent debian/testing package is 3.0.10-3.) But when I look at the vznetcfg script, it appears to just do

/sbin/ifconfig ${dev} up

along with some usage. I know this already doesn't work for me (unless a vps is running) unless this script is called after the interface is up in the vps? I saw no evidence that the vznetcfg script is called in any rc scripts, unless vzctl itself does??

Is being unable to create the vethX.0 interfaces on VE0 until VE start the correct behavior? If this is the case, I can try to work out some other way... perhaps delaying the creation of vethX.0 in some way?
Re: veth setup on startup [message #7307 is a reply to message #7305] Tue, 10 October 2006 20:15 Go to previous message
sideshowbob is currently offline  sideshowbob
Messages: 3
Registered: October 2006
Junior Member
Looks like I should have tried 3.0.12 before I complained about it Smile It sets up the vethX.0 interfaces correctly. Thanks!
Previous Topic: *SOLVED* Checkpoint dump size 512K
Next Topic: modconf
Goto Forum:
  


Current Time: Sat Nov 02 22:26:56 GMT 2024

Total time taken to generate the page: 0.03500 seconds