pub struct GuestLifecycleSynchronousProxy { /* private fields */ }
Implementations§
Source§impl GuestLifecycleSynchronousProxy
impl GuestLifecycleSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<GuestLifecycleEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<GuestLifecycleEvent, Error>
Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.
Sourcepub fn create(
&self,
guest_config: GuestConfig,
___deadline: MonotonicInstant,
) -> Result<GuestLifecycleCreateResult, Error>
pub fn create( &self, guest_config: GuestConfig, ___deadline: MonotonicInstant, ) -> Result<GuestLifecycleCreateResult, Error>
Create a VMM configured with the provided config. This instantiates all devices and loads the kernel without starting the VCPU or device dispatch loops.
Possible errors: - ALREADY_RUNNING: A VMM instance is already running, and must be stopped before being recreated.
All other errors are related to VMM initialization.
Sourcepub fn bind(&self, guest: ServerEnd<GuestMarker>) -> Result<(), Error>
pub fn bind(&self, guest: ServerEnd<GuestMarker>) -> Result<(), Error>
Binds to the Guest protocol for an initialized guest.
This operation must be called between Create
and Stop
, otherwise the provided channel
will be immediately closed.
Sourcepub fn run(
&self,
___deadline: MonotonicInstant,
) -> Result<GuestLifecycleRunResult, Error>
pub fn run( &self, ___deadline: MonotonicInstant, ) -> Result<GuestLifecycleRunResult, Error>
Start the primary VCPU and any dispatch loop. This will not return until the VMM stops running. On a clean shutdown (either guest or client initiated) this will return success.
Possible errors: - ALREADY_RUNING: The VMM has already been started. - NOT_CREATED: Run was called before the VMM was created. - CONTROLLER_FORCED_HALT: Stop was called on a running VMM. - VCPU_START_FAILURE: Failed to start the primary VCPU. - VCPU_RUNTIME_FAILURE: A VCPU encountered a fatal error while running the guest.
Trait Implementations§
Source§impl SynchronousProxy for GuestLifecycleSynchronousProxy
impl SynchronousProxy for GuestLifecycleSynchronousProxy
Source§type Proxy = GuestLifecycleProxy
type Proxy = GuestLifecycleProxy
Source§type Protocol = GuestLifecycleMarker
type Protocol = GuestLifecycleMarker
Proxy
controls.