mirror of
https://github.com/edera-dev/krata.git
synced 2025-08-04 13:41:31 +00:00
Add support for reading hypervisor console (#344)
* feature(xencall): add hypervisor SYSCTL_readconsole definitions * feature(hypervisor-dmesg): xencall: add read_console_ring_raw hypercall wrapper * feature(hypervisor-dmesg): protobuf: add ReadHypervisorConsoleRing RPC * feature(hypervisor-dmesg): runtime: add read_hypervisor_console wrapper * feature(hypervisor-dmesg): daemon: add ReadHypervisorConsoleRing rpc implementation * feature(hypervisor-dmesg): ctl: add host hypervisor-messages command to get hypervisor messages * feature(hypervisor-dmesg): cli: rename hypervisor-messages command to hv-console * feature(hypervisor-dmesg): proto: change ReadHypervisorConsoleRing to ReadHypervisorConsole * feature(hypervisor-dmesg): fix up kratactl protobuf calls
This commit is contained in:
@ -28,6 +28,7 @@ use krata::{
|
||||
ReadZoneMetricsReply, ReadZoneMetricsRequest, ResolveZoneIdReply, ResolveZoneIdRequest,
|
||||
SnoopIdmReply, SnoopIdmRequest, UpdateZoneResourcesReply, UpdateZoneResourcesRequest,
|
||||
WatchEventsReply, WatchEventsRequest, ZoneConsoleReply, ZoneConsoleRequest,
|
||||
ReadHypervisorConsoleRequest, ReadHypervisorConsoleReply,
|
||||
},
|
||||
},
|
||||
};
|
||||
@ -710,4 +711,14 @@ impl ControlService for DaemonControlService {
|
||||
.map_err(ApiError::from)?;
|
||||
Ok(Response::new(UpdateZoneResourcesReply {}))
|
||||
}
|
||||
|
||||
async fn read_hypervisor_console(
|
||||
&self,
|
||||
_request: Request<ReadHypervisorConsoleRequest>,
|
||||
) -> Result<Response<ReadHypervisorConsoleReply>, Status> {
|
||||
let data = self.runtime.read_hypervisor_console(false).await.map_err(|error| ApiError {
|
||||
message: error.to_string(),
|
||||
})?;
|
||||
Ok(Response::new(ReadHypervisorConsoleReply { data: data.to_string() }))
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user