Hi guys
I can not create a container
When trying to download a template, an error occurs with the GPG
LXC node create in cloud VM
Please HELP
lxc-create --logfile ~/log/ubuntu-xenial-create.log --logpriority TRACE -t download -n ubuntu-xenial -- -d ubuntu -r xenial -a amd64
Permission denied - Failed to open ttyPermission denied - Failed to open ttyPermission denied - Failed to open ttySetting up the GPG keyring
ERROR: Unable to fetch GPG key from keyserver
lxc-create: ubuntu-xenial: lxccontainer.c: create_run_template: 1617 Failed to create container from template
lxc-create: ubuntu-xenial: tools/lxc_create.c: main: 327 Failed to create container ubuntu-xenial
Do not working:
lxc-create -t download -n my_lxc – --keyserver hkp://p80.pool.sks-keyservers.net:80
DOWNLOAD_KEYSERVER=“keyserver.ubuntu.com” lxc-create -t download -n test
There are generally two common issues here.
Either you are affected by ipv6 issues when connecting to a particular keyserver, or the key server is swamped with too many requests and your connection fails.
you can’t have IP6 troubles with keyserver.ubuntu.com, this server is IPV4 only (dig keyserver.ubuntu.com AAAA) unless your server is ipv6 only.
Maybe your cloud provider is managing the ports for your VM ? the keyserver port is uncommon (11371), maybe you need to configure it in your panel (if any)
Maybe you could test this with the trick in this page of using ```
– --keyserver hkp://p80.pool.sks-keyservers.net:80
(but this one is IPV6)
ubuntu@mycontainer:~$ sudo lxc-create -t download -n mycontainer -- -d ubuntu -r xenial -a amd64
Setting up the GPG keyring
ERROR: Unable to fetch GPG key from keyserver
lxc-create: mycontainer: lxccontainer.c: create_run_template: 1617 Failed to create container from template
lxc-create: mycontainer: tools/lxc_create.c: main: 327 Failed to create container mycontainer
ubuntu@mycontainer:~$ sudo lxc-create -t download -n mycontainer -- -d ubuntu -r xenial -a amd64 --keyserver hkp://keyserver.ubuntu.com
Setting up the GPG keyring
Downloading the image index
Downloading the rootfs
Downloading the metadata
The image cache is now ready
Unpacking the rootfs
---
You just created an Ubuntu xenial amd64 (20190812_07:42) container.
To enable SSH, run: apt install openssh-server
No default root or user password are set by LXC.
ubuntu@mycontainer:~$
That is, to use the Ubuntu keyserver, use lxc-create as in