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:
@@ -1991,12 +1991,10 @@ def _winbuild_vmx_lines(
|
|||||||
'ethernet0.addressType = "generated"',
|
'ethernet0.addressType = "generated"',
|
||||||
'ethernet0.startConnected = "TRUE"',
|
'ethernet0.startConnected = "TRUE"',
|
||||||
'ethernet0.pciSlotNumber = "192"',
|
'ethernet0.pciSlotNumber = "192"',
|
||||||
'usb.present = "TRUE"',
|
# No USB controllers: a headless CI build VM has no USB devices; input is
|
||||||
'usb.pciSlotNumber = "34"',
|
# the VMware PS/2 keyboard/mouse + SVGA console. Omitting usb/ehci/xhci
|
||||||
'ehci.present = "TRUE"',
|
# trims device enumeration at boot. (Step 9 still strips any usb* line.)
|
||||||
'ehci.pciSlotNumber = "35"',
|
'usb.present = "FALSE"',
|
||||||
'usb_xhci.present = "TRUE"',
|
|
||||||
'usb_xhci.pciSlotNumber = "33"',
|
|
||||||
'svga.present = "TRUE"',
|
'svga.present = "TRUE"',
|
||||||
'svga.graphicsMemoryKB = "262144"',
|
'svga.graphicsMemoryKB = "262144"',
|
||||||
'floppy0.present = "FALSE"',
|
'floppy0.present = "FALSE"',
|
||||||
|
|||||||
@@ -40,6 +40,9 @@ def test_winbuild_vmx_lines() -> None:
|
|||||||
assert 'sata0:1.fileName = "/iso/tools.iso"' in text
|
assert 'sata0:1.fileName = "/iso/tools.iso"' in text
|
||||||
assert 'ethernet0.virtualDev = "e1000e"' in text
|
assert 'ethernet0.virtualDev = "e1000e"' in text
|
||||||
assert 'nvme0:0.fileName = "WinBuild2025.vmdk"' 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:
|
def test_remove_vmx_lines(tmp_path: Path) -> None:
|
||||||
|
|||||||
Reference in New Issue
Block a user