mirror of
https://github.com/flatcar/scripts.git
synced 2025-11-29 14:31:46 +01:00
Look for both kvm and qemu-kvm.
BUG=None TEST=manual, rename kvm to qemu-kvm, else run it on a gentoo host. Change-Id: I4971336a1be4c07fe2c8799643f52cd094d5caf1 Reviewed-on: https://gerrit.chromium.org/gerrit/32093 Tested-by: Brian Harring <ferringb@chromium.org> Reviewed-by: Mike Frysinger <vapier@chromium.org> Commit-Ready: Brian Harring <ferringb@chromium.org>
This commit is contained in:
parent
710e7e9697
commit
fd8a8ee7f6
@ -15,6 +15,12 @@ DEFINE_string vnc "" "VNC Server to display to instead of SDL."
|
|||||||
KVM_PID_FILE=/tmp/kvm.$$.pid
|
KVM_PID_FILE=/tmp/kvm.$$.pid
|
||||||
LIVE_VM_IMAGE=
|
LIVE_VM_IMAGE=
|
||||||
|
|
||||||
|
if ! KVM_BINARY=$(which kvm 2> /dev/null); then
|
||||||
|
if ! KVM_BINARY=$(which qemu-kvm 2> /dev/null); then
|
||||||
|
die "no kvm binary found"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
get_pid() {
|
get_pid() {
|
||||||
sudo cat "${KVM_PID_FILE}"
|
sudo cat "${KVM_PID_FILE}"
|
||||||
}
|
}
|
||||||
@ -89,7 +95,7 @@ start_kvm() {
|
|||||||
cache_type="unsafe"
|
cache_type="unsafe"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sudo kvm -m 2G \
|
sudo "${KVM_BINARY}" -m 2G \
|
||||||
-smp 4 \
|
-smp 4 \
|
||||||
-vga std \
|
-vga std \
|
||||||
-pidfile "${KVM_PID_FILE}" \
|
-pidfile "${KVM_PID_FILE}" \
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user