diff --git a/src/runtime-rs/crates/runtimes/virt_container/src/sandbox.rs b/src/runtime-rs/crates/runtimes/virt_container/src/sandbox.rs index 3d8926018a..6f572083a6 100644 --- a/src/runtime-rs/crates/runtimes/virt_container/src/sandbox.rs +++ b/src/runtime-rs/crates/runtimes/virt_container/src/sandbox.rs @@ -17,10 +17,11 @@ use common::message::{Action, Message}; use common::{Sandbox, SandboxNetworkEnv}; use containerd_shim_protos::events::task::TaskOOM; use hypervisor::VsockConfig; -use hypervisor::{BlockConfig, Hypervisor}; #[cfg(not(target_arch = "s390x"))] use hypervisor::{dragonball::Dragonball, HYPERVISOR_DRAGONBALL}; +use hypervisor::{qemu::Qemu, HYPERVISOR_QEMU}; use hypervisor::{utils::get_hvsock_path, HybridVsockConfig, DEFAULT_GUEST_VSOCK_CID}; +use hypervisor::{BlockConfig, Hypervisor}; use kata_sys_util::hooks::HookStates; use kata_types::capabilities::CapabilityBits; use kata_types::config::TomlConfig; @@ -588,7 +589,14 @@ impl Persist for VirtSandbox { let hypervisor = match h.hypervisor_type.as_str() { // TODO support other hypervisors #[cfg(not(target_arch = "s390x"))] - HYPERVISOR_DRAGONBALL => Ok(Arc::new(Dragonball::restore((), h).await?)), + HYPERVISOR_DRAGONBALL => { + let hypervisor = Arc::new(Dragonball::restore((), h).await?) as Arc; + Ok(hypervisor) + } + HYPERVISOR_QEMU => { + let hypervisor = Arc::new(Qemu::restore((), h).await?) as Arc; + Ok(hypervisor) + } _ => Err(anyhow!("Unsupported hypervisor {}", &h.hypervisor_type)), }?; let agent = Arc::new(KataAgent::new(kata_types::config::Agent::default()));