mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
main, vmm: add --initramfs cli option
currently unused, the initramfs argument is added to the cli, and stored in vmm::config:VmConfig as an Option(InitramfsConfig(PathBuf)) Signed-off-by: Damjan Georgievski <gdamjan@gmail.com>
This commit is contained in:
committed by
Sebastien Boeuf
parent
0ce7de3ef5
commit
4db252b418
11
src/main.rs
11
src/main.rs
@@ -113,6 +113,13 @@ fn create_app<'a, 'b>(
|
||||
.takes_value(true)
|
||||
.group("vm-config"),
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("initramfs")
|
||||
.long("initramfs")
|
||||
.help("Path to initramfs image")
|
||||
.takes_value(true)
|
||||
.group("vm-config"),
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("cmdline")
|
||||
.long("cmdline")
|
||||
@@ -273,11 +280,12 @@ fn start_vmm(cmd_arguments: ArgMatches) {
|
||||
|
||||
println!(
|
||||
"Cloud Hypervisor Guest\n\tAPI server: {}\n\tvCPUs: {}\n\tMemory: {} MB\n\tKernel: \
|
||||
{:?}\n\tKernel cmdline: {}\n\tDisk(s): {:?}",
|
||||
{:?}\n\tInitramfs: {:?}\n\tKernel cmdline: {}\n\tDisk(s): {:?}",
|
||||
api_socket_path,
|
||||
vm_config.cpus.boot_vcpus,
|
||||
vm_config.memory.size >> 20,
|
||||
vm_config.kernel,
|
||||
vm_config.initramfs,
|
||||
vm_config.cmdline.args.as_str(),
|
||||
vm_config.disks,
|
||||
);
|
||||
@@ -477,6 +485,7 @@ mod unit_tests {
|
||||
hotplug_size: None,
|
||||
},
|
||||
kernel: None,
|
||||
initramfs: None,
|
||||
cmdline: CmdlineConfig {
|
||||
args: String::from(""),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user