diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2017-10-07 20:41:49 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2017-10-07 20:41:49 -0300 |
commit | 3f6b95913089a72dd1afe98a6d5fed9ea4e7e4de (patch) | |
tree | d40cb3d29e3fa8fef44445e0df8d45a24261db34 | |
parent | 1dd527fd5f68b1661aa73fdd2a2e3396ee666381 (diff) | |
download | kvmx-3f6b95913089a72dd1afe98a6d5fed9ea4e7e4de.tar.gz kvmx-3f6b95913089a72dd1afe98a6d5fed9ea4e7e4de.tar.bz2 |
Adds nic_model config
-rwxr-xr-x | kvmx | 8 | ||||
-rw-r--r-- | kvmxfile | 3 |
2 files changed, 9 insertions, 2 deletions
@@ -357,6 +357,10 @@ function kvmx_up { 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 \ @@ -365,7 +369,7 @@ function kvmx_up { -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="$!" @@ -532,7 +536,7 @@ function kvmx_ssh { 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 @@ -106,3 +106,6 @@ bootloader="grub" # Drive interface # Needed by some systems like NetBSD and FreeBSD #drive_interface="ide" + +# See http://www.reactos.org/wiki/QEMU#Setting_up_network +#nic_model="ne2k_pci" |