vmm: Introduce new --balloon parameter

This introduces a new way of defining the virtio-balloon device. Instead
of going through the --memory parameter, the idea is to consider balloon
as a standalone virtio device.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
Sebastien Boeuf
2020-10-14 10:48:50 +02:00
parent ae296d2229
commit 1d479e5e08
3 changed files with 56 additions and 0 deletions

View File

@@ -180,6 +180,13 @@ fn create_app<'a, 'b>(
.default_value(&default_rng)
.group("vm-config"),
)
.arg(
Arg::with_name("balloon")
.long("balloon")
.help(config::BalloonConfig::SYNTAX)
.takes_value(true)
.group("vm-config"),
)
.arg(
Arg::with_name("fs")
.long("fs")
@@ -582,6 +589,7 @@ mod unit_tests {
src: PathBuf::from("/dev/urandom"),
iommu: false,
},
balloon: None,
fs: None,
pmem: None,
serial: ConsoleConfig {