From 32d753df3ec9e91e6e44cde539919aaf3300de7a Mon Sep 17 00:00:00 2001 From: Simone Date: Mon, 8 Jun 2026 23:36:29 +0200 Subject: [PATCH] feat(deploy-win): build the VMX without USB controllers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A headless CI build VM has no USB devices — input is the VMware PS/2 keyboard/mouse + SVGA console. Drop the usb/ehci/usb_xhci controllers from the generated VMX (one explicit `usb.present = "FALSE"`), trimming device enumeration at boot. Step 9's usb* line stripping becomes a harmless no-op. --- src/ci_orchestrator/commands/template.py | 10 ++++------ tests/python/test_commands_deploy_win.py | 3 +++ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/ci_orchestrator/commands/template.py b/src/ci_orchestrator/commands/template.py index a7152ac..77e54af 100644 --- a/src/ci_orchestrator/commands/template.py +++ b/src/ci_orchestrator/commands/template.py @@ -1991,12 +1991,10 @@ def _winbuild_vmx_lines( 'ethernet0.addressType = "generated"', 'ethernet0.startConnected = "TRUE"', 'ethernet0.pciSlotNumber = "192"', - 'usb.present = "TRUE"', - 'usb.pciSlotNumber = "34"', - 'ehci.present = "TRUE"', - 'ehci.pciSlotNumber = "35"', - 'usb_xhci.present = "TRUE"', - 'usb_xhci.pciSlotNumber = "33"', + # No USB controllers: a headless CI build VM has no USB devices; input is + # the VMware PS/2 keyboard/mouse + SVGA console. Omitting usb/ehci/xhci + # trims device enumeration at boot. (Step 9 still strips any usb* line.) + 'usb.present = "FALSE"', 'svga.present = "TRUE"', 'svga.graphicsMemoryKB = "262144"', 'floppy0.present = "FALSE"', diff --git a/tests/python/test_commands_deploy_win.py b/tests/python/test_commands_deploy_win.py index e2f4143..6e6dc77 100644 --- a/tests/python/test_commands_deploy_win.py +++ b/tests/python/test_commands_deploy_win.py @@ -40,6 +40,9 @@ def test_winbuild_vmx_lines() -> None: assert 'sata0:1.fileName = "/iso/tools.iso"' in text assert 'ethernet0.virtualDev = "e1000e"' in text assert 'nvme0:0.fileName = "WinBuild2025.vmdk"' in text + # No USB controllers on a headless CI build VM. + assert 'usb.present = "FALSE"' in text + assert "usb_xhci" not in text and 'ehci.present = "TRUE"' not in text def test_remove_vmx_lines(tmp_path: Path) -> None: