OpenVZ Forum


Home » Mailing lists » Users » Networking problem inside a openvz virtual machine
Networking problem inside a openvz virtual machine [message #30998] Thu, 12 June 2008 10:15 Go to next message
misch is currently offline  misch
Messages: 3
Registered: April 2008
Junior Member
Hi,

I want to setup a Linux-HA cluster inside a vitual openvz machine. Due to the 
nature of openvz virtual machines I have a problem with IP address resources.

Let me explain the problem: Inside openvz virtual machine there are two 
different network devices venet and veth.

As far as I understood the documentation, using venet devices you cannot 
change the ip address inside the virtual machine. So no chance to set up a 
cluster using IPaddr2 resource the easy way. So no chance to let heartbeat 
control the IP adress here.I have a ugly workaround, but  that is not the 
topic here.

Using veth device you can change the IP address inside the virtual machine. 
But  you have to set up proxy arp on the host machine and also the host has 
to know about routing to that machine. If the IP address resource inside the 
virtual machine is moved away to an other virtual machine located on the same 
host or another one, the original host will still advertise its MAC address 
for the vitual IP adress of the cluster and will route the packets to the 
virtual machine not serving the IP address any more.

Did I understand OpenVZ documentation right?
Is there any way out of this dilemma using heartbeat inside openvz vitual 
machines?

Greetings,

-- 
Dr. Michael Schwartzkopff
MultiNET Services GmbH
Addresse: Bretonischer Ring 7; 85630 Grasbrunn; Germany
Tel: +49 - 89 - 45 69 11 0
Fax: +49 - 89 - 45 69 11 21
mob: +49 - 174 - 343 28 75

mail: misch@multinet.de
web: www.multinet.de

Sitz der Gesellschaft: 85630 Grasbrunn
Registergericht: Amtsgericht München HRB 114375
Geschäftsführer: Günter Jurgeneit, Hubert Martens

---

PGP Fingerprint: F919 3919 FF12 ED5A 2801 DEA6 AA77 57A4 EDD8 979B
Skype: misch42
Re: Networking problem inside a openvz virtual machine [message #31000 is a reply to message #30998] Thu, 12 June 2008 10:49 Go to previous message
kfh is currently offline  kfh
Messages: 28
Registered: October 2006
Junior Member
On Thursday den 12. June 2008 12:15:24 Michael Schwartzkopff wrote:
> Hi,
>
> I want to setup a Linux-HA cluster inside a vitual openvz machine. Due to
> the nature of openvz virtual machines I have a problem with IP address
> resources.
>
> Let me explain the problem: Inside openvz virtual machine there are two
> different network devices venet and veth.
>
> As far as I understood the documentation, using venet devices you cannot
> change the ip address inside the virtual machine. So no chance to set up a
> cluster using IPaddr2 resource the easy way. So no chance to let heartbeat
> control the IP adress here.I have a ugly workaround, but  that is not the
> topic here.
>
> Using veth device you can change the IP address inside the virtual machine.
> But  you have to set up proxy arp on the host machine and also the host has
> to know about routing to that machine.

I don't use HA nor venet, but anyway...
I setup bridge (br0) in VE0, and attach physical network adapter to it.

When I start a VE (ID: 1000), I create a veth pair.
In VE0 called ve1000.0 and in VE1000 called eth0.

I attach ve1000.0 to br0 in script pointed to by EXTERNAL_SCRIPT= 
in /etc/vz/vznet.conf
Then there is no need for proxy arp.

The VE itself configures the IP address on eth0.

> If the IP address resource inside 
> the virtual machine is moved away to an other virtual machine located on
> the same host or another one, the original host will still advertise its
> MAC address for the vitual IP adress of the cluster and will route the
> packets to the virtual machine not serving the IP address any more.
>
> Did I understand OpenVZ documentation right?
> Is there any way out of this dilemma using heartbeat inside openvz vitual
> machines?

I assume you can create secondary IP address on eth0 in VE1000.

> Greetings,

Good luck,
Kristian Høgh
Previous Topic: rPath or Foresight?
Next Topic: iosched question
Goto Forum:
  


Current Time: Mon Jul 15 12:41:54 GMT 2024

Total time taken to generate the page: 0.02366 seconds