Files
cloud-hypervisor/src/main.rs
Samuel Ortiz a0da3deb5e cloud-hypervisor: Call into the test_vm() routine
test_vm is a dummy VM workload, we use it to test our initial VMM
settings.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2019-05-07 16:06:21 +02:00

37 lines
824 B
Rust

// Copyright © 2019 Intel Corporation
//
// SPDX-License-Identifier: Apache-2.0
//
extern crate vmm;
#[macro_use(crate_version, crate_authors)]
extern crate clap;
use clap::{App, Arg};
use std::path::PathBuf;
fn main() {
let cmd_arguments = App::new("cloud-hypervisor")
.version(crate_version!())
.author(crate_authors!())
.about("Launch a cloud-hypervisor VMM.")
.arg(
Arg::with_name("kernel")
.long("kernel")
.help("Path to kernel image (vmlinux)")
.takes_value(true),
)
.get_matches();
let kernel_path = cmd_arguments
.value_of("kernel")
.map(PathBuf::from)
.expect("Missing argument: kernel");
println!("Booting {:?}...", kernel_path.as_path());
vmm::test_vm()
}