]> gitweb.fluxo.info Git - kvmx.git/commitdiff
Adds drive_interface config
authorSilvio Rhatto <rhatto@riseup.net>
Sat, 7 Oct 2017 19:52:55 +0000 (16:52 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Sat, 7 Oct 2017 19:52:55 +0000 (16:52 -0300)
kvmx
kvmxfile

diff --git a/kvmx b/kvmx
index 64746a32e81d50ed2bf09f931db6fb9c7b9d277f..a17b7d27acdda514d15fc273f08daa3cab3d748b 100755 (executable)
--- a/kvmx
+++ b/kvmx
@@ -353,9 +353,13 @@ function kvmx_up {
     smp="2"
   fi
 
+  if [ -z "$drive_interface" ]; then
+    drive_interface="virtio"
+  fi
+
   # Run virtual machine
   # See https://en.wikipedia.org/wiki/Nohup#Overcoming_hanging
-  nohup kvm -m $memory -name $VM -drive file=$image,if=virtio $graphics $shared \
+  nohup kvm -m $memory -name $VM -drive file=$image,if=$drive_interface $graphics $shared \
       -spice port=$PORT,addr=127.0.0.1,disable-ticketing,streaming-video=off,jpeg-wan-compression=never,playback-compression=off,zlib-glz-wan-compression=never,image-compression=off \
       -device virtio-serial-pci \
       -device virtserialport,chardev=spicechannel0,name=com.redhat.spice.0 \
index 703e88a44653a204992350ac6a5e5d6be461b203..c8bc80d3978f1d51e1107163db9d00206fc39f80 100644 (file)
--- a/kvmxfile
+++ b/kvmxfile
@@ -102,3 +102,7 @@ ssh_custom="y"
 
 # Bootloader (used only during bootstrapping by kvmx-create).
 bootloader="grub"
+
+# Drive interface
+# Needed by some systems like NetBSD and FreeBSD
+#drive_interface="ide"