Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with OpenID
Advertise on

In this Discussion

OpenVZ venet0 question

OpenVZ venet0 question

gbshousegbshouse Member, Provider
edited July 2012 in General

Quick question to OpenVZ experts - is it possible to rename venet0 to eth0 (on VM without node access)? Percona Cluster doesn't like OpenVZ interface naming convention :( Cheers


  • DamianDamian Member

    Can you use veth instead? You could potentially alias veth to eth.

  • jarlandjarland Member, Super Moderator, Provider, Community Advisor

    Short answer is no. If your provider uses veth instead of venet you gain some freedom here. I'm sure there's a creative workaround but my brain is failing.

    MXroute E-mail Hosting | Follow us on Twitter for early Black Friday deals!

  • JacobJacob Member

    venet to eth, no not possible, but you can route it to a different network device for sure.

  • gbshousegbshouse Member, Provider

    @Damian - there is hard coded regex for ethX @Jacob - I was thinking about creating TAP interface but I'm not sure can I name it eth0

  • Don't you have the source of this software? If yes - just edit the regex and generally search and replace eth with venet.

  • What a dumb software then. What if I have a "wlan1", or an "ath0"? I am dissappointed.

    Thanked by 1MrAndroid
  • There is also the ifrename program, but i have no idea if it would work inside an OpenVZ container.

  • gbshousegbshouse Member, Provider

    @rds100 - in theory I've an access to source code (Percona Xtradb Cluster) but I don't want to use custom compiled binaries on production systems (see one of my previous post regarding MySQL issues). The bug is:

    WSREP: Failed to read output of: '/sbin/ifconfig | grep -m1 -1 -E '^[a-z]?eth[0-9]' | tail -n 1 | awk '{ print $2 }' | awk -F : '{ print $2 }'' [Warning] WSREP: Failed to autoguess base node address [Note] WSREP: Service disconnected. [Note] WSREP: Some threads may fail to exit.

    so in theory veth0 should work. I need to ask the provider what kind of interfaces do they support.

  • jarlandjarland Member, Super Moderator, Provider, Community Advisor

    Might be a good time to consider the possibility that KVM would be a better investment for you. KVM options are getting close in price to OpenVZ lately around here, as I'm sure you've noticed as well.

    MXroute E-mail Hosting | Follow us on Twitter for early Black Friday deals!

  • gbshousegbshouse Member, Provider

    @jarland - all current servers are running on Xen/KVM but I want to add new server in New Zealand and the only good budget provider there is running OpenVZ

  • @gbshouse you can trick it, but it's ugly. Since the program is calling grep without the full path, you can do export PATH=/mybin:$PATH and then start the program. Then place your own grep binary (or shell script) in /mybin/grep which detects if it is called with these parameters and if so - prints what is necessary to trick this program into thinking there is eth0. If your grep replacement is not called with these paraments, it can just exec /bin/grep $*

  • @gbshouse I hate to bump an old thread, but I've found a solution to this issue, and this thread is on the first page of Google for "openvz percona cluster", so hopefully this will be useful to someone who stumbles across this. You need to set the following parameters in your my.cnf file (replace with your server's IP):

    wsrep_node_incoming_address= wsrep_node_address=

    Percona only falls back to trying to guess the IP address if you don't have these set.

  • gbshousegbshouse Member, Provider

    @NickM - thanks :) we have moved from Percona to our own custom solution but it's good to know. I just do not like any errors and warnings on (almost) production systems.

Sign In or Register to comment.