mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-02-22 19:32:20 +00:00
main: provide a sensible error message when /dev/mshv is missing
Signed-off-by: Wei Liu <liuwe@microsoft.com>
This commit is contained in:
parent
c32959261e
commit
c4f8e4b000
@ -25,7 +25,14 @@ use vmm_sys_util::eventfd::EventFd;
|
||||
enum Error {
|
||||
#[error("Failed to create API EventFd: {0}")]
|
||||
CreateAPIEventFd(#[source] std::io::Error),
|
||||
#[error("Failed to open hypervisor interface (is /dev/kvm available?): {0}")]
|
||||
#[cfg_attr(
|
||||
feature = "kvm",
|
||||
error("Failed to open hypervisor interface (is /dev/kvm available?): {0}")
|
||||
)]
|
||||
#[cfg_attr(
|
||||
feature = "mshv",
|
||||
error("Failed to open hypervisor interface (is /dev/mshv available?): {0}")
|
||||
)]
|
||||
CreateHypervisor(#[source] hypervisor::HypervisorError),
|
||||
#[error("Failed to start the VMM thread: {0}")]
|
||||
StartVMMThread(#[source] vmm::Error),
|
||||
|
Loading…
x
Reference in New Issue
Block a user