vmm: Only build a new VM when booting it

In order to support further use cases where a VM configuration could be
modified through the HTTP API, we only store the passed VM config when
being asked to create a VM. The actual creation will happen when booting
a new config for the first time.

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

View File

@@ -52,6 +52,12 @@ pub enum ApiError {
/// The VM could not boot.
VmBoot(VmError),
/// The VM is already created.
VmAlreadyCreated,
/// The VM config is missing.
VmMissingConfig,
/// The VM could not shutdown.
VmShutdown(VmError),