vmm: Handle the missing VM error

When trying to boot or shut a VM down, return an error if the VM was not
previously created.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
Samuel Ortiz
2019-09-30 16:24:15 +02:00
parent 7e0cb078ed
commit b70344158b
2 changed files with 26 additions and 10 deletions

View File

@@ -58,6 +58,12 @@ pub enum ApiError {
/// The VM config is missing.
VmMissingConfig,
/// The VM is not booted.
VmNotBooted,
/// The VM is not created.
VmNotCreated,
/// The VM could not shutdown.
VmShutdown(VmError),