From 90bf8e4842404b59a1b4e81b41ea724b236f3c43 Mon Sep 17 00:00:00 2001 From: Claus Lohmar Date: Thu, 23 Jul 2026 10:52:20 +0000 Subject: [PATCH] fix: remove unused out_dir from submit_job + Copy flow uses legacy fallback MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. submit_job() was creating empty tmp/out/{vmid}/ dirs via the old flat STAGING_OUT path. Removed — _process_job handles this via _staging_out() in the session-aware path. 2. Copy (re-convert) flow was hardcoding boot_type=uefi. Now uses auto_detect_boot=true with boot_type=legacy as fallback, matching the behavior of the original analyze→convert flow. --- backend/provisioner.py | 3 --- frontend/templates/index.html | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/backend/provisioner.py b/backend/provisioner.py index 3e0a6e8..f601a6d 100644 --- a/backend/provisioner.py +++ b/backend/provisioner.py @@ -55,9 +55,6 @@ def submit_job(req: JobSubmissionRequest) -> JobStatusResponse: """Queue a conversion job and start it in a background thread.""" job_id = f"job_{req.vmid}_{int(time.time())}" - out_dir = STAGING_OUT / str(req.vmid) - out_dir.mkdir(parents=True, exist_ok=True) - with _jobs_lock: _jobs[job_id] = { "vmid": req.vmid, diff --git a/frontend/templates/index.html b/frontend/templates/index.html index 4b3592a..d971aa5 100644 --- a/frontend/templates/index.html +++ b/frontend/templates/index.html @@ -418,7 +418,7 @@ async function copyVM(jobId, vmid, sourceFilename) { const diskGb = document.getElementById('copy-disk').value; if (diskGb) payload.append('target_disk_size_gb', diskGb); payload.append('auto_detect_boot', 'true'); - payload.append('boot_type', 'uefi'); + payload.append('boot_type', 'legacy'); payload.append('session_id', window.VM_BENCH_SID || ''); try { const resp = await fetch('/session/confirm', { method: 'POST', body: payload });