Skip to content

Support for LXD remotes / migration of instances to remotes #1458

@vosdev

Description

@vosdev

The UI currently has no support for remotes. (LXD remotes, not simplestreams like requested in #410)

I understand that completely managing a remote like requested in #632 is too much work and simply opening the UI of the remote would be easier. I'm only requesting the configuration of remotes and migration of instances between.

lxc remote ls
+----------------------+---------------------------------------------------+---------------+-------------+--------+--------+--------+
|         NAME         |                        URL                        |   PROTOCOL    |  AUTH TYPE  | PUBLIC | STATIC | GLOBAL |
+----------------------+---------------------------------------------------+---------------+-------------+--------+--------+--------+
| cloud                | https://192.168.3.61:8443                         | lxd           | tls         | NO     | NO     | NO     |
+----------------------+---------------------------------------------------+---------------+-------------+--------+--------+--------+
| images               | https://images.lxd.canonical.com                  | simplestreams | none        | YES    | YES    | NO     |
+----------------------+---------------------------------------------------+---------------+-------------+--------+--------+--------+
| local (current)      | unix://                                           | lxd           | file access | NO     | YES    | NO     |
+----------------------+---------------------------------------------------+---------------+-------------+--------+--------+--------+
| ubuntu               | https://cloud-images.ubuntu.com/releases/         | simplestreams | none        | YES    | YES    | NO     |
+----------------------+---------------------------------------------------+---------------+-------------+--------+--------+--------+
| ubuntu-daily         | https://cloud-images.ubuntu.com/daily/            | simplestreams | none        | YES    | YES    | NO     |
+----------------------+---------------------------------------------------+---------------+-------------+--------+--------+--------+
| ubuntu-minimal       | https://cloud-images.ubuntu.com/minimal/releases/ | simplestreams | none        | YES    | YES    | NO     |
+----------------------+---------------------------------------------------+---------------+-------------+--------+--------+--------+
| ubuntu-minimal-daily | https://cloud-images.ubuntu.com/minimal/daily/    | simplestreams | none        | YES    | YES    | NO     |
+----------------------+---------------------------------------------------+---------------+-------------+--------+--------+--------+

Trust

I would like to request the feature to be able to add/configure remotes in the UI so that we can migrate instances between separate lxd nodes/clusters like we can through the CLI.

lxc remote add [<remote>] <IP|FQDN|URL|token> [flags]

Trust identities

The creation of identities is already present in the UI, but the identity I created in the UI did not work for a remote trust.

Through the CLI I executed on my LXD cluster

lxc config trust add
<enter name>
<outputs a generated  token>

I was able to add a remote on my standalone node like so: lxc remote add cloud <token generated via cli on LXD cluster> and it worked.

Then I tried to replicate these steps with what is available in the UI, so I created a TLS trust identity through the UI. I entered a name and clicked Create Identity. I copied the token and tried to replicate my steps lxc remote add cloud2 <token generated via UI on LXD cluster> and it gets rejected with a Error: Identity name must be provided

inspecting the identities (lxc auth identity show <name>) I see that the CLI generated identity has a tls_certificate and the UI does not. The identity created through the CLI shows up under lxc config trust ls and the UI identity does not.

Migration

The main goal of this feature request is the ability to migrate instances to other remotes

Example of moving my instance test/bla to my cloud remote lxd cluster as default/bla, (Optionally removing the profiles because the target doesn't match the profiles of my standalone lxd node):

lxc move bla --project test cloud:bla --target-project default --no-profiles
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    EnhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions