+#!/bin/bash
+
+IP=0.0.0.0
+MONPORT=$(( 8500+${VMID} ))
+VNCPORT=$(( ${VMID} ))
+SERPORT=$(( 9900+${VMID} ))
+TAP_NAME="kvm${VMID}"
+PWD=$( pwd )
+
+if [ -n "$DRIVE2" ] ; then
+ DRIVE2="-drive file=${DRIVE2},if=virtio,cache=none"
+fi
+
+if [ -n "$CORES" ] ; then
+ CORES="-smp cores=$CORES"
+
+fi
+if [ -n "$TABLET" ] ; then
+ TABLET="-usbdevice tablet"
+fi
+
+if [ -z "$VLAN" ] ; then
+ VLAN=0
+fi
+if [ ! -L _run/ifup_br${VLAN} ] ; then
+ pushd _run
+ ln -s ifup_common ifup_br${VLAN}
+ popd
+fi
+
+if [ -z "MACADDR" ] ; then
+ VLANDIGIT=$( echo 'ibase=10;obase=16;'$VLAN | bc)
+ VMDIGIT=$( echo 'ibase=10;obase=16;'$VMID | bc )
+ MACADDR="C0:FF:EE:19:$VLANDIGIT:$VMDIGIT"
+fi