Howdy, Stranger!

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


Delimiter Xen HVM node and failover IPs.
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Delimiter Xen HVM node and failover IPs.

KupolKupol Member

Hello mates,

I would need help from some Xen master with setting up failover IPs for domU on Delimiter dedicated server.

It seems I will have to use the routed method as the particular IPs didn't come with any virtual MAC address so I can't simply use the vif-bridge script and add virtual MAC to the vif setting.

Here is my vif setting for particular domU.

vif = [ 'script=vif-route,ip=66.66.66.60/32,gatewaydev=eth0,type=ioemu,model=e1000,rate=500Mb/s' ]

If I understand vif-route script correctly it should automatically add the static routes for the ip on the dom0. But it doesn't as the VM fails to start after issuing of

xl create /etc/xen/test.hvm.cfg

It throws up these errors.

libxl: error: libxl_exec.c:118:libxl_report_child_exitstatus: /etc/xen/scripts/vif-route online [-1] exited with error status 2
libxl: error: libxl_create.c:1226:domcreate_attach_vtpms: unable to add nic devices
libxl: error: libxl_exec.c:118:libxl_report_child_exitstatus: /etc/xen/scripts/vif-route offline [-1] exited with error status 2
libxl: error: libxl_exec.c:118:libxl_report_child_exitstatus: /etc/xen/scripts/vif-route remove [-1] exited with error status 2

When I modify the vif-route script to log what it does I get these errors.

/etc/xen/scripts/vif-route: line 59: unexpected EOF while looking for matching `"'
/etc/xen/scripts/vif-route: line 63: syntax error: unexpected end of file
/etc/xen/scripts/vif-route: line 59: unexpected EOF while looking for matching `"'
/etc/xen/scripts/vif-route: line 63: syntax error: unexpected end of file

I would appreciate if someone could point me to the right directions.

Comments

  • timnboystimnboys Member
    edited May 2015

    Yes First there is no virtual mac limits you are thinking too much of ovh delimiter doesn't care about your virtual mac hence you didn't get one so first of all please revert your xen scripts back to normal and second use the free virtualizor panel please it makes your life a lot easier as I use it and still use it as it makes administration easy. and finally don't think of how ovh does it on delimiter; delimiter isn't as strict as ovh you don't have to put any virtual mac's in it just flows through. if you want I will help you over my remote support software to show you how to configure this as it is just simple install xen and be done don't modify any of the scripts because the default works it just goes through no issue unlike on ovh.

  • KupolKupol Member
    edited May 2015

    @timnboys

    Hey man, thanks for some points. I know the network is different, if I may know, could you post your network config of one domU?

    What do you set as Gateway on domU, if I understand correctly the GW should be the dom0 IP as all traffic goes through it with failover IPs. But the problem is my failover IP is 199.XXX.XXX.XXX/32 and the dom0 IP is 107.XXX.XXX.XXX, so they are on different subnets.

    if I manually try to setup the route in domU and route it via the failover IP it says 'Cannot connect to the network'.

    Here relevant part of my ifcfg-eth0 from domU.

    BOOTPROTO=static
    IPADDR=199.XXX.XXX.XXX
    NETMASK=255.255.255.255
    GATEWAY=107.XXX.XXX.XXX
    

    The gw never get sets by the script as it's in different subnet.

    EDIT: Above config is with vif-bridge script enabled on domU as per @timnboys recommendation.

  • timnboystimnboys Member
    edited May 2015

    yes well you need a /29 subnet or /28 subnet from delimiter as I ran aground with the same issues you are having and delimiter support probably thought I was dumb asking them why it didn't work and they told me that I had to route the /32's myself or get the /28 or /29 subnet for them to do the routing.
    so I just ended up getting the /29 subnet and later getting the /28 subnet that I have now.
    as it was easier to get the /29 or /28 subnet from them and let them do the routing besides me learning everything to do with iptables and everything else trying to route the /32 single ip's

  • /etc/xen/scripts/vif-route: line 59: unexpected EOF while looking for matching `"'

    That looks like you've made a mistake in the file.

    Post the file to a paste site

  • KupolKupol Member
    edited May 2015

    @timnboys
    This is why you use routed setup instead of bridged setup as the vif-route should setup static routes on dom0 for you, then you can simply add the failover IPs on your domU and it works fine.

    @MarkTurner
    vif-route script is the default one that comes from the repo after installing Xen. My modifications to the script was just adding few commands to enable better error logging as the default log doesn't say much. Here it is anyway.
    These lines were added by me:

    exec 1>>/tmp/vif-route.log
            exec 2>&1
            echo "$0 $@ at `date`
            set -x
    

    Here is the whole script. http://privatepaste.com/96d95b10dc

  • MarkTurnerMarkTurner Member
    edited May 2015

    You missed a " at the end of that echo:


    exec 1>>/tmp/vif-route.log
    exec 2>&1
    echo "$0 $@ at `date`*****"*****
    set -x
    Thanked by 1Kupol
  • timnboystimnboys Member
    edited May 2015

    @Kupol said:
    timnboys
    This is why you use routed setup instead of bridged setup as the vif-route should setup static routes on dom0 for you, then you can simply add the failover IPs on your domU and it works fine.

    MarkTurner
    vif-route script is the default one that comes from the repo after installing Xen. My modifications to the script was just adding few commands to enable better error logging as the default log doesn't say much. Here it is anyway.
    These lines were added by me:

    > exec 1>>/tmp/vif-route.log
    >         exec 2>&1
    >         echo "$0 $@ at `date`
    >         set -x
    > 

    Here is the whole script. http://privatepaste.com/1dc81de91f

    No I got a /28 subnet from delimiter originally a /29 subnet and put it inside virtualizor as gateway they give you, netmask 255.255.255.240(/28 subnet) /29 subnet is 255.255.255.248, ip range start, ip range stop.
    and don't click any routed, nat, etc option in virtualizor
    and click add.
    maybe if I gave you a screenshot of my virtualizor admin panel where I have this setup it would help you but I refuse to give out in public as it has my valid ip information in it.

  • KupolKupol Member
    edited May 2015

    @MarkTurner
    Oh man thank you for pointing this out for me. Now the routed setup with failover IPs work like charm.

    I've edited the config for my domU, I guess I had some problems with my nic drivers? With this setting the domU gets booted and vif-route setups static routes for me.

    vif = [ 'mac=00:16:3E:D7:C7:11,type=vif,model=e1000,script=vif-route,ip=199.XXX.XXX.XXX/32' ]
    

    Note the difference between type=ioemu and vif.

    Then on the domU you just setup the network like this.

    IPADDR=FAILOVER_IP
    NETMASK=255.255.255.255
    GATEWAY=FAILOVER_IP
    

    @timnboys
    I'm not using any panel. Thanks for the help tho.

  • @Kupol said:
    MarkTurner
    Oh man thank you for pointing this out for me. Now the routed setup with failover IPs work like charm.

    I've edited the config for my domU, I guess I had some problems with my nic drivers? With this setting the domU gets booted and vif-route setups static routes for me.

    > vif = [ 'mac=00:16:3E:D7:C7:11,type=vif,model=e1000,script=vif-route,ip=199.XXX.XXX.XXX/32' ]
    > 

    Note the difference between type=ioemu and vif.

    Then on the domU you just setup the network like this.

    > IPADDR=FAILOVER_IP
    > NETMASK=255.255.255.255
    > GATEWAY=FAILOVER_IP
    > 

    timnboys
    I'm not using any panel. Thanks for the help tho.

    Glad you got it working, I wasn't able to pull that off when I started so I just paid extra for a /28 subnet.

Sign In or Register to comment.