drive_interface="virtio"
fi
+ if [ -z "$nic_model" ]; then
+ nic_model="virtio"
+ fi
+
# Run virtual machine
# See https://en.wikipedia.org/wiki/Nohup#Overcoming_hanging
nohup kvm -m $memory -name $VM -drive file=$image,if=$drive_interface $graphics $shared \
-device virtserialport,chardev=spicechannel0,name=com.redhat.spice.0 \
-chardev spicevmc,id=spicechannel0,name=vdagent \
-smp $smp -soundhw ac97 -cpu host -balloon virtio \
- -net nic,model=virtio \
+ -net nic,model=$nic_model \
-net user,hostfwd=tcp:127.0.0.1:$SSH-:22,hostfwd=udp:127.0.0.1:$XDMCP_PORT-:177$hostfwd $qemu_opts &> $LOGFILE < /dev/null &
PID="$!"
fi
SSH="`cat $SSHFILE`"
- $SSH_COMMAND -p $SSH 127.0.0.1 $*
+ TERM=xterm $SSH_COMMAND -p $SSH 127.0.0.1 $*
}
# Suspend the virtual machine