Commit c4be9e57 authored by Chong Gu's avatar Chong Gu Committed by Commit Bot

[Fuchsia] Improve error messaging for kvm.

Add instructions for when access to kvm is denied.

Change-Id: Ie3d4b5f8a172212bdda1177b04ea80076cbe5588
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2347165
Commit-Queue: Chong Gu <chonggu@google.com>
Reviewed-by: default avatarWez <wez@chromium.org>
Cr-Commit-Position: refs/heads/master@{#797843}
parent 76a78002
...@@ -56,7 +56,13 @@ class QemuTarget(emu_target.EmuTarget): ...@@ -56,7 +56,13 @@ class QemuTarget(emu_target.EmuTarget):
return True return True
elif self._require_kvm: elif self._require_kvm:
if same_arch: if same_arch:
raise FuchsiaTargetException('KVM required but unavailable.') if not os.path.exists('/dev/kvm'):
kvm_error = 'File /dev/kvm does not exist. Please install KVM first.'
else:
kvm_error = 'To use KVM acceleration, add user to the kvm group '\
'through editing /etc/groups. Log out and back in for '\
'the change to take effect.'
raise FuchsiaTargetException(kvm_error)
else: else:
raise FuchsiaTargetException('KVM unavailable when CPU architecture of'\ raise FuchsiaTargetException('KVM unavailable when CPU architecture of'\
' host is different from that of target.') ' host is different from that of target.')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment