OpenVZ Forum


Home » Mailing lists » Users » Creating more permanent veth`s
Creating more permanent veth`s [message #14278] Thu, 21 June 2007 09:55 Go to next message
Macka Radek is currently offline  Macka Radek
Messages: 2
Registered: June 2007
Junior Member
Hi all,

Did anyone fight the same thing as me?
I am doing some tests before any real consolidation. I need more
permanent veth in one VPS machine. I have followed how&to in your wiki
http://wiki.openvz.org/Virtual_Ethernet_device but with no sucess. It
seems there is problem in script /usr/sbin/vznetaddoute in line
VZHOSTIF=`echo $NETIF |sed 's/^.*host_ifname=\(.*\),.*$/\1/g'`
I am not able to resolve what author of the script wants use as
VZHOSTIF.

I would like to add that normal configuration one time configguration on
VPS is working.

Do someone has working this script on Debian etch, 2.6.18 distrib kernel
with openvz patch applied?

Thanks for any help

BR
--------------------------------------------------------
Radek Macka
Re: Creating more permanent veth`s [message #14283 is a reply to message #14278] Thu, 21 June 2007 13:21 Go to previous messageGo to next message
Gregor Mosheh is currently offline  Gregor Mosheh
Messages: 62
Registered: April 2007
Member
Macka Radek wrote:
> I have followed how&to in your wiki
> http://wiki.openvz.org/Virtual_Ethernet_device but with no sucess. It
> seems there is problem in script /usr/sbin/vznetaddoute in line
> VZHOSTIF=`echo $NETIF |sed 's/^.*host_ifname=\(.*\),.*$/\1/g'`
> I am not able to resolve what author of the script wants use as
> VZHOSTIF.

Hi, Macka. You're in luck; I wrote that new script, and it works for me.
This is under FC6, not Debian, but that shouldn't make a difference.

The vznetaddroute script checks the VE's conf file for the NETIF line,
which should be very similar to this except for the MACS:
NETIF=" ifname=eth0,mac=00:18:51:D2:F4:A5,host_ifname=veth12.0,host_ mac=00:18:51:1F:70:28 "

The VZHOSTIF is the device name given as host_ifname in that string,
see? In this case, veth12.0 Personally, I've found it a very handy
practice to always keep the ifname the same as the VEID, e.g. veth1.0
for VE 1, veth72.0 for VE 72, and so on. But that's up to you.


If your VE's conf is missing tyhat NETIF line line, you probably didn't
add a veth to it in the first place, so do this:
vzctl set $VEID --save --netif_add eth0
And then don't forget to add the two new lines to the config, manually:
CONFIG_CUSTOMIZED="yes"
VETH_IP_ADDRESS="12.34.56.78"


Let us know if you need more help!

--
Gregor Mosheh / Greg Allensworth
System Administrator, HostGIS cartographic development & hosting services
http://www.HostGIS.com/

"Remember that no one cares if you can back up,
only if you can restore." - AMANDA
RE: Creating more permanent veth`s [message #14284 is a reply to message #14283] Thu, 21 June 2007 14:23 Go to previous message
Macka Radek is currently offline  Macka Radek
Messages: 2
Registered: June 2007
Junior Member
Hi Gregor,

> The vznetaddroute script checks the VE's conf file for the NETIF line,
> which should be very similar to this except for the MACS:
>
NETIF=" ifname=eth0,mac=00:18:51:D2:F4:A5,host_ifname=veth12.0,host_ mac=0
0:
> 18:51:1F:70:28"

Thanks - it gives me a sense, I did not find NETIF syntax in vzctl man
so it was little bit confusing for me.

> The VZHOSTIF is the device name given as host_ifname in that string,
> see? In this case, veth12.0 Personally, I've found it a very handy
> practice to always keep the ifname the same as the VEID, e.g. veth1.0
> for VE 1, veth72.0 for VE 72, and so on. But that's up to you.

Great, now I am sure what kind of interface it is. After few hours of
testing I am little bit confused resoluting between VE0, VHOST, VE, VPS
etc. :-)

Many thanks for making me clear, I think in debian it will be the
same...I hope it`ll work.

Bye
Previous Topic: rhel 3 and other 2.4 kernel based distros
Next Topic: Quota Problem
Goto Forum:
  


Current Time: Tue Dec 06 13:10:36 GMT 2022

Total time taken to generate the page: 0.02003 seconds