mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-10-05 21:15:45 +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 {
|
enum Error {
|
||||||
#[error("Failed to create API EventFd: {0}")]
|
#[error("Failed to create API EventFd: {0}")]
|
||||||
CreateAPIEventFd(#[source] std::io::Error),
|
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),
|
CreateHypervisor(#[source] hypervisor::HypervisorError),
|
||||||
#[error("Failed to start the VMM thread: {0}")]
|
#[error("Failed to start the VMM thread: {0}")]
|
||||||
StartVMMThread(#[source] vmm::Error),
|
StartVMMThread(#[source] vmm::Error),
|
||||||
|
Loading…
Reference in New Issue
Block a user