cloud-hypervisor: Add the --cpus option

You guessed it: To specify the number of vcpus.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
Samuel Ortiz
2019-03-11 17:36:27 +01:00
parent 1853b350ee
commit 59b5e53c40
2 changed files with 15 additions and 2 deletions

View File

@@ -168,9 +168,10 @@ pub struct VmConfig<'a> {
}
impl<'a> VmConfig<'a> {
pub fn new(kernel_path: &'a Path) -> Result<Self> {
pub fn new(kernel_path: &'a Path, vcpus: u8) -> Result<Self> {
Ok(VmConfig {
kernel_path,
vcpu_count: vcpus,
..Default::default()
})
}