OnWorks Linux and Windows Online WorkStations

Logo

Free Hosting Online for WorkStations

< Previous | Contents | Next >

6.2.1. Basic privileged usage


To create a privileged container, you can simply do:



sudo lxc-create --template download --name u1


or, abbreviated


sudo lxc-create -t download -n u1


This will interactively ask for a container root filesystem type to download - in particular the distribution, release, and architecture. To create the container non-interactively, you can specify these values on the command line:


sudo lxc-create -t download -n u1 -- --dist ubuntu --release bionic --arch amd64


or


sudo lxc-create -t download -n u1 -- -d ubuntu -r bionic -a amd64


You can now use lxc-ls to list containers, lxc-info to obtain detailed container information, lxc-start to start and lxc-stop to stop the container. lxc-attach and lxc-console allow you to enter a container, if ssh is not an option. lxc-destroy removes the container, including its rootfs. See the manual pages for more information on each command. An example session might look like:


sudo lxc-ls --fancy

sudo lxc-start --name u1 --daemon sudo lxc-info --name u1

sudo lxc-stop --name u1 sudo lxc-destroy --name u1


Top OS Cloud Computing at OnWorks: