Seems like the container name is being used for hostname directly or something and a "." breaks things. I wanted to add versioning to my image/container names
$ lxc launch images:ubuntu/trusty/amd64 test
Creating test done.
Starting test done.
$ lxc launch images:ubuntu/trusty/amd64 test123
Creating test123 done.
Starting test123 done.
$ lxc launch images:ubuntu/trusty/amd64 test1.0
Creating test1.0 error: Container name isn't a valid hostname.
That's correct, all container names must be a valid hostname under the most restrictive definition of this, that is, maximum 63 characters, may not contain dots, may not start by a digit or dash, may not end by a dash and must be made entirely of letters, digits or hyphens.
LXD in your case appears to behave exactly as designed, so not a bug.
I may suggest calling your container "test01" instead and incrementing that latter part which is compliant with hostname rules.
Oh and if you want to encode more information in the container, you can use the "user." config namespace.
lxc config set test user.version 1.0
At which point you can list those containers by their version with "lxc list user.version=1.0"
thanks
Most helpful comment
That's correct, all container names must be a valid hostname under the most restrictive definition of this, that is, maximum 63 characters, may not contain dots, may not start by a digit or dash, may not end by a dash and must be made entirely of letters, digits or hyphens.
LXD in your case appears to behave exactly as designed, so not a bug.
I may suggest calling your container "test01" instead and incrementing that latter part which is compliant with hostname rules.