mirror of
https://github.com/vdsm/virtual-dsm.git
synced 2025-02-24 21:40:01 +08:00
Allow running without KVM in debug mode
This commit is contained in:
parent
e11f9d8f79
commit
a45dffbce1
13
run/run.sh
13
run/run.sh
@ -49,17 +49,22 @@ if [ -e /dev/kvm ] && sh -c 'echo -n > /dev/kvm' &> /dev/null; then
|
||||
fi
|
||||
fi
|
||||
|
||||
[ -z "${KVM_OPTS}" ] && echo "Error: KVM acceleration is disabled.." && exit 88
|
||||
if [ -z "${KVM_OPTS}" ]; then
|
||||
KVM_OPTS="-machine usb=off"
|
||||
if [ "$DEBUG" != "Y" ]; then
|
||||
echo "Error: KVM acceleration is disabled.." && exit 88
|
||||
fi
|
||||
fi
|
||||
|
||||
DEF_OPTS="-nographic"
|
||||
RAM_OPTS=$(echo "-m ${RAM_SIZE}" | sed 's/MB/M/g;s/GB/G/g;s/TB/T/g')
|
||||
CPU_OPTS="-smp ${CPU_CORES},sockets=1,cores=${CPU_CORES},threads=1"
|
||||
EXTRA_OPTS="-device virtio-balloon-pci,id=balloon0,bus=pcie.0,addr=0x4 -object rng-random,id=rng0,filename=/dev/urandom -device virtio-rng-pci,rng=rng0"
|
||||
DEF_OPTS="-nographic -nodefaults -pidfile ${_QEMU_PID} -overcommit mem-lock=off"
|
||||
EXTRA_OPTS="-device virtio-balloon-pci,id=balloon0 -object rng-random,id=rng0,filename=/dev/urandom -device virtio-rng-pci,rng=rng0"
|
||||
ARGS="${DEF_OPTS} ${CPU_OPTS} ${RAM_OPTS} ${KVM_OPTS} ${MON_OPTS} ${SERIAL_OPTS} ${NET_OPTS} ${DISK_OPTS} ${EXTRA_OPTS}"
|
||||
|
||||
set -m
|
||||
(
|
||||
qemu-system-x86_64 ${ARGS} & echo $! > ${_QEMU_PID}
|
||||
qemu-system-x86_64 ${ARGS} &
|
||||
)
|
||||
set +m
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user