vmm: Add support for spawning vhost-user-block backend

If no socket is supplied when enabling "vhost_user=true" on "--disk"
follow the "exe" path in the /proc entry for this process and launch the
network backend (via the vmm_path field.)

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford
2020-02-04 16:44:12 +00:00
parent 4d60ef59bc
commit 1f6cbad01a
2 changed files with 40 additions and 10 deletions
-7
View File
@@ -45,8 +45,6 @@ pub enum Error {
ParseDiskQueueSizeParam(std::num::ParseIntError),
/// Failed to parse vhost parameters
ParseDiskVhostParam(std::str::ParseBoolError),
/// Need a vhost socket
ParseDiskVhostSocketRequired,
/// Failed parsing disk wce parameter.
ParseDiskWceParam(std::str::ParseBoolError),
/// Failed parsing random number generator parameters.
@@ -447,11 +445,6 @@ impl DiskConfig {
wce = wce_str.parse().map_err(Error::ParseDiskWceParam)?;
}
// For now we require a socket if vhost-user is turned on
if vhost_user && vhost_socket.is_none() {
return Err(Error::ParseDiskVhostSocketRequired);
}
Ok(DiskConfig {
path: PathBuf::from(path_str),
readonly: parse_on_off(readonly_str)?,