I’m running Ubuntu on VirtualBox (4.15.0-36-generic #39 Ubuntu SMP Mon Sept 24 UTC 2018 x86_64 GNU/Linux). I’m following an Ansible tutorial which uses LXC for containers. I’ve installed LXC 3.0.2 and proceeded to create LXC containers as instructed: lxc-create -t ubuntu -n webX, but received an error:
lxc-create: webX: utils.c: get_template_path: 872 No such file or directory - bad template: ubuntu
lxc-create: webX: lxccontainer.c do_lxcapi_create: 1784 Unknown template “ubuntu”
I’ve searched and discovered that indeed the ubuntu template is not present in the templates directory in my install path (/usr/share/lxc/templates) only have the following templates listed: lxc-busybox, lxc-download, lxc-local and lxc-oci, there is not ubuntu.
The tutorial requires the ubuntu template which my lxc distro does not have. What can I do to fix that?
I could create containers using ‘busybox’ template but when I start it and attach to it, it doesn’t have apt, or apt-get, or ssh… so it’s not sufficient for what i need to do.