fix: Do not use virtualization with KVM (#4)
This commit is contained in:
parent
d4feec5a06
commit
6877761cd1
2 changed files with 2 additions and 1 deletions
|
@ -11,7 +11,7 @@ MON_OPTS="-monitor $MONITOR"
|
||||||
USB_OPTS="-device $USB -device usb-kbd -device usb-tablet"
|
USB_OPTS="-device $USB -device usb-kbd -device usb-tablet"
|
||||||
RAM_OPTS=$(echo "-m $RAM_SIZE" | sed 's/MB/M/g;s/GB/G/g;s/TB/T/g')
|
RAM_OPTS=$(echo "-m $RAM_SIZE" | sed 's/MB/M/g;s/GB/G/g;s/TB/T/g')
|
||||||
CPU_OPTS="-cpu $CPU_FLAGS -smp $CPU_CORES,sockets=1,dies=1,cores=$CPU_CORES,threads=1"
|
CPU_OPTS="-cpu $CPU_FLAGS -smp $CPU_CORES,sockets=1,dies=1,cores=$CPU_CORES,threads=1"
|
||||||
MAC_OPTS="-machine type=${MACHINE},virtualization=true,dump-guest-core=off${KVM_OPTS}"
|
MAC_OPTS="-machine type=${MACHINE},dump-guest-core=off${KVM_OPTS}"
|
||||||
DEV_OPTS="-device virtio-balloon-pci,id=balloon0,bus=pcie.0,addr=0x4"
|
DEV_OPTS="-device virtio-balloon-pci,id=balloon0,bus=pcie.0,addr=0x4"
|
||||||
DEV_OPTS="$DEV_OPTS -object rng-random,id=objrng0,filename=/dev/urandom"
|
DEV_OPTS="$DEV_OPTS -object rng-random,id=objrng0,filename=/dev/urandom"
|
||||||
DEV_OPTS="$DEV_OPTS -device virtio-rng-pci,rng=objrng0,id=rng0,bus=pcie.0,addr=0x1c"
|
DEV_OPTS="$DEV_OPTS -device virtio-rng-pci,rng=objrng0,id=rng0,bus=pcie.0,addr=0x1c"
|
||||||
|
|
|
@ -45,6 +45,7 @@ else
|
||||||
|
|
||||||
KVM_OPTS=""
|
KVM_OPTS=""
|
||||||
CPU_FEATURES=""
|
CPU_FEATURES=""
|
||||||
|
MACHINE="$MACHINE,virtualization=on"
|
||||||
|
|
||||||
if [[ "${CPU_MODEL,,}" == "host"* ]]; then
|
if [[ "${CPU_MODEL,,}" == "host"* ]]; then
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue