mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vmm: Add virtio-fs support to the VMM
The user can now share some files and directories with the guest by providing the corresponding vhost-user socket. The virtiofsd daemon should be started by the user before to start the VM. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
committed by
Samuel Ortiz
parent
1ddc8f2f0d
commit
2ede30b6d3
15
src/main.rs
15
src/main.rs
@@ -63,6 +63,16 @@ fn main() {
|
||||
.help("Path to entropy source")
|
||||
.default_value(config::DEFAULT_RNG_SOURCE),
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("fs")
|
||||
.long("fs")
|
||||
.help(
|
||||
"virtio-fs parameters \"tag=<tag_name>,\
|
||||
sock=<socket_path>,num_queues=<number_of_queues>,\
|
||||
queue_size=<size_of_each_queue>\"",
|
||||
)
|
||||
.takes_value(true),
|
||||
)
|
||||
.get_matches();
|
||||
|
||||
// These .unwrap()s cannot fail as there is a default value defined
|
||||
@@ -85,14 +95,17 @@ fn main() {
|
||||
// This .unwrap() cannot fail as there is a default value defined
|
||||
let rng = cmd_arguments.value_of("rng").unwrap();
|
||||
|
||||
let fs = cmd_arguments.value_of("fs");
|
||||
|
||||
let vm_config = match config::VmConfig::parse(config::VmParams {
|
||||
cpus,
|
||||
memory,
|
||||
kernel,
|
||||
cmdline,
|
||||
disks,
|
||||
rng,
|
||||
net,
|
||||
rng,
|
||||
fs,
|
||||
}) {
|
||||
Ok(config) => config,
|
||||
Err(e) => {
|
||||
|
||||
Reference in New Issue
Block a user