OpenVZ Forum


Home » General » Support » *SOLVED* OpenVZ and bonding
*SOLVED* OpenVZ and bonding [message #13722] Mon, 04 June 2007 12:06 Go to next message
amorsen is currently offline  amorsen
Messages: 10
Registered: June 2007
Junior Member
I have an existing setup with linux-vserver, where a number of vserver guests each run asterisk. Each guest gets its own VLAN, and routing is then done with policy routing in the host (because vserver does not virtualise routing).

In order to ensure that a failed network interface or switch does not cause an outage, the two ethernet ports have been bonded in the host. I would like to make a similar setup with OpenVZ, without having to do policy routing. It is rather easy without bonding: Create eth0.114, add eth0.114 to guest 114, set up routing and ip addresses in the guest. The same setup with bonding does not work (Adding bond0.114 to the guest fails).

I opened bug report 582 about this; unfortunately it turned out to be a missing feature rather than a bug. Vasily Tarasov wrote:

As remember veterans of the project Smile for some reasons it was deliberately prohibited. In fact, if we move bond device to VE, then all devices, that are slave to this bond should be moved too. On VE stop this "device strucure" should be moved back carefully, etc. So quite a lot of things to think about.

I am not sure why it is necessary to move the slave devices to the guest. In the case where there are multiple VLAN's on top of the bonding device, it is impossible to move the slave devices to the guest -- several guests need them.

Anyway, suggestions are welcome. So far the choice seems to be between giving up on the device failover and giving up on OpenVZ for this particular server.

[Updated on: Thu, 14 June 2007 10:37] by Moderator

Report message to a moderator

Re: OpenVZ and bonding [message #13835 is a reply to message #13722] Wed, 06 June 2007 12:48 Go to previous messageGo to next message
Andrey Mirkin is currently offline  Andrey Mirkin
Messages: 193
Registered: May 2006
Senior Member
Well, as I understand you just need a network interface inside VE which is separated from another VE. Right?
Then you just need to create a VE and assign an IP address to venet interface with help of following command:
vzctl set VEID --ipadd IP --save


And you don't need to create vlans at all. Two bonded interfaces will be in host system and you don't need to move them to VE.

Please correct me if I misunderstood your configuration and needs.


Andrey Mirkin
http://static.openvz.org/userbars/openvz-developer.png
Re: OpenVZ and bonding [message #13996 is a reply to message #13835] Sat, 09 June 2007 08:59 Go to previous messageGo to next message
amorsen is currently offline  amorsen
Messages: 10
Registered: June 2007
Junior Member
Unfortunately I need VLAN's. Each VE needs to be on a completely separate network, with different routing. I can do it the linux-vserver way, where I keep all those VLAN's in the host system and just move IP addresses to the VE. Policy routing then sends the traffic in the right directions in the host. This (probably) works, as that is exactly how the server is set up with linux-vserver right now.

It is however very difficult to manage. Only static routing is possible, and all routing changes need to be done in the host, not in the VE. In comparison, we have a router with OpenVZ which provides virtualised routing, complete with BGP. It works very well, but again has the limitation that bonding is not supported.
Re: OpenVZ and bonding [message #14071 is a reply to message #13996] Thu, 14 June 2007 08:51 Go to previous messageGo to next message
Andrey Mirkin is currently offline  Andrey Mirkin
Messages: 193
Registered: May 2006
Senior Member
If you need VLANs in VE then you can do following:
1. Create veth device in VE
2. Create vlan device in VE based on veth device
3. Create bridge in VE0
4. Add veth pair device (in VE0) to bridge
5. Add eth0 device from VE0 to bridge

Now your VE will have VLAN and other VEs will not be able to see traffic from this VE.


Andrey Mirkin
http://static.openvz.org/userbars/openvz-developer.png
Re: OpenVZ and bonding [message #14080 is a reply to message #14071] Thu, 14 June 2007 10:32 Go to previous message
amorsen is currently offline  amorsen
Messages: 10
Registered: June 2007
Junior Member
Thank you for the suggestion Andrey. It is certainly a solution, we might adopt it.
Previous Topic: *SOLVED* another question about privvmpages/oomguarpages
Next Topic: *SOLVED* Kernel crash
Goto Forum:
  


Current Time: Sun Jul 14 20:59:30 GMT 2024

Total time taken to generate the page: 0.02365 seconds