incubator-tashi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject svn commit: r1338032 - in /incubator/tashi/trunk/doc: INSTALL2 sample.qemu-ifup
Date Mon, 14 May 2012 04:00:25 GMT
Author: stroucki
Date: Mon May 14 04:00:24 2012
New Revision: 1338032

docs: Show how VLANs can be dynamically created and some clutter removed. Fixes TASHI-20.


Modified: incubator/tashi/trunk/doc/INSTALL2
--- incubator/tashi/trunk/doc/INSTALL2 (original)
+++ incubator/tashi/trunk/doc/INSTALL2 Mon May 14 04:00:24 2012
@@ -48,6 +48,16 @@ exit 0
 Note that the entire path of a network connection must be configured to 
 use jumbo frames, if the virtual machines are to use them.
+If you have large numbers of VLANs, and don't want to hardcode them into
+each VM host, you can find a sample qemu-ifup in the doc directory. This
+script will need to be adapted to your local standards by changing the
+basic parameters at the top. This script can then be linked to by the name
+Tashi expects them to have. For example, if you have a VLAN 1001, you will
+create a link from /etc/qemu-ifup.1001 to this script.
+The script will handle the creation of the VM interface, and creation of the
+bridge and VLANs if they haven't been created before.
 ---+ Accounting server
 An accounting server is available in the distribution. It will log 

Added: incubator/tashi/trunk/doc/sample.qemu-ifup
--- incubator/tashi/trunk/doc/sample.qemu-ifup (added)
+++ incubator/tashi/trunk/doc/sample.qemu-ifup Mon May 14 04:00:24 2012
@@ -0,0 +1,51 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+# by Richard Gass and Michael Stroucken
+# Adapt the following two parameters to your installation
+# Uplink interface
+# Prefix for bridge naming
+vlanID=$(echo $0 | awk -F "ifup." '{print $2}')
+#  see if tagged interface exists
+cat /proc/net/vlan/config | grep "${bridgeUplinkIf} "
+if [ $? -gt 0 ];then
+        echo "creating tagged interface"
+        vconfig add ${UPLINKIF} ${vlanID}
+        ip link set ${bridgeUplinkIf} up
+#  Check for the bridge
+brctl show | grep "^${bridgeName}"  
+if [ $? -gt 0 ];then
+        echo "creating bridge interface"
+        brctl addbr ${bridgeName}
+        brctl addif ${bridgeName} ${bridgeUplinkIf}
+        ip link set ${bridgeName} up
+/sbin/ifconfig ${vmIf} up
+/usr/sbin/brctl addif ${bridgeName} ${vmIf}
+exit 0

View raw message