pub struct Drive {
pub drive_id: String,
pub partuuid: Option<String>,
pub is_root_device: bool,
pub cache_type: Option<CacheType>,
pub is_read_only: bool,
pub path_on_host: PathBuf,
pub rate_limiter: Option<RateLimiter>,
pub io_engine: Option<IoEngine>,
pub socket: Option<PathBuf>,
}
Fieldsยง
ยงdrive_id: String
drive id Required: true
partuuid: Option<String>
partuuid Represents the unique id of the boot partition of this device. It is optional and it will be taken into account only if the is_root_device field is true.
is_root_device: bool
is root device Required: true
cache_type: Option<CacheType>
cache type Represents the caching strategy for the block device.
is_read_only: bool
VirtioBlock specific parameters: Is block read only. This field is required for virtio-block config and should be omitted for vhost-user-block configuration. Required: true
path_on_host: PathBuf
VirtioBlock specific parameters: Host level path for the guest drive. This field is required for virtio-block config and should be omitted for vhost-user-block configuration. Required: true
rate_limiter: Option<RateLimiter>
VirtioBlock specific parameters: rate limiter
io_engine: Option<IoEngine>
VirtioBlock specific parameters: Type of the IO engine used by the device. โAsyncโ is supported on host kernels newer than 5.10.51. This field is optional for virtio-block config and should be omitted for vhost-user-block configuration.
socket: Option<PathBuf>
VhostUserBlock specific parameters Path to the socket of vhost-user-block backend. This field is required for vhost-user-block config should be omitted for virtio-block configuration.