From e6fa446b198b73a4a8274cad842984e4ba969fd7 Mon Sep 17 00:00:00 2001 From: David Tomaschik Date: Mon, 26 Dec 2016 21:13:51 -0800 Subject: [PATCH] Script to switch virtualization hypervisors. --- bin/switch_virt.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 bin/switch_virt.sh diff --git a/bin/switch_virt.sh b/bin/switch_virt.sh new file mode 100755 index 0000000..ae2173f --- /dev/null +++ b/bin/switch_virt.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +if [ "$1" -eq "kvm" ] ; then + /etc/init.d/virtualbox stop + modprobe kvm + modprobe kvm_intel +elif [ "$1" -eq "vbox" ] ; then + rmmod kvm_intel + rmmod kvm + /etc/init.d/virtualbox start +else + echo 'WTF?' >&2 +fi