1

we have this qemu hook. In suse 11 was working well but in suse 12 it is not working. The hook is setting the ports in openvswitch native-untagged. Do you know if there is some libvirt missing configuration in suse 12 for the hook to work? We are using this version of libvirt: libvirtd (libvirt) 1.2.5

Thanks and BR/ Cristina

#!/bin/bash

#/etc/libvirt/hooks/qemu
domain_name="$1"
domain_task="$2"

# Create temporary file to hold the configuration.
guest_cfg=`mktemp`

function cleanup() {
  if [ -n "$guest_cfg" ]; then
   rm -f $guest_cfg
  fi
}

trap cleanup EXIT

function ovs_untag_port() {
  # Read XML configuration on stdin.
  cat - > $guest_cfg
  ifaces=`xpath $guest_cfg         

"count(//devices/interface[@type='network']/target[@dev])" 2>/dev/null`
 for i in `seq 1 $ifaces`; do
 interface=`xpath $guest_cfg "//devices/interface[$i]  

[@type='network']/target[@dev]" 2>/dev/null | cut -d \" -f2`
echo ${interface}
ovs-vsctl set port ${interface} vlan_mode=native-untagged
 done
 cleanup

}


case "${domain_task}" in
  prepare)
    ovs_untag_port
    ;;
  start)
    ;;
  started)
    ovs_untag_port
    ;;
  stopped)
    ;;
  release)
    ;;
  migrate)
    ;;
  restore)
    ;;
  reconnect)
    ;;
  attach)
    ;;
  *)
    exit 0
    echo "qemu hook called with unexpected options $*" >&2
    ;;
esac

exit 0

0

You must log in to answer this question.

Browse other questions tagged .