steps to configure a remote and operations you can perform with a remote.
Generate a Trust Token (if required):
lxc config trust add
Add the Remote Server:
lxc remote add
command to add the remote server. Replace <remote_name>
with a name for the remote and <server_address>
with the IP address or hostname of the remote server:
lxc remote add <remote_name> <server_address>:<port>
lxc remote add syhydsrv001 172.21.0.20:7443
Verify the Certificate Fingerprint:
y
or entering the fingerprint manually.Authenticate Using the Trust Token:
Trust token for syhydsrv001: <paste_trust_token_here>
Verify the Remote is Added:
lxc remote list
Set the Default Remote (Optional):
lxc remote switch <remote_name>
Once the remote is configured, you can perform a variety of operations to manage containers, images, and configurations across multiple LXD servers. Below are some common operations:
lxc copy <source_remote>:<container_name> <destination_remote>:<new_container_name>
lxc copy local:pssb1alxc001 syhydsrv001:pssb1alxc002
lxc launch <remote_name>:<image_alias> <container_name>
lxc launch syhydsrv001:tech-stacked-pssb-image pssb1alxc003
lxc list <remote_name>:
lxc list syhydsrv001:
lxc snapshot <remote_name>:<container_name> <snapshot_name>
lxc copy <source_remote>:<container_name>/<snapshot_name> <destination_remote>:<new_container_name>
lxc publish <remote_name>:<container_name> --alias <image_alias>
lxc publish syhydsrv001:pssb1alxc001 --alias tech-stacked-pssb-image
lxc image copy <source_remote>:<image_alias> <destination_remote>: --copy-aliases
lxc image copy syhydsrv001:tech-stacked-pssb-image local: --copy-aliases
lxc exec <remote_name>:<container_name> -- <command>
lxc exec syhydsrv001:pssb1alxc001 -- apt update
lxc storage list <remote_name>:
lxc network list <remote_name>:
lxc remote remove <remote_name>
lxc remote remove syhydsrv001
By following the steps above, you can configure and utilize remotes in LXD effectively. Let me know if you need further clarification or additional examples!