mirror of
https://github.com/aljazceru/kata-containers.git
synced 2025-12-18 23:04:20 +01:00
runtime-rs: bring support for legacy vsock device.
Bring support for legacy vsock and add Vsock to the ResourceConfig enum type, and add the processing flow of the Vsock device to the prepare_before_start_vm function. Fixes: #8474 Signed-off-by: alex.lyn <alex.lyn@antgroup.com>
This commit is contained in:
@@ -17,7 +17,7 @@ pub mod manager;
|
||||
mod manager_inner;
|
||||
pub mod network;
|
||||
pub mod resource_persist;
|
||||
use hypervisor::{BlockConfig, HybridVsockConfig};
|
||||
use hypervisor::{BlockConfig, HybridVsockConfig, VsockConfig};
|
||||
use network::NetworkConfig;
|
||||
pub mod rootfs;
|
||||
pub mod share_fs;
|
||||
@@ -33,6 +33,7 @@ pub enum ResourceConfig {
|
||||
ShareFs(SharedFsInfo),
|
||||
VmRootfs(BlockConfig),
|
||||
HybridVsock(HybridVsockConfig),
|
||||
Vsock(VsockConfig),
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq)]
|
||||
|
||||
@@ -134,6 +134,11 @@ impl ResourceManagerInner {
|
||||
.await
|
||||
.context("do handle hybrid-vsock device failed.")?;
|
||||
}
|
||||
ResourceConfig::Vsock(v) => {
|
||||
do_handle_device(&self.device_manager, &DeviceConfig::VsockCfg(v))
|
||||
.await
|
||||
.context("do handle vsock device failed.")?;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user