I’m facing a strange behavior when creating images remotely from a running container using Packer and normal commands.
My scenario as follows:
- add remote lxd server using
lxc remote add dev ...
- launch an image on the remote server using
lxc launch <image> dev:c1
- stop remote container 'lxc stop dev:c1`
- publish an image from the stopped container
lxc publish dev:c1 --alias c1-image
- image is created without an alias
- delete the stopped container
What happens is that the image is deleted automatically once the container is deleted in step 6
Also the image was created without an alias although it was defined in the command. This behavior happens only when using remote instance through https, but it works fine with local socket.
I’m using 3.21 on my arch linux and 3.0.3 on remote ubuntu 18.04, I tried updating to the latest snap 3.21 using candidate channel but also it didn’t work.
This issue raised when I was trying Packer lxd builder module to create some containers remotely on dev server as a backup to mine.