Welcome to Eric Hameleers (Alien BOB)'s Wiki pages.

If you want to support my work, please consider a small donation:

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

slackware:vde [2006/04/12 12:07]
alien
slackware:vde [2007/11/30 21:42] (current)
alien fix qemu 'macaddr' syntax; fix rc.vdenetwork script
Line 120: Line 120:
 /etc/rc.d/rc.vdenetwork start /etc/rc.d/rc.vdenetwork start
 </code> We're all set! It is time to start your QEMU session and see if it all works as expected! I have provided another script in the [[#example_scripts | last section]] of this article as an example of how to run QEMU and have it using VDE for the networking. </code> We're all set! It is time to start your QEMU session and see if it all works as expected! I have provided another script in the [[#example_scripts | last section]] of this article as an example of how to run QEMU and have it using VDE for the networking.
 +
  
  
Line 174: Line 175:
         echo -n "Starting VDE network for QEMU: "         echo -n "Starting VDE network for QEMU: "
  
-        # If we are running 2.6, load tun module +        # Load tun module 
-        if uname -r | grep '^2.6'; then +        /sbin/modprobe tun 2>/dev/null 
-          /sbin/modprobe tun 2>/dev/null +        # Wait for the module to be loaded 
-          # Wait for the module to be loaded +        while ! /bin/lsmod |grep -q "^tun"; do echo Waiting for tun device;sleep 1; done
-          while ! /bin/lsmod |grep -q "^tun"; do echo Waiting for tun device;sleep 1; done +
-        fi+
  
         # Start tap switch         # Start tap switch
Line 230: Line 229:
         # Remove the control socket         # Remove the control socket
         rm -f /tmp/vde.*         rm -f /tmp/vde.*
 +        rmdir /var/run/vde.ctl
         # Stop dnsmasq         # Stop dnsmasq
         pgrep -f dnsmasq | xargs kill -TERM         pgrep -f dnsmasq | xargs kill -TERM
Line 237: Line 237:
   restart|reload)   restart|reload)
         $0 stop         $0 stop
 +        sleep 1
         $0 start         $0 start
         ;;         ;;
Line 272: Line 273:
  
 # This command returns to the command prompt immediately, # This command returns to the command prompt immediately,
-#   and QEMU's error output is redirected to files+#   and QEMU's (erroroutput is redirected to logfiles
-vdeqemu -net vde,vlan=0 -net nic,vlan=0,macaddr 52:54:00:00:EE:02 -m 256 -localtime -soundhw all -hda winxp.img -cdrom ${ISODIR}/winxp_pro_us.iso  1>winxp.log 2>winxp.err ${PARAMS} &+vdeqemu -net vde,vlan=0 -net nic,vlan=0,macaddr=52:54:00:00:EE:02 -m 256 -localtime -soundhw all -hda winxp.img -cdrom ${ISODIR}/winxp_pro_us.iso  1>winxp.log 2>winxp.err ${PARAMS} &
 </code> </code>

Personal Tools
sponsoring