mirror of
https://github.com/kata-containers/kata-containers.git
synced 2026-04-10 22:12:35 +00:00
runtime-rs: Add support for handling vmdk hotplugging with scsi
We should also support virtio-scsi driver for handling vmdk format block device, and this will help address more cases. Signed-off-by: Alex Lyn <alex.lyn@antgroup.com>
This commit is contained in:
@@ -19,7 +19,7 @@ use hypervisor::{
|
||||
device_manager::{do_handle_device, get_block_device_info, DeviceManager},
|
||||
DeviceConfig, DeviceType,
|
||||
},
|
||||
BlockConfig, BlockDeviceAio, BlockDeviceFormat,
|
||||
BlockConfig, BlockDeviceAio, BlockDeviceFormat, KATA_SCSI_DEV_TYPE,
|
||||
};
|
||||
use kata_types::device::{
|
||||
DRIVER_BLK_CCW_TYPE as KATA_CCW_DEV_TYPE, DRIVER_BLK_PCI_TYPE as KATA_BLK_DEV_TYPE,
|
||||
@@ -297,6 +297,13 @@ fn extract_block_device_info(
|
||||
return Err(anyhow!("block driver is blk but no pci path exists"));
|
||||
}
|
||||
}
|
||||
KATA_SCSI_DEV_TYPE => {
|
||||
if let Some(scsi_addr) = device.config.scsi_addr {
|
||||
scsi_addr.to_string()
|
||||
} else {
|
||||
return Err(anyhow!("block driver is scsi but no scsi address exists"));
|
||||
}
|
||||
}
|
||||
KATA_CCW_DEV_TYPE => {
|
||||
if let Some(ccw_addr) = device.config.ccw_addr {
|
||||
ccw_addr.to_string()
|
||||
|
||||
Reference in New Issue
Block a user