Add $CPU variable to enable guest_os specific tweaks

This commit is contained in:
Martin Wimpress 2020-03-21 15:21:16 +00:00
parent 2dfe88bd5a
commit 061abfe9b5
No known key found for this signature in database
GPG Key ID: 61DF940515E06DA3
1 changed files with 3 additions and 1 deletions

View File

@ -90,6 +90,7 @@ function vm_boot() {
local VMNAME=$(basename ${VM} .conf)
local VMDIR=$(dirname ${disk_img})
local BIOS=""
local CPU="-cpu host,kvm=on"
local VIDEO_DRV=""
local GL="on"
local VIRGL="on"
@ -123,6 +124,7 @@ function vm_boot() {
VIDEO_DRV="virtio-vga"
;;
windows)
CPU="${CPU},hv_time"
VIDEO_DRV="qxl"
;;
*)
@ -268,7 +270,7 @@ function vm_boot() {
${ISO_BOOT} ${ISO_DRIVER} \
-enable-kvm \
-machine q35 \
-cpu host,kvm=on \
${CPU} \
-smp ${CORES_VM} \
-m ${RAM_VM} \
-device virtio-balloon \