Ubuntu Support Template
Ubuntu Version:
22.04.4 LTS
Desktop Environment (if applicable):
na
Problem Description:
After calling lxd-imagebuilder on my custom Windows image I get error:
Error: Failed to generate ISO: exit status 255
I have a Windows 2025 Server image that I have captured using Windows ADK and WinPE. I can install this image using Hyper-V and VMWare. I would like to use LXD hosted on Ubuntu.
When I try to repack my custom iso with command:
sudo lxd-imagebuilder repack-windows my_custom.iso my_custom_packed.iso --windows-arch=amd64 --windows-version=2k22
I get error:
Error: Failed to generate ISO: exit status 255
(full output below)
Relevant System Information:
lxd-imagebuilder version 3.0
Screenshots or Error Messages:
thisisme@thisisme-VMware20-1:~$ sudo lxd-imagebuilder repack-windows my_custom.iso my_custom_packed.iso --windows-arch=amd64 --windows-version=2k22
INFO [2026-03-30T11:18:54+11:00] Mounting Windows ISO to dir: “/var/cache/lxd-imagebuilder.1452375362/source”
INFO [2026-03-30T11:18:54+11:00] Mounting driver ISO to dir “/var/cache/lxd-imagebuilder.1452375362/drivers”
INFO [2026-03-30T11:18:55+11:00] Mounting idx=“1:Microsoft Windows PE (amd64)” wim=boot.wim
INFO [2026-03-30T11:18:55+11:00] Modifying idx=“1:Microsoft Windows PE (amd64)” wim=boot.wim
INFO [2026-03-30T11:18:55+11:00] Unmounting idx=“1:Microsoft Windows PE (amd64)” wim=boot.wim
Committing changes to /var/cache/lxd-imagebuilder.1452375362/overlay/sources/boot.wim (image 1)
Using LZX compression with 16 threads
Archiving file data: 19 MiB of 19 MiB (100%) done
INFO [2026-03-30T11:19:00+11:00] Mounting idx=“1:My Custom Install” wim=install.wim
INFO [2026-03-30T11:19:00+11:00] Modifying idx=“1:My Custom Install” wim=install.wim
INFO [2026-03-30T11:19:02+11:00] Unmounting idx=“1:My Custom Install” wim=install.wim
Committing changes to /var/cache/lxd-imagebuilder.1452375362/overlay/sources/install.wim (image 1)
Using LZX compression with 16 threads
Archiving file data: 119 MiB of 119 MiB (100%) done
Calculating integrity table for WIM: 17 GiB of 17 GiB (100%) done
INFO [2026-03-30T11:21:01+11:00] Generating new ISO
INFO [2026-03-30T11:21:01+11:00] Umount dir “/var/cache/lxd-imagebuilder.1452375362/drivers” dir=/var/cache/lxd-imagebuilder.1452375362/drivers
INFO [2026-03-30T11:21:01+11:00] Umount dir “/var/cache/lxd-imagebuilder.1452375362/source” dir=/var/cache/lxd-imagebuilder.1452375362/source
Error: Failed to generate ISO: exit status 255
ERROR [2026-03-30T11:21:02+11:00] Failed running imagebuilder err=“Failed to generate ISO: exit status 255”
INFO [2026-03-30T11:21:02+11:00] Removing cache directory
What I’ve Tried:
I have tried injecting the drivers directly into my install.wim and boot.wim from virtio without success
Dism /Image:$winPEMount /Add-Driver /Driver:"$virtioPath” /Recurse /ForceUnsigned
Before Posting:
By the look of things no one has had this issue before