ch-remote: support live disk resizing

Support disk resizing via ch-remote and REST api.

On-behalf-of: SAP thomas.prescher@sap.com
Signed-off-by: Thomas Prescher <thomas.prescher@cyberus-technology.de>
This commit is contained in:
Thomas Prescher
2025-11-10 12:49:17 +01:00
committed by Rob Bradford
parent aac240d076
commit 5fb078305a
4 changed files with 94 additions and 3 deletions

View File

@@ -30,7 +30,7 @@ use crate::api::VmCoredump;
use crate::api::{
AddDisk, ApiError, ApiRequest, VmAddDevice, VmAddFs, VmAddNet, VmAddPmem, VmAddUserDevice,
VmAddVdpa, VmAddVsock, VmBoot, VmCounters, VmDelete, VmNmi, VmPause, VmPowerButton, VmReboot,
VmReceiveMigration, VmRemoveDevice, VmResize, VmResizeZone, VmRestore, VmResume,
VmReceiveMigration, VmRemoveDevice, VmResize, VmResizeDisk, VmResizeZone, VmRestore, VmResume,
VmSendMigration, VmShutdown, VmSnapshot,
};
use crate::landlock::Landlock;
@@ -251,6 +251,10 @@ pub static HTTP_ROUTES: LazyLock<HttpRoutes> = LazyLock::new(|| {
endpoint!("/vm.resize"),
Box::new(VmActionHandler::new(&VmResize)),
);
r.routes.insert(
endpoint!("/vm.resize-disk"),
Box::new(VmActionHandler::new(&VmResizeDisk)),
);
r.routes.insert(
endpoint!("/vm.resize-zone"),
Box::new(VmActionHandler::new(&VmResizeZone)),