Expand description
Host system related APIs for the AxVisor hypervisor.
This module provides APIs for querying information about the host system on which the hypervisor is running.
§Overview
The host system APIs provide essential information about the underlying hardware that the hypervisor needs to manage virtual machines effectively.
§Available APIs
get_host_cpu_num- Get the total number of CPUs in the host system.
§Implementation
To implement these APIs, use the api_impl attribute
macro on an impl block:
ⓘ
struct HostIfImpl;
#[axvisor_api::api_impl]
impl axvisor_api::host::HostIf for HostIfImpl {
fn get_host_cpu_num() -> usize {
// Return the number of CPUs from your platform
4
}
}Traits§
- HostIf
- The API trait for host system functionalities.
Functions§
- get_
host_ cpu_ num - Get the total number of CPUs (logical processors) in the host system.