S
S
Sanes2016-12-12 00:03:30
System administration
Sanes, 2016-12-12 00:03:30

LXD API create container?

There is only one example of creating a container on all the Internet using the LXD API. And it implies "protocol": "simplestreams", "server": " https://cloud-images.ubuntu.com/daily "

curl -s --unix-socket /var/lib/lxd/unix.socket -X POST -d '{"name": "xenial", "source": {"type": "image", "protocol": "simplestreams", "server": "https://cloud-images.ubuntu.com/daily", "alias": "16.04"}}' a/1.0/containers | jq .

How to add other images? like lxc launch images:alpine/3.3/amd64
from lxc image list images:

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sanes, 2016-12-12
@Sanes

docs.ansible.com/ansible/lxd_container_module.html (source)

{ "type": "image", "mode": "pull", "server": "https://images.linuxcontainers.org", "protocol": "lxd", "alias": "ubuntu/xenial/amd64" }

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question