From e82c29536bbf4e6794d5ef012b345f07e89ea956 Mon Sep 17 00:00:00 2001 From: r33drichards Date: Wed, 12 Aug 2026 16:21:13 -0700 Subject: [PATCH] fix(cua-sandbox): boot Windows Fleet sandboxes with UEFI firmware The Fleet cloud transport never set `firmware` on the VM template, so it inherited the Fleet schema default of BIOS (`default_firmware() -> Some(Firmware::Bios)`, libs/fleet/sdk-schema/src/common.rs:70-72). The Windows containerDisk is GPT/UEFI-only, so SeaBIOS has nothing to chainload: the VM boots, prints "Missing operating system", and never opens port 8000, leaving the readiness probe failing forever and warm pools stuck at readyReplicas: 0. Set EFI for Windows guests, keying off the same `os_type == "windows"` signal the local QEMU runtime already uses (runtime/qemu.py:300). Linux guests keep the omitted field and the server-side BIOS default, which is what the working Linux pools already run. Co-Authored-By: Claude Opus 5 (1M context) --- .../cua_sandbox/transport/fleet_cloud.py | 7 +++++++ .../cua-sandbox/tests/test_fleet_cloud_transport.py | 13 +++++++++++++ 2 files changed, 20 insertions(+) diff --git a/libs/python/cua-sandbox/cua_sandbox/transport/fleet_cloud.py b/libs/python/cua-sandbox/cua_sandbox/transport/fleet_cloud.py index 6e27878a84..65586c952b 100644 --- a/libs/python/cua-sandbox/cua_sandbox/transport/fleet_cloud.py +++ b/libs/python/cua-sandbox/cua_sandbox/transport/fleet_cloud.py @@ -34,6 +34,7 @@ CyclopsConfiguration, CyclopsCredentials, CyclopsTokenProviderConfiguration, + Firmware, HttpRequest, OsGymSandboxTemplateSpecBuilder, OsGymSandboxWarmPoolSpecBuilder, @@ -574,6 +575,12 @@ def _template_request(self) -> CreateTemplateRequest: ) .services(services) ) + # Windows guest disks are built UEFI-only (see registry/qemu_builder.py), and the + # Fleet schema defaults firmware to BIOS, so a Windows image left at the default + # boots SeaBIOS against a GPT/ESP disk and never reaches the readiness probe. + # The local QEMU runtime keys off the same os_type check. + if self._image.os_type == "windows": + vm_template_builder = vm_template_builder.firmware(Firmware.EFI) if self._cpu is not None: vm_template_builder = vm_template_builder.cpu_cores(self._cpu) if self._memory_mb is not None: diff --git a/libs/python/cua-sandbox/tests/test_fleet_cloud_transport.py b/libs/python/cua-sandbox/tests/test_fleet_cloud_transport.py index 41e6de8704..87b227741d 100644 --- a/libs/python/cua-sandbox/tests/test_fleet_cloud_transport.py +++ b/libs/python/cua-sandbox/tests/test_fleet_cloud_transport.py @@ -6,6 +6,7 @@ from cua_sandbox.transport import fleet_cloud from cua_sandbox.transport.fleet_cloud import FleetCloudTransport from fleet_sdk import ( + Firmware, OsGymSandboxWarmPoolSpecBuilder, OsGymSandboxWarmPoolStatus, Pool, @@ -88,6 +89,18 @@ def test_default_windows_image_becomes_typed_template_request(): ) +def test_windows_image_boots_uefi(): + request = FleetCloudTransport(image=Image.windows(), name="demo")._template_request() + + assert request.spec.vm_template.firmware == Firmware.EFI + + +def test_linux_image_leaves_firmware_at_the_schema_default(): + request = FleetCloudTransport(image=Image.linux(), name="demo")._template_request() + + assert request.spec.vm_template.firmware is None + + def test_pool_request_uses_the_single_sandbox_name_and_requested_replicas(): request = FleetCloudTransport( image=Image.from_registry("registry.example/workspace@sha256:abc"),