mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vmm: disk resize infrastructure
Add basic infrastructure so resize events are propagated to the underlying disk implementation. On-behalf-of: SAP thomas.prescher@sap.com Signed-off-by: Thomas Prescher <thomas.prescher@cyberus-technology.de>
This commit is contained in:
committed by
Rob Bradford
parent
8e52bf251b
commit
37d71fa038
@@ -1962,6 +1962,16 @@ impl RequestHandler for Vmm {
|
||||
}
|
||||
}
|
||||
|
||||
fn vm_resize_disk(&mut self, id: String, desired_size: u64) -> result::Result<(), VmError> {
|
||||
self.vm_config.as_ref().ok_or(VmError::VmNotCreated)?;
|
||||
|
||||
if let Some(ref mut vm) = self.vm {
|
||||
return vm.resize_disk(&id, desired_size);
|
||||
}
|
||||
|
||||
Err(VmError::ResizeDisk)
|
||||
}
|
||||
|
||||
fn vm_resize_zone(&mut self, id: String, desired_ram: u64) -> result::Result<(), VmError> {
|
||||
self.vm_config.as_ref().ok_or(VmError::VmNotCreated)?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user