I try to add a remote lxd but get a tls error:
root@lxd01:/var/snap/lxd/common/lxd$ lxc remote add test https://test.mycompany.com:8443 --debug
DEBUG [2023-07-06T12:12:55Z] Connecting to a remote LXD over HTTPS url="https://test.mycompany.com:8443"
DEBUG [2023-07-06T12:12:55Z] Sending request to LXD etag= method=GET url="https://test.mycompany.com:8443/1.0"
Certificate fingerprint: d58cb2b8b2bfe84824bc9092e80413300ec26437718703e6da6dffe9478af996
ok (y/n/[fingerprint])? yes
DEBUG [2023-07-06T12:13:07Z] Connecting to a remote LXD over HTTPS url="https://test.mycompany.com:8443"
DEBUG [2023-07-06T12:13:07Z] Sending request to LXD etag= method=GET url="https://test.mycompany.com:8443/1.0"
Error: Get "https://test.mycompany.com:8443/1.0": tls: failed to verify certificate: x509: certificate is valid for lxd07, not test.mycompany.com
On both sides lxd 5.15.
From another system also running lxd 5.15 I can add the same remote url without any problems.
Does anyone have an idea how to work around the problem?
s. also https://discuss.linuxcontainers.org/t/additional-host-names-for-lxd-server-certificate/