diff --git a/lnvps_api/src/api/routes.rs b/lnvps_api/src/api/routes.rs index eec090e..38aa0b8 100644 --- a/lnvps_api/src/api/routes.rs +++ b/lnvps_api/src/api/routes.rs @@ -857,16 +857,14 @@ async fn v1_reinstall_vm( }) .step("import_template_disk", |ctx| { Box::pin(async move { + // import_template_disk already imports AND resizes the primary + // disk to the template size; a separate resize step here would + // ask Proxmox to resize to the same size, which it rejects as a + // disallowed shrink and surfaces as a 500 (see issue #142). info!("Importing template disk for VM {}", ctx.vm_id); ctx.client.import_template_disk(&ctx.info).await }) }) - .step("resize_disk", |ctx| { - Box::pin(async move { - info!("Resizing disk for VM {}", ctx.vm_id); - ctx.client.resize_disk(&ctx.info).await - }) - }) .step("start_vm", |ctx| { Box::pin(async move { info!("Starting VM {} after reinstall", ctx.vm_id);