This project aims for enabling FCoE over virtio-net. With that we should be able to run FCoE within a KVM guest, and finally have a 'real' FC host in a KVM guest. This should enable 'real' FC testing, like link failure, multipath operations etc.

Looking for hackers with the skills:

Nothing? Add some keywords!

This project is part of:

Hack Week 14

Activity

  • over 8 years ago: michal-m liked this project.
  • over 8 years ago: hreinecke joined this project.
  • over 8 years ago: tsaupe started this project.
  • over 8 years ago: zzhou liked this project.
  • over 8 years ago: a_faerber liked this project.
  • over 8 years ago: hreinecke originated this project.

  • Comments

    • tsaupe
      over 8 years ago by tsaupe | Reply

      Will look into ip routing inside a network bridge to be able to split off fcoe traffic from the vm and send it to a dedicated interface on the host.

    • hreinecke
      over 8 years ago by hreinecke | Reply

      So, after some experimenting I've got it to run (sort of).

      Trick 1: Network configuration. qemu needs to run with a bridge (eg br0). Then you need to create a 'veth' pair, which will be used for the lio FC target interface:

      ip link add dev fcoe0 type veth peer name fcoe1 ip link set addr 0c:fd:37:d4:44:7a dev fcoe0 ip link set addr 0c:fd:37:58:b4:60 dev fcoe1 ip link set fcoe1 master br0 ip link set dev fcoe1 up ip link set dev fcoe0 up

      And you need to enable forwarding, otherwise none of the attached interfaces can see each other:

      sysctl -w net.ipv4.conf.all.forwarding=1

      Then you can use the 'fcoe0' interface for FCoE traffic:

      modprobe fcoe echo fcoe0 > /sys/bus/fcoe/ctlr_create

      Now you need to switch it to VN2VN mode:

      echo vn2vn > /sys/bus/fcoe/devices/ctlr_0/mode

      and start FCoE:

      echo 1 > /sys/bus/fcoe/devices/ctlr_0/enable

    • tsaupe
      over 8 years ago by tsaupe | Reply

      Finally got it also working using this config file on both machines: --<-- kvm200-10:/ # cat /etc/fcoe/cfg-vlan100

      Type: yes/no

      Default: no

      Enable/Disable FCoE service at the Ethernet port

      Normally set to "yes"

      FCOE_ENABLE="yes"

      Type: yes/no

      Default: no

      Indicate if DCB service is required at the Ethernet port

      Normally set to "yes"

      DCB_REQUIRED="no"

      Type: yes/no

      Default: no

      Indicate if VLAN discovery should be handled by fcoemon

      Normally set to "yes"

      AUTO_VLAN="yes"

      Type: fabric/vn2vn

      Default: fabric

      Indicate the mode of the FCoE operation, either fabric or vn2vn

      Normally set to "fabric"

      MODE="vn2vn"

      Type: yes/no

      Default: no

      Indicate whether to run a FIP responder for VLAN discovery in vn2vn mode

      FIP_RESP="yes" -->--

      and this script to setup the lio target:

      -->-- kvm200-10:/ # cat /root/scripts/add-lio-fcoe-device-new.sh

      !/bin/sh

      targetcli tcm_fc/ info

      targetcli backstores/iblock create name=fcoedisk1 dev=/dev/sdb

      targetcli /tcmfc create 20:00:52:54:00:a2:4f:7b targetcli /tcmfc/20:00:52:54:00:a2:4f:7b/luns/ create /backstores/iblock/fcoedisk1 targetcli /tcm_fc/20:00:52:54:00:a2:4f:7b/acls/ create 20:00:52:54:00:9a:f0:d8

      targetcli ls / --<--

    Similar Projects

    This project is one of its kind!