mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-28 19:54:35 +00:00
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:
parent
2f6d0d408b
commit
eb8c9d38ff
@ -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(())
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user