pub enum GuestLifecycleRequest {
Create {
guest_config: GuestConfig,
responder: GuestLifecycleCreateResponder,
},
Bind {
guest: ServerEnd<GuestMarker>,
control_handle: GuestLifecycleControlHandle,
},
Run {
responder: GuestLifecycleRunResponder,
},
Stop {
responder: GuestLifecycleStopResponder,
},
}
Expand description
The guest control plane allowing for creating, starting, and stopping the guest.
Variants§
Create
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.
Bind
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.
Run
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.
Fields
responder: GuestLifecycleRunResponder
Stop
Stop a running VMM. Returns once the dispatch loops have stopped. After Stop returns, Create and then Run can be called again.
Fields
responder: GuestLifecycleStopResponder
Implementations§
Source§impl GuestLifecycleRequest
impl GuestLifecycleRequest
pub fn into_create(self) -> Option<(GuestConfig, GuestLifecycleCreateResponder)>
pub fn into_bind( self, ) -> Option<(ServerEnd<GuestMarker>, GuestLifecycleControlHandle)>
pub fn into_run(self) -> Option<GuestLifecycleRunResponder>
pub fn into_stop(self) -> Option<GuestLifecycleStopResponder>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL