echo "running qemu with ssh port $ADMIN_PORT, vnc ID $ID"
VNC_EFFECTIVE_PORT=`expr 5900 + $ID`
echo "see output with vncviewer 127.0.0.1:$VNC_EFFECTIVE_PORT"
- qemu-kvm \
+ model_to_use=${NET_MODEL-e1000}
+ num_interfaces_to_use=${NUM_INTERFACES-2}
+ if [ $num_interfaces_to_use -eq 2 ]; then
+ SECOND_NET_SWITCHES="-net nic,vlan=1,macaddr=$MAC_ADDR,model=$model_to_use \
+ -net socket,vlan=1,mcast=230.0.0.1:1234"
+ else
+ SECOND_NET_SWITCHES=""
+ fi
+ QEMU_VARIANT=${QEMU_VARIANT-qemu-kvm}
+ ${QEMU_VARIANT} \
-daemonize \
-vga std \
-redir tcp:$ADMIN_PORT::22 \
- -vnc 127.0.0.1:$ID \
- -net nic,vlan=0,model=e1000 \
+ -net nic,vlan=0,model=$model_to_use \
-net user,vlan=0,net=10.0.2.0/8,host=10.0.2.2,hostname=vm$ID \
- -net nic,vlan=1,macaddr=$MAC_ADDR,model=e1000 \
- -net socket,vlan=1,mcast=230.0.0.1:1234 \
+ -vnc 127.0.0.1:$ID \
+ $SECOND_NET_SWITCHES \
$NARGS || die "qemu invocation failed."
+ #-sdl -frame \
}
# Tap stuff (currently unused):