From 8dd80d558697430a6bdc5c526f6814c216e8112a Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Fri, 22 Mar 2019 16:56:45 -0400 Subject: [PATCH] Use KVM with FreeBSD image --- images/freebsd/functions | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/images/freebsd/functions b/images/freebsd/functions index 9b9b6b5..d9ee206 100644 --- a/images/freebsd/functions +++ b/images/freebsd/functions @@ -10,8 +10,13 @@ boot() { fi qemu=qemu-system-x86_64 #_boot $(cpu_opts x86_64) - # -cpu host doesn't work on AMD, kvm is not supported on freebsd - _boot -cpu qemu64 + # -cpu host doesn't work on AMD + if [ "$(uname -m)" = "$1" ] && [ -e /dev/kvm ] + then + _boot -cpu qemu64 -enable-kvm + else + _boot -cpu qemu64 + fi } install() { -- 2.38.5