runtime-rs: add launch of a simple qemu process to start_vm()

The point here is just to get a simplest Kata VM running.

Signed-off-by: Pavel Mores <pmores@redhat.com>
This commit is contained in:
Pavel Mores 2022-11-15 19:30:02 +01:00
parent 2f6d0d408b
commit eb8c9d38ff

View File

@ -33,6 +33,23 @@ impl QemuInner {
pub(crate) async fn start_vm(&mut self, _timeout: i32) -> Result<()> {
info!(sl!(), "Starting QEMU VM");
let mut command = std::process::Command::new(&self.config.path);
command
.arg("-kernel")
.arg(&self.config.boot_info.kernel)
.arg("-m")
.arg(format!("{}M", &self.config.memory_info.default_memory))
.arg("-initrd")
.arg(&self.config.boot_info.initrd)
.arg("-vga")
.arg("none")
.arg("-nodefaults")
.arg("-nographic");
command.spawn()?;
Ok(())
}