mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
virtio-balloon: Add memory_actual_size to vm.info to show memory actual size
The virtio-balloon change the memory size is asynchronous. VirtioBalloonConfig.actual of balloon device show current balloon size. This commit add memory_actual_size to vm.info to show memory actual size. Signed-off-by: Hui Zhu <teawater@antfin.com>
This commit is contained in:
@@ -145,6 +145,7 @@ pub type ApiResult<T> = std::result::Result<T, ApiError>;
|
||||
pub struct VmInfo {
|
||||
pub config: Arc<Mutex<VmConfig>>,
|
||||
pub state: VmState,
|
||||
pub memory_actual_size: u64,
|
||||
}
|
||||
|
||||
#[derive(Clone, Deserialize, Serialize)]
|
||||
|
||||
@@ -360,6 +360,9 @@ components:
|
||||
state:
|
||||
type: string
|
||||
enum: [Created, Running, Shutdown, Paused]
|
||||
memory_actual_size:
|
||||
type: integer
|
||||
format: int64
|
||||
description: Virtual Machine information
|
||||
|
||||
VmCounters:
|
||||
|
||||
Reference in New Issue
Block a user