Hello everyone,
I’m encountering a persistent issue while trying to repack Windows ISOs with VirtIO drivers using lxd-imagebuilder. I have successfully performed this process using older versions of lxd-imagebuilder, but the current version fails during the registry injection phase when trying to repack “Windows Server 2019” and “Windows 11” ISOs…
It seems like a compatibility issue between the libwin-hivex-perl library and the modern Windows registry structure (specifically the driver database).
The Error Output:
`PlaintextDEBUG [2025-12-24T14:26:33+03:00] Updating Windows registry hivefile=DRIVERS
reg_import: cannot create \DriverDatabase\DeviceIds\pci\VEN_1AF4&DEV_1000 since parent \DriverDatabase\DeviceIds\pci\ does not exist at /usr/lib/x86_64-linux-gnu/perl5/5.38/Win/Hivex/Regedit.pm line 342.
Error: Failed to modify wim “install.wim”: Failed to modify index 1=Windows Server 2019 SERVERSTANDARDCORE of “install.wim”: Failed to inject drivers: Failed to edit Windows DRIVERS registry: exit status 255`
The tool fails to find the parent path \DriverDatabase\DeviceIds\pci\ in the DRIVERS hive of modern Windows WIM files. I have tried with --disable-overlay and different cache directories, but the result remains the same.
System Information:
- OS: Ubuntu 24.04.3 LTS x86_64
- Kernel: 6.14.0-37-generic
- lxd-imagebuilder version: git-4d08079
- libwin-hivex-perl version: 1.3.23-1build7 (Standard Noble package)
Is this a known limitation of the current Hivex integration in lxd-imagebuilder? Has anyone found a workaround or a specific hivex update that addresses the new Windows registry schema?
Any help or guidance would be greatly appreciated.
Best regards, Serkan