libvmclient: Take VmCallback in VmInstance::start()
Taking VmCallback from VmInstance::new() has following issues:
- Hard to manage VmInstance and VmCallback together,
becaues VmInstance is available after Callback is instantiated.
- VmCallback is only called after being started.
Bug: 381195543
Test: T/H
Change-Id: I013dce6371156ed298a612582c392a54768c00d6
diff --git a/tests/vmbase_example/src/main.rs b/tests/vmbase_example/src/main.rs
index cbe90d8..d427164 100644
--- a/tests/vmbase_example/src/main.rs
+++ b/tests/vmbase_example/src/main.rs
@@ -115,10 +115,9 @@
/* consoleIn */ None,
Some(log_writer),
/* dump_dt */ None,
- None,
)
.context("Failed to create VM")?;
- vm.start().context("Failed to start VM")?;
+ vm.start(None).context("Failed to start VM")?;
info!("Started example VM.");
// Wait for VM to finish, and check that it shut down cleanly.