xen/vif-route-ifup.patch
Charles Arnold 800917b5a2 - bnc#717650 - Unable to start VM
- Update to Xen 4.1.2_rc2 c/s 23152

- bnc#716695 - domUs using tap devices will not start
  updated multi-xvdp.patch

- Upstream patches from Jan
  23803-intel-pmu-models.patch
  23800-x86_64-guest-addr-range.patch
  23795-intel-ich10-quirk.patch
  23804-x86-IPI-counts.patch 

- bnc#706106 - Inconsistent reporting of VM names during migration
  xend-migration-domname-fix.patch

- bnc#712823 - L3:Xen guest does not start reliable when rebooted
  xend-vcpu-affinity-fix.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=143
2011-09-15 21:43:21 +00:00

90 lines
3.2 KiB
Diff

---
tools/examples/xend-config.sxp | 20 ++++++++++++++++++++
tools/hotplug/Linux/Makefile | 2 +-
tools/hotplug/Linux/vif-route-ifup | 34 ++++++++++++++++++++++++++++++++++
3 files changed, 55 insertions(+), 1 deletion(-)
Index: xen-4.1.2-testing/tools/examples/xend-config.sxp
===================================================================
--- xen-4.1.2-testing.orig/tools/examples/xend-config.sxp
+++ xen-4.1.2-testing/tools/examples/xend-config.sxp
@@ -200,6 +200,26 @@
#(network-script network-route)
#(vif-script vif-route)
+# SuSE users note:
+# If using a routed network configuration it is advised to NOT use
+# network-route and vif-route scripts but instead use sysconfig scripts
+# in dom0 and vif-route-ifup script to "connect" the domU vif to dom0.
+# Since this configuration requires a vif sysconfig script in dom0, a static
+# vif name must be used. E.g. in dom0 the vif sysconfig script
+# (/etc/sysconfig/network/ifcfg-xen1.0) may contain
+#
+# NAME='XEN vm 1 virtual interface 0'
+# BOOTPROTO='static'
+# STARTMODE='hotplug'
+# ...
+#
+# The corresponding domain vif configuration would contain e.g.
+# vif=[ 'mac=00:16:3e:aa:bb:cc,script=vif-route-ifup,vifname=xen1.0', ]
+#
+# If the vif-route-ifup script will be used for all domains, it can be
+# set here as the default vif script, alleviating the need for
+# 'script=' in domain vif configuration.
+#(vif-script vif-route-ifup)
## Use the following if network traffic is routed with NAT, as an alternative
# to the settings for bridged networking given above.
Index: xen-4.1.2-testing/tools/hotplug/Linux/Makefile
===================================================================
--- xen-4.1.2-testing.orig/tools/hotplug/Linux/Makefile
+++ xen-4.1.2-testing/tools/hotplug/Linux/Makefile
@@ -11,7 +11,7 @@ XENCOMMONS_SYSCONFIG = init.d/sysconfig.
# Xen script dir and scripts to go there.
XEN_SCRIPTS = network-bridge vif-bridge
-XEN_SCRIPTS += network-route vif-route
+XEN_SCRIPTS += network-route vif-route vif-route-ifup
XEN_SCRIPTS += network-nat vif-nat
XEN_SCRIPTS += vif2
XEN_SCRIPTS += vif-setup
Index: xen-4.1.2-testing/tools/hotplug/Linux/vif-route-ifup
===================================================================
--- /dev/null
+++ xen-4.1.2-testing/tools/hotplug/Linux/vif-route-ifup
@@ -0,0 +1,34 @@
+#!/bin/bash
+#============================================================================
+# /etc/xen/vif-route-ifup
+#
+# Script for configuring a vif in routed mode.
+# The hotplugging system will call this script if it is specified either in
+# the device configuration given to Xend, or the default Xend configuration
+# in /etc/xen/xend-config.sxp. If the script is specified in neither of those
+# places, then vif-bridge is the default.
+#
+# Usage:
+# vif-route-ifup (add|remove|online|offline)
+#
+# Environment vars:
+# dev vif interface name (required).
+#============================================================================
+
+dir=$(dirname "$0")
+. "$dir/vif-common.sh"
+
+case "$command" in
+ online)
+ ifup ${dev}
+ ;;
+ offline)
+ do_without_error ifdown ${dev}
+ ;;
+esac
+
+log debug "Successful vif-route-ifup $command for ${dev}."
+if [ "$command" = "online" ]
+then
+ success
+fi