Imagebuilder inside a LXD VM

Hello,

I’m attempting to create a windows ISO for LXD following the guide.

I dont wish to install imagebuilder (and its dependencies in my host) so naturally i wish to do this inside a LXD vm (24.04) (host is 24.04 as well).

Image builder seems unable to mount the windows iso inside of the LXD VM, Can someone either a) point me to somewhere that reputable LXD windows iso’s exist , or b) help me figure out how to run imagebuilder inside of my lxd VM (happy to switch to a different VM OS version if helpful)

root@throwaway:/home/ubuntu/Downloads# sudo lxd-imagebuilder repack-windows Win10_22H2_English_x64v1.iso win10.lxd.iso
INFO   [2025-04-25T19:37:59Z] Mounting Windows ISO to dir: "/var/cache/lxd-imagebuilder.242143783/source" 
mount: /var/cache/lxd-imagebuilder.242143783/source: mount failed: No such file or directory.
Error: Failed to mount "Win10_22H2_English_x64v1.iso" at "/var/cache/lxd-imagebuilder.242143783/source": exit status 32
ERROR  [2025-04-25T19:37:59Z] Failed running imagebuilder                   err="Failed to mount \"Win10_22H2_English_x64v1.iso\" at \"/var/cache/lxd-imagebuilder.242143783/source\": exit status 32"
INFO   [2025-04-25T19:37:59Z] Removing cache directory

Hi @sillysalamander

Please can you show the output of lxc config show <instance> --expanded just to confirm that this is a LXD VM rather than a LXD container.

As the mount syscall is restricted in LXD containers by default.

We have some more info on creating Windows ISOs here too:

https://canonical-lxd-imagebuilder.readthedocs-hosted.com/en/latest/tutorials/use/#repack-windows-iso

Site with Windows 10 with the right format for adjustments: https://www.microsoft.com/en-ca/software-download/windows10ISO

Thanks All! A kind soul (@egelinas ) send me a Windows LXD iso and I was able to get that setup by following the information on the page you linked to @tomp Thanks all!

2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.