Failed to repack Windows 20212R2 iso

I’m trying to repack a Win2012R2 server image but I’m ending up with this error:

distrobuilder repack-windows Win_2012R2.iso Win_2012R2-incus.iso --windows-version 2k12 --windows-arch amd64

ERROR: Failed to unmount "/var/cache/distrobuilder.3988495118/wim"
ERROR: Exiting with error code 47:
       Failed to open a file.
Discarding changes to /var/cache/distrobuilder.3988495118/overlay/sources/install.wim (image 1)
        (Use --commit to keep changes.)
Error: Failed to modify index 1 of "install.wim": Failed to unmount WIM image: exit status 47
ERROR  [2023-12-17T18:20:59Z] Failed running distrobuilder                  err="Failed to modify index 1 of \"install.wim\": Failed to unmount WIM image: exit status 47"
INFO   [2023-12-17T18:20:59Z] Removing cache directory

Any suggestions on how to fix this?

Thanks

@monstermunchkin any suggestions?

I don’t think I’ve ever played with a Windows 2012R2 image. I did some repacking of Win11 and Win2019 this week without an issue though.