aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2017-10-07 16:52:55 -0300
committerSilvio Rhatto <rhatto@riseup.net>2017-10-07 16:52:55 -0300
commit1dd527fd5f68b1661aa73fdd2a2e3396ee666381 (patch)
treee0c273b517823922e01fefa5b8d383f6327e1d2a
parent3a0a0b17af88c5d8b33c09acb2154045bf2a25af (diff)
downloadkvmx-1dd527fd5f68b1661aa73fdd2a2e3396ee666381.tar.gz
kvmx-1dd527fd5f68b1661aa73fdd2a2e3396ee666381.tar.bz2
Adds drive_interface config
-rwxr-xr-xkvmx6
-rw-r--r--kvmxfile4
2 files changed, 9 insertions, 1 deletions
diff --git a/kvmx b/kvmx
index 64746a3..a17b7d2 100755
--- 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 \
diff --git a/kvmxfile b/kvmxfile
index 703e88a..c8bc80d 100644
--- 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"