Skip to contentSkip to conversation

converting gatewaydev= from domU.cfg to libvirt.xml fails

DISCUSSION Jim Fehlig 2 participants 2 messages Apr 17, 2015 – Apr 18, 2015 2 messages not in the archive

lore
Share & tools
lore

Jim Fehlig

author
#1 lore raw
In reply to a message not in the archive
Quoted 16 lines · Olaf Hering

How should this be converted?

/etc/init.d/boot.local
tap=xentap
tunctl -pt ${tap}
ip addr add 1.1.1.1/29 dev ${tap}
ip link set up dev ${tap}

domU.cfg
vif=[ 'mac=00:16:3e:13:01:00,ip=1.1.1.2,type=vif,gatewaydev=xentap,script=vif-route' ]

The result from "convert-xml xen-xl domU,cfg" is:

Quoted 7 lines
     <interface type='ethernet'>
       <mac address='00:16:3e:13:01:00'/>
       <ip address='1.1.1.2' family='ipv4'/>
       <script path='vif-route'/>
     </interface>

gatewaydev= is missing, the guest will not start.

libvirt doesn't support 'gatewaydev'. I'm certainly no expert in this area, but is it possible to convert your host config in boot.local to a libvirt routed network [1] and then have the guest use it with something like

<interface type='network'>

    <source network='boot.local.equiv'/>
    ...

</interface>

Regards,
Jim

[1] http://libvirt.org/formatnetwork.html#examplesRoute

#3 lore raw
In reply to a message not in the archive
Quoted 25 lines · Jim Fehlig
Quoted 16 lines · Olaf Hering

How should this be converted?

/etc/init.d/boot.local
tap=xentap
tunctl -pt ${tap}
ip addr add 1.1.1.1/29 dev ${tap}
ip link set up dev ${tap}

domU.cfg
vif=[ 'mac=00:16:3e:13:01:00,ip=1.1.1.2,type=vif,gatewaydev=xentap,script=vif-route' ]

The result from "convert-xml xen-xl domU,cfg" is:

Quoted 7 lines
    <interface type='ethernet'>
      <mac address='00:16:3e:13:01:00'/>
      <ip address='1.1.1.2' family='ipv4'/>
      <script path='vif-route'/>
    </interface>

gatewaydev= is missing, the guest will not start.

Quoted 8 lines

libvirt doesn't support 'gatewaydev'. I'm certainly no expert in this area, but is it possible to convert your host config in boot.local to a libvirt routed network [1] and then have the guest use it with something like

<interface type='network'>

    <source network='boot.local.equiv'/>
    ...

</interface>

I will have to check how this is supposed to work, but it seems the xen-xl to xml converter should recognize this variant.

Olaf