wiki:PluggingIn

Version 4 (modified by mikeryan, 12 years ago) (diff)

--

Benito has been designed from the ground up to support multiple virtualization platforms. The interface for plugging new virtualization platform into Benito is described here.

It is useful to refer to BenitoPipeline, as this document will refer to various points in the pipeline where your scripts must be called.

Networking

All networking internal to Benito is done using VDE (Virtual Distributed Ethernet). If your virtualization platform natively supports VDE, your life is relatively easy. If not, plugging in should still be possible.

Networking configuration can be found in the following places:

  • TopDL: IP address, netmask, MAC address, VDE switch/port
  • /var/benito/config/routes/$HOSTNAME: routes

Each interface on the experimental network will be assigned a VDE switch and port number. If your platform supports VDE natively, then you're done!

For platforms that do not have VDE support, TAP support is sufficient. vde_plug2tap acts as an adapter between a VDE switch port and a TAP interface. VDE also comes with vde_tunctl which can create TAP interfaces on the fly to be used by other apps.

The following example illustrates how one might do this with QEMU. QEMU has native VDE support, but we'll assume for a moment that we can't use it.

#!/bin/sh

SWITCH_SOCKET=$1
SWITCH_PORT=$2

vde_tunctl tap0
vde_plug2tap -d -s $SWITCH_SOCKET -p $SWITCH_PORT tap0
qemu -net nic -net tap,ifname=tap0 fs.img

If you don't even have TAP support.. get creative. Chances are if you can talk to a file descriptor pair vde_plug will work for you.

Interface Attributes

The info you care about will be attributes on each interface.

  • ip4_address
  • ip4_netmask
  • benito:mac_address
  • benito:vde_switch (switch socket full path)
  • benito:vde_port (switch port)

Control Net

TODO: info about requesting controlnet interfaces; bridging

File Systems