diff --git a/nlvmi b/nlvmi index 4cda58c..9d486f2 100755 --- a/nlvmi +++ b/nlvmi @@ -134,7 +134,13 @@ function vmstart { USBDEV3=""; fi if [ ${array[23]}!="" ]; then USBDEV3="-usbdevice ${array[22]}"; fi - echo "su ${array[3]} -c \"${array[10]} -enable-kvm -cpu host -m 1024 -smp 2 -boot ${array[5]} $USBDEV1 $USBDEV2 $USBDEV3 -k ${array[24]} -daemonize $DRIVE1 $DRIVE2 $DRIVE3 $CDROM $NETDEV1 $TAPDEV1 $TAPDEV2 $TAPDEV3 $VNCPORT -pidfile $RUNDIRECTORY/${array[1]}.pid -monitor unix:$RUNDIRECTORY/${array[1]}.mon,server,nowait\"" + tunctl -t $TAPDEV1 -u ${array[3]} + brctl addif br0 $TAPDEV1 + ifconfig $TAPDEV1 up + su ${array[3]} -c \"${array[10]} -enable-kvm -cpu host -m 1024 -smp 2 -boot ${array[5]} $USBDEV1 $USBDEV2 $USBDEV3 -k ${array[24]} -daemonize $DRIVE1 $DRIVE2 $DRIVE3 $CDROM $NETDEV1 $TAPDEV1 $TAPDEV2 $TAPDEV3 $VNCPORT -pidfile $RUNDIRECTORY/${array[1]}.pid -monitor unix:$RUNDIRECTORY/${array[1]}.mon,server,nowait\" + + #Set VNC Password + echo "change vnc password ${array[20]}" | socat - unix-connect:$RUNDIRECTORY/${array[1]}.mon >/dev/null done export VMFOUND="yes" }