]> gitweb.fluxo.info Git - kvmx.git/commitdiff
Adds nic_model config
authorSilvio Rhatto <rhatto@riseup.net>
Sat, 7 Oct 2017 23:41:49 +0000 (20:41 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Sat, 7 Oct 2017 23:41:49 +0000 (20:41 -0300)
kvmx
kvmxfile

diff --git a/kvmx b/kvmx
index a17b7d27acdda514d15fc273f08daa3cab3d748b..8715e95098f446db86d051ea478c763b309cdec3 100755 (executable)
--- a/kvmx
+++ b/kvmx
@@ -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
index c8bc80d3978f1d51e1107163db9d00206fc39f80..31710493608272c2020726aa197fcf73fcdc2f8c 100644 (file)
--- a/kvmxfile
+++ b/kvmxfile
@@ -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"