Lxd remote launching getting failed

Hello @stgraber ,
Hope you are doing good ,

i am facing a problem while launching a container remotely with my custom image ,
one server is on GCP and one server is on AWS , and from GCP host node i am trying to launch a container on AWS instance but it is not launching facing following error

command :
lxc launch testimage aws:firstcontainer

Error: Failed instance creation:

This may be because of the use of NAT in AWS and GCP, such that the source host doesn’t know the external IP that can be used to reach it from the remote host.

Sounds similar to Failed to connect to LXD server

yes my colleague also posted this issue can you please brief what is the way around now ,
is it possible to launch container remotely in this scenario ?
or i am also thinking about if images should made public so it would be easy to launch , can you please guide how to make your images public ?

i was looking around for guides to make my own LXD image server but guides were unclear
so can you please brief or suggest some nice tricks here would be very appreciated

@stgraber is there a recommended work around for this situation, such as adding hints for the source’s external IP somehow, or perhaps a push mode when deploying an instance from a remote image?

You could do this as a workaround though, export the image to a file lxc image export <fingerprint> <file>, transfer it to the remote machine, and then import it lxc image import <file>.

Then you can launch an instance using the local image.

lxc image copy supports --mode so you could transfer the image ahead of time using --mode=relay.

1 Like

Ah excellent thanks, that would help.

As an aside, I noticed that doing lxc image export <fingerprint> image.tar.gz for an image downloaded from the official image servers would export 2 files (image.tar.gz and image.tar.gz.root), which was then unimportable using lxc image import. Perhaps we should prevent exporting of those type of images?

lxc image import supports importing split images, just always feed the metadata tarball (small file) before the root tarball.

1 Like

Thanks for your feedbacks @stgraber and @tomp
can you please explain me easy words that how should I launch container remotely in this scenario as i am not that much nerd though :slight_smile:

lxc copy command is for container i think but can we launch container remotely ?

lxc image copy local:stg_v0.22 linode: --mode=relay

i ran this command to copy a local image from GCP hostnode to Linode hostnode i got following error
Error: not found

why not found error this image exists on gcp hostnode which i am trying to copy

@stgraber apologies for bugging you again and again
please help me i am stuck at this point

This is odd, can you pass --debug?