feat(deploy-win): build the VMX without USB controllers

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.
This commit is contained in:
2026-06-08 23:36:29 +02:00
parent 0df7305841
commit 32d753df3e
2 changed files with 7 additions and 6 deletions
+4 -6
View File
@@ -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"',
+3
View File
@@ -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: