Function vboxhelper::wait_for_state
source · [−]pub fn wait_for_state(
vid: &VmId,
state: VmState,
max_rechecks: usize,
recheck_delay: Duration
) -> Result<(), Error>
Expand description
Wait for a virtual machine to enter an expected state.
use std::time::Duration;
use vboxhelper::{wait_for_state, VmId, VmState};
let vmid = VmId::from("myvm");
let max_rechecks = 4;
let four_seconds = Duration::new(4, 0);
wait_for_state(&vmid, VmState::Running, max_rechecks, four_seconds);